diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 659c0b6bb1..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,12 +0,0 @@ -*.md @arnaubennassar -aggregator/ @Mikelle @KonradIT -cmd/ @tclemos -db/ @Mikelle @tclemos -docs/ @arnaubennassar -etherman/ @ARR552 @cool-develope -jsonrpc/ @tclemos @KonradIT -pool/ @Mikelle @tclemos @KonradIT -sequencer/ @Mikelle @ToniRamirezM @KonradIT -state/ @ToniRamirezM @tclemos -synchronizer/ @ARR552 @cool-develope -test/ @tclemos diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index c7c848431c..0000000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Report a bug -about: Something with Polygon zkEVM is not working as expected -title: '' -labels: 'type:bug' -assignees: '' ---- - -#### System information - -zkEVM Node version: `v0.0.X-RCXX` -OS & Version: `Windows/Linux/OSX` -Commit hash : (if `develop`) -Network: `Mainnet/Testnet` - -#### Expected behaviour - - -#### Actual behaviour - - -#### Steps to reproduce the behaviour - - -#### Backtrace - -```` -[backtrace] -```` - -When submitting logs: please submit them as text and not screenshots. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md deleted file mode 100644 index aacd885f9e..0000000000 --- a/.github/ISSUE_TEMPLATE/feature.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Request a feature -about: Report a missing feature - e.g. as a step before submitting a PR -title: '' -labels: 'type:feature' -assignees: '' ---- - -# Rationale - -Why should this feature exist? -What are the use-cases? - -# Implementation - -Do you have ideas regarding the implementation of this feature? -Are you willing to implement this feature? \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 2d06858d17..0000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: Ask a question -about: Something is unclear -title: '' -labels: 'type:question' -assignees: '' ---- - -This should only be used in very rare cases e.g. if you are not 100% sure if something is a bug or asking a question that leads to improving the documentation. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index c9588d5d48..0000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,22 +0,0 @@ -Closes #. - -### What does this PR do? - - - -### Reviewers - -Main reviewers: - - - -- @John -- @Doe - -Codeowner reviewers: - - - -- @Alice -- @Bob \ No newline at end of file diff --git a/.github/workflows/push-docker-develop.yml b/.github/workflows/push-docker-develop.yml index c3a9a69527..1441d0a5a1 100644 --- a/.github/workflows/push-docker-develop.yml +++ b/.github/workflows/push-docker-develop.yml @@ -29,4 +29,4 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - hermeznetwork/zkevm-node:develop + hermeznetwork/cdk-validium-node:develop diff --git a/.github/workflows/push-docker-tagged.yml b/.github/workflows/push-docker-tagged.yml index 402e71e466..4178d3a15d 100644 --- a/.github/workflows/push-docker-tagged.yml +++ b/.github/workflows/push-docker-tagged.yml @@ -30,4 +30,4 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - hermeznetwork/zkevm-node:${{ github.ref_name }} + hermeznetwork/cdk-validium-node:${{ github.ref_name }} diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 94159cc09e..0c2b38dab3 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -17,7 +17,7 @@ jobs: matrix: go-version: [ 1.19.x ] goarch: [ "amd64" ] - e2e-group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ] + e2e-group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, cdk-validium-1 ] runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/.github/workflows/test-from-prover.yml b/.github/workflows/test-from-prover.yml deleted file mode 100644 index ca917668a4..0000000000 --- a/.github/workflows/test-from-prover.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Test from zkevm-prover call -on: - workflow_call: - inputs: - prover_image: - required: true - type: string - secrets: - DOCKERHUB_USERNAME: - required: true - DOCKERHUB_TOKEN: - required: true - -jobs: - test-from-prover: - runs-on: [self-hosted, linux, X64, hc] - - strategy: - matrix: - go-version: [ 1.19.x ] - goarch: [ "amd64" ] - e2e-group: [ 2 ] - - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - repository: 0xPolygonHermez/zkevm-node - - - name: Install Go - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go-version }} - env: - GOARCH: ${{ matrix.goarch }} - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build Docker - run: make build-docker - - - name: Compile SCs - run: make compile-scs - working-directory: test - - - name: Test - run: make test-full-non-e2e - working-directory: test diff --git a/.gitignore b/.gitignore index 4907cd4699..fa90330439 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,6 @@ .env out.dat -cmd/__debug_bin +**__debug_bin .venv \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 69829d3151..b84829a84e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,7 @@ RUN cd /src && 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 +COPY --from=build /src/dist/cdk-validium-node /app/cdk-validium-node RUN apk update && apk add postgresql15-client EXPOSE 8123 -CMD ["/bin/sh", "-c", "/app/zkevm-node run"] +CMD ["/bin/sh", "-c", "/app/cdk-validium-node run"] \ No newline at end of file diff --git a/Makefile b/Makefile index 43a49ee882..4694cb3caa 100644 --- a/Makefile +++ b/Makefile @@ -12,13 +12,13 @@ endif GOBASE := $(shell pwd) GOBIN := $(GOBASE)/dist GOENVVARS := GOBIN=$(GOBIN) CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) -GOBINARY := zkevm-node +GOBINARY := cdk-validium-node GOCMD := $(GOBASE)/cmd -LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-node.Version=$(VERSION)' -LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-node.GitRev=$(GITREV)' -LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-node.GitBranch=$(GITBRANCH)' -LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-node.BuildDate=$(DATE)' +LDFLAGS += -X 'github.com/0xPolygon/cdk-validium-node.Version=$(VERSION)' +LDFLAGS += -X 'github.com/0xPolygon/cdk-validium-node.GitRev=$(GITREV)' +LDFLAGS += -X 'github.com/0xPolygon/cdk-validium-node.GitBranch=$(GITBRANCH)' +LDFLAGS += -X 'github.com/0xPolygon/cdk-validium-node.BuildDate=$(DATE)' # Variables VENV = .venv @@ -35,25 +35,11 @@ build: ## Builds the binary locally into ./dist .PHONY: build-docker build-docker: ## Builds a docker image with the node binary - docker build -t zkevm-node -f ./Dockerfile . + docker build -t snapchain/cdk-validium-node -f ./Dockerfile . .PHONY: build-docker-nc build-docker-nc: ## Builds a docker image with the node binary - but without build cache - docker build --no-cache=true -t zkevm-node -f ./Dockerfile . - -.PHONY: run-rpc -run-rpc: ## Runs all the services need to run a local zkEMV RPC node - docker-compose up -d zkevm-state-db zkevm-pool-db - sleep 2 - docker-compose up -d zkevm-prover - sleep 5 - docker-compose up -d zkevm-sync - sleep 2 - docker-compose up -d zkevm-rpc - -.PHONY: stop -stop: ## Stops all services - docker-compose down + docker build --no-cache=true -t snapchain/cdk-validium-node -f ./Dockerfile . .PHONY: install-linter install-linter: ## Installs the linter @@ -119,9 +105,9 @@ install-git-hooks: ## Moves hook files to the .git/hooks directory .PHONY: generate-code-from-proto generate-code-from-proto: ## Generates code from proto files - cd proto/src/proto/hashdb/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../merkletree/pb --go-grpc_out=../../../../../merkletree/pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative hashdb.proto + cd proto/src/proto/hashdb/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../merkletree/hashdb --go-grpc_out=../../../../../merkletree/hashdb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative hashdb.proto cd proto/src/proto/executor/v1 && protoc --proto_path=. --go_out=../../../../../state/runtime/executor --go-grpc_out=../../../../../state/runtime/executor --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative executor.proto - cd proto/src/proto/aggregator/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../aggregator/pb --go-grpc_out=../../../../../aggregator/pb --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative aggregator.proto + cd proto/src/proto/aggregator/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../aggregator/prover --go-grpc_out=../../../../../aggregator/prover --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative aggregator.proto ## Help display. ## Pulls comments from beside commands and prints a nicely formatted @@ -132,4 +118,4 @@ generate-code-from-proto: ## Generates code from proto files help: ## Prints this help @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ | sort \ - | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' \ No newline at end of file diff --git a/README.md b/README.md index 158d990caa..532db28a45 100644 --- a/README.md +++ b/README.md @@ -1,120 +1,213 @@ -# zkEVM Node +# Polygon CDK Validium Node -zkEVM Node is a Go implementation of a node that operates the Polygon zkEVM Network. +For a full overview of the CDK-Validium please reference the [CDK documentation](https://wiki.polygon.technology/docs/cdk/). -## About the Polygon zkEVM network +The CDK-Validium solution is made up of several components, start with the [CDK Validium Node](https://github.com/0xPolygon/cdk-validium-node). However, for quick reference, the complete list of components are outlined below: -Since this is an implementation of a protocol it's fundamental to understand it, [here](https://zkevm.polygon.technology/docs/zknode/zknode-overview) you can find the specification of the protocol. +| Component | Description | +| ----------------------------------------------------------------------------- | -------------------------------------------------------------------- | +| [CDK Validium Node](https://github.com/0xPolygon/cdk-validium-node) | Node implementation for the CDK networks in Validium mode | +| [CDK Validium Contracts](https://github.com/0xPolygon/cdk-validium-contracts) | Smart contract implementation for the CDK networks in Validium mode | +| [CDK Data Availability](https://github.com/0xPolygon/cdk-data-availability) | Data availability implementation for the CDK networks | +| [Prover / Executor](https://github.com/0xPolygonHermez/zkevm-prover) | zkEVM engine and prover implementation | +| [Bridge Service](https://github.com/0xPolygonHermez/zkevm-bridge-service) | Bridge service implementation for CDK networks | +| [Bridge UI](https://github.com/0xPolygonHermez/zkevm-bridge-ui) | UI for the CDK networks bridge | -Glossary: +Understanding the underlying protocol is crucial when working with an implementation. This project is based on the Polygon zkEVM network, which is designed to bring scalability to Ethereum-compatible blockchains. -- L1: Base blockchain where the rollup smart contracts are deployed. It's Ethereum or a testnet of Ethereum, but it could be any EVM compatible blockchain. -- L2: the rollup network aka the Polygon zkEVM network. -- Batch: a group of transactions that are executed/proved, using the [zkEVM prover](https://github.com/0xPolygonHermez/zkevm-prover) and sent to / synchronized from L1 -- Sequencer: the actor that is responsible for selecting transactions, putting them in a specific order, and sending them in batches to L1 -- Trusted sequencer: sequencer that has special privileges, there can only be one trusted sequencer. The privileges granted to the trusted sequencer allow it to forecast the batches that will be applied to L1. This way it can commit to a specific sequence before interacting with L1. This is done to achieve fast finality and reduce costs associated with using the network (lower gas fees) -- Permissionless sequencer: sequencer role that can be performed by anyone. It has competitive disadvantages compared to the trusted sequencer (slow finality, MEV attacks). Its main purpose is to provide censorship resistance and unstoppability features to the network. -- Sequence: Group of batches and other metadata that the trusted sequencer sends to L1 to update the state -- Forced batch: batch that is sent by permissionless sequencers to L1 to update the state -- L2 Block: Same as an L1 block, but for L2. This is mostly used by the JSON RPC interface. Currently, all the L2 Blocks are set to only include one transaction, this is done to achieve instant finality: it's not necessary to close a batch to allow the JSON RPC to expose results of already processed transactions -- Trusted state: state reached through processing transactions that have been shared by the trusted sequencer. This state is considered trusted as the trusted sequencer could commit to a certain sequence, and then send a different one to L1 -- Virtual state: state reached through processing transactions that have already been submitted to L1. These transactions are sent in batches by either trusted or permissionless sequencers. Those batches are also called virtual batches. Note that this state is trustless as it relies on L1 security assumptions -- Consolidated state: state that is proven on-chain by submitting a ZKP (Zero Knowledge Proof) that proves the execution of a sequence of the last virtual batch. -- Invalid transaction: a transaction that can't be processed and doesn't affect the state. Note that such a transaction could be included in a virtual batch. The reason for a transaction to be invalid could be related to the Ethereum protocol (invalid nonce, not enough balance, ...) or due to limitations introduced by the zkEVM (each batch can make use of a limited amount of resources such as the total amount of keccak hashes that can be computed) -- Reverted transaction: a transaction that is executed, but is reverted (because of smart contract logic). The main difference with *invalid transaction* is that this transaction modifies the state, at least to increment nonce of the sender. +For an in-depth understanding of the protocol’s specifications, please refer to the [zkEVM Protocol Overview](https://wiki.polygon.technology/docs/zkevm/) -## Architecture +## Run a CDK Validium -

- -

+### Development -The diagram represents the main components of the software and how they interact between them. Note that this reflects a single entity running a node, in particular a node that acts as the trusted sequencer. But there are many entities running nodes in the network, and each of these entities can perform different roles. More on this later. +> ARM devices (such as Apple M1 and M2) are not supported -- (JSON) RPC: an HTTP interface that allows users (dApps, metamask, etherscan, ...) to interact with the node. Fully compatible with Ethereum RPC + some extra [custom endpoints](./docs/zkEVM-custom-endpoints.md) specifics of the network. It interacts with the `state` (to get data and process transactions) as well as the `pool` (to store transactions). -- L2GasPricer: it fetches the L1 gas price and applies some formula to calculate the gas price that will be suggested for the users to use for paying fees on L2. The suggestions are stored on the `pool`, and will be consumed by the `rpc` -- Pool: DB that stores transactions by the `RPC` to be selected/discarded by the `sequencer` later on -- Sequencer: responsible for building the trusted state. To do so, it gets transactions from the pool and puts them in a specific order. It needs to take care of opening and closing batches while trying to make them as full as possible. To achieve this it needs to use the executor to actually process the transaction not only to execute the state transition (and update the hashDB) but also to check the consumed resources by the transactions and the remaining resources of the batch. After executing a transaction that fits into a batch, it gets stored on the `state`. Once transactions are added into the state, they are immediately available through the `rpc`. -- SequenceSender: gets closed batches from the `state`, tries to aggregate as many of them as possible, and at some point, decides that it's time to send those batches to L1, turning the state from trusted to virtualized. In order to send the L1 tx, it uses the `ethtxmanager` -- EthTxManager: handles requests to send L1 transactions from `sequencesender` and `aggregator`. It takes care of dealing with the nonce of the accounts, increasing the gas price, and other actions that may be needed to ensure that L1 transactions get mined -- Etherman: abstraction that implements the needed methods to interact with the Ethereum network and the relevant smart contracts. -- Synchronizer: Updates the `state` (virtual batches, verified batches, forced batches, ...) by fetching data from L1 through the `etherman`. If the node is not a `trusted sequencer` it also updates the state with the data fetched from the `rpc` of the `trusted sequencer`. It also detects and handles reorgs that can happen if the `trusted sequencer` sends different data in the rpc vs the sequences sent to L1 (trusted reorg aka L2 reorg). Also handles L1 reorgs (reorgs that happen on the L1 network) -- State: Responsible for managing the state data (batches, blocks, transactions, ...) that is stored on the `state SB`. It also handles the integration with the `executor` and the `Merkletree` service -- State DB: persistence layer for the state data (except the Merkletree that is handled by the `HashDB` service), it stores informationrelated to L1 (blocks, global exit root updates, ...) and L2 (batches, L2 blocks, transactions, ...) -- Aggregator: consolidates batches by generating ZKPs (Zero Knowledge proofs). To do so it gathers the necessary data that the `prover` needs as input through the `state` and sends a request to it. Once the proof is generated it sends a request to send an L1 tx to verify the proof and move the state from virtual to verified to the `ethtxmanager`. Note that provers connect to the aggregator and not the other way arround. The aggregator can handle multiple connected provers at once and make them work concurrently in the generation of different proofs -- Prover/Executor/hashDB: service that generates ZK proofs. Note that this component is not implemented in this repository, and it's treated as a "black box" from the perspective of the node. The prover/executor has two implementations: [JS reference implementation](https://github.com/0xPolygonHermez/zkevm-proverjs) and [C production-ready implementation](https://github.com/0xPolygonHermez/zkevm-prover). Although it's the same software/binary, it implements three services: - - Executor: Provides an EVM implementation that allows processing batches as well as getting metadata (state root, transaction receipts, logs, ...) of all the needed results. - - Prover: Generates ZKPs for batches, batches aggregation, and final proofs. - - HashDB: service that stores the Merkletree, containing all the account information (balances, nonces, smart contract code, and smart contract storage) +For a streamlined development experience, it’s highly recommended to utilize the make utility for tasks such as building and testing the code. To view a comprehensive list of available commands, simply execute `make help` in your terminal. -## Roles of the network +This step by step guide will result in a local environment that has everything needed to test and develop on a CDK Validium, but note that: -The node software is designed to support the execution of multiple roles. Each role requires different services to work. Most of the services can run in different instances, and the JSON RPC can run in many instances (all the other services must have a single instance) +- everything will be run on a ephemeral and local L1 network, once the environment is shutdown, all progress will be lost +- ZK Proofs are mocked +- Bridge service and UI is not included as part of this setup, instead there is a pre-funded account -### RPC +#### Steps -This role can be performed by anyone. +1. Clone this GitHub repository to your local machine: -Required services and components: +``` +git clone https://github.com/0xPolygon/cdk-validium-node.git +``` -- JSON RPC: can run in a separated instance, and can have multiple instances -- Synchronizer: single instance that can run on a separate instance -- Executor & Merkletree: service that can run on a separate instance -- State DB: Postgres SQL that can be run in a separate instance +2. Navigate to the cloned directory: -There must be only one synchronizer, and it's recommended that it has exclusive access to an executor instance, although it's not necessary. This role can perfectly be run in a single instance, however, the JSON RPC and executor services can benefit from running in multiple instances, if the performance decreases due to the number of requests received +``` +cd cdk-validium-node +``` -- [`zkEVM RPC endpoints`](./docs/json-rpc-endpoints.md) -- [`zkEVM RPC Custom endpoints documentation`](./docs/zkEVM-custom-endpoints.md) +3. Build the Docker image using the provided Dockerfile: -### Trusted sequencer +``` +make build-docker +``` -This role can only be performed by a single entity. This is enforced in the smart contract, as the related methods of the trusted sequencer can only be performed by the owner of a particular private key. +4. Navigate to the test directory: -Required services and components: +``` +cd test +``` -- JSON RPC: can run in a separated instance, and can have multiple instances -- Sequencer & Synchronizer: single instance that needs to run together -- Executor & Merkletree: service that can run on a separate instance -- Pool DB: Postgres SQL that can be run in a separate instance -- State DB: Postgres SQL that can be run in a separate instance +5. Run all needed components: -Note that the JSON RPC is required to receive transactions. It's recommended that the JSON RPC runs on separated instances, and potentially more than one (depending on the load of the network). It's also recommended that the JSON RPC and the Sequencer don't share the same executor instance, to make sure that the sequencer has exclusive access to an executor +``` +make run +``` + +#### Usage + +- L2 RPC endpoint: `http://localhost:8123` +- L2 Chain ID: 1001 +- L1 RPC endpoint: `http:localhost:8545` +- L1 Chain ID: 1337 +- Pre funded account private key: `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` + +#### Troubleshooting + +Everything is run using docker, so if anything is not working, first thing is to identify what containers are running or not: + +``` +docker compose ps +``` + +Then check the logs: + +``` +docker logs +``` + +Aditionaly, it can be worth checking the DBs: + +- StateDB: `psql -h localhost -p 5432 -U state_user state_db`, password: `state_password` +- PoolDB: `psql -h localhost -p 5433 -U pool_user pool_db`, password: `pool_password` + +#### Advanced config + +In order to go beyond the default configuration, you can edit the config files: + +- `./test/config/test.node.config.toml`: configuration of the node, documented [here](./docs/config-file/node-config-doc.md) +- `./test/config/test.genesis.config.toml`: configuration of the network, documented [here](./docs/config-file/custom_network-config-doc.md) +- `./test/config/test.prover.config.json`: configuration of the prover/executor + +## Key Components ### Aggregator -This role can be performed by anyone. +The Aggregator is responsible for submitting validity proofs of the L2 state to L1. To do so, it fetches the batches sequencced by the sequencer, and interacts with the provers to generate the ZeroKnowledge Proofs (ZKPs). + +To do so in a efficient way, the Aggregator will: + +- Orchestrate communication with one or multiple provers +- Aggregate proofs from many batches, a single proof can verify multiple batches +- Send the aggregated proof to L1 using the EthTxManager + +### Prover + +The Prover is tasked with generating proofs for the batched transactions. These proofs are essential for the subsequent validation of the transactions on the Ethereum mainnet. In general: + +- ZKP Generation: Creates cryptographic proofs for each batch of transactions or for a combination of batches (proof aggregation). +- Optimization: Utilizes parallel computing to speed up the proof generation process. +- Ethereum Mainnet Preparation: Formats the proofs for validation on the Ethereum mainnet. + +Note that this software is not implemented in this repo, but in [this one](https://github.com/0xPolygonHermez/zkevm-prover) + +### Sequencer + +The Sequencer is responsible for ordering transactions, in other words, making the state move forward: + +- Transaction Ordering: Get transactions from the pool and adds them into the state. +- State Transition: Collaborates with the Executor to process transactions and update the state. +- Trusted finality: Once the sequencer has added a transaction into the state, it shares this information with other nodes, making the transaction final. Other nodes will need to trust that this transaction is added into the state until they get data availability (DA) and validity (ZKPs) confirmations + +### SequenceSender + +The SequenceSender’s role is to send the ordered list of transactions, known as a sequence, to the Ethereum mainnet. It also collaborates with the Data Availability layer, ensuring that all transaction data is accessible off-chain. It plays a pivotal role in finalizing the rollup: + +- Sequence Transmission: Sends a fingerprint of the ordered transaction batches to the Ethereum mainnet. +- Data Availability: Works in tandem with the Data Availability layer to ensure off-chain data is accessible. +- L1 Interaction: Utilizes the EthTxManager to handle L1 transaction nuances like nonce management and gas price adjustments. + +### Synchronizer + +The Synchronizer keeps the node’s local state in sync with the Ethereum mainnet. It listens for events emitted by the smart contract on the mainnet and updates the local state to match. The Synchronizer acts as the bridge between the Ethereum mainnet and the node: + +- Event Listening: Monitors events emitted by the smart contract on the Ethereum mainnet. +- Data Availability: downloads data from the Data Availability layer based on L1 events +- State Updating: Aligns the local state with the mainnet, ensuring consistency. +- Reorg Handling: Detects and manages blockchain reorganizations to maintain data integrity. + +### Data Availability Configuration + +The Data Availability (DA) layer is a crucial component that ensures all transaction data is available when needed. This off-chain storage solution is configurable, allowing operators to set parameters that best suit their needs. The DA layer is essential for the Validium system, where data availability is maintained off-chain but can be made available for verification when required. In general: + +- Off-Chain Storage: Stores all transaction data off-chain but ensures it’s readily available for verification. +- Configurability: Allows chain operators to customize data storage parameters. +- Data Verification: Provides mechanisms for data integrity checks, crucial for the Validium model. + +### Executor + +The Executor is the state transition implementation, in this case a EVM implementation: + +- Batch execution: receives requests to execute batch of transactions. +- EVM Implementation: Provides an EVM-compatible implementation for transaction processing. +- Metadata Retrieval: Retrieves necessary metadata like state root, transaction receipts, and logs from the execution. + +Note that this software is not implemented in this repo, but in [this one](https://github.com/0xPolygonHermez/zkevm-prover) + +### EthTxManager + +The EthTxManager is crucial for interacting with the Ethereum mainnet: + +- L1 Transaction Handling: Manages requests from the SequenceSender and Aggregator to send transactions to L1. +- Nonce Management: Takes care of the nonce for each account involved in a transaction. +- Gas Price Adjustment: Dynamically adjusts the gas price to ensure that transactions are mined in a timely manner. + +### State + +The State component is the backbone of the node’s data management: + +- State Management: Handles all state-related data, including batches, blocks, and transactions. +- Executor Integration: Communicates with the Executor to process transactions and update the state. +- StateDB: used for persistance -Required services and components: +### Pool -- Synchronizer: single instance that can run on a separated instance -- Executor & Merkletree: service that can run on a separate instance -- State DB: Postgres SQL that can be run in a separate instance -- Aggregator: single instance that can run on a separated instance -- Prover: single instance that can run on a separated instance -- Executor: single instance that can run on a separated instance +The Pool serves as a temporary storage for transactions: -It's recommended that the prover is run on a separate instance, as it has important hardware requirements. On the other hand, all the other components can run on a single instance, +- Transaction Storage: Holds transactions submitted via the RPC. +- Sequencer Interaction: Provides transactions to the Sequencer for ordering and batch creation. -## Development +### JSON RPC -It's recommended to use `make` for building, and testing the code, ... Run `make help` to get a list of the available commands. +The JSON RPC serves as the HTTP interface for user interaction: -## Running the node +- User Interface: Allows users and dApps to interact with the node, following the Ethereum standard: + - [Endpoint compatibility](./docs/json-rpc-endpoints.md) + - [Custom endpoints](./docs/zkEVM-custom-endpoints.md) +- State Interaction: Retrieves data from the state and processes transactions. +- Pool Interaction: Stores transactions in the pool. -- [Running locally](docs/running_local.md) -- [Running on production](docs/production-setup.md) +### L2GasPricer -### Requirements +The L2GasPricer is responsible for calculating the gas price on L2 based on the L1 gas price: -- Go 1.19 -- Docker -- Docker Compose -- Make -- GCC +- L1 Gas Price Fetching: Retrieves the current L1 gas price. +- Gas Price Calculation: Applies a formula to calculate the suggested L2 gas price. +- Pool Storage: Stores the calculated L2 gas price in the pool for consumption by the rpc. ## Contribute -Before opening a pull request, please read this [guide](CONTRIBUTING.md). +Before opening a pull request, please read [this guide](./CONTRIBUTING.md). +## License +The cdk-validium-node project is licensed under the GNU Affero General Public License free software license. diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index 93420738f8..b17cc79923 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -13,15 +13,14 @@ import ( "time" "unicode" - "github.com/0xPolygonHermez/zkevm-node/aggregator/metrics" - "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" - "github.com/0xPolygonHermez/zkevm-node/aggregator/prover" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/encoding" - 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/state" + "github.com/0xPolygon/cdk-validium-node/aggregator/metrics" + "github.com/0xPolygon/cdk-validium-node/aggregator/prover" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/encoding" + ethmanTypes "github.com/0xPolygon/cdk-validium-node/etherman/types" + "github.com/0xPolygon/cdk-validium-node/ethtxmanager" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" "google.golang.org/grpc" @@ -41,12 +40,12 @@ type finalProofMsg struct { proverName string proverID string recursiveProof *state.Proof - finalProof *pb.FinalProof + finalProof *prover.FinalProof } // Aggregator represents an aggregator type Aggregator struct { - pb.UnimplementedAggregatorServiceServer + prover.UnimplementedAggregatorServiceServer cfg Config @@ -129,7 +128,7 @@ func (a *Aggregator) Start(ctx context.Context) error { } a.srv = grpc.NewServer() - pb.RegisterAggregatorServiceServer(a.srv, a) + prover.RegisterAggregatorServiceServer(a.srv, a) healthService := newHealthChecker() grpchealth.RegisterHealthServer(a.srv, healthService) @@ -159,7 +158,7 @@ func (a *Aggregator) Stop() { // Channel implements the bi-directional communication channel between the // Prover client and the Aggregator server. -func (a *Aggregator) Channel(stream pb.AggregatorService_ChannelServer) error { +func (a *Aggregator) Channel(stream prover.AggregatorService_ChannelServer) error { metrics.ConnectedProver() defer metrics.DisconnectedProver() @@ -306,7 +305,7 @@ func (a *Aggregator) handleFailureToAddVerifyBatchToBeMonitored(ctx context.Cont } // buildFinalProof builds and return the final proof for an aggregated/batch proof. -func (a *Aggregator) buildFinalProof(ctx context.Context, prover proverInterface, proof *state.Proof) (*pb.FinalProof, error) { +func (a *Aggregator) buildFinalProof(ctx context.Context, prover proverInterface, proof *state.Proof) (*prover.FinalProof, error) { log := log.WithFields( "prover", prover.Name(), "proverId", prover.ID(), @@ -972,14 +971,14 @@ func (a *Aggregator) isSynced(ctx context.Context, batchNum *uint64) bool { return true } -func (a *Aggregator) buildInputProver(ctx context.Context, batchToVerify *state.Batch) (*pb.InputProver, error) { +func (a *Aggregator) buildInputProver(ctx context.Context, batchToVerify *state.Batch) (*prover.InputProver, error) { previousBatch, err := a.State.GetBatchByNumber(ctx, batchToVerify.BatchNumber-1, nil) if err != nil && err != state.ErrStateNotSynchronized { return nil, fmt.Errorf("failed to get previous batch, err: %v", err) } - inputProver := &pb.InputProver{ - PublicInputs: &pb.PublicInputs{ + inputProver := &prover.InputProver{ + PublicInputs: &prover.PublicInputs{ OldStateRoot: previousBatch.StateRoot.Bytes(), OldAccInputHash: previousBatch.AccInputHash.Bytes(), OldBatchNum: previousBatch.BatchNumber, diff --git a/aggregator/aggregator_test.go b/aggregator/aggregator_test.go index f75d7237f3..274e67c3a8 100644 --- a/aggregator/aggregator_test.go +++ b/aggregator/aggregator_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/aggregator/mocks" - "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" - 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/state" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/aggregator/mocks" + "github.com/0xPolygon/cdk-validium-node/aggregator/prover" + configTypes "github.com/0xPolygon/cdk-validium-node/config/types" + ethmanTypes "github.com/0xPolygon/cdk-validium-node/etherman/types" + "github.com/0xPolygon/cdk-validium-node/ethtxmanager" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -53,7 +53,7 @@ func TestSendFinalProof(t *testing.T) { BatchNumber: batchNum, BatchNumberFinal: batchNumFinal, } - finalProof := &pb.FinalProof{} + finalProof := &prover.FinalProof{} cfg := Config{SenderAddress: from.Hex()} testCases := []struct { @@ -1000,9 +1000,9 @@ func TestTryBuildFinalProof(t *testing.T) { proverName := "proverName" proverID := "proverID" finalProofID := "finalProofID" - finalProof := pb.FinalProof{ + finalProof := prover.FinalProof{ Proof: "", - Public: &pb.PublicInputsExtended{ + Public: &prover.PublicInputsExtended{ NewStateRoot: []byte("newStateRoot"), NewLocalExitRoot: []byte("newLocalExitRoot"), }, diff --git a/aggregator/config.go b/aggregator/config.go index d654a1aaf3..76a1a8e0e9 100644 --- a/aggregator/config.go +++ b/aggregator/config.go @@ -4,8 +4,8 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/encoding" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/encoding" ) // TokenAmountWithDecimals is a wrapper type that parses token amount with decimals to big int diff --git a/aggregator/interfaces.go b/aggregator/interfaces.go index f957e5178f..2f8bb498df 100644 --- a/aggregator/interfaces.go +++ b/aggregator/interfaces.go @@ -4,10 +4,10 @@ import ( "context" "math/big" - "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/aggregator/prover" + ethmanTypes "github.com/0xPolygon/cdk-validium-node/etherman/types" + "github.com/0xPolygon/cdk-validium-node/ethtxmanager" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" ) @@ -19,11 +19,11 @@ type proverInterface interface { ID() string Addr() string IsIdle() (bool, error) - BatchProof(input *pb.InputProver) (*string, error) + BatchProof(input *prover.InputProver) (*string, error) AggregatedProof(inputProof1, inputProof2 string) (*string, error) FinalProof(inputProof string, aggregatorAddr string) (*string, error) WaitRecursiveProof(ctx context.Context, proofID string) (string, error) - WaitFinalProof(ctx context.Context, proofID string) (*pb.FinalProof, error) + WaitFinalProof(ctx context.Context, proofID string) (*prover.FinalProof, error) } // ethTxManager contains the methods required to send txs to diff --git a/aggregator/metrics/metrics.go b/aggregator/metrics/metrics.go index ea8bed4242..d13131566c 100644 --- a/aggregator/metrics/metrics.go +++ b/aggregator/metrics/metrics.go @@ -1,7 +1,7 @@ package metrics import ( - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/cdk-validium-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/aggregator/mocks/mock_etherman.go b/aggregator/mocks/mock_etherman.go index 50831aac38..222186546d 100644 --- a/aggregator/mocks/mock_etherman.go +++ b/aggregator/mocks/mock_etherman.go @@ -6,7 +6,7 @@ import ( common "github.com/ethereum/go-ethereum/common" mock "github.com/stretchr/testify/mock" - types "github.com/0xPolygonHermez/zkevm-node/etherman/types" + types "github.com/0xPolygon/cdk-validium-node/etherman/types" ) // Etherman is an autogenerated mock type for the etherman type diff --git a/aggregator/mocks/mock_ethtxmanager.go b/aggregator/mocks/mock_ethtxmanager.go index 8aeae6304a..fd121325aa 100644 --- a/aggregator/mocks/mock_ethtxmanager.go +++ b/aggregator/mocks/mock_ethtxmanager.go @@ -8,7 +8,7 @@ import ( common "github.com/ethereum/go-ethereum/common" - ethtxmanager "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" + ethtxmanager "github.com/0xPolygon/cdk-validium-node/ethtxmanager" mock "github.com/stretchr/testify/mock" diff --git a/aggregator/mocks/mock_prover.go b/aggregator/mocks/mock_prover.go index 7cba231d6e..dcfca06d97 100644 --- a/aggregator/mocks/mock_prover.go +++ b/aggregator/mocks/mock_prover.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - pb "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" + prover "github.com/0xPolygon/cdk-validium-node/aggregator/prover" mock "github.com/stretchr/testify/mock" ) @@ -55,15 +55,15 @@ func (_m *ProverMock) AggregatedProof(inputProof1 string, inputProof2 string) (* } // BatchProof provides a mock function with given fields: input -func (_m *ProverMock) BatchProof(input *pb.InputProver) (*string, error) { +func (_m *ProverMock) BatchProof(input *prover.InputProver) (*string, error) { ret := _m.Called(input) var r0 *string var r1 error - if rf, ok := ret.Get(0).(func(*pb.InputProver) (*string, error)); ok { + if rf, ok := ret.Get(0).(func(*prover.InputProver) (*string, error)); ok { return rf(input) } - if rf, ok := ret.Get(0).(func(*pb.InputProver) *string); ok { + if rf, ok := ret.Get(0).(func(*prover.InputProver) *string); ok { r0 = rf(input) } else { if ret.Get(0) != nil { @@ -71,7 +71,7 @@ func (_m *ProverMock) BatchProof(input *pb.InputProver) (*string, error) { } } - if rf, ok := ret.Get(1).(func(*pb.InputProver) error); ok { + if rf, ok := ret.Get(1).(func(*prover.InputProver) error); ok { r1 = rf(input) } else { r1 = ret.Error(1) @@ -159,19 +159,19 @@ func (_m *ProverMock) Name() string { } // WaitFinalProof provides a mock function with given fields: ctx, proofID -func (_m *ProverMock) WaitFinalProof(ctx context.Context, proofID string) (*pb.FinalProof, error) { +func (_m *ProverMock) WaitFinalProof(ctx context.Context, proofID string) (*prover.FinalProof, error) { ret := _m.Called(ctx, proofID) - var r0 *pb.FinalProof + var r0 *prover.FinalProof var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*pb.FinalProof, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string) (*prover.FinalProof, error)); ok { return rf(ctx, proofID) } - if rf, ok := ret.Get(0).(func(context.Context, string) *pb.FinalProof); ok { + if rf, ok := ret.Get(0).(func(context.Context, string) *prover.FinalProof); ok { r0 = rf(ctx, proofID) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*pb.FinalProof) + r0 = ret.Get(0).(*prover.FinalProof) } } diff --git a/aggregator/mocks/mock_state.go b/aggregator/mocks/mock_state.go index 75d5e26c26..b2d2335a89 100644 --- a/aggregator/mocks/mock_state.go +++ b/aggregator/mocks/mock_state.go @@ -8,7 +8,7 @@ import ( pgx "github.com/jackc/pgx/v4" mock "github.com/stretchr/testify/mock" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/cdk-validium-node/state" ) // StateMock is an autogenerated mock type for the stateInterface type diff --git a/aggregator/pb/aggregator.pb.go b/aggregator/pb/aggregator.pb.go deleted file mode 100644 index 54fd9044d7..0000000000 --- a/aggregator/pb/aggregator.pb.go +++ /dev/null @@ -1,2340 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: aggregator.proto - -package pb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// * -// @dev Result -// - OK: succesfully completed -// - ERROR: request is not correct, i.e. input data is wrong -// - INTERNAL_ERROR: internal server error when delivering the response -type Result int32 - -const ( - Result_RESULT_UNSPECIFIED Result = 0 - Result_RESULT_OK Result = 1 - Result_RESULT_ERROR Result = 2 - Result_RESULT_INTERNAL_ERROR Result = 3 -) - -// Enum value maps for Result. -var ( - Result_name = map[int32]string{ - 0: "RESULT_UNSPECIFIED", - 1: "RESULT_OK", - 2: "RESULT_ERROR", - 3: "RESULT_INTERNAL_ERROR", - } - Result_value = map[string]int32{ - "RESULT_UNSPECIFIED": 0, - "RESULT_OK": 1, - "RESULT_ERROR": 2, - "RESULT_INTERNAL_ERROR": 3, - } -) - -func (x Result) Enum() *Result { - p := new(Result) - *p = x - return p -} - -func (x Result) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Result) Descriptor() protoreflect.EnumDescriptor { - return file_aggregator_proto_enumTypes[0].Descriptor() -} - -func (Result) Type() protoreflect.EnumType { - return &file_aggregator_proto_enumTypes[0] -} - -func (x Result) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Result.Descriptor instead. -func (Result) EnumDescriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{0} -} - -type GetStatusResponse_Status int32 - -const ( - GetStatusResponse_STATUS_UNSPECIFIED GetStatusResponse_Status = 0 - GetStatusResponse_STATUS_BOOTING GetStatusResponse_Status = 1 - GetStatusResponse_STATUS_COMPUTING GetStatusResponse_Status = 2 - GetStatusResponse_STATUS_IDLE GetStatusResponse_Status = 3 - GetStatusResponse_STATUS_HALT GetStatusResponse_Status = 4 -) - -// Enum value maps for GetStatusResponse_Status. -var ( - GetStatusResponse_Status_name = map[int32]string{ - 0: "STATUS_UNSPECIFIED", - 1: "STATUS_BOOTING", - 2: "STATUS_COMPUTING", - 3: "STATUS_IDLE", - 4: "STATUS_HALT", - } - GetStatusResponse_Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "STATUS_BOOTING": 1, - "STATUS_COMPUTING": 2, - "STATUS_IDLE": 3, - "STATUS_HALT": 4, - } -) - -func (x GetStatusResponse_Status) Enum() *GetStatusResponse_Status { - p := new(GetStatusResponse_Status) - *p = x - return p -} - -func (x GetStatusResponse_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GetStatusResponse_Status) Descriptor() protoreflect.EnumDescriptor { - return file_aggregator_proto_enumTypes[1].Descriptor() -} - -func (GetStatusResponse_Status) Type() protoreflect.EnumType { - return &file_aggregator_proto_enumTypes[1] -} - -func (x GetStatusResponse_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GetStatusResponse_Status.Descriptor instead. -func (GetStatusResponse_Status) EnumDescriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{9, 0} -} - -type GetProofResponse_Result int32 - -const ( - GetProofResponse_RESULT_UNSPECIFIED GetProofResponse_Result = 0 - GetProofResponse_RESULT_COMPLETED_OK GetProofResponse_Result = 1 - GetProofResponse_RESULT_ERROR GetProofResponse_Result = 2 - GetProofResponse_RESULT_COMPLETED_ERROR GetProofResponse_Result = 3 - GetProofResponse_RESULT_PENDING GetProofResponse_Result = 4 - GetProofResponse_RESULT_INTERNAL_ERROR GetProofResponse_Result = 5 - GetProofResponse_RESULT_CANCEL GetProofResponse_Result = 6 -) - -// Enum value maps for GetProofResponse_Result. -var ( - GetProofResponse_Result_name = map[int32]string{ - 0: "RESULT_UNSPECIFIED", - 1: "RESULT_COMPLETED_OK", - 2: "RESULT_ERROR", - 3: "RESULT_COMPLETED_ERROR", - 4: "RESULT_PENDING", - 5: "RESULT_INTERNAL_ERROR", - 6: "RESULT_CANCEL", - } - GetProofResponse_Result_value = map[string]int32{ - "RESULT_UNSPECIFIED": 0, - "RESULT_COMPLETED_OK": 1, - "RESULT_ERROR": 2, - "RESULT_COMPLETED_ERROR": 3, - "RESULT_PENDING": 4, - "RESULT_INTERNAL_ERROR": 5, - "RESULT_CANCEL": 6, - } -) - -func (x GetProofResponse_Result) Enum() *GetProofResponse_Result { - p := new(GetProofResponse_Result) - *p = x - return p -} - -func (x GetProofResponse_Result) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GetProofResponse_Result) Descriptor() protoreflect.EnumDescriptor { - return file_aggregator_proto_enumTypes[2].Descriptor() -} - -func (GetProofResponse_Result) Type() protoreflect.EnumType { - return &file_aggregator_proto_enumTypes[2] -} - -func (x GetProofResponse_Result) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GetProofResponse_Result.Descriptor instead. -func (GetProofResponse_Result) EnumDescriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{14, 0} -} - -type Version struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - V0_0_1 string `protobuf:"bytes,1,opt,name=v0_0_1,json=v001,proto3" json:"v0_0_1,omitempty"` -} - -func (x *Version) Reset() { - *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Version) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Version) ProtoMessage() {} - -func (x *Version) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Version.ProtoReflect.Descriptor instead. -func (*Version) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{0} -} - -func (x *Version) GetV0_0_1() string { - if x != nil { - return x.V0_0_1 - } - return "" -} - -type AggregatorMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Types that are assignable to Request: - // *AggregatorMessage_GetStatusRequest - // *AggregatorMessage_GenBatchProofRequest - // *AggregatorMessage_GenAggregatedProofRequest - // *AggregatorMessage_GenFinalProofRequest - // *AggregatorMessage_CancelRequest - // *AggregatorMessage_GetProofRequest - Request isAggregatorMessage_Request `protobuf_oneof:"request"` -} - -func (x *AggregatorMessage) Reset() { - *x = AggregatorMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AggregatorMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AggregatorMessage) ProtoMessage() {} - -func (x *AggregatorMessage) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AggregatorMessage.ProtoReflect.Descriptor instead. -func (*AggregatorMessage) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{1} -} - -func (x *AggregatorMessage) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (m *AggregatorMessage) GetRequest() isAggregatorMessage_Request { - if m != nil { - return m.Request - } - return nil -} - -func (x *AggregatorMessage) GetGetStatusRequest() *GetStatusRequest { - if x, ok := x.GetRequest().(*AggregatorMessage_GetStatusRequest); ok { - return x.GetStatusRequest - } - return nil -} - -func (x *AggregatorMessage) GetGenBatchProofRequest() *GenBatchProofRequest { - if x, ok := x.GetRequest().(*AggregatorMessage_GenBatchProofRequest); ok { - return x.GenBatchProofRequest - } - return nil -} - -func (x *AggregatorMessage) GetGenAggregatedProofRequest() *GenAggregatedProofRequest { - if x, ok := x.GetRequest().(*AggregatorMessage_GenAggregatedProofRequest); ok { - return x.GenAggregatedProofRequest - } - return nil -} - -func (x *AggregatorMessage) GetGenFinalProofRequest() *GenFinalProofRequest { - if x, ok := x.GetRequest().(*AggregatorMessage_GenFinalProofRequest); ok { - return x.GenFinalProofRequest - } - return nil -} - -func (x *AggregatorMessage) GetCancelRequest() *CancelRequest { - if x, ok := x.GetRequest().(*AggregatorMessage_CancelRequest); ok { - return x.CancelRequest - } - return nil -} - -func (x *AggregatorMessage) GetGetProofRequest() *GetProofRequest { - if x, ok := x.GetRequest().(*AggregatorMessage_GetProofRequest); ok { - return x.GetProofRequest - } - return nil -} - -type isAggregatorMessage_Request interface { - isAggregatorMessage_Request() -} - -type AggregatorMessage_GetStatusRequest struct { - GetStatusRequest *GetStatusRequest `protobuf:"bytes,2,opt,name=get_status_request,json=getStatusRequest,proto3,oneof"` -} - -type AggregatorMessage_GenBatchProofRequest struct { - GenBatchProofRequest *GenBatchProofRequest `protobuf:"bytes,3,opt,name=gen_batch_proof_request,json=genBatchProofRequest,proto3,oneof"` -} - -type AggregatorMessage_GenAggregatedProofRequest struct { - GenAggregatedProofRequest *GenAggregatedProofRequest `protobuf:"bytes,4,opt,name=gen_aggregated_proof_request,json=genAggregatedProofRequest,proto3,oneof"` -} - -type AggregatorMessage_GenFinalProofRequest struct { - GenFinalProofRequest *GenFinalProofRequest `protobuf:"bytes,5,opt,name=gen_final_proof_request,json=genFinalProofRequest,proto3,oneof"` -} - -type AggregatorMessage_CancelRequest struct { - CancelRequest *CancelRequest `protobuf:"bytes,6,opt,name=cancel_request,json=cancelRequest,proto3,oneof"` -} - -type AggregatorMessage_GetProofRequest struct { - GetProofRequest *GetProofRequest `protobuf:"bytes,7,opt,name=get_proof_request,json=getProofRequest,proto3,oneof"` -} - -func (*AggregatorMessage_GetStatusRequest) isAggregatorMessage_Request() {} - -func (*AggregatorMessage_GenBatchProofRequest) isAggregatorMessage_Request() {} - -func (*AggregatorMessage_GenAggregatedProofRequest) isAggregatorMessage_Request() {} - -func (*AggregatorMessage_GenFinalProofRequest) isAggregatorMessage_Request() {} - -func (*AggregatorMessage_CancelRequest) isAggregatorMessage_Request() {} - -func (*AggregatorMessage_GetProofRequest) isAggregatorMessage_Request() {} - -type ProverMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Types that are assignable to Response: - // *ProverMessage_GetStatusResponse - // *ProverMessage_GenBatchProofResponse - // *ProverMessage_GenAggregatedProofResponse - // *ProverMessage_GenFinalProofResponse - // *ProverMessage_CancelResponse - // *ProverMessage_GetProofResponse - Response isProverMessage_Response `protobuf_oneof:"response"` -} - -func (x *ProverMessage) Reset() { - *x = ProverMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProverMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProverMessage) ProtoMessage() {} - -func (x *ProverMessage) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProverMessage.ProtoReflect.Descriptor instead. -func (*ProverMessage) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{2} -} - -func (x *ProverMessage) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (m *ProverMessage) GetResponse() isProverMessage_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *ProverMessage) GetGetStatusResponse() *GetStatusResponse { - if x, ok := x.GetResponse().(*ProverMessage_GetStatusResponse); ok { - return x.GetStatusResponse - } - return nil -} - -func (x *ProverMessage) GetGenBatchProofResponse() *GenBatchProofResponse { - if x, ok := x.GetResponse().(*ProverMessage_GenBatchProofResponse); ok { - return x.GenBatchProofResponse - } - return nil -} - -func (x *ProverMessage) GetGenAggregatedProofResponse() *GenAggregatedProofResponse { - if x, ok := x.GetResponse().(*ProverMessage_GenAggregatedProofResponse); ok { - return x.GenAggregatedProofResponse - } - return nil -} - -func (x *ProverMessage) GetGenFinalProofResponse() *GenFinalProofResponse { - if x, ok := x.GetResponse().(*ProverMessage_GenFinalProofResponse); ok { - return x.GenFinalProofResponse - } - return nil -} - -func (x *ProverMessage) GetCancelResponse() *CancelResponse { - if x, ok := x.GetResponse().(*ProverMessage_CancelResponse); ok { - return x.CancelResponse - } - return nil -} - -func (x *ProverMessage) GetGetProofResponse() *GetProofResponse { - if x, ok := x.GetResponse().(*ProverMessage_GetProofResponse); ok { - return x.GetProofResponse - } - return nil -} - -type isProverMessage_Response interface { - isProverMessage_Response() -} - -type ProverMessage_GetStatusResponse struct { - GetStatusResponse *GetStatusResponse `protobuf:"bytes,2,opt,name=get_status_response,json=getStatusResponse,proto3,oneof"` -} - -type ProverMessage_GenBatchProofResponse struct { - GenBatchProofResponse *GenBatchProofResponse `protobuf:"bytes,3,opt,name=gen_batch_proof_response,json=genBatchProofResponse,proto3,oneof"` -} - -type ProverMessage_GenAggregatedProofResponse struct { - GenAggregatedProofResponse *GenAggregatedProofResponse `protobuf:"bytes,4,opt,name=gen_aggregated_proof_response,json=genAggregatedProofResponse,proto3,oneof"` -} - -type ProverMessage_GenFinalProofResponse struct { - GenFinalProofResponse *GenFinalProofResponse `protobuf:"bytes,5,opt,name=gen_final_proof_response,json=genFinalProofResponse,proto3,oneof"` -} - -type ProverMessage_CancelResponse struct { - CancelResponse *CancelResponse `protobuf:"bytes,6,opt,name=cancel_response,json=cancelResponse,proto3,oneof"` -} - -type ProverMessage_GetProofResponse struct { - GetProofResponse *GetProofResponse `protobuf:"bytes,7,opt,name=get_proof_response,json=getProofResponse,proto3,oneof"` -} - -func (*ProverMessage_GetStatusResponse) isProverMessage_Response() {} - -func (*ProverMessage_GenBatchProofResponse) isProverMessage_Response() {} - -func (*ProverMessage_GenAggregatedProofResponse) isProverMessage_Response() {} - -func (*ProverMessage_GenFinalProofResponse) isProverMessage_Response() {} - -func (*ProverMessage_CancelResponse) isProverMessage_Response() {} - -func (*ProverMessage_GetProofResponse) isProverMessage_Response() {} - -// * -// @dev GetStatusRequest -type GetStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetStatusRequest) Reset() { - *x = GetStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetStatusRequest) ProtoMessage() {} - -func (x *GetStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetStatusRequest.ProtoReflect.Descriptor instead. -func (*GetStatusRequest) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{3} -} - -// * -// @dev GenBatchProofRequest -// @param {input} - input prover -type GenBatchProofRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Input *InputProver `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` -} - -func (x *GenBatchProofRequest) Reset() { - *x = GenBatchProofRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenBatchProofRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenBatchProofRequest) ProtoMessage() {} - -func (x *GenBatchProofRequest) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenBatchProofRequest.ProtoReflect.Descriptor instead. -func (*GenBatchProofRequest) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{4} -} - -func (x *GenBatchProofRequest) GetInput() *InputProver { - if x != nil { - return x.Input - } - return nil -} - -// * -// @dev GenAggregatedProofRequest -// @param {recursive_proof_1} - proof json of the first batch to aggregate -// @param {recursive_proof_2} - proof json of the second batch to aggregate -type GenAggregatedProofRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RecursiveProof_1 string `protobuf:"bytes,1,opt,name=recursive_proof_1,json=recursiveProof1,proto3" json:"recursive_proof_1,omitempty"` - RecursiveProof_2 string `protobuf:"bytes,2,opt,name=recursive_proof_2,json=recursiveProof2,proto3" json:"recursive_proof_2,omitempty"` -} - -func (x *GenAggregatedProofRequest) Reset() { - *x = GenAggregatedProofRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenAggregatedProofRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenAggregatedProofRequest) ProtoMessage() {} - -func (x *GenAggregatedProofRequest) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenAggregatedProofRequest.ProtoReflect.Descriptor instead. -func (*GenAggregatedProofRequest) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{5} -} - -func (x *GenAggregatedProofRequest) GetRecursiveProof_1() string { - if x != nil { - return x.RecursiveProof_1 - } - return "" -} - -func (x *GenAggregatedProofRequest) GetRecursiveProof_2() string { - if x != nil { - return x.RecursiveProof_2 - } - return "" -} - -// * -// @dev GenFinalProofRequest -// @param {recursive_proof} - proof json of the batch or aggregated proof to finalise -// @param {aggregator_addr} - address of the aggregator -type GenFinalProofRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RecursiveProof string `protobuf:"bytes,1,opt,name=recursive_proof,json=recursiveProof,proto3" json:"recursive_proof,omitempty"` - AggregatorAddr string `protobuf:"bytes,2,opt,name=aggregator_addr,json=aggregatorAddr,proto3" json:"aggregator_addr,omitempty"` -} - -func (x *GenFinalProofRequest) Reset() { - *x = GenFinalProofRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenFinalProofRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenFinalProofRequest) ProtoMessage() {} - -func (x *GenFinalProofRequest) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenFinalProofRequest.ProtoReflect.Descriptor instead. -func (*GenFinalProofRequest) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{6} -} - -func (x *GenFinalProofRequest) GetRecursiveProof() string { - if x != nil { - return x.RecursiveProof - } - return "" -} - -func (x *GenFinalProofRequest) GetAggregatorAddr() string { - if x != nil { - return x.AggregatorAddr - } - return "" -} - -// * -// @dev CancelRequest -// @param {id} - identifier of the proof request to cancel -type CancelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *CancelRequest) Reset() { - *x = CancelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CancelRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelRequest) ProtoMessage() {} - -func (x *CancelRequest) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancelRequest.ProtoReflect.Descriptor instead. -func (*CancelRequest) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{7} -} - -func (x *CancelRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// * -// @dev Request GetProof -// @param {id} - proof identifier of the proof request -// @param {timeout} - time to wait until the service responds -type GetProofRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Timeout uint64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` -} - -func (x *GetProofRequest) Reset() { - *x = GetProofRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetProofRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProofRequest) ProtoMessage() {} - -func (x *GetProofRequest) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProofRequest.ProtoReflect.Descriptor instead. -func (*GetProofRequest) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{8} -} - -func (x *GetProofRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *GetProofRequest) GetTimeout() uint64 { - if x != nil { - return x.Timeout - } - return 0 -} - -// * -// @dev Response GetStatus -// @param {status} - server status -// - BOOTING: being ready to compute proofs -// - COMPUTING: busy computing a proof -// - IDLE: waiting for a proof to compute -// - HALT: stop -// @param {last_computed_request_id} - last proof identifier that has been computed -// @param {last_computed_end_time} - last proof timestamp when it was finished -// @param {current_computing_request_id} - id of the proof that is being computed -// @param {current_computing_start_time} - timestamp when the proof that is being computed started -// @param {version_proto} - .proto verion -// @param {version_server} - server version -// @param {pending_request_queue_ids} - list of identifierss of proof requests that are in the pending queue -// @param {prover_name} - id of this prover server, normally specified via config.json, or UNSPECIFIED otherwise; it does not change if prover reboots -// @param {prover_id} - id of this prover instance or reboot; it changes if prover reboots; it is a UUID, automatically generated during the initialization -// @param {number_of_cores} - number of cores in the system where the prover is running -// @param {total_memory} - total memory in the system where the prover is running -// @param {free_memory} - free memory in the system where the prover is running -type GetStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status GetStatusResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=aggregator.v1.GetStatusResponse_Status" json:"status,omitempty"` - LastComputedRequestId string `protobuf:"bytes,2,opt,name=last_computed_request_id,json=lastComputedRequestId,proto3" json:"last_computed_request_id,omitempty"` - LastComputedEndTime uint64 `protobuf:"varint,3,opt,name=last_computed_end_time,json=lastComputedEndTime,proto3" json:"last_computed_end_time,omitempty"` - CurrentComputingRequestId string `protobuf:"bytes,4,opt,name=current_computing_request_id,json=currentComputingRequestId,proto3" json:"current_computing_request_id,omitempty"` - CurrentComputingStartTime uint64 `protobuf:"varint,5,opt,name=current_computing_start_time,json=currentComputingStartTime,proto3" json:"current_computing_start_time,omitempty"` - VersionProto string `protobuf:"bytes,6,opt,name=version_proto,json=versionProto,proto3" json:"version_proto,omitempty"` - VersionServer string `protobuf:"bytes,7,opt,name=version_server,json=versionServer,proto3" json:"version_server,omitempty"` - PendingRequestQueueIds []string `protobuf:"bytes,8,rep,name=pending_request_queue_ids,json=pendingRequestQueueIds,proto3" json:"pending_request_queue_ids,omitempty"` - ProverName string `protobuf:"bytes,9,opt,name=prover_name,json=proverName,proto3" json:"prover_name,omitempty"` - ProverId string `protobuf:"bytes,10,opt,name=prover_id,json=proverId,proto3" json:"prover_id,omitempty"` - NumberOfCores uint64 `protobuf:"varint,11,opt,name=number_of_cores,json=numberOfCores,proto3" json:"number_of_cores,omitempty"` - TotalMemory uint64 `protobuf:"varint,12,opt,name=total_memory,json=totalMemory,proto3" json:"total_memory,omitempty"` - FreeMemory uint64 `protobuf:"varint,13,opt,name=free_memory,json=freeMemory,proto3" json:"free_memory,omitempty"` - ForkId uint64 `protobuf:"varint,14,opt,name=fork_id,json=forkId,proto3" json:"fork_id,omitempty"` -} - -func (x *GetStatusResponse) Reset() { - *x = GetStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetStatusResponse) ProtoMessage() {} - -func (x *GetStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetStatusResponse.ProtoReflect.Descriptor instead. -func (*GetStatusResponse) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{9} -} - -func (x *GetStatusResponse) GetStatus() GetStatusResponse_Status { - if x != nil { - return x.Status - } - return GetStatusResponse_STATUS_UNSPECIFIED -} - -func (x *GetStatusResponse) GetLastComputedRequestId() string { - if x != nil { - return x.LastComputedRequestId - } - return "" -} - -func (x *GetStatusResponse) GetLastComputedEndTime() uint64 { - if x != nil { - return x.LastComputedEndTime - } - return 0 -} - -func (x *GetStatusResponse) GetCurrentComputingRequestId() string { - if x != nil { - return x.CurrentComputingRequestId - } - return "" -} - -func (x *GetStatusResponse) GetCurrentComputingStartTime() uint64 { - if x != nil { - return x.CurrentComputingStartTime - } - return 0 -} - -func (x *GetStatusResponse) GetVersionProto() string { - if x != nil { - return x.VersionProto - } - return "" -} - -func (x *GetStatusResponse) GetVersionServer() string { - if x != nil { - return x.VersionServer - } - return "" -} - -func (x *GetStatusResponse) GetPendingRequestQueueIds() []string { - if x != nil { - return x.PendingRequestQueueIds - } - return nil -} - -func (x *GetStatusResponse) GetProverName() string { - if x != nil { - return x.ProverName - } - return "" -} - -func (x *GetStatusResponse) GetProverId() string { - if x != nil { - return x.ProverId - } - return "" -} - -func (x *GetStatusResponse) GetNumberOfCores() uint64 { - if x != nil { - return x.NumberOfCores - } - return 0 -} - -func (x *GetStatusResponse) GetTotalMemory() uint64 { - if x != nil { - return x.TotalMemory - } - return 0 -} - -func (x *GetStatusResponse) GetFreeMemory() uint64 { - if x != nil { - return x.FreeMemory - } - return 0 -} - -func (x *GetStatusResponse) GetForkId() uint64 { - if x != nil { - return x.ForkId - } - return 0 -} - -// * -// @dev GenBatchProofResponse -// @param {id} - proof identifier, to be used in GetProofRequest() -// @param {result} - request result -type GenBatchProofResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=aggregator.v1.Result" json:"result,omitempty"` -} - -func (x *GenBatchProofResponse) Reset() { - *x = GenBatchProofResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenBatchProofResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenBatchProofResponse) ProtoMessage() {} - -func (x *GenBatchProofResponse) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenBatchProofResponse.ProtoReflect.Descriptor instead. -func (*GenBatchProofResponse) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{10} -} - -func (x *GenBatchProofResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *GenBatchProofResponse) GetResult() Result { - if x != nil { - return x.Result - } - return Result_RESULT_UNSPECIFIED -} - -// * -// @dev GenAggregatedProofResponse -// @param {id} - proof identifier, to be used in GetProofRequest() -// @param {result} - request result -type GenAggregatedProofResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=aggregator.v1.Result" json:"result,omitempty"` -} - -func (x *GenAggregatedProofResponse) Reset() { - *x = GenAggregatedProofResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenAggregatedProofResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenAggregatedProofResponse) ProtoMessage() {} - -func (x *GenAggregatedProofResponse) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenAggregatedProofResponse.ProtoReflect.Descriptor instead. -func (*GenAggregatedProofResponse) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{11} -} - -func (x *GenAggregatedProofResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *GenAggregatedProofResponse) GetResult() Result { - if x != nil { - return x.Result - } - return Result_RESULT_UNSPECIFIED -} - -// * -// @dev Response GenFinalProof -// @param {id} - proof identifier, to be used in GetProofRequest() -// @param {result} - request result -type GenFinalProofResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=aggregator.v1.Result" json:"result,omitempty"` -} - -func (x *GenFinalProofResponse) Reset() { - *x = GenFinalProofResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenFinalProofResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenFinalProofResponse) ProtoMessage() {} - -func (x *GenFinalProofResponse) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenFinalProofResponse.ProtoReflect.Descriptor instead. -func (*GenFinalProofResponse) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{12} -} - -func (x *GenFinalProofResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *GenFinalProofResponse) GetResult() Result { - if x != nil { - return x.Result - } - return Result_RESULT_UNSPECIFIED -} - -// * -// @dev CancelResponse -// @param {result} - request result -type CancelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result Result `protobuf:"varint,1,opt,name=result,proto3,enum=aggregator.v1.Result" json:"result,omitempty"` -} - -func (x *CancelResponse) Reset() { - *x = CancelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CancelResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelResponse) ProtoMessage() {} - -func (x *CancelResponse) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancelResponse.ProtoReflect.Descriptor instead. -func (*CancelResponse) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{13} -} - -func (x *CancelResponse) GetResult() Result { - if x != nil { - return x.Result - } - return Result_RESULT_UNSPECIFIED -} - -// * -// @dev GetProofResponse -// @param {id} - proof identifier -// @param {final_proof} - groth16 proof + public circuit inputs -// @param {recursive_proof} - recursive proof json -// @param {result} - proof result -// - COMPLETED_OK: proof has been computed successfully and it is valid -// - ERROR: request error -// - COMPLETED_ERROR: proof has been computed successfully and it is not valid -// - PENDING: proof is being computed -// - INTERNAL_ERROR: server error during proof computation -// - CANCEL: proof has been cancelled -// -// @param {result_string} - extends result information -type GetProofResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Types that are assignable to Proof: - // *GetProofResponse_FinalProof - // *GetProofResponse_RecursiveProof - Proof isGetProofResponse_Proof `protobuf_oneof:"proof"` - Result GetProofResponse_Result `protobuf:"varint,4,opt,name=result,proto3,enum=aggregator.v1.GetProofResponse_Result" json:"result,omitempty"` - ResultString string `protobuf:"bytes,5,opt,name=result_string,json=resultString,proto3" json:"result_string,omitempty"` -} - -func (x *GetProofResponse) Reset() { - *x = GetProofResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetProofResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProofResponse) ProtoMessage() {} - -func (x *GetProofResponse) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProofResponse.ProtoReflect.Descriptor instead. -func (*GetProofResponse) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{14} -} - -func (x *GetProofResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (m *GetProofResponse) GetProof() isGetProofResponse_Proof { - if m != nil { - return m.Proof - } - return nil -} - -func (x *GetProofResponse) GetFinalProof() *FinalProof { - if x, ok := x.GetProof().(*GetProofResponse_FinalProof); ok { - return x.FinalProof - } - return nil -} - -func (x *GetProofResponse) GetRecursiveProof() string { - if x, ok := x.GetProof().(*GetProofResponse_RecursiveProof); ok { - return x.RecursiveProof - } - return "" -} - -func (x *GetProofResponse) GetResult() GetProofResponse_Result { - if x != nil { - return x.Result - } - return GetProofResponse_RESULT_UNSPECIFIED -} - -func (x *GetProofResponse) GetResultString() string { - if x != nil { - return x.ResultString - } - return "" -} - -type isGetProofResponse_Proof interface { - isGetProofResponse_Proof() -} - -type GetProofResponse_FinalProof struct { - FinalProof *FinalProof `protobuf:"bytes,2,opt,name=final_proof,json=finalProof,proto3,oneof"` -} - -type GetProofResponse_RecursiveProof struct { - RecursiveProof string `protobuf:"bytes,3,opt,name=recursive_proof,json=recursiveProof,proto3,oneof"` -} - -func (*GetProofResponse_FinalProof) isGetProofResponse_Proof() {} - -func (*GetProofResponse_RecursiveProof) isGetProofResponse_Proof() {} - -// @dev FinalProof -// @param {proof} - groth16 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"` -} - -func (x *FinalProof) Reset() { - *x = FinalProof{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FinalProof) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FinalProof) ProtoMessage() {} - -func (x *FinalProof) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FinalProof.ProtoReflect.Descriptor instead. -func (*FinalProof) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{15} -} - -func (x *FinalProof) GetProof() string { - if x != nil { - return x.Proof - } - return "" -} - -func (x *FinalProof) GetPublic() *PublicInputsExtended { - if x != nil { - return x.Public - } - return nil -} - -// @dev PublicInputs -// @param {old_state_root} -// @param {old_acc_input_hash} -// @param {old_batch_num} -// @param {chain_id} -// @param {batch_l2_data} -// @param {global_exit_root} -// @param {sequencer_addr} -// @param {aggregator_addr} -type PublicInputs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OldStateRoot []byte `protobuf:"bytes,1,opt,name=old_state_root,json=oldStateRoot,proto3" json:"old_state_root,omitempty"` - OldAccInputHash []byte `protobuf:"bytes,2,opt,name=old_acc_input_hash,json=oldAccInputHash,proto3" json:"old_acc_input_hash,omitempty"` - OldBatchNum uint64 `protobuf:"varint,3,opt,name=old_batch_num,json=oldBatchNum,proto3" json:"old_batch_num,omitempty"` - ChainId uint64 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ForkId uint64 `protobuf:"varint,5,opt,name=fork_id,json=forkId,proto3" json:"fork_id,omitempty"` - BatchL2Data []byte `protobuf:"bytes,6,opt,name=batch_l2_data,json=batchL2Data,proto3" json:"batch_l2_data,omitempty"` - GlobalExitRoot []byte `protobuf:"bytes,7,opt,name=global_exit_root,json=globalExitRoot,proto3" json:"global_exit_root,omitempty"` - EthTimestamp uint64 `protobuf:"varint,8,opt,name=eth_timestamp,json=ethTimestamp,proto3" json:"eth_timestamp,omitempty"` - SequencerAddr string `protobuf:"bytes,9,opt,name=sequencer_addr,json=sequencerAddr,proto3" json:"sequencer_addr,omitempty"` - AggregatorAddr string `protobuf:"bytes,10,opt,name=aggregator_addr,json=aggregatorAddr,proto3" json:"aggregator_addr,omitempty"` -} - -func (x *PublicInputs) Reset() { - *x = PublicInputs{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PublicInputs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PublicInputs) ProtoMessage() {} - -func (x *PublicInputs) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PublicInputs.ProtoReflect.Descriptor instead. -func (*PublicInputs) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{16} -} - -func (x *PublicInputs) GetOldStateRoot() []byte { - if x != nil { - return x.OldStateRoot - } - return nil -} - -func (x *PublicInputs) GetOldAccInputHash() []byte { - if x != nil { - return x.OldAccInputHash - } - return nil -} - -func (x *PublicInputs) GetOldBatchNum() uint64 { - if x != nil { - return x.OldBatchNum - } - return 0 -} - -func (x *PublicInputs) GetChainId() uint64 { - if x != nil { - return x.ChainId - } - return 0 -} - -func (x *PublicInputs) GetForkId() uint64 { - if x != nil { - return x.ForkId - } - return 0 -} - -func (x *PublicInputs) GetBatchL2Data() []byte { - if x != nil { - return x.BatchL2Data - } - return nil -} - -func (x *PublicInputs) GetGlobalExitRoot() []byte { - if x != nil { - return x.GlobalExitRoot - } - return nil -} - -func (x *PublicInputs) GetEthTimestamp() uint64 { - if x != nil { - return x.EthTimestamp - } - return 0 -} - -func (x *PublicInputs) GetSequencerAddr() string { - if x != nil { - return x.SequencerAddr - } - return "" -} - -func (x *PublicInputs) GetAggregatorAddr() string { - if x != nil { - return x.AggregatorAddr - } - return "" -} - -// * -// @dev InputProver -// @param {public_inputs} - public inputs -// @param {db} - database containing all key-values in smt matching the old state root -// @param {contracts_bytecode} - key is the hash(contractBytecode), value is the bytecode itself -type InputProver struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PublicInputs *PublicInputs `protobuf:"bytes,1,opt,name=public_inputs,json=publicInputs,proto3" json:"public_inputs,omitempty"` - Db map[string]string `protobuf:"bytes,4,rep,name=db,proto3" json:"db,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // For debug/testing purpposes only. Don't fill this on production - ContractsBytecode map[string]string `protobuf:"bytes,5,rep,name=contracts_bytecode,json=contractsBytecode,proto3" json:"contracts_bytecode,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // For debug/testing purpposes only. Don't fill this on production -} - -func (x *InputProver) Reset() { - *x = InputProver{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InputProver) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InputProver) ProtoMessage() {} - -func (x *InputProver) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InputProver.ProtoReflect.Descriptor instead. -func (*InputProver) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{17} -} - -func (x *InputProver) GetPublicInputs() *PublicInputs { - if x != nil { - return x.PublicInputs - } - return nil -} - -func (x *InputProver) GetDb() map[string]string { - if x != nil { - return x.Db - } - return nil -} - -func (x *InputProver) GetContractsBytecode() map[string]string { - if x != nil { - return x.ContractsBytecode - } - return nil -} - -// * -// @dev PublicInputsExtended -// @param {public_inputs} - public inputs -// @param {new_state_root} - final state root. Used as a sanity check. -// @param {new_acc_input_hash} - final accumulate input hash. Used as a sanity check. -// @param {new_local_exit_root} - new local exit root. Used as a sanity check. -// @param {new_batch_num} - final num batch. Used as a sanity check. -type PublicInputsExtended struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PublicInputs *PublicInputs `protobuf:"bytes,1,opt,name=public_inputs,json=publicInputs,proto3" json:"public_inputs,omitempty"` - NewStateRoot []byte `protobuf:"bytes,2,opt,name=new_state_root,json=newStateRoot,proto3" json:"new_state_root,omitempty"` - NewAccInputHash []byte `protobuf:"bytes,3,opt,name=new_acc_input_hash,json=newAccInputHash,proto3" json:"new_acc_input_hash,omitempty"` - NewLocalExitRoot []byte `protobuf:"bytes,4,opt,name=new_local_exit_root,json=newLocalExitRoot,proto3" json:"new_local_exit_root,omitempty"` - NewBatchNum uint64 `protobuf:"varint,5,opt,name=new_batch_num,json=newBatchNum,proto3" json:"new_batch_num,omitempty"` -} - -func (x *PublicInputsExtended) Reset() { - *x = PublicInputsExtended{} - if protoimpl.UnsafeEnabled { - mi := &file_aggregator_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PublicInputsExtended) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PublicInputsExtended) ProtoMessage() {} - -func (x *PublicInputsExtended) ProtoReflect() protoreflect.Message { - mi := &file_aggregator_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PublicInputsExtended.ProtoReflect.Descriptor instead. -func (*PublicInputsExtended) Descriptor() ([]byte, []int) { - return file_aggregator_proto_rawDescGZIP(), []int{18} -} - -func (x *PublicInputsExtended) GetPublicInputs() *PublicInputs { - if x != nil { - return x.PublicInputs - } - return nil -} - -func (x *PublicInputsExtended) GetNewStateRoot() []byte { - if x != nil { - return x.NewStateRoot - } - return nil -} - -func (x *PublicInputsExtended) GetNewAccInputHash() []byte { - if x != nil { - return x.NewAccInputHash - } - return nil -} - -func (x *PublicInputsExtended) GetNewLocalExitRoot() []byte { - if x != nil { - return x.NewLocalExitRoot - } - return nil -} - -func (x *PublicInputsExtended) GetNewBatchNum() uint64 { - if x != nil { - return x.NewBatchNum - } - return 0 -} - -var File_aggregator_proto protoreflect.FileDescriptor - -var file_aggregator_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0d, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x22, 0x1f, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x06, - 0x76, 0x30, 0x5f, 0x30, 0x5f, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x30, - 0x30, 0x31, 0x22, 0xbd, 0x04, 0x0a, 0x11, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4f, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x10, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5c, 0x0a, 0x17, 0x67, 0x65, 0x6e, - 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x14, 0x67, 0x65, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x1c, 0x67, 0x65, 0x6e, 0x5f, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x6e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x19, 0x67, 0x65, 0x6e, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x5c, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x5f, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x14, 0x67, 0x65, - 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x11, 0x67, 0x65, 0x74, - 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0xcc, 0x04, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x52, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x11, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x18, 0x67, 0x65, 0x6e, 0x5f, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x48, 0x00, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x1d, 0x67, 0x65, 0x6e, - 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, - 0x66, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x6e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1a, 0x67, - 0x65, 0x6e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x18, 0x67, 0x65, 0x6e, - 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x46, - 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x00, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, - 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0f, 0x63, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x6f, - 0x66, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x00, 0x52, 0x10, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x14, 0x47, 0x65, 0x6e, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, - 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 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, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, - 0x73, 0x0a, 0x19, 0x47, 0x65, 0x6e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, - 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, - 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, - 0x76, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x31, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x75, - 0x72, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x32, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x32, 0x22, 0x68, 0x0a, 0x14, 0x47, 0x65, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, - 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x22, 0x1f, - 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x3b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xfc, 0x05, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x75, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x16, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, - 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6c, 0x61, - 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x3f, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, - 0x39, 0x0a, 0x19, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x16, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, - 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, - 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x43, 0x6f, 0x72, 0x65, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x65, 0x6d, - 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, - 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x66, 0x72, 0x65, 0x65, 0x4d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x22, 0x6c, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x49, 0x4e, - 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, - 0x4d, 0x50, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x48, 0x41, 0x4c, 0x54, 0x10, 0x04, 0x22, 0x56, 0x0a, 0x15, 0x47, - 0x65, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x22, 0x5b, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x22, 0x56, 0x0a, 0x15, 0x47, 0x65, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3f, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa5, 0x03, 0x0a, 0x10, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3c, - 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, - 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x29, 0x0a, 0x0f, - 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, - 0x76, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa9, 0x01, 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, - 0x17, 0x0a, 0x13, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, - 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x53, 0x55, - 0x4c, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, - 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, - 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x04, 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, 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, - 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, 0x35, 0x5a, 0x33, 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, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_aggregator_proto_rawDescOnce sync.Once - file_aggregator_proto_rawDescData = file_aggregator_proto_rawDesc -) - -func file_aggregator_proto_rawDescGZIP() []byte { - file_aggregator_proto_rawDescOnce.Do(func() { - file_aggregator_proto_rawDescData = protoimpl.X.CompressGZIP(file_aggregator_proto_rawDescData) - }) - return file_aggregator_proto_rawDescData -} - -var file_aggregator_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_aggregator_proto_msgTypes = make([]protoimpl.MessageInfo, 21) -var file_aggregator_proto_goTypes = []interface{}{ - (Result)(0), // 0: aggregator.v1.Result - (GetStatusResponse_Status)(0), // 1: aggregator.v1.GetStatusResponse.Status - (GetProofResponse_Result)(0), // 2: aggregator.v1.GetProofResponse.Result - (*Version)(nil), // 3: aggregator.v1.Version - (*AggregatorMessage)(nil), // 4: aggregator.v1.AggregatorMessage - (*ProverMessage)(nil), // 5: aggregator.v1.ProverMessage - (*GetStatusRequest)(nil), // 6: aggregator.v1.GetStatusRequest - (*GenBatchProofRequest)(nil), // 7: aggregator.v1.GenBatchProofRequest - (*GenAggregatedProofRequest)(nil), // 8: aggregator.v1.GenAggregatedProofRequest - (*GenFinalProofRequest)(nil), // 9: aggregator.v1.GenFinalProofRequest - (*CancelRequest)(nil), // 10: aggregator.v1.CancelRequest - (*GetProofRequest)(nil), // 11: aggregator.v1.GetProofRequest - (*GetStatusResponse)(nil), // 12: aggregator.v1.GetStatusResponse - (*GenBatchProofResponse)(nil), // 13: aggregator.v1.GenBatchProofResponse - (*GenAggregatedProofResponse)(nil), // 14: aggregator.v1.GenAggregatedProofResponse - (*GenFinalProofResponse)(nil), // 15: aggregator.v1.GenFinalProofResponse - (*CancelResponse)(nil), // 16: aggregator.v1.CancelResponse - (*GetProofResponse)(nil), // 17: aggregator.v1.GetProofResponse - (*FinalProof)(nil), // 18: aggregator.v1.FinalProof - (*PublicInputs)(nil), // 19: aggregator.v1.PublicInputs - (*InputProver)(nil), // 20: aggregator.v1.InputProver - (*PublicInputsExtended)(nil), // 21: aggregator.v1.PublicInputsExtended - nil, // 22: aggregator.v1.InputProver.DbEntry - nil, // 23: aggregator.v1.InputProver.ContractsBytecodeEntry -} -var file_aggregator_proto_depIdxs = []int32{ - 6, // 0: aggregator.v1.AggregatorMessage.get_status_request:type_name -> aggregator.v1.GetStatusRequest - 7, // 1: aggregator.v1.AggregatorMessage.gen_batch_proof_request:type_name -> aggregator.v1.GenBatchProofRequest - 8, // 2: aggregator.v1.AggregatorMessage.gen_aggregated_proof_request:type_name -> aggregator.v1.GenAggregatedProofRequest - 9, // 3: aggregator.v1.AggregatorMessage.gen_final_proof_request:type_name -> aggregator.v1.GenFinalProofRequest - 10, // 4: aggregator.v1.AggregatorMessage.cancel_request:type_name -> aggregator.v1.CancelRequest - 11, // 5: aggregator.v1.AggregatorMessage.get_proof_request:type_name -> aggregator.v1.GetProofRequest - 12, // 6: aggregator.v1.ProverMessage.get_status_response:type_name -> aggregator.v1.GetStatusResponse - 13, // 7: aggregator.v1.ProverMessage.gen_batch_proof_response:type_name -> aggregator.v1.GenBatchProofResponse - 14, // 8: aggregator.v1.ProverMessage.gen_aggregated_proof_response:type_name -> aggregator.v1.GenAggregatedProofResponse - 15, // 9: aggregator.v1.ProverMessage.gen_final_proof_response:type_name -> aggregator.v1.GenFinalProofResponse - 16, // 10: aggregator.v1.ProverMessage.cancel_response:type_name -> aggregator.v1.CancelResponse - 17, // 11: aggregator.v1.ProverMessage.get_proof_response:type_name -> aggregator.v1.GetProofResponse - 20, // 12: aggregator.v1.GenBatchProofRequest.input:type_name -> aggregator.v1.InputProver - 1, // 13: aggregator.v1.GetStatusResponse.status:type_name -> aggregator.v1.GetStatusResponse.Status - 0, // 14: aggregator.v1.GenBatchProofResponse.result:type_name -> aggregator.v1.Result - 0, // 15: aggregator.v1.GenAggregatedProofResponse.result:type_name -> aggregator.v1.Result - 0, // 16: aggregator.v1.GenFinalProofResponse.result:type_name -> aggregator.v1.Result - 0, // 17: aggregator.v1.CancelResponse.result:type_name -> aggregator.v1.Result - 18, // 18: aggregator.v1.GetProofResponse.final_proof:type_name -> aggregator.v1.FinalProof - 2, // 19: aggregator.v1.GetProofResponse.result:type_name -> aggregator.v1.GetProofResponse.Result - 21, // 20: aggregator.v1.FinalProof.public:type_name -> aggregator.v1.PublicInputsExtended - 19, // 21: aggregator.v1.InputProver.public_inputs:type_name -> aggregator.v1.PublicInputs - 22, // 22: aggregator.v1.InputProver.db:type_name -> aggregator.v1.InputProver.DbEntry - 23, // 23: aggregator.v1.InputProver.contracts_bytecode:type_name -> aggregator.v1.InputProver.ContractsBytecodeEntry - 19, // 24: aggregator.v1.PublicInputsExtended.public_inputs:type_name -> aggregator.v1.PublicInputs - 5, // 25: aggregator.v1.AggregatorService.Channel:input_type -> aggregator.v1.ProverMessage - 4, // 26: aggregator.v1.AggregatorService.Channel:output_type -> aggregator.v1.AggregatorMessage - 26, // [26:27] is the sub-list for method output_type - 25, // [25:26] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name -} - -func init() { file_aggregator_proto_init() } -func file_aggregator_proto_init() { - if File_aggregator_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_aggregator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregatorMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProverMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenBatchProofRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenAggregatedProofRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenFinalProofRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProofRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenBatchProofResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenAggregatedProofResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenFinalProofResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProofResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FinalProof); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PublicInputs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InputProver); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_aggregator_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PublicInputsExtended); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_aggregator_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*AggregatorMessage_GetStatusRequest)(nil), - (*AggregatorMessage_GenBatchProofRequest)(nil), - (*AggregatorMessage_GenAggregatedProofRequest)(nil), - (*AggregatorMessage_GenFinalProofRequest)(nil), - (*AggregatorMessage_CancelRequest)(nil), - (*AggregatorMessage_GetProofRequest)(nil), - } - file_aggregator_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*ProverMessage_GetStatusResponse)(nil), - (*ProverMessage_GenBatchProofResponse)(nil), - (*ProverMessage_GenAggregatedProofResponse)(nil), - (*ProverMessage_GenFinalProofResponse)(nil), - (*ProverMessage_CancelResponse)(nil), - (*ProverMessage_GetProofResponse)(nil), - } - file_aggregator_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*GetProofResponse_FinalProof)(nil), - (*GetProofResponse_RecursiveProof)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_aggregator_proto_rawDesc, - NumEnums: 3, - NumMessages: 21, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_aggregator_proto_goTypes, - DependencyIndexes: file_aggregator_proto_depIdxs, - EnumInfos: file_aggregator_proto_enumTypes, - MessageInfos: file_aggregator_proto_msgTypes, - }.Build() - File_aggregator_proto = out.File - file_aggregator_proto_rawDesc = nil - file_aggregator_proto_goTypes = nil - file_aggregator_proto_depIdxs = nil -} diff --git a/aggregator/prover/aggregator.pb.go b/aggregator/prover/aggregator.pb.go new file mode 100644 index 0000000000..6e635bcee2 --- /dev/null +++ b/aggregator/prover/aggregator.pb.go @@ -0,0 +1,1659 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: aggregator.proto + +package prover + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +//* +// @dev Result +// - OK: succesfully completed +// - ERROR: request is not correct, i.e. input data is wrong +// - INTERNAL_ERROR: internal server error when delivering the response +type Result int32 + +const ( + Result_RESULT_UNSPECIFIED Result = 0 + Result_RESULT_OK Result = 1 + Result_RESULT_ERROR Result = 2 + Result_RESULT_INTERNAL_ERROR Result = 3 +) + +var Result_name = map[int32]string{ + 0: "RESULT_UNSPECIFIED", + 1: "RESULT_OK", + 2: "RESULT_ERROR", + 3: "RESULT_INTERNAL_ERROR", +} + +var Result_value = map[string]int32{ + "RESULT_UNSPECIFIED": 0, + "RESULT_OK": 1, + "RESULT_ERROR": 2, + "RESULT_INTERNAL_ERROR": 3, +} + +func (x Result) String() string { + return proto.EnumName(Result_name, int32(x)) +} + +func (Result) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{0} +} + +type GetStatusResponse_Status int32 + +const ( + GetStatusResponse_STATUS_UNSPECIFIED GetStatusResponse_Status = 0 + GetStatusResponse_STATUS_BOOTING GetStatusResponse_Status = 1 + GetStatusResponse_STATUS_COMPUTING GetStatusResponse_Status = 2 + GetStatusResponse_STATUS_IDLE GetStatusResponse_Status = 3 + GetStatusResponse_STATUS_HALT GetStatusResponse_Status = 4 +) + +var GetStatusResponse_Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "STATUS_BOOTING", + 2: "STATUS_COMPUTING", + 3: "STATUS_IDLE", + 4: "STATUS_HALT", +} + +var GetStatusResponse_Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "STATUS_BOOTING": 1, + "STATUS_COMPUTING": 2, + "STATUS_IDLE": 3, + "STATUS_HALT": 4, +} + +func (x GetStatusResponse_Status) String() string { + return proto.EnumName(GetStatusResponse_Status_name, int32(x)) +} + +func (GetStatusResponse_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{9, 0} +} + +type GetProofResponse_Result int32 + +const ( + GetProofResponse_RESULT_UNSPECIFIED GetProofResponse_Result = 0 + GetProofResponse_RESULT_COMPLETED_OK GetProofResponse_Result = 1 + GetProofResponse_RESULT_ERROR GetProofResponse_Result = 2 + GetProofResponse_RESULT_COMPLETED_ERROR GetProofResponse_Result = 3 + GetProofResponse_RESULT_PENDING GetProofResponse_Result = 4 + GetProofResponse_RESULT_INTERNAL_ERROR GetProofResponse_Result = 5 + GetProofResponse_RESULT_CANCEL GetProofResponse_Result = 6 +) + +var GetProofResponse_Result_name = map[int32]string{ + 0: "RESULT_UNSPECIFIED", + 1: "RESULT_COMPLETED_OK", + 2: "RESULT_ERROR", + 3: "RESULT_COMPLETED_ERROR", + 4: "RESULT_PENDING", + 5: "RESULT_INTERNAL_ERROR", + 6: "RESULT_CANCEL", +} + +var GetProofResponse_Result_value = map[string]int32{ + "RESULT_UNSPECIFIED": 0, + "RESULT_COMPLETED_OK": 1, + "RESULT_ERROR": 2, + "RESULT_COMPLETED_ERROR": 3, + "RESULT_PENDING": 4, + "RESULT_INTERNAL_ERROR": 5, + "RESULT_CANCEL": 6, +} + +func (x GetProofResponse_Result) String() string { + return proto.EnumName(GetProofResponse_Result_name, int32(x)) +} + +func (GetProofResponse_Result) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{14, 0} +} + +type Version struct { + V0_0_1 string `protobuf:"bytes,1,opt,name=v0_0_1,json=v001,proto3" json:"v0_0_1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{0} +} + +func (m *Version) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Version.Unmarshal(m, b) +} +func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Version.Marshal(b, m, deterministic) +} +func (m *Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_Version.Merge(m, src) +} +func (m *Version) XXX_Size() int { + return xxx_messageInfo_Version.Size(m) +} +func (m *Version) XXX_DiscardUnknown() { + xxx_messageInfo_Version.DiscardUnknown(m) +} + +var xxx_messageInfo_Version proto.InternalMessageInfo + +func (m *Version) GetV0_0_1() string { + if m != nil { + return m.V0_0_1 + } + return "" +} + +type AggregatorMessage struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Types that are valid to be assigned to Request: + // *AggregatorMessage_GetStatusRequest + // *AggregatorMessage_GenBatchProofRequest + // *AggregatorMessage_GenAggregatedProofRequest + // *AggregatorMessage_GenFinalProofRequest + // *AggregatorMessage_CancelRequest + // *AggregatorMessage_GetProofRequest + Request isAggregatorMessage_Request `protobuf_oneof:"request"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AggregatorMessage) Reset() { *m = AggregatorMessage{} } +func (m *AggregatorMessage) String() string { return proto.CompactTextString(m) } +func (*AggregatorMessage) ProtoMessage() {} +func (*AggregatorMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{1} +} + +func (m *AggregatorMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AggregatorMessage.Unmarshal(m, b) +} +func (m *AggregatorMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AggregatorMessage.Marshal(b, m, deterministic) +} +func (m *AggregatorMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregatorMessage.Merge(m, src) +} +func (m *AggregatorMessage) XXX_Size() int { + return xxx_messageInfo_AggregatorMessage.Size(m) +} +func (m *AggregatorMessage) XXX_DiscardUnknown() { + xxx_messageInfo_AggregatorMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregatorMessage proto.InternalMessageInfo + +func (m *AggregatorMessage) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type isAggregatorMessage_Request interface { + isAggregatorMessage_Request() +} + +type AggregatorMessage_GetStatusRequest struct { + GetStatusRequest *GetStatusRequest `protobuf:"bytes,2,opt,name=get_status_request,json=getStatusRequest,proto3,oneof"` +} + +type AggregatorMessage_GenBatchProofRequest struct { + GenBatchProofRequest *GenBatchProofRequest `protobuf:"bytes,3,opt,name=gen_batch_proof_request,json=genBatchProofRequest,proto3,oneof"` +} + +type AggregatorMessage_GenAggregatedProofRequest struct { + GenAggregatedProofRequest *GenAggregatedProofRequest `protobuf:"bytes,4,opt,name=gen_aggregated_proof_request,json=genAggregatedProofRequest,proto3,oneof"` +} + +type AggregatorMessage_GenFinalProofRequest struct { + GenFinalProofRequest *GenFinalProofRequest `protobuf:"bytes,5,opt,name=gen_final_proof_request,json=genFinalProofRequest,proto3,oneof"` +} + +type AggregatorMessage_CancelRequest struct { + CancelRequest *CancelRequest `protobuf:"bytes,6,opt,name=cancel_request,json=cancelRequest,proto3,oneof"` +} + +type AggregatorMessage_GetProofRequest struct { + GetProofRequest *GetProofRequest `protobuf:"bytes,7,opt,name=get_proof_request,json=getProofRequest,proto3,oneof"` +} + +func (*AggregatorMessage_GetStatusRequest) isAggregatorMessage_Request() {} + +func (*AggregatorMessage_GenBatchProofRequest) isAggregatorMessage_Request() {} + +func (*AggregatorMessage_GenAggregatedProofRequest) isAggregatorMessage_Request() {} + +func (*AggregatorMessage_GenFinalProofRequest) isAggregatorMessage_Request() {} + +func (*AggregatorMessage_CancelRequest) isAggregatorMessage_Request() {} + +func (*AggregatorMessage_GetProofRequest) isAggregatorMessage_Request() {} + +func (m *AggregatorMessage) GetRequest() isAggregatorMessage_Request { + if m != nil { + return m.Request + } + return nil +} + +func (m *AggregatorMessage) GetGetStatusRequest() *GetStatusRequest { + if x, ok := m.GetRequest().(*AggregatorMessage_GetStatusRequest); ok { + return x.GetStatusRequest + } + return nil +} + +func (m *AggregatorMessage) GetGenBatchProofRequest() *GenBatchProofRequest { + if x, ok := m.GetRequest().(*AggregatorMessage_GenBatchProofRequest); ok { + return x.GenBatchProofRequest + } + return nil +} + +func (m *AggregatorMessage) GetGenAggregatedProofRequest() *GenAggregatedProofRequest { + if x, ok := m.GetRequest().(*AggregatorMessage_GenAggregatedProofRequest); ok { + return x.GenAggregatedProofRequest + } + return nil +} + +func (m *AggregatorMessage) GetGenFinalProofRequest() *GenFinalProofRequest { + if x, ok := m.GetRequest().(*AggregatorMessage_GenFinalProofRequest); ok { + return x.GenFinalProofRequest + } + return nil +} + +func (m *AggregatorMessage) GetCancelRequest() *CancelRequest { + if x, ok := m.GetRequest().(*AggregatorMessage_CancelRequest); ok { + return x.CancelRequest + } + return nil +} + +func (m *AggregatorMessage) GetGetProofRequest() *GetProofRequest { + if x, ok := m.GetRequest().(*AggregatorMessage_GetProofRequest); ok { + return x.GetProofRequest + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*AggregatorMessage) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*AggregatorMessage_GetStatusRequest)(nil), + (*AggregatorMessage_GenBatchProofRequest)(nil), + (*AggregatorMessage_GenAggregatedProofRequest)(nil), + (*AggregatorMessage_GenFinalProofRequest)(nil), + (*AggregatorMessage_CancelRequest)(nil), + (*AggregatorMessage_GetProofRequest)(nil), + } +} + +type ProverMessage struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Types that are valid to be assigned to Response: + // *ProverMessage_GetStatusResponse + // *ProverMessage_GenBatchProofResponse + // *ProverMessage_GenAggregatedProofResponse + // *ProverMessage_GenFinalProofResponse + // *ProverMessage_CancelResponse + // *ProverMessage_GetProofResponse + Response isProverMessage_Response `protobuf_oneof:"response"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProverMessage) Reset() { *m = ProverMessage{} } +func (m *ProverMessage) String() string { return proto.CompactTextString(m) } +func (*ProverMessage) ProtoMessage() {} +func (*ProverMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{2} +} + +func (m *ProverMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProverMessage.Unmarshal(m, b) +} +func (m *ProverMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProverMessage.Marshal(b, m, deterministic) +} +func (m *ProverMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProverMessage.Merge(m, src) +} +func (m *ProverMessage) XXX_Size() int { + return xxx_messageInfo_ProverMessage.Size(m) +} +func (m *ProverMessage) XXX_DiscardUnknown() { + xxx_messageInfo_ProverMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_ProverMessage proto.InternalMessageInfo + +func (m *ProverMessage) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type isProverMessage_Response interface { + isProverMessage_Response() +} + +type ProverMessage_GetStatusResponse struct { + GetStatusResponse *GetStatusResponse `protobuf:"bytes,2,opt,name=get_status_response,json=getStatusResponse,proto3,oneof"` +} + +type ProverMessage_GenBatchProofResponse struct { + GenBatchProofResponse *GenBatchProofResponse `protobuf:"bytes,3,opt,name=gen_batch_proof_response,json=genBatchProofResponse,proto3,oneof"` +} + +type ProverMessage_GenAggregatedProofResponse struct { + GenAggregatedProofResponse *GenAggregatedProofResponse `protobuf:"bytes,4,opt,name=gen_aggregated_proof_response,json=genAggregatedProofResponse,proto3,oneof"` +} + +type ProverMessage_GenFinalProofResponse struct { + GenFinalProofResponse *GenFinalProofResponse `protobuf:"bytes,5,opt,name=gen_final_proof_response,json=genFinalProofResponse,proto3,oneof"` +} + +type ProverMessage_CancelResponse struct { + CancelResponse *CancelResponse `protobuf:"bytes,6,opt,name=cancel_response,json=cancelResponse,proto3,oneof"` +} + +type ProverMessage_GetProofResponse struct { + GetProofResponse *GetProofResponse `protobuf:"bytes,7,opt,name=get_proof_response,json=getProofResponse,proto3,oneof"` +} + +func (*ProverMessage_GetStatusResponse) isProverMessage_Response() {} + +func (*ProverMessage_GenBatchProofResponse) isProverMessage_Response() {} + +func (*ProverMessage_GenAggregatedProofResponse) isProverMessage_Response() {} + +func (*ProverMessage_GenFinalProofResponse) isProverMessage_Response() {} + +func (*ProverMessage_CancelResponse) isProverMessage_Response() {} + +func (*ProverMessage_GetProofResponse) isProverMessage_Response() {} + +func (m *ProverMessage) GetResponse() isProverMessage_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *ProverMessage) GetGetStatusResponse() *GetStatusResponse { + if x, ok := m.GetResponse().(*ProverMessage_GetStatusResponse); ok { + return x.GetStatusResponse + } + return nil +} + +func (m *ProverMessage) GetGenBatchProofResponse() *GenBatchProofResponse { + if x, ok := m.GetResponse().(*ProverMessage_GenBatchProofResponse); ok { + return x.GenBatchProofResponse + } + return nil +} + +func (m *ProverMessage) GetGenAggregatedProofResponse() *GenAggregatedProofResponse { + if x, ok := m.GetResponse().(*ProverMessage_GenAggregatedProofResponse); ok { + return x.GenAggregatedProofResponse + } + return nil +} + +func (m *ProverMessage) GetGenFinalProofResponse() *GenFinalProofResponse { + if x, ok := m.GetResponse().(*ProverMessage_GenFinalProofResponse); ok { + return x.GenFinalProofResponse + } + return nil +} + +func (m *ProverMessage) GetCancelResponse() *CancelResponse { + if x, ok := m.GetResponse().(*ProverMessage_CancelResponse); ok { + return x.CancelResponse + } + return nil +} + +func (m *ProverMessage) GetGetProofResponse() *GetProofResponse { + if x, ok := m.GetResponse().(*ProverMessage_GetProofResponse); ok { + return x.GetProofResponse + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ProverMessage) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ProverMessage_GetStatusResponse)(nil), + (*ProverMessage_GenBatchProofResponse)(nil), + (*ProverMessage_GenAggregatedProofResponse)(nil), + (*ProverMessage_GenFinalProofResponse)(nil), + (*ProverMessage_CancelResponse)(nil), + (*ProverMessage_GetProofResponse)(nil), + } +} + +//* +// @dev GetStatusRequest +type GetStatusRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetStatusRequest) Reset() { *m = GetStatusRequest{} } +func (m *GetStatusRequest) String() string { return proto.CompactTextString(m) } +func (*GetStatusRequest) ProtoMessage() {} +func (*GetStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{3} +} + +func (m *GetStatusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetStatusRequest.Unmarshal(m, b) +} +func (m *GetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetStatusRequest.Marshal(b, m, deterministic) +} +func (m *GetStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetStatusRequest.Merge(m, src) +} +func (m *GetStatusRequest) XXX_Size() int { + return xxx_messageInfo_GetStatusRequest.Size(m) +} +func (m *GetStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetStatusRequest proto.InternalMessageInfo + +//* +// @dev GenBatchProofRequest +// @param {input} - input prover +type GenBatchProofRequest struct { + Input *InputProver `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenBatchProofRequest) Reset() { *m = GenBatchProofRequest{} } +func (m *GenBatchProofRequest) String() string { return proto.CompactTextString(m) } +func (*GenBatchProofRequest) ProtoMessage() {} +func (*GenBatchProofRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{4} +} + +func (m *GenBatchProofRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenBatchProofRequest.Unmarshal(m, b) +} +func (m *GenBatchProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenBatchProofRequest.Marshal(b, m, deterministic) +} +func (m *GenBatchProofRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenBatchProofRequest.Merge(m, src) +} +func (m *GenBatchProofRequest) XXX_Size() int { + return xxx_messageInfo_GenBatchProofRequest.Size(m) +} +func (m *GenBatchProofRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GenBatchProofRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GenBatchProofRequest proto.InternalMessageInfo + +func (m *GenBatchProofRequest) GetInput() *InputProver { + if m != nil { + return m.Input + } + return nil +} + +//* +// @dev GenAggregatedProofRequest +// @param {recursive_proof_1} - proof json of the first batch to aggregate +// @param {recursive_proof_2} - proof json of the second batch to aggregate +type GenAggregatedProofRequest struct { + RecursiveProof_1 string `protobuf:"bytes,1,opt,name=recursive_proof_1,json=recursiveProof1,proto3" json:"recursive_proof_1,omitempty"` + RecursiveProof_2 string `protobuf:"bytes,2,opt,name=recursive_proof_2,json=recursiveProof2,proto3" json:"recursive_proof_2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenAggregatedProofRequest) Reset() { *m = GenAggregatedProofRequest{} } +func (m *GenAggregatedProofRequest) String() string { return proto.CompactTextString(m) } +func (*GenAggregatedProofRequest) ProtoMessage() {} +func (*GenAggregatedProofRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{5} +} + +func (m *GenAggregatedProofRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenAggregatedProofRequest.Unmarshal(m, b) +} +func (m *GenAggregatedProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenAggregatedProofRequest.Marshal(b, m, deterministic) +} +func (m *GenAggregatedProofRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenAggregatedProofRequest.Merge(m, src) +} +func (m *GenAggregatedProofRequest) XXX_Size() int { + return xxx_messageInfo_GenAggregatedProofRequest.Size(m) +} +func (m *GenAggregatedProofRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GenAggregatedProofRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GenAggregatedProofRequest proto.InternalMessageInfo + +func (m *GenAggregatedProofRequest) GetRecursiveProof_1() string { + if m != nil { + return m.RecursiveProof_1 + } + return "" +} + +func (m *GenAggregatedProofRequest) GetRecursiveProof_2() string { + if m != nil { + return m.RecursiveProof_2 + } + return "" +} + +//* +// @dev GenFinalProofRequest +// @param {recursive_proof} - proof json of the batch or aggregated proof to finalise +// @param {aggregator_addr} - address of the aggregator +type GenFinalProofRequest struct { + RecursiveProof string `protobuf:"bytes,1,opt,name=recursive_proof,json=recursiveProof,proto3" json:"recursive_proof,omitempty"` + AggregatorAddr string `protobuf:"bytes,2,opt,name=aggregator_addr,json=aggregatorAddr,proto3" json:"aggregator_addr,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenFinalProofRequest) Reset() { *m = GenFinalProofRequest{} } +func (m *GenFinalProofRequest) String() string { return proto.CompactTextString(m) } +func (*GenFinalProofRequest) ProtoMessage() {} +func (*GenFinalProofRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{6} +} + +func (m *GenFinalProofRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenFinalProofRequest.Unmarshal(m, b) +} +func (m *GenFinalProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenFinalProofRequest.Marshal(b, m, deterministic) +} +func (m *GenFinalProofRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenFinalProofRequest.Merge(m, src) +} +func (m *GenFinalProofRequest) XXX_Size() int { + return xxx_messageInfo_GenFinalProofRequest.Size(m) +} +func (m *GenFinalProofRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GenFinalProofRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GenFinalProofRequest proto.InternalMessageInfo + +func (m *GenFinalProofRequest) GetRecursiveProof() string { + if m != nil { + return m.RecursiveProof + } + return "" +} + +func (m *GenFinalProofRequest) GetAggregatorAddr() string { + if m != nil { + return m.AggregatorAddr + } + return "" +} + +//* +// @dev CancelRequest +// @param {id} - identifier of the proof request to cancel +type CancelRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CancelRequest) Reset() { *m = CancelRequest{} } +func (m *CancelRequest) String() string { return proto.CompactTextString(m) } +func (*CancelRequest) ProtoMessage() {} +func (*CancelRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{7} +} + +func (m *CancelRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CancelRequest.Unmarshal(m, b) +} +func (m *CancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CancelRequest.Marshal(b, m, deterministic) +} +func (m *CancelRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelRequest.Merge(m, src) +} +func (m *CancelRequest) XXX_Size() int { + return xxx_messageInfo_CancelRequest.Size(m) +} +func (m *CancelRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CancelRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CancelRequest proto.InternalMessageInfo + +func (m *CancelRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +//* +// @dev Request GetProof +// @param {id} - proof identifier of the proof request +// @param {timeout} - time to wait until the service responds +type GetProofRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Timeout uint64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetProofRequest) Reset() { *m = GetProofRequest{} } +func (m *GetProofRequest) String() string { return proto.CompactTextString(m) } +func (*GetProofRequest) ProtoMessage() {} +func (*GetProofRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{8} +} + +func (m *GetProofRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetProofRequest.Unmarshal(m, b) +} +func (m *GetProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetProofRequest.Marshal(b, m, deterministic) +} +func (m *GetProofRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetProofRequest.Merge(m, src) +} +func (m *GetProofRequest) XXX_Size() int { + return xxx_messageInfo_GetProofRequest.Size(m) +} +func (m *GetProofRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetProofRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetProofRequest proto.InternalMessageInfo + +func (m *GetProofRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *GetProofRequest) GetTimeout() uint64 { + if m != nil { + return m.Timeout + } + return 0 +} + +//* +// @dev Response GetStatus +// @param {status} - server status +// - BOOTING: being ready to compute proofs +// - COMPUTING: busy computing a proof +// - IDLE: waiting for a proof to compute +// - HALT: stop +// @param {last_computed_request_id} - last proof identifier that has been computed +// @param {last_computed_end_time} - last proof timestamp when it was finished +// @param {current_computing_request_id} - id of the proof that is being computed +// @param {current_computing_start_time} - timestamp when the proof that is being computed started +// @param {version_proto} - .proto verion +// @param {version_server} - server version +// @param {pending_request_queue_ids} - list of identifierss of proof requests that are in the pending queue +// @param {prover_name} - id of this prover server, normally specified via config.json, or UNSPECIFIED otherwise; it does not change if prover reboots +// @param {prover_id} - id of this prover instance or reboot; it changes if prover reboots; it is a UUID, automatically generated during the initialization +// @param {number_of_cores} - number of cores in the system where the prover is running +// @param {total_memory} - total memory in the system where the prover is running +// @param {free_memory} - free memory in the system where the prover is running +type GetStatusResponse struct { + Status GetStatusResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=aggregator.v1.GetStatusResponse_Status" json:"status,omitempty"` + LastComputedRequestId string `protobuf:"bytes,2,opt,name=last_computed_request_id,json=lastComputedRequestId,proto3" json:"last_computed_request_id,omitempty"` + LastComputedEndTime uint64 `protobuf:"varint,3,opt,name=last_computed_end_time,json=lastComputedEndTime,proto3" json:"last_computed_end_time,omitempty"` + CurrentComputingRequestId string `protobuf:"bytes,4,opt,name=current_computing_request_id,json=currentComputingRequestId,proto3" json:"current_computing_request_id,omitempty"` + CurrentComputingStartTime uint64 `protobuf:"varint,5,opt,name=current_computing_start_time,json=currentComputingStartTime,proto3" json:"current_computing_start_time,omitempty"` + VersionProto string `protobuf:"bytes,6,opt,name=version_proto,json=versionProto,proto3" json:"version_proto,omitempty"` + VersionServer string `protobuf:"bytes,7,opt,name=version_server,json=versionServer,proto3" json:"version_server,omitempty"` + PendingRequestQueueIds []string `protobuf:"bytes,8,rep,name=pending_request_queue_ids,json=pendingRequestQueueIds,proto3" json:"pending_request_queue_ids,omitempty"` + ProverName string `protobuf:"bytes,9,opt,name=prover_name,json=proverName,proto3" json:"prover_name,omitempty"` + ProverId string `protobuf:"bytes,10,opt,name=prover_id,json=proverId,proto3" json:"prover_id,omitempty"` + NumberOfCores uint64 `protobuf:"varint,11,opt,name=number_of_cores,json=numberOfCores,proto3" json:"number_of_cores,omitempty"` + TotalMemory uint64 `protobuf:"varint,12,opt,name=total_memory,json=totalMemory,proto3" json:"total_memory,omitempty"` + FreeMemory uint64 `protobuf:"varint,13,opt,name=free_memory,json=freeMemory,proto3" json:"free_memory,omitempty"` + ForkId uint64 `protobuf:"varint,14,opt,name=fork_id,json=forkId,proto3" json:"fork_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetStatusResponse) Reset() { *m = GetStatusResponse{} } +func (m *GetStatusResponse) String() string { return proto.CompactTextString(m) } +func (*GetStatusResponse) ProtoMessage() {} +func (*GetStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{9} +} + +func (m *GetStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetStatusResponse.Unmarshal(m, b) +} +func (m *GetStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetStatusResponse.Marshal(b, m, deterministic) +} +func (m *GetStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetStatusResponse.Merge(m, src) +} +func (m *GetStatusResponse) XXX_Size() int { + return xxx_messageInfo_GetStatusResponse.Size(m) +} +func (m *GetStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetStatusResponse proto.InternalMessageInfo + +func (m *GetStatusResponse) GetStatus() GetStatusResponse_Status { + if m != nil { + return m.Status + } + return GetStatusResponse_STATUS_UNSPECIFIED +} + +func (m *GetStatusResponse) GetLastComputedRequestId() string { + if m != nil { + return m.LastComputedRequestId + } + return "" +} + +func (m *GetStatusResponse) GetLastComputedEndTime() uint64 { + if m != nil { + return m.LastComputedEndTime + } + return 0 +} + +func (m *GetStatusResponse) GetCurrentComputingRequestId() string { + if m != nil { + return m.CurrentComputingRequestId + } + return "" +} + +func (m *GetStatusResponse) GetCurrentComputingStartTime() uint64 { + if m != nil { + return m.CurrentComputingStartTime + } + return 0 +} + +func (m *GetStatusResponse) GetVersionProto() string { + if m != nil { + return m.VersionProto + } + return "" +} + +func (m *GetStatusResponse) GetVersionServer() string { + if m != nil { + return m.VersionServer + } + return "" +} + +func (m *GetStatusResponse) GetPendingRequestQueueIds() []string { + if m != nil { + return m.PendingRequestQueueIds + } + return nil +} + +func (m *GetStatusResponse) GetProverName() string { + if m != nil { + return m.ProverName + } + return "" +} + +func (m *GetStatusResponse) GetProverId() string { + if m != nil { + return m.ProverId + } + return "" +} + +func (m *GetStatusResponse) GetNumberOfCores() uint64 { + if m != nil { + return m.NumberOfCores + } + return 0 +} + +func (m *GetStatusResponse) GetTotalMemory() uint64 { + if m != nil { + return m.TotalMemory + } + return 0 +} + +func (m *GetStatusResponse) GetFreeMemory() uint64 { + if m != nil { + return m.FreeMemory + } + return 0 +} + +func (m *GetStatusResponse) GetForkId() uint64 { + if m != nil { + return m.ForkId + } + return 0 +} + +//* +// @dev GenBatchProofResponse +// @param {id} - proof identifier, to be used in GetProofRequest() +// @param {result} - request result +type GenBatchProofResponse struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=aggregator.v1.Result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenBatchProofResponse) Reset() { *m = GenBatchProofResponse{} } +func (m *GenBatchProofResponse) String() string { return proto.CompactTextString(m) } +func (*GenBatchProofResponse) ProtoMessage() {} +func (*GenBatchProofResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{10} +} + +func (m *GenBatchProofResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenBatchProofResponse.Unmarshal(m, b) +} +func (m *GenBatchProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenBatchProofResponse.Marshal(b, m, deterministic) +} +func (m *GenBatchProofResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenBatchProofResponse.Merge(m, src) +} +func (m *GenBatchProofResponse) XXX_Size() int { + return xxx_messageInfo_GenBatchProofResponse.Size(m) +} +func (m *GenBatchProofResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GenBatchProofResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GenBatchProofResponse proto.InternalMessageInfo + +func (m *GenBatchProofResponse) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *GenBatchProofResponse) GetResult() Result { + if m != nil { + return m.Result + } + return Result_RESULT_UNSPECIFIED +} + +//* +// @dev GenAggregatedProofResponse +// @param {id} - proof identifier, to be used in GetProofRequest() +// @param {result} - request result +type GenAggregatedProofResponse struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=aggregator.v1.Result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenAggregatedProofResponse) Reset() { *m = GenAggregatedProofResponse{} } +func (m *GenAggregatedProofResponse) String() string { return proto.CompactTextString(m) } +func (*GenAggregatedProofResponse) ProtoMessage() {} +func (*GenAggregatedProofResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{11} +} + +func (m *GenAggregatedProofResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenAggregatedProofResponse.Unmarshal(m, b) +} +func (m *GenAggregatedProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenAggregatedProofResponse.Marshal(b, m, deterministic) +} +func (m *GenAggregatedProofResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenAggregatedProofResponse.Merge(m, src) +} +func (m *GenAggregatedProofResponse) XXX_Size() int { + return xxx_messageInfo_GenAggregatedProofResponse.Size(m) +} +func (m *GenAggregatedProofResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GenAggregatedProofResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GenAggregatedProofResponse proto.InternalMessageInfo + +func (m *GenAggregatedProofResponse) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *GenAggregatedProofResponse) GetResult() Result { + if m != nil { + return m.Result + } + return Result_RESULT_UNSPECIFIED +} + +//* +// @dev Response GenFinalProof +// @param {id} - proof identifier, to be used in GetProofRequest() +// @param {result} - request result +type GenFinalProofResponse struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=aggregator.v1.Result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenFinalProofResponse) Reset() { *m = GenFinalProofResponse{} } +func (m *GenFinalProofResponse) String() string { return proto.CompactTextString(m) } +func (*GenFinalProofResponse) ProtoMessage() {} +func (*GenFinalProofResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{12} +} + +func (m *GenFinalProofResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenFinalProofResponse.Unmarshal(m, b) +} +func (m *GenFinalProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenFinalProofResponse.Marshal(b, m, deterministic) +} +func (m *GenFinalProofResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenFinalProofResponse.Merge(m, src) +} +func (m *GenFinalProofResponse) XXX_Size() int { + return xxx_messageInfo_GenFinalProofResponse.Size(m) +} +func (m *GenFinalProofResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GenFinalProofResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GenFinalProofResponse proto.InternalMessageInfo + +func (m *GenFinalProofResponse) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *GenFinalProofResponse) GetResult() Result { + if m != nil { + return m.Result + } + return Result_RESULT_UNSPECIFIED +} + +//* +// @dev CancelResponse +// @param {result} - request result +type CancelResponse struct { + Result Result `protobuf:"varint,1,opt,name=result,proto3,enum=aggregator.v1.Result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CancelResponse) Reset() { *m = CancelResponse{} } +func (m *CancelResponse) String() string { return proto.CompactTextString(m) } +func (*CancelResponse) ProtoMessage() {} +func (*CancelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{13} +} + +func (m *CancelResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CancelResponse.Unmarshal(m, b) +} +func (m *CancelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CancelResponse.Marshal(b, m, deterministic) +} +func (m *CancelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelResponse.Merge(m, src) +} +func (m *CancelResponse) XXX_Size() int { + return xxx_messageInfo_CancelResponse.Size(m) +} +func (m *CancelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CancelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CancelResponse proto.InternalMessageInfo + +func (m *CancelResponse) GetResult() Result { + if m != nil { + return m.Result + } + return Result_RESULT_UNSPECIFIED +} + +//* +// @dev GetProofResponse +// @param {id} - proof identifier +// @param {final_proof} - groth16 proof + public circuit inputs +// @param {recursive_proof} - recursive proof json +// @param {result} - proof result +// - COMPLETED_OK: proof has been computed successfully and it is valid +// - ERROR: request error +// - COMPLETED_ERROR: proof has been computed successfully and it is not valid +// - PENDING: proof is being computed +// - INTERNAL_ERROR: server error during proof computation +// - CANCEL: proof has been cancelled +// @param {result_string} - extends result information +type GetProofResponse struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Types that are valid to be assigned to Proof: + // *GetProofResponse_FinalProof + // *GetProofResponse_RecursiveProof + Proof isGetProofResponse_Proof `protobuf_oneof:"proof"` + Result GetProofResponse_Result `protobuf:"varint,4,opt,name=result,proto3,enum=aggregator.v1.GetProofResponse_Result" json:"result,omitempty"` + ResultString string `protobuf:"bytes,5,opt,name=result_string,json=resultString,proto3" json:"result_string,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetProofResponse) Reset() { *m = GetProofResponse{} } +func (m *GetProofResponse) String() string { return proto.CompactTextString(m) } +func (*GetProofResponse) ProtoMessage() {} +func (*GetProofResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{14} +} + +func (m *GetProofResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetProofResponse.Unmarshal(m, b) +} +func (m *GetProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetProofResponse.Marshal(b, m, deterministic) +} +func (m *GetProofResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetProofResponse.Merge(m, src) +} +func (m *GetProofResponse) XXX_Size() int { + return xxx_messageInfo_GetProofResponse.Size(m) +} +func (m *GetProofResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetProofResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetProofResponse proto.InternalMessageInfo + +func (m *GetProofResponse) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type isGetProofResponse_Proof interface { + isGetProofResponse_Proof() +} + +type GetProofResponse_FinalProof struct { + FinalProof *FinalProof `protobuf:"bytes,2,opt,name=final_proof,json=finalProof,proto3,oneof"` +} + +type GetProofResponse_RecursiveProof struct { + RecursiveProof string `protobuf:"bytes,3,opt,name=recursive_proof,json=recursiveProof,proto3,oneof"` +} + +func (*GetProofResponse_FinalProof) isGetProofResponse_Proof() {} + +func (*GetProofResponse_RecursiveProof) isGetProofResponse_Proof() {} + +func (m *GetProofResponse) GetProof() isGetProofResponse_Proof { + if m != nil { + return m.Proof + } + return nil +} + +func (m *GetProofResponse) GetFinalProof() *FinalProof { + if x, ok := m.GetProof().(*GetProofResponse_FinalProof); ok { + return x.FinalProof + } + return nil +} + +func (m *GetProofResponse) GetRecursiveProof() string { + if x, ok := m.GetProof().(*GetProofResponse_RecursiveProof); ok { + return x.RecursiveProof + } + return "" +} + +func (m *GetProofResponse) GetResult() GetProofResponse_Result { + if m != nil { + return m.Result + } + return GetProofResponse_RESULT_UNSPECIFIED +} + +func (m *GetProofResponse) GetResultString() string { + if m != nil { + return m.ResultString + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GetProofResponse) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*GetProofResponse_FinalProof)(nil), + (*GetProofResponse_RecursiveProof)(nil), + } +} + +// +// @dev FinalProof +// @param {proof} - groth16 proof +// @param {public} - public circuit inputs +type FinalProof struct { + Proof string `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` + Public *PublicInputsExtended `protobuf:"bytes,2,opt,name=public,proto3" json:"public,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FinalProof) Reset() { *m = FinalProof{} } +func (m *FinalProof) String() string { return proto.CompactTextString(m) } +func (*FinalProof) ProtoMessage() {} +func (*FinalProof) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{15} +} + +func (m *FinalProof) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FinalProof.Unmarshal(m, b) +} +func (m *FinalProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FinalProof.Marshal(b, m, deterministic) +} +func (m *FinalProof) XXX_Merge(src proto.Message) { + xxx_messageInfo_FinalProof.Merge(m, src) +} +func (m *FinalProof) XXX_Size() int { + return xxx_messageInfo_FinalProof.Size(m) +} +func (m *FinalProof) XXX_DiscardUnknown() { + xxx_messageInfo_FinalProof.DiscardUnknown(m) +} + +var xxx_messageInfo_FinalProof proto.InternalMessageInfo + +func (m *FinalProof) GetProof() string { + if m != nil { + return m.Proof + } + return "" +} + +func (m *FinalProof) GetPublic() *PublicInputsExtended { + if m != nil { + return m.Public + } + return nil +} + +// +// @dev PublicInputs +// @param {old_state_root} +// @param {old_acc_input_hash} +// @param {old_batch_num} +// @param {chain_id} +// @param {batch_l2_data} +// @param {global_exit_root} +// @param {sequencer_addr} +// @param {aggregator_addr} +type PublicInputs struct { + OldStateRoot []byte `protobuf:"bytes,1,opt,name=old_state_root,json=oldStateRoot,proto3" json:"old_state_root,omitempty"` + OldAccInputHash []byte `protobuf:"bytes,2,opt,name=old_acc_input_hash,json=oldAccInputHash,proto3" json:"old_acc_input_hash,omitempty"` + OldBatchNum uint64 `protobuf:"varint,3,opt,name=old_batch_num,json=oldBatchNum,proto3" json:"old_batch_num,omitempty"` + ChainId uint64 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + ForkId uint64 `protobuf:"varint,5,opt,name=fork_id,json=forkId,proto3" json:"fork_id,omitempty"` + BatchL2Data []byte `protobuf:"bytes,6,opt,name=batch_l2_data,json=batchL2Data,proto3" json:"batch_l2_data,omitempty"` + GlobalExitRoot []byte `protobuf:"bytes,7,opt,name=global_exit_root,json=globalExitRoot,proto3" json:"global_exit_root,omitempty"` + EthTimestamp uint64 `protobuf:"varint,8,opt,name=eth_timestamp,json=ethTimestamp,proto3" json:"eth_timestamp,omitempty"` + SequencerAddr string `protobuf:"bytes,9,opt,name=sequencer_addr,json=sequencerAddr,proto3" json:"sequencer_addr,omitempty"` + AggregatorAddr string `protobuf:"bytes,10,opt,name=aggregator_addr,json=aggregatorAddr,proto3" json:"aggregator_addr,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PublicInputs) Reset() { *m = PublicInputs{} } +func (m *PublicInputs) String() string { return proto.CompactTextString(m) } +func (*PublicInputs) ProtoMessage() {} +func (*PublicInputs) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{16} +} + +func (m *PublicInputs) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PublicInputs.Unmarshal(m, b) +} +func (m *PublicInputs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PublicInputs.Marshal(b, m, deterministic) +} +func (m *PublicInputs) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicInputs.Merge(m, src) +} +func (m *PublicInputs) XXX_Size() int { + return xxx_messageInfo_PublicInputs.Size(m) +} +func (m *PublicInputs) XXX_DiscardUnknown() { + xxx_messageInfo_PublicInputs.DiscardUnknown(m) +} + +var xxx_messageInfo_PublicInputs proto.InternalMessageInfo + +func (m *PublicInputs) GetOldStateRoot() []byte { + if m != nil { + return m.OldStateRoot + } + return nil +} + +func (m *PublicInputs) GetOldAccInputHash() []byte { + if m != nil { + return m.OldAccInputHash + } + return nil +} + +func (m *PublicInputs) GetOldBatchNum() uint64 { + if m != nil { + return m.OldBatchNum + } + return 0 +} + +func (m *PublicInputs) GetChainId() uint64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *PublicInputs) GetForkId() uint64 { + if m != nil { + return m.ForkId + } + return 0 +} + +func (m *PublicInputs) GetBatchL2Data() []byte { + if m != nil { + return m.BatchL2Data + } + return nil +} + +func (m *PublicInputs) GetGlobalExitRoot() []byte { + if m != nil { + return m.GlobalExitRoot + } + return nil +} + +func (m *PublicInputs) GetEthTimestamp() uint64 { + if m != nil { + return m.EthTimestamp + } + return 0 +} + +func (m *PublicInputs) GetSequencerAddr() string { + if m != nil { + return m.SequencerAddr + } + return "" +} + +func (m *PublicInputs) GetAggregatorAddr() string { + if m != nil { + return m.AggregatorAddr + } + return "" +} + +//* +// @dev InputProver +// @param {public_inputs} - public inputs +// @param {db} - database containing all key-values in smt matching the old state root +// @param {contracts_bytecode} - key is the hash(contractBytecode), value is the bytecode itself +type InputProver struct { + PublicInputs *PublicInputs `protobuf:"bytes,1,opt,name=public_inputs,json=publicInputs,proto3" json:"public_inputs,omitempty"` + Db map[string]string `protobuf:"bytes,4,rep,name=db,proto3" json:"db,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ContractsBytecode map[string]string `protobuf:"bytes,5,rep,name=contracts_bytecode,json=contractsBytecode,proto3" json:"contracts_bytecode,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InputProver) Reset() { *m = InputProver{} } +func (m *InputProver) String() string { return proto.CompactTextString(m) } +func (*InputProver) ProtoMessage() {} +func (*InputProver) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{17} +} + +func (m *InputProver) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InputProver.Unmarshal(m, b) +} +func (m *InputProver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InputProver.Marshal(b, m, deterministic) +} +func (m *InputProver) XXX_Merge(src proto.Message) { + xxx_messageInfo_InputProver.Merge(m, src) +} +func (m *InputProver) XXX_Size() int { + return xxx_messageInfo_InputProver.Size(m) +} +func (m *InputProver) XXX_DiscardUnknown() { + xxx_messageInfo_InputProver.DiscardUnknown(m) +} + +var xxx_messageInfo_InputProver proto.InternalMessageInfo + +func (m *InputProver) GetPublicInputs() *PublicInputs { + if m != nil { + return m.PublicInputs + } + return nil +} + +func (m *InputProver) GetDb() map[string]string { + if m != nil { + return m.Db + } + return nil +} + +func (m *InputProver) GetContractsBytecode() map[string]string { + if m != nil { + return m.ContractsBytecode + } + return nil +} + +//* +// @dev PublicInputsExtended +// @param {public_inputs} - public inputs +// @param {new_state_root} - final state root. Used as a sanity check. +// @param {new_acc_input_hash} - final accumulate input hash. Used as a sanity check. +// @param {new_local_exit_root} - new local exit root. Used as a sanity check. +// @param {new_batch_num} - final num batch. Used as a sanity check. +type PublicInputsExtended struct { + PublicInputs *PublicInputs `protobuf:"bytes,1,opt,name=public_inputs,json=publicInputs,proto3" json:"public_inputs,omitempty"` + NewStateRoot []byte `protobuf:"bytes,2,opt,name=new_state_root,json=newStateRoot,proto3" json:"new_state_root,omitempty"` + NewAccInputHash []byte `protobuf:"bytes,3,opt,name=new_acc_input_hash,json=newAccInputHash,proto3" json:"new_acc_input_hash,omitempty"` + NewLocalExitRoot []byte `protobuf:"bytes,4,opt,name=new_local_exit_root,json=newLocalExitRoot,proto3" json:"new_local_exit_root,omitempty"` + NewBatchNum uint64 `protobuf:"varint,5,opt,name=new_batch_num,json=newBatchNum,proto3" json:"new_batch_num,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PublicInputsExtended) Reset() { *m = PublicInputsExtended{} } +func (m *PublicInputsExtended) String() string { return proto.CompactTextString(m) } +func (*PublicInputsExtended) ProtoMessage() {} +func (*PublicInputsExtended) Descriptor() ([]byte, []int) { + return fileDescriptor_60785b04c84bec7e, []int{18} +} + +func (m *PublicInputsExtended) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PublicInputsExtended.Unmarshal(m, b) +} +func (m *PublicInputsExtended) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PublicInputsExtended.Marshal(b, m, deterministic) +} +func (m *PublicInputsExtended) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicInputsExtended.Merge(m, src) +} +func (m *PublicInputsExtended) XXX_Size() int { + return xxx_messageInfo_PublicInputsExtended.Size(m) +} +func (m *PublicInputsExtended) XXX_DiscardUnknown() { + xxx_messageInfo_PublicInputsExtended.DiscardUnknown(m) +} + +var xxx_messageInfo_PublicInputsExtended proto.InternalMessageInfo + +func (m *PublicInputsExtended) GetPublicInputs() *PublicInputs { + if m != nil { + return m.PublicInputs + } + return nil +} + +func (m *PublicInputsExtended) GetNewStateRoot() []byte { + if m != nil { + return m.NewStateRoot + } + return nil +} + +func (m *PublicInputsExtended) GetNewAccInputHash() []byte { + if m != nil { + return m.NewAccInputHash + } + return nil +} + +func (m *PublicInputsExtended) GetNewLocalExitRoot() []byte { + if m != nil { + return m.NewLocalExitRoot + } + return nil +} + +func (m *PublicInputsExtended) GetNewBatchNum() uint64 { + if m != nil { + return m.NewBatchNum + } + return 0 +} + +func init() { + proto.RegisterEnum("aggregator.v1.Result", Result_name, Result_value) + proto.RegisterEnum("aggregator.v1.GetStatusResponse_Status", GetStatusResponse_Status_name, GetStatusResponse_Status_value) + proto.RegisterEnum("aggregator.v1.GetProofResponse_Result", GetProofResponse_Result_name, GetProofResponse_Result_value) + proto.RegisterType((*Version)(nil), "aggregator.v1.Version") + proto.RegisterType((*AggregatorMessage)(nil), "aggregator.v1.AggregatorMessage") + proto.RegisterType((*ProverMessage)(nil), "aggregator.v1.ProverMessage") + proto.RegisterType((*GetStatusRequest)(nil), "aggregator.v1.GetStatusRequest") + proto.RegisterType((*GenBatchProofRequest)(nil), "aggregator.v1.GenBatchProofRequest") + proto.RegisterType((*GenAggregatedProofRequest)(nil), "aggregator.v1.GenAggregatedProofRequest") + proto.RegisterType((*GenFinalProofRequest)(nil), "aggregator.v1.GenFinalProofRequest") + proto.RegisterType((*CancelRequest)(nil), "aggregator.v1.CancelRequest") + proto.RegisterType((*GetProofRequest)(nil), "aggregator.v1.GetProofRequest") + proto.RegisterType((*GetStatusResponse)(nil), "aggregator.v1.GetStatusResponse") + proto.RegisterType((*GenBatchProofResponse)(nil), "aggregator.v1.GenBatchProofResponse") + proto.RegisterType((*GenAggregatedProofResponse)(nil), "aggregator.v1.GenAggregatedProofResponse") + proto.RegisterType((*GenFinalProofResponse)(nil), "aggregator.v1.GenFinalProofResponse") + proto.RegisterType((*CancelResponse)(nil), "aggregator.v1.CancelResponse") + proto.RegisterType((*GetProofResponse)(nil), "aggregator.v1.GetProofResponse") + proto.RegisterType((*FinalProof)(nil), "aggregator.v1.FinalProof") + proto.RegisterType((*PublicInputs)(nil), "aggregator.v1.PublicInputs") + proto.RegisterType((*InputProver)(nil), "aggregator.v1.InputProver") + proto.RegisterMapType((map[string]string)(nil), "aggregator.v1.InputProver.ContractsBytecodeEntry") + proto.RegisterMapType((map[string]string)(nil), "aggregator.v1.InputProver.DbEntry") + proto.RegisterType((*PublicInputsExtended)(nil), "aggregator.v1.PublicInputsExtended") +} + +func init() { + proto.RegisterFile("aggregator.proto", fileDescriptor_60785b04c84bec7e) +} + +var fileDescriptor_60785b04c84bec7e = []byte{ + // 1654 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xe9, 0x72, 0xd3, 0x58, + 0x16, 0x8e, 0xf7, 0xf8, 0x78, 0x53, 0x6e, 0x16, 0x9c, 0x00, 0x93, 0x8c, 0x60, 0x20, 0x30, 0x45, + 0x16, 0x53, 0x53, 0x0c, 0xc3, 0xd4, 0x30, 0x8e, 0x63, 0xb0, 0x6b, 0x8c, 0xe3, 0x91, 0x1d, 0x7e, + 0x74, 0x53, 0xa5, 0x96, 0xa5, 0x1b, 0x59, 0x15, 0x59, 0x32, 0x5a, 0x9c, 0x84, 0xf7, 0xe9, 0x1f, + 0xfd, 0x10, 0xfd, 0x06, 0xfd, 0x14, 0xfd, 0x1c, 0x54, 0x57, 0xd7, 0x5d, 0x64, 0xcb, 0xb2, 0x1d, + 0xe8, 0xa2, 0xff, 0x45, 0xdf, 0xf9, 0xee, 0x77, 0xee, 0xb1, 0xce, 0xa6, 0x80, 0xa0, 0xe8, 0xba, + 0x83, 0x75, 0xc5, 0xb3, 0x9d, 0x83, 0x91, 0x63, 0x7b, 0x36, 0x2a, 0x84, 0x90, 0xf1, 0xb1, 0xb8, + 0x0b, 0x99, 0xf7, 0xd8, 0x71, 0x0d, 0xdb, 0x42, 0x1b, 0x90, 0x1e, 0x1f, 0xc9, 0x47, 0xf2, 0x71, + 0x39, 0xb6, 0x17, 0xdb, 0xcf, 0x4a, 0xc9, 0xf1, 0xd1, 0xd1, 0xb1, 0xf8, 0x73, 0x12, 0xd6, 0xaa, + 0x93, 0x23, 0xef, 0xb0, 0xeb, 0x2a, 0x3a, 0x46, 0x45, 0x88, 0x1b, 0x1a, 0xe7, 0xc5, 0x0d, 0x0d, + 0x9d, 0x01, 0xd2, 0xb1, 0x27, 0xbb, 0x9e, 0xe2, 0xf9, 0xae, 0xec, 0xe0, 0x8f, 0x3e, 0x76, 0xbd, + 0x72, 0x7c, 0x2f, 0xb6, 0x9f, 0xab, 0xec, 0x1e, 0xcc, 0xb8, 0x3c, 0x78, 0x8b, 0xbd, 0x2e, 0xe5, + 0x49, 0x8c, 0xd6, 0x58, 0x91, 0x04, 0x3d, 0x82, 0xa1, 0x0f, 0x70, 0x47, 0xc7, 0x96, 0xdc, 0x57, + 0x3c, 0x75, 0x20, 0x8f, 0x1c, 0xdb, 0xbe, 0x98, 0xa8, 0x26, 0xa8, 0xea, 0x83, 0x39, 0x55, 0xeb, + 0x84, 0x90, 0x3b, 0x84, 0x3b, 0x55, 0xde, 0xd0, 0x17, 0xe0, 0xe8, 0x12, 0xee, 0x11, 0xf5, 0x40, + 0x01, 0x6b, 0x11, 0x17, 0x49, 0xea, 0x62, 0x7f, 0xde, 0x45, 0x75, 0x72, 0x22, 0xe2, 0x67, 0x5b, + 0x5f, 0x66, 0x0c, 0x42, 0xb9, 0x30, 0x2c, 0xc5, 0x8c, 0xf8, 0x49, 0x2d, 0x0b, 0xe5, 0x0d, 0x21, + 0x2f, 0x08, 0x65, 0x0e, 0x47, 0x75, 0x28, 0xaa, 0x8a, 0xa5, 0x62, 0x73, 0x22, 0x9a, 0xa6, 0xa2, + 0xf7, 0x22, 0xa2, 0x35, 0x4a, 0x9a, 0xaa, 0x15, 0xd4, 0x30, 0x80, 0x5a, 0xb0, 0x46, 0x5e, 0xe0, + 0xec, 0xf5, 0x32, 0x54, 0xe9, 0x2f, 0xf3, 0xef, 0x2f, 0x72, 0xb3, 0x92, 0x3e, 0x0b, 0x9d, 0x64, + 0x21, 0xc3, 0x35, 0xc4, 0x5f, 0x92, 0x50, 0xe8, 0x38, 0xf6, 0x18, 0x2f, 0xcd, 0x1d, 0x09, 0xd6, + 0x67, 0x72, 0xc7, 0x1d, 0xd9, 0x96, 0x8b, 0x79, 0xf2, 0xec, 0x2d, 0x4f, 0x1e, 0xc6, 0x6b, 0xac, + 0x48, 0x6b, 0x7a, 0x14, 0x44, 0x32, 0x94, 0xe7, 0xd3, 0x87, 0x0b, 0xb3, 0xfc, 0x79, 0x78, 0x7b, + 0xfe, 0x4c, 0xc4, 0x37, 0xf5, 0x45, 0x06, 0x64, 0xc1, 0xfd, 0x25, 0x19, 0xc4, 0xbd, 0xb0, 0x14, + 0x7a, 0xf2, 0x15, 0x29, 0x34, 0x71, 0xb5, 0xa3, 0x2f, 0xb5, 0x06, 0x01, 0xcd, 0x26, 0x11, 0x77, + 0x95, 0x5a, 0x16, 0x50, 0x38, 0x5b, 0x66, 0x02, 0x9a, 0x37, 0xa0, 0x06, 0x94, 0x26, 0x79, 0xc4, + 0x75, 0x59, 0x22, 0xdd, 0x5f, 0x92, 0x48, 0x13, 0xc1, 0xa2, 0x3a, 0x83, 0x04, 0xbd, 0x20, 0x72, + 0xc9, 0xcc, 0xb2, 0x5e, 0x10, 0xbd, 0x9f, 0xa0, 0x47, 0xb0, 0x13, 0x80, 0xd5, 0x40, 0x46, 0x44, + 0x20, 0x44, 0xfb, 0x87, 0xd8, 0x80, 0x8d, 0x45, 0xd5, 0x8f, 0x8e, 0x20, 0x65, 0x58, 0x23, 0xdf, + 0xa3, 0xb9, 0x96, 0xab, 0xec, 0x44, 0x7c, 0x37, 0x89, 0x8d, 0xa5, 0xa6, 0xc4, 0x88, 0xa2, 0x0b, + 0xdb, 0x4b, 0x8b, 0x1c, 0x3d, 0x85, 0x35, 0x07, 0xab, 0xbe, 0xe3, 0x1a, 0x63, 0xcc, 0xa3, 0x0b, + 0x5a, 0x65, 0x69, 0x62, 0xa0, 0x27, 0x8e, 0x17, 0x71, 0x2b, 0x34, 0xa3, 0xe7, 0xb8, 0x15, 0x71, + 0x40, 0xaf, 0x3f, 0x5f, 0xd9, 0x8f, 0xa1, 0x14, 0xd1, 0xe0, 0xde, 0x8a, 0xb3, 0x0a, 0x84, 0x38, + 0x8d, 0x4c, 0x56, 0x34, 0xcd, 0xe1, 0xae, 0x8a, 0x53, 0xb8, 0xaa, 0x69, 0x8e, 0xb8, 0x0b, 0x85, + 0x99, 0x36, 0x10, 0x2d, 0x45, 0xf1, 0x15, 0x94, 0x22, 0xd5, 0x3d, 0x57, 0xad, 0x65, 0xc8, 0x78, + 0xc6, 0x10, 0xdb, 0x3e, 0x6b, 0xef, 0x49, 0x29, 0x78, 0x14, 0x3f, 0xa7, 0x60, 0x6d, 0xae, 0x3c, + 0xd1, 0x6b, 0x48, 0xb3, 0xca, 0xa6, 0x1a, 0xc5, 0xca, 0xe3, 0x2f, 0x15, 0xf4, 0x01, 0x7f, 0xe4, + 0xc7, 0xd0, 0x0b, 0x28, 0x9b, 0x8a, 0xeb, 0xc9, 0xaa, 0x3d, 0x1c, 0xf9, 0xa4, 0xd0, 0x78, 0x67, + 0x91, 0x0d, 0x8d, 0x87, 0xb9, 0x49, 0xec, 0x35, 0x6e, 0xe6, 0xf7, 0x6e, 0x6a, 0xe8, 0x39, 0x6c, + 0xcd, 0x1e, 0xc4, 0x96, 0x26, 0x93, 0xcb, 0xd2, 0x0e, 0x90, 0x94, 0xd6, 0xc3, 0xc7, 0xea, 0x96, + 0xd6, 0x33, 0x86, 0xe4, 0xba, 0xf7, 0x54, 0xdf, 0x71, 0xb0, 0x15, 0x9c, 0x33, 0x2c, 0x3d, 0xec, + 0x31, 0x49, 0x3d, 0x6e, 0x73, 0x4e, 0x2d, 0xa0, 0x4c, 0xbd, 0x2e, 0x14, 0x70, 0x3d, 0xc5, 0xf1, + 0x98, 0xef, 0x14, 0xf5, 0x3d, 0x27, 0xd0, 0x25, 0x0c, 0x7a, 0x83, 0x07, 0x50, 0x18, 0xb3, 0x89, + 0x2c, 0xd3, 0x89, 0x4d, 0xcb, 0x30, 0x2b, 0xe5, 0x39, 0xd8, 0xa1, 0x53, 0xfc, 0x6f, 0x50, 0x0c, + 0x48, 0x2e, 0x76, 0xc6, 0xd8, 0xa1, 0xf5, 0x95, 0x95, 0x82, 0xa3, 0x5d, 0x0a, 0xa2, 0x97, 0xb0, + 0x3d, 0xc2, 0x96, 0x16, 0x8e, 0xe1, 0xa3, 0x8f, 0x7d, 0x2c, 0x1b, 0x9a, 0x5b, 0x5e, 0xdd, 0x4b, + 0xec, 0x67, 0xa5, 0x2d, 0x4e, 0xe0, 0x11, 0xfc, 0x9f, 0x98, 0x9b, 0x9a, 0x8b, 0x76, 0x21, 0x37, + 0xa2, 0xb5, 0x21, 0x5b, 0xca, 0x10, 0x97, 0xb3, 0x54, 0x1e, 0x18, 0xd4, 0x56, 0x86, 0x18, 0xdd, + 0x85, 0x2c, 0x27, 0x18, 0x5a, 0x19, 0xa8, 0x79, 0x95, 0x01, 0x4d, 0x0d, 0x3d, 0x82, 0x92, 0xe5, + 0x0f, 0xfb, 0xd8, 0x91, 0xed, 0x0b, 0x59, 0xb5, 0x1d, 0xec, 0x96, 0x73, 0x34, 0xf0, 0x02, 0x83, + 0xcf, 0x2e, 0x6a, 0x04, 0x44, 0x7f, 0x85, 0xbc, 0x67, 0x7b, 0x8a, 0x29, 0x0f, 0xf1, 0xd0, 0x76, + 0x6e, 0xca, 0x79, 0x4a, 0xca, 0x51, 0xec, 0x1d, 0x85, 0xc8, 0x45, 0x2e, 0x1c, 0x8c, 0x03, 0x46, + 0x81, 0x32, 0x80, 0x40, 0x9c, 0x70, 0x07, 0x32, 0x17, 0xb6, 0x73, 0x49, 0xae, 0x51, 0xa4, 0xc6, + 0x34, 0x79, 0x6c, 0x6a, 0xa2, 0x09, 0x69, 0x96, 0x4b, 0x68, 0x0b, 0x50, 0xb7, 0x57, 0xed, 0x9d, + 0x77, 0xe5, 0xf3, 0x76, 0xb7, 0x53, 0xaf, 0x35, 0xdf, 0x34, 0xeb, 0xa7, 0xc2, 0x0a, 0x42, 0x50, + 0xe4, 0xf8, 0xc9, 0xd9, 0x59, 0xaf, 0xd9, 0x7e, 0x2b, 0xc4, 0xd0, 0x06, 0x08, 0x1c, 0xab, 0x9d, + 0xbd, 0xeb, 0x9c, 0x53, 0x34, 0x8e, 0x4a, 0x90, 0xe3, 0x68, 0xf3, 0xb4, 0x55, 0x17, 0x12, 0x21, + 0xa0, 0x51, 0x6d, 0xf5, 0x84, 0xa4, 0xf8, 0x1e, 0x36, 0x17, 0xce, 0x90, 0xb9, 0x0a, 0x7a, 0x06, + 0x69, 0x07, 0xbb, 0xbe, 0xc9, 0x0a, 0xa8, 0x58, 0xd9, 0x8c, 0x54, 0x84, 0x44, 0x8d, 0x12, 0x27, + 0x89, 0xdf, 0xc3, 0xce, 0xf2, 0xa9, 0xf1, 0xad, 0xe2, 0xec, 0xd2, 0x0b, 0xc6, 0xc1, 0x37, 0xea, + 0xbe, 0x86, 0xe2, 0xec, 0x9c, 0x08, 0x09, 0xc4, 0xbe, 0x46, 0xe0, 0xc7, 0x04, 0x6d, 0xf4, 0xb7, + 0x5f, 0xea, 0xdf, 0x90, 0x0b, 0x0d, 0x44, 0xbe, 0x31, 0x6c, 0x47, 0x84, 0xa7, 0xc1, 0x35, 0x56, + 0x24, 0xb8, 0x98, 0x3c, 0xa1, 0x27, 0xf3, 0xfd, 0x95, 0x34, 0x86, 0x2c, 0x19, 0x69, 0x91, 0x0e, + 0xfb, 0x9f, 0xc9, 0xe5, 0x93, 0xf4, 0xf2, 0x8f, 0xbe, 0x30, 0xc6, 0x22, 0xd1, 0x90, 0x9a, 0x66, + 0x7f, 0xc9, 0xae, 0xe7, 0x18, 0x96, 0x4e, 0xbb, 0x40, 0x56, 0xca, 0x33, 0xb0, 0x4b, 0x31, 0xf1, + 0xa7, 0x18, 0xa4, 0xd9, 0x39, 0x92, 0xaf, 0x52, 0xbd, 0x7b, 0xde, 0xea, 0x45, 0xf2, 0xf5, 0x0e, + 0xac, 0x73, 0x9c, 0xe4, 0x66, 0xab, 0xde, 0xab, 0x9f, 0xca, 0x67, 0xff, 0x13, 0x62, 0x48, 0x80, + 0x3c, 0x37, 0xd4, 0x25, 0xe9, 0x4c, 0x12, 0xe2, 0x68, 0x07, 0xb6, 0xe6, 0xa8, 0xcc, 0x96, 0x20, + 0x69, 0xcf, 0x6d, 0x9d, 0x7a, 0xfb, 0x94, 0x24, 0x78, 0x12, 0x6d, 0xc3, 0x26, 0xc7, 0x9a, 0xed, + 0x5e, 0x5d, 0x6a, 0x57, 0x5b, 0x9c, 0x9e, 0x42, 0x6b, 0x50, 0x08, 0xa4, 0xaa, 0xed, 0x5a, 0xbd, + 0x25, 0xa4, 0x4f, 0x32, 0x90, 0xa2, 0xbf, 0x98, 0x28, 0x03, 0x4c, 0x7f, 0x60, 0xb4, 0xc1, 0x61, + 0xfe, 0x8e, 0xd8, 0x03, 0x7a, 0x05, 0xe9, 0x91, 0xdf, 0x37, 0x0d, 0x95, 0xbf, 0xa1, 0xe8, 0xbe, + 0xdb, 0xa1, 0x46, 0x3a, 0x8e, 0xdd, 0xfa, 0xb5, 0x87, 0x2d, 0x0d, 0x6b, 0x12, 0x3f, 0x22, 0x7e, + 0x8e, 0x43, 0x3e, 0x4c, 0x40, 0x0f, 0xa1, 0x68, 0x9b, 0x1a, 0x5d, 0x17, 0xb1, 0xec, 0xd8, 0x36, + 0x4b, 0xa8, 0xbc, 0x94, 0xb7, 0x4d, 0x8d, 0x94, 0x3b, 0x96, 0x6c, 0xdb, 0x43, 0x7f, 0x07, 0x44, + 0x58, 0x8a, 0xaa, 0xca, 0x74, 0xb4, 0xcb, 0x03, 0xc5, 0x1d, 0x50, 0xff, 0x79, 0xa9, 0x64, 0x9b, + 0x5a, 0x55, 0x65, 0x7a, 0x0d, 0xc5, 0x1d, 0x20, 0x11, 0x0a, 0x84, 0xcc, 0xb6, 0x45, 0xcb, 0x1f, + 0xf2, 0x01, 0x91, 0xb3, 0x4d, 0x8d, 0xd6, 0x73, 0xdb, 0x1f, 0xa2, 0x6d, 0x58, 0x55, 0x07, 0x8a, + 0x61, 0x05, 0x43, 0x20, 0x29, 0x65, 0xe8, 0x73, 0x53, 0x0b, 0x37, 0xa0, 0x54, 0xb8, 0x01, 0x11, + 0x5d, 0xa6, 0x69, 0x56, 0x64, 0x4d, 0xf1, 0x14, 0xda, 0xca, 0xf3, 0x52, 0x8e, 0x82, 0xad, 0xca, + 0xa9, 0xe2, 0x29, 0x68, 0x1f, 0x04, 0xdd, 0xb4, 0xfb, 0x8a, 0x29, 0xe3, 0x6b, 0xc3, 0x63, 0x01, + 0x65, 0x28, 0xad, 0xc8, 0xf0, 0xfa, 0xb5, 0xe1, 0xd1, 0x90, 0x1e, 0x40, 0x01, 0x7b, 0x03, 0x3a, + 0x45, 0x5c, 0x4f, 0x19, 0x8e, 0xca, 0xab, 0xd4, 0x59, 0x1e, 0x7b, 0x83, 0x5e, 0x80, 0x91, 0xc1, + 0xe0, 0x92, 0x4e, 0x6e, 0xa9, 0x98, 0xaf, 0x02, 0xac, 0x73, 0x17, 0x26, 0x28, 0xd9, 0x04, 0x16, + 0xad, 0x0c, 0xb0, 0x70, 0x65, 0xf8, 0x35, 0x0e, 0xb9, 0xd0, 0xa2, 0x84, 0xfe, 0x0b, 0x05, 0xf6, + 0x62, 0xd8, 0xcf, 0xea, 0xf2, 0xdd, 0xea, 0xee, 0x2d, 0xaf, 0x54, 0xca, 0x8f, 0xc2, 0xef, 0xaf, + 0x02, 0x71, 0xad, 0x5f, 0x4e, 0xee, 0x25, 0xf6, 0x73, 0x15, 0x71, 0xf9, 0x4a, 0x76, 0x70, 0xda, + 0xaf, 0x5b, 0x9e, 0x73, 0x23, 0xc5, 0xb5, 0x3e, 0xfa, 0x01, 0x90, 0x6a, 0x5b, 0x9e, 0xa3, 0xa8, + 0x9e, 0x2b, 0xf7, 0x6f, 0x3c, 0xac, 0xda, 0x1a, 0x19, 0xa5, 0x44, 0xe3, 0xf8, 0x16, 0x8d, 0x5a, + 0x70, 0xe8, 0x84, 0x9f, 0x61, 0x92, 0x6b, 0x6a, 0x14, 0xdf, 0xf9, 0x07, 0x64, 0xb8, 0x43, 0x24, + 0x40, 0xe2, 0x12, 0xdf, 0xf0, 0x14, 0x26, 0x7f, 0x92, 0xb4, 0x1e, 0x2b, 0xa6, 0x8f, 0xf9, 0xbe, + 0xc1, 0x1e, 0xfe, 0x15, 0xff, 0x67, 0x6c, 0xe7, 0x14, 0xb6, 0x16, 0xfb, 0xf8, 0x23, 0x2a, 0xe2, + 0x6f, 0x31, 0xd8, 0x58, 0x54, 0x04, 0x7f, 0xc2, 0xaf, 0xfd, 0x10, 0x8a, 0x16, 0xbe, 0x0a, 0x57, + 0x0b, 0xab, 0x81, 0xbc, 0x85, 0xaf, 0x66, 0xaa, 0x85, 0xb0, 0x22, 0xd5, 0x92, 0x60, 0xd5, 0x62, + 0xe1, 0xab, 0x99, 0x6a, 0x79, 0x06, 0xeb, 0x84, 0x6c, 0xda, 0xea, 0x4c, 0xd2, 0x26, 0x29, 0x5b, + 0xb0, 0xf0, 0x55, 0x8b, 0x58, 0x26, 0x69, 0x2b, 0x42, 0x81, 0xd0, 0xa7, 0xc5, 0xc5, 0x6a, 0x24, + 0x67, 0xe1, 0xab, 0xa0, 0xb8, 0x9e, 0x7e, 0xf8, 0x62, 0xe7, 0x2b, 0x40, 0x96, 0xe3, 0x4b, 0xfa, + 0xdd, 0xd2, 0xfe, 0x95, 0xa8, 0x68, 0xe1, 0xff, 0x60, 0x90, 0xcd, 0xc8, 0x50, 0xc9, 0x57, 0x4a, + 0xa6, 0x36, 0x50, 0x2c, 0x0b, 0x9b, 0x28, 0xfa, 0xa9, 0x3c, 0xf3, 0xb9, 0xba, 0x13, 0xfd, 0x02, + 0x9d, 0xfb, 0x67, 0x88, 0xb8, 0xb2, 0x1f, 0x3b, 0x8a, 0x9d, 0xbc, 0xfc, 0xee, 0x85, 0x6e, 0x78, + 0x03, 0xbf, 0x7f, 0xa0, 0xda, 0xc3, 0xc3, 0xa3, 0xeb, 0x8e, 0x6d, 0xde, 0xe8, 0xb6, 0xd5, 0xc0, + 0xce, 0x10, 0x7f, 0x3a, 0xfc, 0x74, 0x89, 0xc7, 0xc3, 0x67, 0x96, 0xad, 0xe1, 0xc3, 0xa9, 0xdc, + 0x21, 0xdb, 0x97, 0xfa, 0x69, 0xba, 0xe8, 0x3d, 0xff, 0x3d, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x3b, + 0xe2, 0xf9, 0xae, 0x11, 0x00, 0x00, +} diff --git a/aggregator/pb/aggregator_grpc.pb.go b/aggregator/prover/aggregator_grpc.pb.go similarity index 94% rename from aggregator/pb/aggregator_grpc.pb.go rename to aggregator/prover/aggregator_grpc.pb.go index 8d2b33815d..0b1a499d19 100644 --- a/aggregator/pb/aggregator_grpc.pb.go +++ b/aggregator/prover/aggregator_grpc.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.12 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.12.4 // source: aggregator.proto -package pb +package prover import ( context "context" @@ -18,6 +18,10 @@ import ( // 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. @@ -34,7 +38,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], "/aggregator.v1.AggregatorService/Channel", opts...) + stream, err := c.cc.NewStream(ctx, &AggregatorService_ServiceDesc.Streams[0], AggregatorService_Channel_FullMethodName, opts...) if err != nil { return nil, err } diff --git a/aggregator/prover/prover.go b/aggregator/prover/prover.go index 2a61a1678d..34aa58ac3e 100644 --- a/aggregator/prover/prover.go +++ b/aggregator/prover/prover.go @@ -7,10 +7,9 @@ import ( "net" "time" - "github.com/0xPolygonHermez/zkevm-node/aggregator/metrics" - "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/aggregator/metrics" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/log" ) var ( @@ -29,11 +28,11 @@ type Prover struct { id string address net.Addr proofStatePollingInterval types.Duration - stream pb.AggregatorService_ChannelServer + stream AggregatorService_ChannelServer } // New returns a new Prover instance. -func New(stream pb.AggregatorService_ChannelServer, addr net.Addr, proofStatePollingInterval types.Duration) (*Prover, error) { +func New(stream AggregatorService_ChannelServer, addr net.Addr, proofStatePollingInterval types.Duration) (*Prover, error) { p := &Prover{ stream: stream, address: addr, @@ -63,20 +62,20 @@ func (p *Prover) Addr() string { } // Status gets the prover status. -func (p *Prover) Status() (*pb.GetStatusResponse, error) { - req := &pb.AggregatorMessage{ - Request: &pb.AggregatorMessage_GetStatusRequest{ - GetStatusRequest: &pb.GetStatusRequest{}, +func (p *Prover) Status() (*GetStatusResponse, error) { + req := &AggregatorMessage{ + Request: &AggregatorMessage_GetStatusRequest{ + GetStatusRequest: &GetStatusRequest{}, }, } res, err := p.call(req) if err != nil { return nil, err } - if msg, ok := res.Response.(*pb.ProverMessage_GetStatusResponse); ok { + if msg, ok := res.Response.(*ProverMessage_GetStatusResponse); ok { return msg.GetStatusResponse, nil } - return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &pb.ProverMessage_GetStatusResponse{}, res.Response) + return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &ProverMessage_GetStatusResponse{}, res.Response) } // IsIdle returns true if the prover is idling. @@ -85,7 +84,7 @@ func (p *Prover) IsIdle() (bool, error) { if err != nil { return false, err } - return status.Status == pb.GetStatusResponse_STATUS_IDLE, nil + return status.Status == GetStatusResponse_STATUS_IDLE, nil } // SupportsForkID returns true if the prover supports the given fork id. @@ -103,12 +102,12 @@ func (p *Prover) SupportsForkID(forkID uint64) bool { // BatchProof instructs the prover to generate a batch proof for the provided // input. It returns the ID of the proof being computed. -func (p *Prover) BatchProof(input *pb.InputProver) (*string, error) { +func (p *Prover) BatchProof(input *InputProver) (*string, error) { metrics.WorkingProver() - req := &pb.AggregatorMessage{ - Request: &pb.AggregatorMessage_GenBatchProofRequest{ - GenBatchProofRequest: &pb.GenBatchProofRequest{Input: input}, + req := &AggregatorMessage{ + Request: &AggregatorMessage_GenBatchProofRequest{ + GenBatchProofRequest: &GenBatchProofRequest{Input: input}, }, } res, err := p.call(req) @@ -116,22 +115,22 @@ func (p *Prover) BatchProof(input *pb.InputProver) (*string, error) { return nil, err } - if msg, ok := res.Response.(*pb.ProverMessage_GenBatchProofResponse); ok { + if msg, ok := res.Response.(*ProverMessage_GenBatchProofResponse); ok { switch msg.GenBatchProofResponse.Result { - case pb.Result_RESULT_UNSPECIFIED: + case Result_RESULT_UNSPECIFIED: return nil, fmt.Errorf("failed to generate proof %s, %w, input %v", msg.GenBatchProofResponse.String(), ErrUnspecified, input) - case pb.Result_RESULT_OK: + case Result_RESULT_OK: return &msg.GenBatchProofResponse.Id, nil - case pb.Result_RESULT_ERROR: + case Result_RESULT_ERROR: return nil, fmt.Errorf("failed to generate proof %s, %w, input %v", msg.GenBatchProofResponse.String(), ErrBadRequest, input) - case pb.Result_RESULT_INTERNAL_ERROR: + case Result_RESULT_INTERNAL_ERROR: return nil, fmt.Errorf("failed to generate proof %s, %w, input %v", msg.GenBatchProofResponse.String(), ErrProverInternalError, input) default: return nil, fmt.Errorf("failed to generate proof %s, %w,input %v", msg.GenBatchProofResponse.String(), ErrUnknown, input) } } - return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &pb.ProverMessage_GenBatchProofResponse{}, res.Response) + return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &ProverMessage_GenBatchProofResponse{}, res.Response) } // AggregatedProof instructs the prover to generate an aggregated proof from @@ -139,9 +138,9 @@ func (p *Prover) BatchProof(input *pb.InputProver) (*string, error) { func (p *Prover) AggregatedProof(inputProof1, inputProof2 string) (*string, error) { metrics.WorkingProver() - req := &pb.AggregatorMessage{ - Request: &pb.AggregatorMessage_GenAggregatedProofRequest{ - GenAggregatedProofRequest: &pb.GenAggregatedProofRequest{ + req := &AggregatorMessage{ + Request: &AggregatorMessage_GenAggregatedProofRequest{ + GenAggregatedProofRequest: &GenAggregatedProofRequest{ RecursiveProof_1: inputProof1, RecursiveProof_2: inputProof2, }, @@ -152,17 +151,17 @@ func (p *Prover) AggregatedProof(inputProof1, inputProof2 string) (*string, erro return nil, err } - if msg, ok := res.Response.(*pb.ProverMessage_GenAggregatedProofResponse); ok { + if msg, ok := res.Response.(*ProverMessage_GenAggregatedProofResponse); ok { switch msg.GenAggregatedProofResponse.Result { - case pb.Result_RESULT_UNSPECIFIED: + case Result_RESULT_UNSPECIFIED: return nil, fmt.Errorf("failed to aggregate proofs %s, %w, input 1 %s, input 2 %s", msg.GenAggregatedProofResponse.String(), ErrUnspecified, inputProof1, inputProof2) - case pb.Result_RESULT_OK: + case Result_RESULT_OK: return &msg.GenAggregatedProofResponse.Id, nil - case pb.Result_RESULT_ERROR: + case Result_RESULT_ERROR: return nil, fmt.Errorf("failed to aggregate proofs %s, %w, input 1 %s, input 2 %s", msg.GenAggregatedProofResponse.String(), ErrBadRequest, inputProof1, inputProof2) - case pb.Result_RESULT_INTERNAL_ERROR: + case Result_RESULT_INTERNAL_ERROR: return nil, fmt.Errorf("failed to aggregate proofs %s, %w, input 1 %s, input 2 %s", msg.GenAggregatedProofResponse.String(), ErrProverInternalError, inputProof1, inputProof2) default: @@ -171,7 +170,7 @@ func (p *Prover) AggregatedProof(inputProof1, inputProof2 string) (*string, erro } } - return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &pb.ProverMessage_GenAggregatedProofResponse{}, res.Response) + return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &ProverMessage_GenAggregatedProofResponse{}, res.Response) } // FinalProof instructs the prover to generate a final proof for the given @@ -179,9 +178,9 @@ func (p *Prover) AggregatedProof(inputProof1, inputProof2 string) (*string, erro func (p *Prover) FinalProof(inputProof string, aggregatorAddr string) (*string, error) { metrics.WorkingProver() - req := &pb.AggregatorMessage{ - Request: &pb.AggregatorMessage_GenFinalProofRequest{ - GenFinalProofRequest: &pb.GenFinalProofRequest{ + req := &AggregatorMessage{ + Request: &AggregatorMessage_GenFinalProofRequest{ + GenFinalProofRequest: &GenFinalProofRequest{ RecursiveProof: inputProof, AggregatorAddr: aggregatorAddr, }, @@ -192,17 +191,17 @@ func (p *Prover) FinalProof(inputProof string, aggregatorAddr string) (*string, return nil, err } - if msg, ok := res.Response.(*pb.ProverMessage_GenFinalProofResponse); ok { + if msg, ok := res.Response.(*ProverMessage_GenFinalProofResponse); ok { switch msg.GenFinalProofResponse.Result { - case pb.Result_RESULT_UNSPECIFIED: + case Result_RESULT_UNSPECIFIED: return nil, fmt.Errorf("failed to generate final proof %s, %w, input %s", msg.GenFinalProofResponse.String(), ErrUnspecified, inputProof) - case pb.Result_RESULT_OK: + case Result_RESULT_OK: return &msg.GenFinalProofResponse.Id, nil - case pb.Result_RESULT_ERROR: + case Result_RESULT_ERROR: return nil, fmt.Errorf("failed to generate final proof %s, %w, input %s", msg.GenFinalProofResponse.String(), ErrBadRequest, inputProof) - case pb.Result_RESULT_INTERNAL_ERROR: + case Result_RESULT_INTERNAL_ERROR: return nil, fmt.Errorf("failed to generate final proof %s, %w, input %s", msg.GenFinalProofResponse.String(), ErrProverInternalError, inputProof) default: @@ -210,32 +209,32 @@ func (p *Prover) FinalProof(inputProof string, aggregatorAddr string) (*string, msg.GenFinalProofResponse.String(), ErrUnknown, inputProof) } } - return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &pb.ProverMessage_GenFinalProofResponse{}, res.Response) + return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &ProverMessage_GenFinalProofResponse{}, res.Response) } // CancelProofRequest asks the prover to stop the generation of the proof // matching the provided proofID. func (p *Prover) CancelProofRequest(proofID string) error { - req := &pb.AggregatorMessage{ - Request: &pb.AggregatorMessage_CancelRequest{ - CancelRequest: &pb.CancelRequest{Id: proofID}, + req := &AggregatorMessage{ + Request: &AggregatorMessage_CancelRequest{ + CancelRequest: &CancelRequest{Id: proofID}, }, } res, err := p.call(req) if err != nil { return err } - if msg, ok := res.Response.(*pb.ProverMessage_CancelResponse); ok { + if msg, ok := res.Response.(*ProverMessage_CancelResponse); ok { switch msg.CancelResponse.Result { - case pb.Result_RESULT_UNSPECIFIED: + case Result_RESULT_UNSPECIFIED: return fmt.Errorf("failed to cancel proof id [%s], %w, %s", proofID, ErrUnspecified, msg.CancelResponse.String()) - case pb.Result_RESULT_OK: + case Result_RESULT_OK: return nil - case pb.Result_RESULT_ERROR: + case Result_RESULT_ERROR: return fmt.Errorf("failed to cancel proof id [%s], %w, %s", proofID, ErrBadRequest, msg.CancelResponse.String()) - case pb.Result_RESULT_INTERNAL_ERROR: + case Result_RESULT_INTERNAL_ERROR: return fmt.Errorf("failed to cancel proof id [%s], %w, %s", proofID, ErrProverInternalError, msg.CancelResponse.String()) default: @@ -243,7 +242,7 @@ func (p *Prover) CancelProofRequest(proofID string) error { proofID, ErrUnknown, msg.CancelResponse.String()) } } - return fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &pb.ProverMessage_CancelResponse{}, res.Response) + return fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &ProverMessage_CancelResponse{}, res.Response) } // WaitRecursiveProof waits for a recursive proof to be generated by the prover @@ -253,29 +252,29 @@ func (p *Prover) WaitRecursiveProof(ctx context.Context, proofID string) (string if err != nil { return "", err } - resProof := res.Proof.(*pb.GetProofResponse_RecursiveProof) + resProof := res.Proof.(*GetProofResponse_RecursiveProof) return resProof.RecursiveProof, nil } // WaitFinalProof waits for the final proof to be generated by the prover and // returns it. -func (p *Prover) WaitFinalProof(ctx context.Context, proofID string) (*pb.FinalProof, error) { +func (p *Prover) WaitFinalProof(ctx context.Context, proofID string) (*FinalProof, error) { res, err := p.waitProof(ctx, proofID) if err != nil { return nil, err } - resProof := res.Proof.(*pb.GetProofResponse_FinalProof) + resProof := res.Proof.(*GetProofResponse_FinalProof) return resProof.FinalProof, nil } // waitProof waits for a proof to be generated by the prover and returns the // prover response. -func (p *Prover) waitProof(ctx context.Context, proofID string) (*pb.GetProofResponse, error) { +func (p *Prover) waitProof(ctx context.Context, proofID string) (*GetProofResponse, error) { defer metrics.IdlingProver() - req := &pb.AggregatorMessage{ - Request: &pb.AggregatorMessage_GetProofRequest{ - GetProofRequest: &pb.GetProofRequest{ + req := &AggregatorMessage{ + Request: &AggregatorMessage_GetProofRequest{ + GetProofRequest: &GetProofRequest{ // TODO(pg): set Timeout field? Id: proofID, }, @@ -291,26 +290,26 @@ func (p *Prover) waitProof(ctx context.Context, proofID string) (*pb.GetProofRes if err != nil { return nil, err } - if msg, ok := res.Response.(*pb.ProverMessage_GetProofResponse); ok { + if msg, ok := res.Response.(*ProverMessage_GetProofResponse); ok { switch msg.GetProofResponse.Result { - case pb.GetProofResponse_RESULT_PENDING: + case GetProofResponse_RESULT_PENDING: time.Sleep(p.proofStatePollingInterval.Duration) continue - case pb.GetProofResponse_RESULT_UNSPECIFIED: + case GetProofResponse_RESULT_UNSPECIFIED: return nil, fmt.Errorf("failed to get proof ID: %s, %w, prover response: %s", proofID, ErrUnspecified, msg.GetProofResponse.String()) - case pb.GetProofResponse_RESULT_COMPLETED_OK: + case GetProofResponse_RESULT_COMPLETED_OK: return msg.GetProofResponse, nil - case pb.GetProofResponse_RESULT_ERROR: + case GetProofResponse_RESULT_ERROR: return nil, fmt.Errorf("failed to get proof with ID %s, %w, prover response: %s", proofID, ErrBadRequest, msg.GetProofResponse.String()) - case pb.GetProofResponse_RESULT_COMPLETED_ERROR: + case GetProofResponse_RESULT_COMPLETED_ERROR: return nil, fmt.Errorf("failed to get proof with ID %s, %w, prover response: %s", proofID, ErrProverCompletedError, msg.GetProofResponse.String()) - case pb.GetProofResponse_RESULT_INTERNAL_ERROR: + case GetProofResponse_RESULT_INTERNAL_ERROR: return nil, fmt.Errorf("failed to get proof ID: %s, %w, prover response: %s", proofID, ErrProverInternalError, msg.GetProofResponse.String()) - case pb.GetProofResponse_RESULT_CANCEL: + case GetProofResponse_RESULT_CANCEL: return nil, fmt.Errorf("proof generation was cancelled for proof ID %s, %w, prover response: %s", proofID, ErrProofCanceled, msg.GetProofResponse.String()) default: @@ -318,14 +317,14 @@ func (p *Prover) waitProof(ctx context.Context, proofID string) (*pb.GetProofRes proofID, ErrUnknown, msg.GetProofResponse.String()) } } - return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &pb.ProverMessage_GetProofResponse{}, res.Response) + return nil, fmt.Errorf("%w, wanted %T, got %T", ErrBadProverResponse, &ProverMessage_GetProofResponse{}, res.Response) } } } // call sends a message to the prover and waits to receive the response over // the connection stream. -func (p *Prover) call(req *pb.AggregatorMessage) (*pb.ProverMessage, error) { +func (p *Prover) call(req *AggregatorMessage) (*ProverMessage, error) { if err := p.stream.Send(req); err != nil { return nil, err } diff --git a/ci/e2e-group-cdk-validium-1/datacommittee_test.go b/ci/e2e-group-cdk-validium-1/datacommittee_test.go new file mode 120000 index 0000000000..ac030e10c3 --- /dev/null +++ b/ci/e2e-group-cdk-validium-1/datacommittee_test.go @@ -0,0 +1 @@ +../../test/e2e/datacommittee_test.go \ No newline at end of file diff --git a/ci/e2e-group-cdk-validium-1/gasless_test.go b/ci/e2e-group-cdk-validium-1/gasless_test.go new file mode 120000 index 0000000000..280cb4bce2 --- /dev/null +++ b/ci/e2e-group-cdk-validium-1/gasless_test.go @@ -0,0 +1 @@ +../../test/e2e/gasless_test.go \ No newline at end of file diff --git a/ci/e2e-group10/forced_batches_test.go b/ci/e2e-group10/forced_batches_test.go index d2e2efb080..775de726f0 100644 --- a/ci/e2e-group10/forced_batches_test.go +++ b/ci/e2e-group10/forced_batches_test.go @@ -8,12 +8,12 @@ import ( "github.com/ethereum/go-ethereum/core/types" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmglobalexitroot" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/polygonzkevmglobalexitroot" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -125,8 +125,8 @@ func sendForcedBatch(t *testing.T, txs []byte, opsman *operations.Manager) (*sta require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvmAddr := common.HexToAddress(operations.DefaultL1CDKValidiumSmartContract) + zkEvm, err := cdkvalidium.NewCdkvalidium(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) diff --git a/ci/e2e-group10/forced_batches_vector_group2_test.go b/ci/e2e-group10/forced_batches_vector_group2_test.go index 0faf78a046..4a3a95f079 100644 --- a/ci/e2e-group10/forced_batches_vector_group2_test.go +++ b/ci/e2e-group10/forced_batches_vector_group2_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/vectors" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -140,8 +140,8 @@ func sendForcedBatchForVector(t *testing.T, txs []byte, opsman *operations.Manag require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvmAddr := common.HexToAddress(operations.DefaultL1CDKValidiumSmartContract) + zkEvm, err := cdkvalidium.NewCdkvalidium(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) diff --git a/ci/e2e-group11/forced_batches_vector_group3_test.go b/ci/e2e-group11/forced_batches_vector_group3_test.go index 4bbf4b508b..bcb261106e 100644 --- a/ci/e2e-group11/forced_batches_vector_group3_test.go +++ b/ci/e2e-group11/forced_batches_vector_group3_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/vectors" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -144,8 +144,8 @@ func sendForcedBatchForVector(t *testing.T, txs []byte, opsman *operations.Manag require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvmAddr := common.HexToAddress(operations.DefaultL1CDKValidiumSmartContract) + zkEvm, err := cdkvalidium.NewCdkvalidium(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) diff --git a/ci/e2e-group9/forced_batches_vector_group1_test.go b/ci/e2e-group9/forced_batches_vector_group1_test.go index 9949fdaeee..3015ad9282 100644 --- a/ci/e2e-group9/forced_batches_vector_group1_test.go +++ b/ci/e2e-group9/forced_batches_vector_group1_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/vectors" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -145,8 +145,8 @@ func sendForcedBatchForVector(t *testing.T, txs []byte, opsman *operations.Manag require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvmAddr := common.HexToAddress(operations.DefaultL1CDKValidiumSmartContract) + zkEvm, err := cdkvalidium.NewCdkvalidium(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) diff --git a/cmd/approve.go b/cmd/approve.go index 91a7e24aba..62501f3754 100644 --- a/cmd/approve.go +++ b/cmd/approve.go @@ -5,9 +5,9 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/ethereum/go-ethereum/common" "github.com/urfave/cli/v2" ) @@ -37,7 +37,7 @@ func approveTokens(ctx *cli.Context) error { if !ctx.Bool(config.FlagYes) { fmt.Print("*WARNING* Are you sure you want to approve ", amount.String(), - " tokens (in wei) for the smc ? [y/N]: ") + " tokens (in wei) for the smc ? [y/N]: ") var input string if _, err := fmt.Scanln(&input); err != nil { return err @@ -58,13 +58,13 @@ func approveTokens(ctx *cli.Context) error { } // load auth from keystore file - auth, err := etherman.LoadAuthFromKeyStore(addrKeyStorePath, addrPassword) + auth, _, err := etherman.LoadAuthFromKeyStore(addrKeyStorePath, addrPassword) if err != nil { log.Fatal(err) return err } - tx, err := etherman.ApproveMatic(ctx.Context, auth.From, amount, c.NetworkConfig.L1Config.ZkEVMAddr) + tx, err := etherman.ApproveMatic(ctx.Context, auth.From, amount, c.NetworkConfig.L1Config.CDKValidiumAddr) if err != nil { return err } diff --git a/cmd/dumpstate.go b/cmd/dumpstate.go index 05b0bbea4e..9dcc64dc71 100644 --- a/cmd/dumpstate.go +++ b/cmd/dumpstate.go @@ -9,9 +9,9 @@ import ( "os" "strings" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/urfave/cli/v2" ) diff --git a/cmd/jsonschema.go b/cmd/jsonschema.go index 42c6402bd5..503f6f86b8 100644 --- a/cmd/jsonschema.go +++ b/cmd/jsonschema.go @@ -1,7 +1,7 @@ package main import ( - "github.com/0xPolygonHermez/zkevm-node/config" + "github.com/0xPolygon/cdk-validium-node/config" "github.com/urfave/cli/v2" ) diff --git a/cmd/main.go b/cmd/main.go index 7086e8994a..17983d1447 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -4,14 +4,14 @@ import ( "fmt" "os" - "github.com/0xPolygonHermez/zkevm-node" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/log" + node "github.com/0xPolygon/cdk-validium-node" + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/jsonrpc" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/urfave/cli/v2" ) -const appName = "zkevm-node" +const appName = "cdk-validium-node" const ( // AGGREGATOR is the aggregator component identifier @@ -97,7 +97,7 @@ var ( func main() { app := cli.NewApp() app.Name = appName - app.Version = zkevm.Version + app.Version = node.Version flags := []cli.Flag{ &configFileFlag, &yesFlag, @@ -114,7 +114,7 @@ func main() { { Name: "run", Aliases: []string{}, - Usage: "Run the zkevm-node", + Usage: "Run the cdk-validium-node", Action: start, Flags: append(flags, &networkFlag, &customNetworkFlag, &migrationsFlag), }, @@ -152,6 +152,28 @@ func main() { &customNetworkFlag, ), }, + { + Name: "setupCommittee", + Aliases: []string{"sc"}, + Usage: "Allows the admin to setup the members of the committee", + Action: setupCommittee, + Flags: append(flags, + &cli.StringFlag{ + Name: config.FlagKeyStorePath, + Aliases: []string{""}, + Usage: "the path of the key store file containing the private key of the account going to sign and setup committee", + Required: true, + }, + &cli.StringFlag{ + Name: config.FlagPassword, + Aliases: []string{"pw"}, + Usage: "the password do decrypt the key store file", + Required: true, + }, + &networkFlag, + &customNetworkFlag, + ), + }, { Name: "encryptKey", Aliases: []string{}, @@ -186,6 +208,7 @@ func main() { Action: restore, Flags: restoreFlags, }, + &policyCommands, } err := app.Run(os.Args) diff --git a/cmd/policy.go b/cmd/policy.go new file mode 100644 index 0000000000..6ffa2b7918 --- /dev/null +++ b/cmd/policy.go @@ -0,0 +1,308 @@ +package main + +import ( + "context" + "encoding/csv" + "errors" + "fmt" + "os" + "strings" + + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/pool/pgpoolstorage" + "github.com/ethereum/go-ethereum/common" + "github.com/urfave/cli/v2" +) + +var ( + policyFlag = cli.StringFlag{ + Name: "policy", + Aliases: []string{"p"}, + Usage: "Name of policy to operate on", + Required: false, + } + csvFlag = cli.StringFlag{ + Name: "csv", + Usage: "CSV file with addresses", + Required: false, + } + allowFlag = cli.BoolFlag{ + Name: "allow", + Usage: "Update policy to 'allow' addresses on list", + Required: false, + } + denyFlag = cli.BoolFlag{ + Name: "deny", + Usage: "Update policy to 'deny' addresses on list", + Required: false, + } + noHeaderFlag = cli.BoolFlag{ + Name: "no-header", + Value: false, + Required: false, + } + + policyActionFlags = []cli.Flag{&policyFlag} +) + +var policyCommands = cli.Command{ + Name: "policy", + Usage: "View, update, and apply policies", + Action: describe, + Flags: []cli.Flag{&configFileFlag}, + Subcommands: []*cli.Command{ + { + Name: "add", + Usage: "Add address(es) to a policy exclusion list", + Action: addAcl, + Flags: append(policyActionFlags, &csvFlag), + }, { + Name: "clear", + Usage: "Clear the addresses listed as exceptions to a policy", + Action: clearAcl, + Flags: policyActionFlags, + }, { + Name: "describe", + Usage: "Describe the default actions for the policies", + Action: describe, + Flags: append(policyActionFlags, &noHeaderFlag), + }, { + Name: "remove", + Usage: "Remove address(es) from a policy exclusion list", + Action: removeAcl, + Flags: append(policyActionFlags, &csvFlag), + }, { + Name: "update", + Usage: "Update the default action for a policy", + Action: updatePolicy, + Flags: append(policyActionFlags, &allowFlag, &denyFlag), + }, + }, +} + +func updatePolicy(cli *cli.Context) error { + _, db, err := configAndStorage(cli) + if err != nil { + return err + } + policy, err := resolvePolicy(cli) + if err != nil { + return err + } + + allow := cli.Bool(allowFlag.Name) + deny := cli.Bool(denyFlag.Name) + + // exactly one must be set + if (allow && deny) || (!allow && !deny) { + return errors.New("supply one policy action [--allow or --deny]") + } + + var setting bool + if allow { + setting = true + } else if deny { + setting = false + } + + err = db.UpdatePolicy(context.Background(), policy, setting) + if err != nil { + return err + } + return nil +} + +func addAcl(cli *cli.Context) error { + _, db, err := configAndStorage(cli) + if err != nil { + return err + } + policy, addresses, err := requirePolicyAndAddresses(cli) + if err != nil { + return err + } + err = db.AddAddressesToPolicy(context.Background(), policy, addresses) + if err != nil { + return err + } + return nil +} + +func removeAcl(cli *cli.Context) error { + _, db, err := configAndStorage(cli) + if err != nil { + return err + } + policy, addresses, err := requirePolicyAndAddresses(cli) + if err != nil { + return err + } + err = db.RemoveAddressesFromPolicy(context.Background(), policy, addresses) + if err != nil { + return err + } + return nil +} + +func clearAcl(cli *cli.Context) error { + _, db, err := configAndStorage(cli) + if err != nil { + return err + } + policy, err := resolvePolicy(cli) + if err != nil { + return err + } + err = db.ClearPolicy(context.Background(), policy) + if err != nil { + return err + } + return nil +} + +func describe(cli *cli.Context) error { + showHeader := !cli.Bool(noHeaderFlag.Name) + if cli.IsSet(policyFlag.Name) { + return describePolicy(cli, showHeader) + } + return describePolicies(cli, showHeader) +} + +func describePolicy(cli *cli.Context, showHeader bool) error { + _, db, err := configAndStorage(cli) + if err != nil { + return err + } + + policyName, err := resolvePolicy(cli) + if err != nil { + return err + } + + if showHeader { + policy, err := db.DescribePolicy(context.Background(), policyName) + if err != nil { + return err + } + fmt.Printf("%s: %s\n", "Policy", policy.Name) + fmt.Printf("%s: %s\n", "Action", policy.Desc()) + } + query, err := resolveAddresses(cli, false) + if err != nil { + return nil + } + list, err := db.ListAcl(context.Background(), policyName, query) + if err != nil { + return err + } + + if showHeader { + fmt.Println("Addresses:") + } + for _, address := range list { + fmt.Println(address.Hex()) + } + return nil +} + +func describePolicies(cli *cli.Context, showHeader bool) error { + _, db, err := configAndStorage(cli) + if err != nil { + return err + } + list, err := db.DescribePolicies(context.Background()) + if err != nil { + return err + } + + if showHeader { + fmt.Printf("%7s: %s\n", "Policy", "Action") + } + for _, p := range list { + fmt.Printf("%7s: %s\n", p.Name, p.Desc()) + } + + return nil +} + +func configAndStorage(cli *cli.Context) (*config.Config, *pgpoolstorage.PostgresPoolStorage, error) { + c, err := config.Load(cli, false) + if err != nil { + return nil, nil, err + } + setupLog(c.Log) + + db, err := pgpoolstorage.NewPostgresPoolStorage(c.Pool.DB) + if err != nil { + return nil, nil, err + } + return c, db, nil +} + +func requirePolicyAndAddresses(cli *cli.Context) (pool.PolicyName, []common.Address, error) { + policy, err := resolvePolicy(cli) + if err != nil { + return "", nil, err + } + addresses, err := resolveAddresses(cli, true) + if err != nil { + return "", nil, err + } + return policy, addresses, nil +} + +func resolvePolicy(cli *cli.Context) (pool.PolicyName, error) { + policy := cli.String(policyFlag.Name) + if policy == "" { + return "", nil + } + if !pool.IsPolicy(policy) { + return "", fmt.Errorf("invalid policy name: %s", policy) + } + return pool.PolicyName(policy), nil +} + +func resolveAddresses(cli *cli.Context, failIfEmpty bool) ([]common.Address, error) { + var set = make(map[common.Address]struct{}) + if cli.IsSet("csv") { + file := cli.String(csvFlag.Name) + fd, err := os.Open(file) + if err != nil { + return nil, err + } + defer func(fd *os.File) { + _ = fd.Close() + }(fd) + + fileReader := csv.NewReader(fd) + records, err := fileReader.ReadAll() + + if err != nil { + return nil, err + } + for _, row := range records { + for _, cell := range row { + hex := strings.TrimSpace(cell) + set[common.HexToAddress(hex)] = struct{}{} + } + } + } + + for _, a := range cli.Args().Slice() { + a = strings.TrimSpace(a) + a = strings.Trim(a, ",|") + if !strings.HasPrefix(a, "0x") { + a = "0x" + a + } + set[common.HexToAddress(a)] = struct{}{} + } + var ret []common.Address + for a := range set { + ret = append(ret, a) + } + if failIfEmpty && len(ret) == 0 { + return nil, errors.New("no addresses given") + } + return ret, nil +} diff --git a/cmd/restore.go b/cmd/restore.go index 10e364338c..96cc96b674 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -5,9 +5,9 @@ import ( "strconv" "strings" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/log" pg "github.com/habx/pg-commands" "github.com/urfave/cli/v2" ) diff --git a/cmd/run.go b/cmd/run.go index f85f3c1f52..23163e4cd5 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -11,28 +11,29 @@ import ( "runtime" "time" - "github.com/0xPolygonHermez/zkevm-node" - "github.com/0xPolygonHermez/zkevm-node/aggregator" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/event/pgeventstorage" - "github.com/0xPolygonHermez/zkevm-node/gasprice" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/metrics" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/pool/pgpoolstorage" - "github.com/0xPolygonHermez/zkevm-node/sequencer" - "github.com/0xPolygonHermez/zkevm-node/sequencesender" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/synchronizer" + dataCommitteeClient "github.com/0xPolygon/cdk-data-availability/client" + zkevm "github.com/0xPolygon/cdk-validium-node" + "github.com/0xPolygon/cdk-validium-node/aggregator" + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/ethtxmanager" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/nileventstorage" + "github.com/0xPolygon/cdk-validium-node/event/pgeventstorage" + "github.com/0xPolygon/cdk-validium-node/gasprice" + "github.com/0xPolygon/cdk-validium-node/jsonrpc" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/metrics" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/pool/pgpoolstorage" + "github.com/0xPolygon/cdk-validium-node/sequencer" + "github.com/0xPolygon/cdk-validium-node/sequencesender" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/synchronizer" "github.com/jackc/pgx/v4/pgxpool" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/urfave/cli/v2" @@ -303,6 +304,7 @@ func runSynchronizer(cfg config.Config, etherman *etherman.Client, ethTxManager sy, err := synchronizer.NewSynchronizer( cfg.IsTrustedSequencer, etherman, st, pool, ethTxManager, zkEVMClient, eventLog, cfg.NetworkConfig.Genesis, cfg.Synchronizer, + &dataCommitteeClient.ClientFactory{}, ) if err != nil { log.Fatal(err) @@ -396,18 +398,17 @@ func createSequenceSender(cfg config.Config, pool *pool.Pool, etmStorage *ethtxm log.Fatal(err) } - for _, privateKey := range cfg.SequenceSender.PrivateKeys { - _, err := etherman.LoadAuthFromKeyStore(privateKey.Path, privateKey.Password) - if err != nil { - log.Fatal(err) - } + auth, pk, err := etherman.LoadAuthFromKeyStore(cfg.SequenceSender.PrivateKey.Path, cfg.SequenceSender.PrivateKey.Password) + if err != nil { + log.Fatal(err) } + cfg.SequenceSender.SenderAddress = auth.From cfg.SequenceSender.ForkUpgradeBatchNumber = cfg.ForkUpgradeBatchNumber ethTxManager := ethtxmanager.New(cfg.EthTxManager, etherman, etmStorage, st) - seqSender, err := sequencesender.New(cfg.SequenceSender, st, etherman, ethTxManager, eventLog) + seqSender, err := sequencesender.New(cfg.SequenceSender, st, etherman, ethTxManager, eventLog, pk) if err != nil { log.Fatal(err) } @@ -497,7 +498,7 @@ func createEthTxManager(cfg config.Config, etmStorage *ethtxmanager.PostgresStor } for _, privateKey := range cfg.EthTxManager.PrivateKeys { - _, err := etherman.LoadAuthFromKeyStore(privateKey.Path, privateKey.Password) + _, _, err := etherman.LoadAuthFromKeyStore(privateKey.Path, privateKey.Password) if err != nil { log.Fatal(err) } diff --git a/cmd/setupcommittee.go b/cmd/setupcommittee.go new file mode 100644 index 0000000000..c0690ee05c --- /dev/null +++ b/cmd/setupcommittee.go @@ -0,0 +1,115 @@ +package main + +import ( + "fmt" + "math/big" + "os" + "path/filepath" + "strings" + + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkdatacommittee" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/urfave/cli/v2" +) + +func setupCommittee(ctx *cli.Context) error { + c, err := config.Load(ctx, true) + if err != nil { + return err + } + if !ctx.Bool(config.FlagYes) { + fmt.Println("*WARNING* Are you sure you want to setup committee? [y/N]: ") + var input string + if _, err := fmt.Scanln(&input); err != nil { + return err + } + input = strings.ToLower(input) + if !(input == "y" || input == "yes") { + return nil + } + } + + setupLog(c.Log) + + // Check if it is already registered + etherman, err := newEtherman(*c) + if err != nil { + log.Fatal(err) + return err + } + + // load auth from keystore file + addrKeyStorePath := ctx.String(config.FlagKeyStorePath) + addrPassword := ctx.String(config.FlagPassword) + authL1, _, err := etherman.LoadAuthFromKeyStore(addrKeyStorePath, addrPassword) + if err != nil { + log.Fatal(err) + return err + } + + dataCommitteeContract := c.DataAvailability.L1.DataCommitteeAddress + fmt.Println("cdkDataCommitteeContract: ", dataCommitteeContract) + + clientL1, err := ethclient.Dial(c.DataAvailability.L1.RpcURL) + if err != nil { + log.Fatal(err) + return err + } + dacSC, err := cdkdatacommittee.NewCdkdatacommittee( + common.HexToAddress(dataCommitteeContract), + clientL1, + ) + if err != nil { + log.Fatal(err) + return err + } + + const nSignatures = 1 + addrsBytes := []byte{} + urls := []string{} + + // load dac member from keystore file + keystoreEncrypted, err := os.ReadFile(filepath.Clean(c.DataAvailability.PrivateKey.Path)) + if err != nil { + return err + } + log.Infof("decrypting dac member key from: %v", c.DataAvailability.PrivateKey.Path) + dacMemberKey, err := keystore.DecryptKey(keystoreEncrypted, c.DataAvailability.PrivateKey.Password) + if err != nil { + return err + } + dacMemberAddress := dacMemberKey.Address + fmt.Println("dacMemberAddress: ", dacMemberAddress) + dacServiceURL := fmt.Sprintf("http://%s:%d", c.DataAvailability.RPC.Host, c.DataAvailability.RPC.Port) + fmt.Println("dacServiceURL: ", dacServiceURL) + addrsBytes = append(addrsBytes, dacMemberAddress.Bytes()...) + urls = append(urls, dacServiceURL) + + tx, err := dacSC.SetupCommittee(authL1, big.NewInt(nSignatures), urls, addrsBytes) + if err != nil { + return err + } + const ( + mainnet = 1 + rinkeby = 4 + goerli = 5 + local = 1337 + ) + switch c.NetworkConfig.L1Config.L1ChainID { + case mainnet: + fmt.Println("Check tx status: https://etherscan.io/tx/" + tx.Hash().String()) + case rinkeby: + fmt.Println("Check tx status: https://rinkeby.etherscan.io/tx/" + tx.Hash().String()) + case goerli: + fmt.Println("Check tx status: https://goerli.etherscan.io/tx/" + tx.Hash().String()) + case local: + fmt.Println("Local network. Tx Hash: " + tx.Hash().String()) + default: + fmt.Println("Unknown network. Tx Hash: " + tx.Hash().String()) + } + return nil +} diff --git a/cmd/snapshot.go b/cmd/snapshot.go index 4605772e12..505426846a 100644 --- a/cmd/snapshot.go +++ b/cmd/snapshot.go @@ -5,9 +5,9 @@ import ( "strconv" "time" + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/0xPolygonHermez/zkevm-node" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/log" pg "github.com/habx/pg-commands" "github.com/urfave/cli/v2" ) diff --git a/config/config.go b/config/config.go index 9660faac75..dfa0dd089c 100644 --- a/config/config.go +++ b/config/config.go @@ -5,21 +5,22 @@ import ( "path/filepath" "strings" - "github.com/0xPolygonHermez/zkevm-node/aggregator" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/gasprice" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/metrics" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/sequencer" - "github.com/0xPolygonHermez/zkevm-node/sequencesender" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/synchronizer" + daCfg "github.com/0xPolygon/cdk-data-availability/config" + "github.com/0xPolygon/cdk-validium-node/aggregator" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/ethtxmanager" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/gasprice" + "github.com/0xPolygon/cdk-validium-node/jsonrpc" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/metrics" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/sequencer" + "github.com/0xPolygon/cdk-validium-node/sequencesender" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/synchronizer" "github.com/mitchellh/mapstructure" "github.com/spf13/viper" "github.com/urfave/cli/v2" @@ -76,7 +77,7 @@ type Config struct { // So after the batch number `ForkUpgradeBatchNumber` is virtualized and verified you could update // the system (SC,...) to new forkId and remove this value to allow the system to keep // Virtualizing and verifying the new batchs. - // Check issue [#2236](https://github.com/0xPolygonHermez/zkevm-node/issues/2236) to known more + // Check issue [#2236](https://github.com/0xPolygon/cdk-validium-node/issues/2236) to known more // This value overwrite `SequenceSender.ForkUpgradeBatchNumber` ForkUpgradeBatchNumber uint64 `mapstructure:"ForkUpgradeBatchNumber"` // Which is the new forkId @@ -108,6 +109,8 @@ type Config struct { Executor executor.Config // Configuration of the merkle tree client service. Not use in the node, only for testing MTClient merkletree.Config + // Configuration of the data availability service + DataAvailability daCfg.Config // Configuration of the state database connection StateDB db.Config // Configuration of the metrics service, basically is where is going to publish the metrics @@ -154,7 +157,7 @@ func Load(ctx *cli.Context, loadNetworkConfig bool) (*Config, error) { viper.AutomaticEnv() replacer := strings.NewReplacer(".", "_") viper.SetEnvKeyReplacer(replacer) - viper.SetEnvPrefix("ZKEVM_NODE") + viper.SetEnvPrefix("CDK_VALIDIUM_NODE") err = viper.ReadInConfig() if err != nil { _, ok := err.(viper.ConfigFileNotFoundError) diff --git a/config/config_test.go b/config/config_test.go index 269a2e19ba..58315836d0 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/aggregator" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/aggregator" + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -100,42 +100,6 @@ func Test_Defaults(t *testing.T) { path: "Sequencer.MaxTxLifetime", expectedValue: types.NewDuration(3 * time.Hour), }, - { - path: "Sequencer.WeightBatchBytesSize", - expectedValue: 1, - }, - { - path: "Sequencer.WeightCumulativeGasUsed", - expectedValue: 1, - }, - { - path: "Sequencer.WeightKeccakHashes", - expectedValue: 1, - }, - { - path: "Sequencer.WeightPoseidonHashes", - expectedValue: 1, - }, - { - path: "Sequencer.WeightPoseidonPaddings", - expectedValue: 1, - }, - { - path: "Sequencer.WeightMemAligns", - expectedValue: 1, - }, - { - path: "Sequencer.WeightArithmetics", - expectedValue: 1, - }, - { - path: "Sequencer.WeightBinaries", - expectedValue: 1, - }, - { - path: "Sequencer.WeightSteps", - expectedValue: 1, - }, { path: "Sequencer.Finalizer.GERDeadlineTimeout", expectedValue: types.NewDuration(5 * time.Second), @@ -208,10 +172,6 @@ func Test_Defaults(t *testing.T) { path: "Sequencer.DBManager.L2ReorgRetrievalInterval", expectedValue: types.NewDuration(5 * time.Second), }, - { - path: "Sequencer.Worker.ResourceCostMultiplier", - expectedValue: float64(1000), - }, { path: "SequenceSender.WaitPeriodSendSequence", expectedValue: types.NewDuration(5 * time.Second), @@ -221,8 +181,8 @@ func Test_Defaults(t *testing.T) { expectedValue: types.NewDuration(5 * time.Second), }, { - path: "SequenceSender.MaxTxSizeForL1", - expectedValue: uint64(131072), + path: "SequenceSender.MaxBatchesForL1", + expectedValue: uint64(1000), }, { path: "Etherman.URL", @@ -230,19 +190,23 @@ func Test_Defaults(t *testing.T) { }, { path: "NetworkConfig.L1Config.L1ChainID", - expectedValue: uint64(5), + expectedValue: uint64(1337), }, { - path: "NetworkConfig.L1Config.ZkEVMAddr", - expectedValue: common.HexToAddress("0xa997cfD539E703921fD1e3Cf25b4c241a27a4c7A"), + path: "NetworkConfig.L1Config.CDKValidiumAddr", + expectedValue: common.HexToAddress("0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82"), }, { path: "NetworkConfig.L1Config.MaticAddr", - expectedValue: common.HexToAddress("0x1319D23c2F7034F52Eb07399702B040bA278Ca49"), + expectedValue: common.HexToAddress("0x5FbDB2315678afecb367f032d93F642f64180aa3"), }, { path: "NetworkConfig.L1Config.GlobalExitRootManagerAddr", - expectedValue: common.HexToAddress("0x4d9427DCA0406358445bC0a8F88C26b704004f74"), + expectedValue: common.HexToAddress("0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e"), + }, + { + path: "NetworkConfig.L1Config.DataCommitteeAddr", + expectedValue: common.HexToAddress("0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6"), }, { path: "Etherman.MultiGasProvider", @@ -264,6 +228,14 @@ func Test_Defaults(t *testing.T) { path: "EthTxManager.ForcedGas", expectedValue: uint64(0), }, + { + path: "EthTxManager.GasPriceMarginFactor", + expectedValue: float64(1), + }, + { + path: "EthTxManager.MaxGasPriceLimit", + expectedValue: uint64(0), + }, { path: "L2GasPriceSuggester.DefaultGasPriceWei", expectedValue: uint64(2000000000), @@ -274,7 +246,7 @@ func Test_Defaults(t *testing.T) { }, { path: "MTClient.URI", - expectedValue: "zkevm-prover:50061", + expectedValue: "cdk-validium-prover:50061", }, { path: "StateDB.User", @@ -290,7 +262,7 @@ func Test_Defaults(t *testing.T) { }, { path: "StateDB.Host", - expectedValue: "zkevm-state-db", + expectedValue: "cdk-validium-state-db", }, { path: "StateDB.Port", @@ -351,7 +323,7 @@ func Test_Defaults(t *testing.T) { }, { path: "Pool.DB.Host", - expectedValue: "zkevm-pool-db", + expectedValue: "cdk-validium-pool-db", }, { path: "Pool.DB.Port", @@ -407,7 +379,7 @@ func Test_Defaults(t *testing.T) { }, { path: "Executor.URI", - expectedValue: "zkevm-prover:50071", + expectedValue: "cdk-validium-prover:50071", }, { path: "Executor.MaxResourceExhaustedAttempts", @@ -478,7 +450,8 @@ func Test_Defaults(t *testing.T) { require.NoError(t, os.WriteFile(file.Name(), []byte("{}"), 0600)) flagSet := flag.NewFlagSet("", flag.PanicOnError) - flagSet.String(config.FlagNetwork, "testnet", "") + flagSet.String(config.FlagNetwork, "custom", "") + flagSet.String(config.FlagCustomNetwork, "../test/config/test.genesis.config.json", "") ctx := cli.NewContext(cli.NewApp(), flagSet, nil) cfg, err := config.Load(ctx, true) if err != nil { @@ -509,19 +482,14 @@ func getValueFromStruct(path string, object interface{}) interface{} { } func TestEnvVarArrayDecoding(t *testing.T) { - file, err := os.CreateTemp("", "genesisConfig") - require.NoError(t, err) - defer func() { - require.NoError(t, os.Remove(file.Name())) - }() - require.NoError(t, os.WriteFile(file.Name(), []byte("{}"), 0600)) flagSet := flag.NewFlagSet("", flag.PanicOnError) - flagSet.String(config.FlagNetwork, "testnet", "") + flagSet.String(config.FlagNetwork, "custom", "") + flagSet.String(config.FlagCustomNetwork, "../test/config/test.genesis.config.json", "") ctx := cli.NewContext(cli.NewApp(), flagSet, nil) - os.Setenv("ZKEVM_NODE_LOG_OUTPUTS", "a,b,c") + os.Setenv("CDK_VALIDIUM_NODE_LOG_OUTPUTS", "a,b,c") defer func() { - os.Unsetenv("ZKEVM_NODE_LOG_OUTPUTS") + os.Unsetenv("CDK_VALIDIUM_NODE_LOG_OUTPUTS") }() cfg, err := config.Load(ctx, true) diff --git a/config/default.go b/config/default.go index 8d44065ab8..2553c563b5 100644 --- a/config/default.go +++ b/config/default.go @@ -15,7 +15,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "cdk-validium-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -34,7 +34,7 @@ GlobalQueue = 1024 User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "cdk-validium-pool-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -49,6 +49,8 @@ MultiGasProvider = false FrequencyToMonitorTxs = "1s" WaitTxToBeMined = "2m" ForcedGas = 0 +GasPriceMarginFactor = 1 +MaxGasPriceLimit = 0 [RPC] Host = "0.0.0.0" @@ -83,15 +85,6 @@ MaxMemAligns = 236585 MaxArithmetics = 236585 MaxBinaries = 473170 MaxSteps = 7570538 -WeightBatchBytesSize = 1 -WeightCumulativeGasUsed = 1 -WeightKeccakHashes = 1 -WeightPoseidonHashes = 1 -WeightPoseidonPaddings = 1 -WeightMemAligns = 1 -WeightArithmetics = 1 -WeightBinaries = 1 -WeightSteps = 1 TxLifetimeCheckTimeout = "10m" MaxTxLifetime = "3h" [Sequencer.Finalizer] @@ -109,8 +102,6 @@ MaxTxLifetime = "3h" [Sequencer.DBManager] PoolRetrievalInterval = "500ms" L2ReorgRetrievalInterval = "5s" - [Sequencer.Worker] - ResourceCostMultiplier = 1000 [Sequencer.EffectiveGasPrice] MaxBreakEvenGasPriceDeviationPercentage = 10 L1GasPriceFactor = 0.25 @@ -121,9 +112,9 @@ MaxTxLifetime = "3h" [SequenceSender] WaitPeriodSendSequence = "5s" LastBatchVirtualizationTimeMaxWaitPeriod = "5s" -MaxTxSizeForL1 = 131072 -SenderAddress = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" -PrivateKeys = [{Path = "/pk/sequencer.keystore", Password = "testonly"}] +MaxBatchesForL1 = 1000 +L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" +PrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"} [Aggregator] Host = "0.0.0.0" @@ -146,14 +137,23 @@ CleanHistoryPeriod = "1h" CleanHistoryTimeRetention = "5m" [MTClient] -URI = "zkevm-prover:50061" +URI = "cdk-validium-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "cdk-validium-prover:50071" MaxResourceExhaustedAttempts = 3 WaitOnResourceExhaustion = "1s" MaxGRPCMessageSize = 100000000 +[DataCommittee] +PrivateKey = {Path = "/pk/test-member.keystore", Password = "testonly"} + [DataCommittee.L1] + RpcURL = "http://cdk-validium-mock-l1-network:8545" + DataCommitteeAddress = "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" + [DataCommittee.RPC] + Host = "cdk-validium-data-availability" + Port = 8444 + [Metrics] Host = "0.0.0.0" Port = 9091 @@ -163,7 +163,7 @@ Enabled = false User = "prover_user" Password = "prover_pass" Name = "prover_db" -Host = "zkevm-state-db" +Host = "cdk-validium-state-db" Port = "5432" EnableLog = false MaxConns = 200 diff --git a/config/environments/local/local.genesis.config.json b/config/environments/local/local.genesis.config.json deleted file mode 100644 index e78f355783..0000000000 --- a/config/environments/local/local.genesis.config.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "l1Config" : { - "chainId": 1337, - "polygonZkEVMAddress": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788", - "maticTokenAddress": "0x5FbDB2315678afecb367f032d93F642f64180aa3", - "polygonZkEVMGlobalExitRootAddress": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" - }, - "root": "0xd88680f1b151dd67518f9aca85161424c0cac61df2f5424a3ddc04ea25adecc7", - "genesisBlockNumber": 102, - "genesis": [ - { - "contractName": "PolygonZkEVMDeployer", - "balance": "0", - "nonce": "4", - "address": "0x4b2700570f8426A24EA85e0324611E527BdD55B8", - "bytecode": "0x6080604052600436106100705760003560e01c8063715018a61161004e578063715018a6146100e65780638da5cb5b146100fb578063e11ae6cb14610126578063f2fde38b1461013957600080fd5b80632b79805a146100755780634a94d4871461008a5780636d07dbf81461009d575b600080fd5b610088610083366004610927565b610159565b005b6100886100983660046109c7565b6101cb565b3480156100a957600080fd5b506100bd6100b8366004610a1e565b61020d565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b50610088610220565b34801561010757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100bd565b610088610134366004610a40565b610234565b34801561014557600080fd5b50610088610154366004610a90565b61029b565b610161610357565b600061016e8585856103d8565b905061017a8183610537565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527fba82f25fed02cd2a23d9f5d11c2ef588d22af5437cbf23bfe61d87257c480e4c9060200160405180910390a15050505050565b6101d3610357565b6101de83838361057b565b506040517f25adb19089b6a549831a273acdf7908cff8b7ee5f551f8d1d37996cf01c5df5b90600090a1505050565b600061021983836105a9565b9392505050565b610228610357565b61023260006105b6565b565b61023c610357565b60006102498484846103d8565b60405173ffffffffffffffffffffffffffffffffffffffff821681529091507fba82f25fed02cd2a23d9f5d11c2ef588d22af5437cbf23bfe61d87257c480e4c9060200160405180910390a150505050565b6102a3610357565b73ffffffffffffffffffffffffffffffffffffffff811661034b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610354816105b6565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610342565b600083471015610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610342565b81516000036104af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610342565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff8116610219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610342565b6060610219838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525061062b565b60606105a1848484604051806060016040528060298152602001610b3d6029913961062b565b949350505050565b6000610219838330610744565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060824710156106bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610342565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516106e69190610acf565b60006040518083038185875af1925050503d8060008114610723576040519150601f19603f3d011682016040523d82523d6000602084013e610728565b606091505b50915091506107398783838761076e565b979650505050505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b606083156108045782516000036107fd5773ffffffffffffffffffffffffffffffffffffffff85163b6107fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610342565b50816105a1565b6105a183838151156108195781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103429190610aeb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261088d57600080fd5b813567ffffffffffffffff808211156108a8576108a861084d565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156108ee576108ee61084d565b8160405283815286602085880101111561090757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806080858703121561093d57600080fd5b8435935060208501359250604085013567ffffffffffffffff8082111561096357600080fd5b61096f8883890161087c565b9350606087013591508082111561098557600080fd5b506109928782880161087c565b91505092959194509250565b803573ffffffffffffffffffffffffffffffffffffffff811681146109c257600080fd5b919050565b6000806000606084860312156109dc57600080fd5b6109e58461099e565b9250602084013567ffffffffffffffff811115610a0157600080fd5b610a0d8682870161087c565b925050604084013590509250925092565b60008060408385031215610a3157600080fd5b50508035926020909101359150565b600080600060608486031215610a5557600080fd5b8335925060208401359150604084013567ffffffffffffffff811115610a7a57600080fd5b610a868682870161087c565b9150509250925092565b600060208284031215610aa257600080fd5b6102198261099e565b60005b83811015610ac6578181015183820152602001610aae565b50506000910152565b60008251610ae1818460208701610aab565b9190910192915050565b6020815260008251806020840152610b0a816040850160208701610aab565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a26469706673582212203e70ce334e8ec9d8d03e87415afd36dce4e82633bd277b08937095a6bd66367764736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" - } - }, - { - "contractName": "ProxyAdmin", - "balance": "0", - "nonce": "1", - "address": "0xf065BaE7C019ff5627E09ed48D4EeA317D211956", - "bytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461012b57806399a88ec41461013e578063f2fde38b1461015e578063f3b7dead1461017e57600080fd5b8063204e1c7a14610080578063715018a6146100c95780637eff275e146100e05780638da5cb5b14610100575b600080fd5b34801561008c57600080fd5b506100a061009b366004610608565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d557600080fd5b506100de610255565b005b3480156100ec57600080fd5b506100de6100fb36600461062c565b610269565b34801561010c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100a0565b6100de610139366004610694565b6102f7565b34801561014a57600080fd5b506100de61015936600461062c565b61038c565b34801561016a57600080fd5b506100de610179366004610608565b6103e8565b34801561018a57600080fd5b506100a0610199366004610608565b6104a4565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b50915091508161023957600080fd5b8080602001905181019061024d9190610788565b949350505050565b61025d6104f0565b6102676000610571565b565b6102716104f0565b6040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690638f283970906024015b600060405180830381600087803b1580156102db57600080fd5b505af11580156102ef573d6000803e3d6000fd5b505050505050565b6102ff6104f0565b6040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690634f1ef28690349061035590869086906004016107a5565b6000604051808303818588803b15801561036e57600080fd5b505af1158015610382573d6000803e3d6000fd5b5050505050505050565b6103946104f0565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690633659cfe6906024016102c1565b6103f06104f0565b73ffffffffffffffffffffffffffffffffffffffff8116610498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104a181610571565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b60005473ffffffffffffffffffffffffffffffffffffffff163314610267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161048f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811681146104a157600080fd5b60006020828403121561061a57600080fd5b8135610625816105e6565b9392505050565b6000806040838503121561063f57600080fd5b823561064a816105e6565b9150602083013561065a816105e6565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156106a957600080fd5b83356106b4816105e6565b925060208401356106c4816105e6565b9150604084013567ffffffffffffffff808211156106e157600080fd5b818601915086601f8301126106f557600080fd5b81358181111561070757610707610665565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561074d5761074d610665565b8160405282815289602084870101111561076657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561079a57600080fd5b8151610625816105e6565b73ffffffffffffffffffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b818110156107ef578581018301518582016060015282016107d3565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010192505050939250505056fea2646970667358221220372a0e10eebea1b7fa43ae4c976994e6ed01d85eedc3637b83f01d3f06be442064736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f" - } - }, - { - "contractName": "PolygonZkEVMBridge implementation", - "balance": "0", - "nonce": "1", - "address": "0xf23919bb44BCa81aeAb4586BE71Ee3fd4E99B951", - "bytecode": "0x6080604052600436106200019f5760003560e01c8063647c576c11620000e7578063be5831c71162000089578063dbc169761162000060578063dbc169761462000639578063ee25560b1462000651578063fb570834146200068257600080fd5b8063be5831c714620005ae578063cd58657914620005ea578063d02103ca146200060157600080fd5b80639e34070f11620000be5780639e34070f146200050a578063aaa13cc2146200054f578063bab161bf146200057457600080fd5b8063647c576c146200048657806379e2cf9714620004ab57806381b1c17414620004c357600080fd5b80632d2c9d94116200015157806334ac9cf2116200012857806334ac9cf2146200034b5780633ae05047146200037a5780633e197043146200039257600080fd5b80632d2c9d9414620002765780632dfdf0b5146200029b578063318aee3d14620002c257600080fd5b806322e95f2c116200018657806322e95f2c14620001ef578063240ff378146200023a5780632cffd02e146200025157600080fd5b806315064c9614620001a45780632072f6c514620001d5575b600080fd5b348015620001b157600080fd5b50606854620001c09060ff1681565b60405190151581526020015b60405180910390f35b348015620001e257600080fd5b50620001ed620006a7565b005b348015620001fc57600080fd5b50620002146200020e366004620032db565b62000705565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001620001cc565b620001ed6200024b36600462003372565b620007a8565b3480156200025e57600080fd5b50620001ed6200027036600462003409565b620009d0565b3480156200028357600080fd5b50620001ed6200029536600462003409565b62000f74565b348015620002a857600080fd5b50620002b360535481565b604051908152602001620001cc565b348015620002cf57600080fd5b5062000319620002e1366004620034ef565b606b6020526000908152604090205463ffffffff811690640100000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6040805163ffffffff909316835273ffffffffffffffffffffffffffffffffffffffff909116602083015201620001cc565b3480156200035857600080fd5b50606c54620002149073ffffffffffffffffffffffffffffffffffffffff1681565b3480156200038757600080fd5b50620002b362001178565b3480156200039f57600080fd5b50620002b3620003b136600462003526565b6040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b3480156200049357600080fd5b50620001ed620004a5366004620035b0565b6200125e565b348015620004b857600080fd5b50620001ed620014ad565b348015620004d057600080fd5b5062000214620004e236600462003600565b606a6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156200051757600080fd5b50620001c06200052936600462003600565b600881901c600090815260696020526040902054600160ff9092169190911b9081161490565b3480156200055c57600080fd5b50620002146200056e3660046200361a565b620014e7565b3480156200058157600080fd5b506068546200059890610100900463ffffffff1681565b60405163ffffffff9091168152602001620001cc565b348015620005bb57600080fd5b506068546200059890790100000000000000000000000000000000000000000000000000900463ffffffff1681565b620001ed620005fb366004620036ce565b620016d3565b3480156200060e57600080fd5b50606854620002149065010000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b3480156200064657600080fd5b50620001ed62001c37565b3480156200065e57600080fd5b50620002b36200067036600462003600565b60696020526000908152604090205481565b3480156200068f57600080fd5b50620001c0620006a136600462003770565b62001c93565b606c5473ffffffffffffffffffffffffffffffffffffffff163314620006f9576040517fe2e8106b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362001d7c565b565b6040805160e084901b7fffffffff0000000000000000000000000000000000000000000000000000000016602080830191909152606084901b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602483015282516018818403018152603890920183528151918101919091206000908152606a909152205473ffffffffffffffffffffffffffffffffffffffff165b92915050565b60685460ff1615620007e6576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff8681166101009092041614806200080c5750600263ffffffff861610155b1562000844576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b6001606860019054906101000a900463ffffffff163388883488886053546040516200089a9998979695949392919062003806565b60405180910390a1620009b8620009b26001606860019054906101000a900463ffffffff16338989348989604051620008d592919062003881565b60405180910390206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b62001e10565b8215620009c957620009c962001f27565b5050505050565b60685460ff161562000a0e576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000a258b8b8b8b8b8b8b8b8b8b8b600062001ffc565b73ffffffffffffffffffffffffffffffffffffffff861662000b01576040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff861690859060405162000a7a9190620038e6565b60006040518083038185875af1925050503d806000811462000ab9576040519150601f19603f3d011682016040523d82523d6000602084013e62000abe565b606091505b505090508062000afa576040517f6747a28800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5062000efc565b60685463ffffffff61010090910481169088160362000b435762000b3d73ffffffffffffffffffffffffffffffffffffffff87168585620021ed565b62000efc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b166024820152600090603801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152606a90935291205490915073ffffffffffffffffffffffffffffffffffffffff168062000e6e576000808062000c1886880188620039fb565b92509250925060008584848460405162000c329062003292565b62000c409392919062003abd565b8190604051809103906000f590508015801562000c61573d6000803e3d6000fd5b506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c81166004830152602482018c9052919250908216906340c10f1990604401600060405180830381600087803b15801562000cd757600080fd5b505af115801562000cec573d6000803e3d6000fd5b5050505080606a600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180604001604052808e63ffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff16815250606b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050507f490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a398d8d838b8b60405162000e5c95949392919062003afa565b60405180910390a15050505062000ef9565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018790528216906340c10f1990604401600060405180830381600087803b15801562000edf57600080fd5b505af115801562000ef4573d6000803e3d6000fd5b505050505b50505b6040805163ffffffff8c811682528916602082015273ffffffffffffffffffffffffffffffffffffffff88811682840152861660608201526080810185905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a15050505050505050505050565b60685460ff161562000fb2576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000fc98b8b8b8b8b8b8b8b8b8b8b600162001ffc565b60008473ffffffffffffffffffffffffffffffffffffffff1684888a868660405160240162000ffc949392919062003b42565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1806b5f200000000000000000000000000000000000000000000000000000000179052516200107f9190620038e6565b60006040518083038185875af1925050503d8060008114620010be576040519150601f19603f3d011682016040523d82523d6000602084013e620010c3565b606091505b5050905080620010ff576040517f37e391c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805163ffffffff8d811682528a16602082015273ffffffffffffffffffffffffffffffffffffffff89811682840152871660608201526080810186905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a1505050505050505050505050565b605354600090819081805b602081101562001255578083901c600116600103620011e65760338160208110620011b257620011b262003b8a565b0154604080516020810192909252810185905260600160405160208183030381529060405280519060200120935062001213565b60408051602081018690529081018390526060016040516020818303038152906040528051906020012093505b604080516020810184905290810183905260600160405160208183030381529060405280519060200120915080806200124c9062003be8565b91505062001183565b50919392505050565b600054610100900460ff16158080156200127f5750600054600160ff909116105b806200129b5750303b1580156200129b575060005460ff166001145b6200132d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156200138c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b606880547fffffffffffffff000000000000000000000000000000000000000000000000ff1661010063ffffffff8716027fffffffffffffff0000000000000000000000000000000000000000ffffffffff16176501000000000073ffffffffffffffffffffffffffffffffffffffff8681169190910291909117909155606c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001691841691909117905562001443620022c3565b8015620014a757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b605354606854790100000000000000000000000000000000000000000000000000900463ffffffff16101562000703576200070362001f27565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b1660248201526000908190603801604051602081830303815290604052805190602001209050600060ff60f81b3083604051806020016200157d9062003292565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f909101166040819052620015c8908d908d908d908d908d9060200162003c23565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262001606929160200162003c64565b604051602081830303815290604052805190602001206040516020016200168f94939291907fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101209a9950505050505050505050565b60685460ff161562001711576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200171b62002366565b60685463ffffffff888116610100909204161480620017415750600263ffffffff881610155b1562001779576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060608773ffffffffffffffffffffffffffffffffffffffff8816620017df57883414620017d5576040517fb89240f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000925062001ad9565b341562001818576040517f798ee6f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8089166000908152606b602090815260409182902082518084019093525463ffffffff811683526401000000009004909216918101829052901562001908576040517f9dc29fac000000000000000000000000000000000000000000000000000000008152336004820152602481018b905273ffffffffffffffffffffffffffffffffffffffff8a1690639dc29fac90604401600060405180830381600087803b158015620018db57600080fd5b505af1158015620018f0573d6000803e3d6000fd5b50505050806020015194508060000151935062001ad7565b85156200191d576200191d898b8989620023db565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8b16906370a0823190602401602060405180830381865afa1580156200198b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620019b1919062003c97565b9050620019d773ffffffffffffffffffffffffffffffffffffffff8b1633308e620028f9565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8c16906370a0823190602401602060405180830381865afa15801562001a45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a6b919062003c97565b905062001a79828262003cb1565b6068548c9850610100900463ffffffff169650935062001a998762002959565b62001aa48c62002a71565b62001aaf8d62002b7e565b60405160200162001ac39392919062003abd565b604051602081830303815290604052945050505b505b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b600084868e8e868860535460405162001b1b98979695949392919062003cc7565b60405180910390a162001c0f620009b2600085878f8f8789805190602001206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b861562001c205762001c2062001f27565b5050505062001c2e60018055565b50505050505050565b606c5473ffffffffffffffffffffffffffffffffffffffff16331462001c89576040517fe2e8106b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362002c80565b600084815b602081101562001d6e57600163ffffffff8616821c8116900362001d0a5785816020811062001ccb5762001ccb62003b8a565b60200201358260405160200162001cec929190918252602082015260400190565b60405160208183030381529060405280519060200120915062001d59565b8186826020811062001d205762001d2062003b8a565b602002013560405160200162001d40929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b8062001d658162003be8565b91505062001c98565b50821490505b949350505050565b60685460ff161562001dba576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b80600162001e216020600262003e79565b62001e2d919062003cb1565b6053541062001e68576040517fef5ccf6600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060536000815462001e7b9062003be8565b9182905550905060005b602081101562001f17578082901c60011660010362001ebd57826033826020811062001eb55762001eb562003b8a565b015550505050565b6033816020811062001ed35762001ed362003b8a565b01546040805160208101929092528101849052606001604051602081830303815290604052805190602001209250808062001f0e9062003be8565b91505062001e85565b5062001f2262003e87565b505050565b6053546068805463ffffffff909216790100000000000000000000000000000000000000000000000000027fffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179081905573ffffffffffffffffffffffffffffffffffffffff65010000000000909104166333d6247d62001fad62001178565b6040518263ffffffff1660e01b815260040162001fcc91815260200190565b600060405180830381600087803b15801562001fe757600080fd5b505af1158015620014a7573d6000803e3d6000fd5b6200200d8b63ffffffff1662002d10565b6068546040805160208082018e90528183018d9052825180830384018152606083019384905280519101207f257b363200000000000000000000000000000000000000000000000000000000909252606481019190915260009165010000000000900473ffffffffffffffffffffffffffffffffffffffff169063257b3632906084016020604051808303816000875af1158015620020b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620020d6919062003c97565b90508060000362002112576040517e2f6fad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff88811661010090920416146200215c576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606854600090610100900463ffffffff166200217a5750896200217d565b508a5b620021a66200219d848c8c8c8c8c8c8c604051620008d592919062003881565b8f8f8462001c93565b620021dd576040517fe0417cec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905262001f229084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915262002d75565b600054610100900460ff166200235c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6200070362002e88565b600260015403620023d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162001324565b6002600155565b6000620023ec600482848662003eb6565b620023f79162003ee2565b90507f2afa5331000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601620026765760008080808080806200245a896004818d62003eb6565b81019062002469919062003f2b565b96509650965096509650965096503373ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614620024dd576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff861630146200252d576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a851462002567576040517f03fffc4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff89811660248301528881166044830152606482018890526084820187905260ff861660a483015260c4820185905260e48083018590528351808403909101815261010490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd505accf000000000000000000000000000000000000000000000000000000001790529151918e1691620026229190620038e6565b6000604051808303816000865af19150503d806000811462002661576040519150601f19603f3d011682016040523d82523d6000602084013e62002666565b606091505b50505050505050505050620009c9565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f8fcbaf0c0000000000000000000000000000000000000000000000000000000014620026f2576040517fe282c0ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808080808080806200270a8a6004818e62003eb6565b81019062002719919062003f86565b975097509750975097509750975097503373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146200278f576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff87163014620027df576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8a811660248301528981166044830152606482018990526084820188905286151560a483015260ff861660c483015260e482018590526101048083018590528351808403909101815261012490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8fcbaf0c000000000000000000000000000000000000000000000000000000001790529151918f1691620028a39190620038e6565b6000604051808303816000865af19150503d8060008114620028e2576040519150601f19603f3d011682016040523d82523d6000602084013e620028e7565b606091505b50505050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052620014a79085907f23b872dd000000000000000000000000000000000000000000000000000000009060840162002240565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f06fdde03000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff861691620029dd9190620038e6565b600060405180830381855afa9150503d806000811462002a1a576040519150601f19603f3d011682016040523d82523d6000602084013e62002a1f565b606091505b50915091508162002a66576040518060400160405280600781526020017f4e4f5f4e414d450000000000000000000000000000000000000000000000000081525062001d74565b62001d748162002f21565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f95d89b41000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff86169162002af59190620038e6565b600060405180830381855afa9150503d806000811462002b32576040519150601f19603f3d011682016040523d82523d6000602084013e62002b37565b606091505b50915091508162002a66576040518060400160405280600981526020017f4e4f5f53594d424f4c000000000000000000000000000000000000000000000081525062001d74565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f313ce5670000000000000000000000000000000000000000000000000000000017905290516000918291829173ffffffffffffffffffffffffffffffffffffffff86169162002c019190620038e6565b600060405180830381855afa9150503d806000811462002c3e576040519150601f19603f3d011682016040523d82523d6000602084013e62002c43565b606091505b509150915081801562002c57575080516020145b62002c6457601262001d74565b8080602001905181019062001d74919062004012565b60018055565b60685460ff1662002cbd576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b600881901c60008181526069602052604081208054600160ff861690811b91821892839055929091908183169003620009c9576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600062002dd9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620031119092919063ffffffff16565b80519091501562001f22578080602001905181019062002dfa919062004032565b62001f22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162001324565b600054610100900460ff1662002c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6060604082511062002f435781806020019051810190620007a2919062004052565b8151602003620030d35760005b60208110801562002f9b575082818151811062002f715762002f7162003b8a565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b1562002fb6578062002fad8162003be8565b91505062002f50565b8060000362002ffa57505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e4700000000000000000000000000006020820152919050565b60008167ffffffffffffffff81111562003018576200301862003891565b6040519080825280601f01601f19166020018201604052801562003043576020820181803683370190505b50905060005b82811015620030cb5784818151811062003067576200306762003b8a565b602001015160f81c60f81b82828151811062003087576200308762003b8a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080620030c28162003be8565b91505062003049565b509392505050565b505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e470000000000000000000000000000602082015290565b919050565b606062001d748484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051620031489190620038e6565b60006040518083038185875af1925050503d806000811462003187576040519150601f19603f3d011682016040523d82523d6000602084013e6200318c565b606091505b50915091506200319f87838387620031aa565b979650505050505050565b60608315620032455782516000036200323d5773ffffffffffffffffffffffffffffffffffffffff85163b6200323d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162001324565b508162001d74565b62001d7483838151156200325c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620013249190620040d2565b611b6680620040e883390190565b803563ffffffff811681146200310c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114620032d857600080fd5b50565b60008060408385031215620032ef57600080fd5b620032fa83620032a0565b915060208301356200330c81620032b5565b809150509250929050565b8015158114620032d857600080fd5b60008083601f8401126200333957600080fd5b50813567ffffffffffffffff8111156200335257600080fd5b6020830191508360208285010111156200336b57600080fd5b9250929050565b6000806000806000608086880312156200338b57600080fd5b6200339686620032a0565b94506020860135620033a881620032b5565b93506040860135620033ba8162003317565b9250606086013567ffffffffffffffff811115620033d757600080fd5b620033e58882890162003326565b969995985093965092949392505050565b806104008101831015620007a257600080fd5b60008060008060008060008060008060006105208c8e0312156200342c57600080fd5b620034388d8d620033f6565b9a50620034496104008d01620032a0565b99506104208c013598506104408c013597506200346a6104608d01620032a0565b96506104808c01356200347d81620032b5565b95506200348e6104a08d01620032a0565b94506104c08c0135620034a181620032b5565b93506104e08c013592506105008c013567ffffffffffffffff811115620034c757600080fd5b620034d58e828f0162003326565b915080935050809150509295989b509295989b9093969950565b6000602082840312156200350257600080fd5b81356200350f81620032b5565b9392505050565b60ff81168114620032d857600080fd5b600080600080600080600060e0888a0312156200354257600080fd5b87356200354f8162003516565b96506200355f60208901620032a0565b955060408801356200357181620032b5565b94506200358160608901620032a0565b935060808801356200359381620032b5565b9699959850939692959460a0840135945060c09093013592915050565b600080600060608486031215620035c657600080fd5b620035d184620032a0565b92506020840135620035e381620032b5565b91506040840135620035f581620032b5565b809150509250925092565b6000602082840312156200361357600080fd5b5035919050565b600080600080600080600060a0888a0312156200363657600080fd5b6200364188620032a0565b965060208801356200365381620032b5565b9550604088013567ffffffffffffffff808211156200367157600080fd5b6200367f8b838c0162003326565b909750955060608a01359150808211156200369957600080fd5b50620036a88a828b0162003326565b9094509250506080880135620036be8162003516565b8091505092959891949750929550565b600080600080600080600060c0888a031215620036ea57600080fd5b620036f588620032a0565b965060208801356200370781620032b5565b95506040880135945060608801356200372081620032b5565b93506080880135620037328162003317565b925060a088013567ffffffffffffffff8111156200374f57600080fd5b6200375d8a828b0162003326565b989b979a50959850939692959293505050565b60008060008061046085870312156200378857600080fd5b843593506200379b8660208701620033f6565b9250620037ac6104208601620032a0565b939692955092936104400135925050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600061010060ff8c16835263ffffffff808c16602085015273ffffffffffffffffffffffffffffffffffffffff808c166040860152818b166060860152808a166080860152508760a08501528160c0850152620038678285018789620037bd565b925080851660e085015250509a9950505050505050505050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60005b83811015620038dd578181015183820152602001620038c3565b50506000910152565b60008251620038fa818460208701620038c0565b9190910192915050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156200394e576200394e62003891565b604052919050565b600067ffffffffffffffff82111562003973576200397362003891565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112620039b157600080fd5b8135620039c8620039c28262003956565b62003904565b818152846020838601011115620039de57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121562003a1157600080fd5b833567ffffffffffffffff8082111562003a2a57600080fd5b62003a38878388016200399f565b9450602086013591508082111562003a4f57600080fd5b5062003a5e868287016200399f565b9250506040840135620035f58162003516565b6000815180845262003a8b816020860160208601620038c0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60608152600062003ad2606083018662003a71565b828103602084015262003ae6818662003a71565b91505060ff83166040830152949350505050565b63ffffffff86168152600073ffffffffffffffffffffffffffffffffffffffff8087166020840152808616604084015250608060608301526200319f608083018486620037bd565b73ffffffffffffffffffffffffffffffffffffffff8516815263ffffffff8416602082015260606040820152600062003b80606083018486620037bd565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362003c1c5762003c1c62003bb9565b5060010190565b60608152600062003c39606083018789620037bd565b828103602084015262003c4e818688620037bd565b91505060ff831660408301529695505050505050565b6000835162003c78818460208801620038c0565b83519083019062003c8e818360208801620038c0565b01949350505050565b60006020828403121562003caa57600080fd5b5051919050565b81810381811115620007a257620007a262003bb9565b600061010060ff8b16835263ffffffff808b16602085015273ffffffffffffffffffffffffffffffffffffffff808b166040860152818a1660608601528089166080860152508660a08501528160c085015262003d278285018762003a71565b925080851660e085015250509998505050505050505050565b600181815b8085111562003d9f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003d835762003d8362003bb9565b8085161562003d9157918102915b93841c939080029062003d45565b509250929050565b60008262003db857506001620007a2565b8162003dc757506000620007a2565b816001811462003de0576002811462003deb5762003e0b565b6001915050620007a2565b60ff84111562003dff5762003dff62003bb9565b50506001821b620007a2565b5060208310610133831016604e8410600b841016171562003e30575081810a620007a2565b62003e3c838362003d40565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003e715762003e7162003bb9565b029392505050565b60006200350f838362003da7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000808585111562003ec757600080fd5b8386111562003ed557600080fd5b5050820193919092039150565b7fffffffff00000000000000000000000000000000000000000000000000000000813581811691600485101562003f235780818660040360031b1b83161692505b505092915050565b600080600080600080600060e0888a03121562003f4757600080fd5b873562003f5481620032b5565b9650602088013562003f6681620032b5565b955060408801359450606088013593506080880135620035938162003516565b600080600080600080600080610100898b03121562003fa457600080fd5b883562003fb181620032b5565b9750602089013562003fc381620032b5565b96506040890135955060608901359450608089013562003fe38162003317565b935060a089013562003ff58162003516565b979a969950949793969295929450505060c08201359160e0013590565b6000602082840312156200402557600080fd5b81516200350f8162003516565b6000602082840312156200404557600080fd5b81516200350f8162003317565b6000602082840312156200406557600080fd5b815167ffffffffffffffff8111156200407d57600080fd5b8201601f810184136200408f57600080fd5b8051620040a0620039c28262003956565b818152856020838501011115620040b657600080fd5b620040c9826020830160208601620038c0565b95945050505050565b6020815260006200350f602083018462003a7156fe6101006040523480156200001257600080fd5b5060405162001b6638038062001b6683398101604081905262000035916200028d565b82826003620000458382620003a1565b506004620000548282620003a1565b50503360c0525060ff811660e052466080819052620000739062000080565b60a052506200046d915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620000ad6200012e565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6060600380546200013f9062000312565b80601f01602080910402602001604051908101604052809291908181526020018280546200016d9062000312565b8015620001be5780601f106200019257610100808354040283529160200191620001be565b820191906000526020600020905b815481529060010190602001808311620001a057829003601f168201915b5050505050905090565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f057600080fd5b81516001600160401b03808211156200020d576200020d620001c8565b604051601f8301601f19908116603f01168101908282118183101715620002385762000238620001c8565b816040528381526020925086838588010111156200025557600080fd5b600091505b838210156200027957858201830151818301840152908201906200025a565b600093810190920192909252949350505050565b600080600060608486031215620002a357600080fd5b83516001600160401b0380821115620002bb57600080fd5b620002c987838801620001de565b94506020860151915080821115620002e057600080fd5b50620002ef86828701620001de565b925050604084015160ff811681146200030757600080fd5b809150509250925092565b600181811c908216806200032757607f821691505b6020821081036200034857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039c57600081815260208120601f850160051c81016020861015620003775750805b601f850160051c820191505b81811015620003985782815560010162000383565b5050505b505050565b81516001600160401b03811115620003bd57620003bd620001c8565b620003d581620003ce845462000312565b846200034e565b602080601f8311600181146200040d5760008415620003f45750858301515b600019600386901b1c1916600185901b17855562000398565b600085815260208120601f198616915b828110156200043e578886015182559484019460019091019084016200041d565b50858210156200045d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516116aa620004bc6000396000610237015260008181610307015281816105c001526106a70152600061053a015260008181610379015261050401526116aa6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063a457c2d71161008c578063d505accf11610066578063d505accf1461039b578063dd62ed3e146103ae578063ffa1ad74146103f457600080fd5b8063a457c2d71461034e578063a9059cbb14610361578063cd0d00961461037457600080fd5b806395d89b41116100bd57806395d89b41146102e75780639dc29fac146102ef578063a3c573eb1461030257600080fd5b806370a08231146102915780637ecebe00146102c757600080fd5b806330adf81f1161012f5780633644e515116101145780633644e51514610261578063395093511461026957806340c10f191461027c57600080fd5b806330adf81f14610209578063313ce5671461023057600080fd5b806318160ddd1161016057806318160ddd146101bd57806320606b70146101cf57806323b872dd146101f657600080fd5b806306fdde031461017c578063095ea7b31461019a575b600080fd5b610184610430565b60405161019191906113e4565b60405180910390f35b6101ad6101a8366004611479565b6104c2565b6040519015158152602001610191565b6002545b604051908152602001610191565b6101c17f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6101ad6102043660046114a3565b6104dc565b6101c17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610191565b6101c1610500565b6101ad610277366004611479565b61055c565b61028f61028a366004611479565b6105a8565b005b6101c161029f3660046114df565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101c16102d53660046114df565b60056020526000908152604090205481565b610184610680565b61028f6102fd366004611479565b61068f565b6103297f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610191565b6101ad61035c366004611479565b61075e565b6101ad61036f366004611479565b61082f565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61028f6103a9366004611501565b61083d565b6101c16103bc366004611574565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101846040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b60606003805461043f906115a7565b80601f016020809104026020016040519081016040528092919081815260200182805461046b906115a7565b80156104b85780601f1061048d576101008083540402835291602001916104b8565b820191906000526020600020905b81548152906001019060200180831161049b57829003601f168201915b5050505050905090565b6000336104d0818585610b73565b60019150505b92915050565b6000336104ea858285610d27565b6104f5858585610dfe565b506001949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000004614610537576105324661106d565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104d090829086906105a3908790611629565b610b73565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610672576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d4272696467650000000000000000000000000000000060648201526084015b60405180910390fd5b61067c8282611135565b5050565b60606004805461043f906115a7565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d427269646765000000000000000000000000000000006064820152608401610669565b61067c8282611228565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610669565b6104f58286868403610b73565b6000336104d0818585610dfe565b834211156108cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f546f6b656e577261707065643a3a7065726d69743a204578706972656420706560448201527f726d6974000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260056020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a9190866109268361163c565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610991610500565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019190915260428101839052606201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff89169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa158015610a55573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590610ad057508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f546f6b656e577261707065643a3a7065726d69743a20496e76616c696420736960448201527f676e6174757265000000000000000000000000000000000000000000000000006064820152608401610669565b610b678a8a8a610b73565b50505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8316610c15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610df85781811015610deb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610669565b610df88484848403610b73565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610ea1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610f44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610df8565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611098610430565b8051602091820120604080518082018252600181527f310000000000000000000000000000000000000000000000000000000000000090840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b73ffffffffffffffffffffffffffffffffffffffff82166111b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610669565b80600260008282546111c49190611629565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff82166112cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205481811015611381576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610d1a565b600060208083528351808285015260005b81811015611411578581018301518582016040015282016113f5565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461147457600080fd5b919050565b6000806040838503121561148c57600080fd5b61149583611450565b946020939093013593505050565b6000806000606084860312156114b857600080fd5b6114c184611450565b92506114cf60208501611450565b9150604084013590509250925092565b6000602082840312156114f157600080fd5b6114fa82611450565b9392505050565b600080600080600080600060e0888a03121561151c57600080fd5b61152588611450565b965061153360208901611450565b95506040880135945060608801359350608088013560ff8116811461155757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561158757600080fd5b61159083611450565b915061159e60208401611450565b90509250929050565b600181811c908216806115bb57607f821691505b6020821081036115f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156104d6576104d66115fa565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361166d5761166d6115fa565b506001019056fea26469706673582212208d88fee561cff7120d381c345cfc534cef8229a272dc5809d4bbb685ad67141164736f6c63430008110033a2646970667358221220d9b3ca7b13ec80ac58634ddf0ecebe71e209a71f532614949b9e720413f50c8364736f6c63430008110033" - }, - { - "contractName": "PolygonZkEVMBridge proxy", - "balance": "200000000000000000000000000", - "nonce": "1", - "address": "0xff0EE8ea08cEf5cb4322777F5CC3E8A584B8A4A0", - "bytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461088b565b610135565b61006b6100a33660046108a6565b61017f565b3480156100b457600080fd5b506100bd6101f3565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461088b565b610231565b34801561011257600080fd5b506100bd61025e565b6101236102d4565b61013361012e6103ab565b6103b5565b565b61013d6103d9565b73ffffffffffffffffffffffffffffffffffffffff1633036101775761017481604051806020016040528060008152506000610419565b50565b61017461011b565b6101876103d9565b73ffffffffffffffffffffffffffffffffffffffff1633036101eb576101e68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610419915050565b505050565b6101e661011b565b60006101fd6103d9565b73ffffffffffffffffffffffffffffffffffffffff163303610226576102216103ab565b905090565b61022e61011b565b90565b6102396103d9565b73ffffffffffffffffffffffffffffffffffffffff1633036101775761017481610444565b60006102686103d9565b73ffffffffffffffffffffffffffffffffffffffff163303610226576102216103d9565b60606102b183836040518060600160405280602781526020016109bb602791396104a5565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6102dc6103d9565b73ffffffffffffffffffffffffffffffffffffffff163303610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b600061022161052a565b3660008037600080366000845af43d6000803e8080156103d4573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b61042283610552565b60008251118061042f5750805b156101e65761043e838361028c565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61046d6103d9565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a16101748161059f565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516104cf919061094d565b600060405180830381855af49150503d806000811461050a576040519150601f19603f3d011682016040523d82523d6000602084013e61050f565b606091505b5091509150610520868383876106ab565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6103fd565b61055b81610753565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff8116610642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103a2565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b6060831561074157825160000361073a5773ffffffffffffffffffffffffffffffffffffffff85163b61073a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103a2565b508161074b565b61074b838361081e565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff81163b6107f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103a2565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610665565b81511561082e5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a29190610969565b803573ffffffffffffffffffffffffffffffffffffffff8116811461088657600080fd5b919050565b60006020828403121561089d57600080fd5b6102b182610862565b6000806000604084860312156108bb57600080fd5b6108c484610862565b9250602084013567ffffffffffffffff808211156108e157600080fd5b818601915086601f8301126108f557600080fd5b81358181111561090457600080fd5b87602082850101111561091657600080fd5b6020830194508093505050509250925092565b60005b8381101561094457818101518382015260200161092c565b50506000910152565b6000825161095f818460208701610929565b9190910192915050565b6020815260008251806020840152610988816040850160208701610929565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a1af0d6cb4f1e31496a4c5c1448913bce4bd6ad3a39e47c6f7190c114d6f9bf464736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000068": "0x00000000000000a40d5f56745a118d0906a34e69aec8c0db1cb8fa0000000100", - "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x000000000000000000000000f065bae7c019ff5627e09ed48d4eea317d211956", - "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000f23919bb44bca81aeab4586be71ee3fd4e99b951" - } - }, - { - "contractName": "PolygonZkEVMGlobalExitRootL2 implementation", - "balance": "0", - "nonce": "1", - "address": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9", - "bytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806301fd904414610051578063257b36321461006d57806333d6247d1461008d578063a3c573eb146100a2575b600080fd5b61005a60015481565b6040519081526020015b60405180910390f35b61005a61007b366004610162565b60006020819052908152604090205481565b6100a061009b366004610162565b6100ee565b005b6100c97f000000000000000000000000ff0ee8ea08cef5cb4322777f5cc3e8a584b8a4a081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610064565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ff0ee8ea08cef5cb4322777f5cc3e8a584b8a4a0161461015d576040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600155565b60006020828403121561017457600080fd5b503591905056fea2646970667358221220a187fc278346c1b61c449ea3641002b6eac2bda3351a122a12c35099f933696864736f6c63430008110033" - }, - { - "contractName": "PolygonZkEVMGlobalExitRootL2 proxy", - "balance": "0", - "nonce": "1", - "address": "0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa", - "bytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106ca565b610118565b61005b6100933660046106e5565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106ca565b61020b565b3480156100f557600080fd5b506100ad610235565b610106610292565b610116610111610331565b61033b565b565b61012061035f565b6001600160a01b0316336001600160a01b031614156101575761015481604051806020016040528060008152506000610392565b50565b6101546100fe565b61016761035f565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610392915050565b505050565b6101c36100fe565b60006101da61035f565b6001600160a01b0316336001600160a01b03161415610200576101fb610331565b905090565b6102086100fe565b90565b61021361035f565b6001600160a01b0316336001600160a01b0316141561015757610154816103f1565b600061023f61035f565b6001600160a01b0316336001600160a01b03161415610200576101fb61035f565b606061028583836040518060600160405280602781526020016107e460279139610445565b9392505050565b3b151590565b61029a61035f565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb610519565b3660008037600080366000845af43d6000803e80801561035a573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61039b83610541565b6040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a26000825111806103dc5750805b156101c3576103eb8383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61041a61035f565b604080516001600160a01b03928316815291841660208301520160405180910390a1610154816105e9565b6060833b6104a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610328565b600080856001600160a01b0316856040516104bf9190610794565b600060405180830381855af49150503d80600081146104fa576040519150601f19603f3d011682016040523d82523d6000602084013e6104ff565b606091505b509150915061050f828286610675565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610383565b803b6105a55760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610328565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b03811661064e5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610328565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036105c8565b60608315610684575081610285565b8251156106945782518084602001fd5b8160405162461bcd60e51b815260040161032891906107b0565b80356001600160a01b03811681146106c557600080fd5b919050565b6000602082840312156106dc57600080fd5b610285826106ae565b6000806000604084860312156106fa57600080fd5b610703846106ae565b9250602084013567ffffffffffffffff8082111561072057600080fd5b818601915086601f83011261073457600080fd5b81358181111561074357600080fd5b87602082850101111561075557600080fd5b6020830194508093505050509250925092565b60005b8381101561078357818101518382015260200161076b565b838111156103eb5750506000910152565b600082516107a6818460208701610768565b9190910192915050565b60208152600082518060208401526107cf816040850160208701610768565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204675187caf3a43285d9a2c1844a981e977bd52a85ff073e7fc649f73847d70a464736f6c63430008090033", - "storage": { - "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x000000000000000000000000f065bae7c019ff5627e09ed48d4eea317d211956", - "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000dc64a140aa3e981100a9beca4e685f962f0cf6c9" - } - }, - { - "contractName": "PolygonZkEVMTimelock", - "balance": "0", - "nonce": "1", - "address": "0x0165878A594ca255338adfa4d48449f69242Eb8F", - "bytecode": "0x6080604052600436106101c65760003560e01c806364d62353116100f7578063b1c5f42711610095578063d547741f11610064578063d547741f14610661578063e38335e514610681578063f23a6e6114610694578063f27a0c92146106d957600080fd5b8063b1c5f427146105af578063bc197c81146105cf578063c4d252f514610614578063d45c44351461063457600080fd5b80638f61f4f5116100d15780638f61f4f5146104e157806391d1485414610515578063a217fddf14610566578063b08e51c01461057b57600080fd5b806364d62353146104815780638065657f146104a15780638f2a0bb0146104c157600080fd5b8063248a9ca31161016457806331d507501161013e57806331d50750146103c857806336568abe146103e85780633a6aae7214610408578063584b153e1461046157600080fd5b8063248a9ca3146103475780632ab0f529146103775780632f2ff15d146103a857600080fd5b80630d3cf6fc116101a05780630d3cf6fc1461026b578063134008d31461029f57806313bc9f20146102b2578063150b7a02146102d257600080fd5b806301d5062a146101d257806301ffc9a7146101f457806307bd02651461022957600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004611c52565b6106ee565b005b34801561020057600080fd5b5061021461020f366004611cc7565b610783565b60405190151581526020015b60405180910390f35b34801561023557600080fd5b5061025d7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610220565b34801561027757600080fd5b5061025d7f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101f26102ad366004611d09565b6107df565b3480156102be57600080fd5b506102146102cd366004611d75565b6108d7565b3480156102de57600080fd5b506103166102ed366004611e9a565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610220565b34801561035357600080fd5b5061025d610362366004611d75565b60009081526020819052604090206001015490565b34801561038357600080fd5b50610214610392366004611d75565b6000908152600160208190526040909120541490565b3480156103b457600080fd5b506101f26103c3366004611f02565b6108fd565b3480156103d457600080fd5b506102146103e3366004611d75565b610927565b3480156103f457600080fd5b506101f2610403366004611f02565b610940565b34801561041457600080fd5b5061043c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610220565b34801561046d57600080fd5b5061021461047c366004611d75565b6109f8565b34801561048d57600080fd5b506101f261049c366004611d75565b610a0e565b3480156104ad57600080fd5b5061025d6104bc366004611d09565b610ade565b3480156104cd57600080fd5b506101f26104dc366004611f73565b610b1d565b3480156104ed57600080fd5b5061025d7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561052157600080fd5b50610214610530366004611f02565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b34801561057257600080fd5b5061025d600081565b34801561058757600080fd5b5061025d7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156105bb57600080fd5b5061025d6105ca366004612025565b610d4f565b3480156105db57600080fd5b506103166105ea36600461214e565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561062057600080fd5b506101f261062f366004611d75565b610d94565b34801561064057600080fd5b5061025d61064f366004611d75565b60009081526001602052604090205490565b34801561066d57600080fd5b506101f261067c366004611f02565b610e8f565b6101f261068f366004612025565b610eb4565b3480156106a057600080fd5b506103166106af3660046121f8565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b3480156106e557600080fd5b5061025d611161565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161071881611244565b6000610728898989898989610ade565b90506107348184611251565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610770969594939291906122a6565b60405180910390a3505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e00000000000000000000000000000000000000000000000000000000014806107d957506107d98261139e565b92915050565b600080527fdae2aa361dfd1ca020a396615627d436107c35eff9fe7738a3512819782d70696020527f5ba6852781629bcdcd4bdaa6de76d786f1c64b16acdac474e55bebc0ea157951547fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e639060ff1661085c5761085c8133611435565b600061086c888888888888610ade565b905061087881856114ed565b6108848888888861162a565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516108bc94939291906122f1565b60405180910390a36108cd8161172e565b5050505050505050565b6000818152600160205260408120546001811180156108f65750428111155b9392505050565b60008281526020819052604090206001015461091881611244565b61092283836117d7565b505050565b60008181526001602052604081205481905b1192915050565b73ffffffffffffffffffffffffffffffffffffffff811633146109ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6109f482826118c7565b5050565b6000818152600160208190526040822054610939565b333014610a9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201527f62652074696d656c6f636b00000000000000000000000000000000000000000060648201526084016109e1565b60025460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1600255565b6000868686868686604051602001610afb969594939291906122a6565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1610b4781611244565b888714610bd6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b888514610c65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b6000610c778b8b8b8b8b8b8b8b610d4f565b9050610c838184611251565b60005b8a811015610d415780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610cc357610cc3612331565b9050602002016020810190610cd89190612360565b8d8d86818110610cea57610cea612331565b905060200201358c8c87818110610d0357610d03612331565b9050602002810190610d15919061237b565b8c8b604051610d29969594939291906122a6565b60405180910390a3610d3a8161240f565b9050610c86565b505050505050505050505050565b60008888888888888888604051602001610d709897969594939291906124f7565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610dbe81611244565b610dc7826109f8565b610e53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20636160448201527f6e6e6f742062652063616e63656c6c656400000000000000000000000000000060648201526084016109e1565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610eaa81611244565b61092283836118c7565b600080527fdae2aa361dfd1ca020a396615627d436107c35eff9fe7738a3512819782d70696020527f5ba6852781629bcdcd4bdaa6de76d786f1c64b16acdac474e55bebc0ea157951547fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e639060ff16610f3157610f318133611435565b878614610fc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b87841461104f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b60006110618a8a8a8a8a8a8a8a610d4f565b905061106d81856114ed565b60005b8981101561114b5760008b8b8381811061108c5761108c612331565b90506020020160208101906110a19190612360565b905060008a8a848181106110b7576110b7612331565b9050602002013590503660008a8a868181106110d5576110d5612331565b90506020028101906110e7919061237b565b915091506110f78484848461162a565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588686868660405161112e94939291906122f1565b60405180910390a350505050806111449061240f565b9050611070565b506111558161172e565b50505050505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff161580159061123257507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315064c966040518163ffffffff1660e01b8152600401602060405180830381865afa15801561120e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123291906125be565b1561123d5750600090565b5060025490565b61124e8133611435565b50565b61125a82610927565b156112e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201527f7265616479207363686564756c6564000000000000000000000000000000000060648201526084016109e1565b6112ef611161565b81101561137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e7460448201527f2064656c6179000000000000000000000000000000000000000000000000000060648201526084016109e1565b61138881426125e0565b6000928352600160205260409092209190915550565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806107d957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107d9565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109f4576114738161197e565b61147e83602061199d565b60405160200161148f929190612617565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526109e191600401612698565b6114f6826108d7565b611582576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20697360448201527f206e6f742072656164790000000000000000000000000000000000000000000060648201526084016109e1565b80158061159e5750600081815260016020819052604090912054145b6109f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e67206465706560448201527f6e64656e6379000000000000000000000000000000000000000000000000000060648201526084016109e1565b60008473ffffffffffffffffffffffffffffffffffffffff168484846040516116549291906126e9565b60006040518083038185875af1925050503d8060008114611691576040519150601f19603f3d011682016040523d82523d6000602084013e611696565b606091505b5050905080611727576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e67207460448201527f72616e73616374696f6e2072657665727465640000000000000000000000000060648201526084016109e1565b5050505050565b611737816108d7565b6117c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20697360448201527f206e6f742072656164790000000000000000000000000000000000000000000060648201526084016109e1565b600090815260016020819052604090912055565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109f45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556118693390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156109f45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606107d973ffffffffffffffffffffffffffffffffffffffff831660145b606060006119ac8360026126f9565b6119b79060026125e0565b67ffffffffffffffff8111156119cf576119cf611d8e565b6040519080825280601f01601f1916602001820160405280156119f9576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611a3057611a30612331565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611a9357611a93612331565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611acf8460026126f9565b611ada9060016125e0565b90505b6001811115611b77577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611b1b57611b1b612331565b1a60f81b828281518110611b3157611b31612331565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611b7081612710565b9050611add565b5083156108f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109e1565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c0457600080fd5b919050565b60008083601f840112611c1b57600080fd5b50813567ffffffffffffffff811115611c3357600080fd5b602083019150836020828501011115611c4b57600080fd5b9250929050565b600080600080600080600060c0888a031215611c6d57600080fd5b611c7688611be0565b965060208801359550604088013567ffffffffffffffff811115611c9957600080fd5b611ca58a828b01611c09565b989b979a50986060810135976080820135975060a09091013595509350505050565b600060208284031215611cd957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146108f657600080fd5b60008060008060008060a08789031215611d2257600080fd5b611d2b87611be0565b955060208701359450604087013567ffffffffffffffff811115611d4e57600080fd5b611d5a89828a01611c09565b979a9699509760608101359660809091013595509350505050565b600060208284031215611d8757600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611e0457611e04611d8e565b604052919050565b600082601f830112611e1d57600080fd5b813567ffffffffffffffff811115611e3757611e37611d8e565b611e6860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611dbd565b818152846020838601011115611e7d57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611eb057600080fd5b611eb985611be0565b9350611ec760208601611be0565b925060408501359150606085013567ffffffffffffffff811115611eea57600080fd5b611ef687828801611e0c565b91505092959194509250565b60008060408385031215611f1557600080fd5b82359150611f2560208401611be0565b90509250929050565b60008083601f840112611f4057600080fd5b50813567ffffffffffffffff811115611f5857600080fd5b6020830191508360208260051b8501011115611c4b57600080fd5b600080600080600080600080600060c08a8c031215611f9157600080fd5b893567ffffffffffffffff80821115611fa957600080fd5b611fb58d838e01611f2e565b909b50995060208c0135915080821115611fce57600080fd5b611fda8d838e01611f2e565b909950975060408c0135915080821115611ff357600080fd5b506120008c828d01611f2e565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561204157600080fd5b883567ffffffffffffffff8082111561205957600080fd5b6120658c838d01611f2e565b909a50985060208b013591508082111561207e57600080fd5b61208a8c838d01611f2e565b909850965060408b01359150808211156120a357600080fd5b506120b08b828c01611f2e565b999c989b509699959896976060870135966080013595509350505050565b600082601f8301126120df57600080fd5b8135602067ffffffffffffffff8211156120fb576120fb611d8e565b8160051b61210a828201611dbd565b928352848101820192828101908785111561212457600080fd5b83870192505b848310156121435782358252918301919083019061212a565b979650505050505050565b600080600080600060a0868803121561216657600080fd5b61216f86611be0565b945061217d60208701611be0565b9350604086013567ffffffffffffffff8082111561219a57600080fd5b6121a689838a016120ce565b945060608801359150808211156121bc57600080fd5b6121c889838a016120ce565b935060808801359150808211156121de57600080fd5b506121eb88828901611e0c565b9150509295509295909350565b600080600080600060a0868803121561221057600080fd5b61221986611be0565b945061222760208701611be0565b93506040860135925060608601359150608086013567ffffffffffffffff81111561225157600080fd5b6121eb88828901611e0c565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a0604082015260006122dc60a08301868861225d565b60608301949094525060800152949350505050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152600061232760608301848661225d565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561237257600080fd5b6108f682611be0565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126123b057600080fd5b83018035915067ffffffffffffffff8211156123cb57600080fd5b602001915036819003821315611c4b57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612440576124406123e0565b5060010190565b81835260006020808501808196508560051b810191508460005b878110156124ea57828403895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18836030181126124a057600080fd5b8701858101903567ffffffffffffffff8111156124bc57600080fd5b8036038213156124cb57600080fd5b6124d686828461225d565b9a87019a9550505090840190600101612461565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b8110156125455773ffffffffffffffffffffffffffffffffffffffff61253084611be0565b1682526020928301929091019060010161250a565b5083810360208501528881527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89111561257e57600080fd5b8860051b9150818a602083013701828103602090810160408501526125a69082018789612447565b60608401959095525050608001529695505050505050565b6000602082840312156125d057600080fd5b815180151581146108f657600080fd5b808201808211156107d9576107d96123e0565b60005b8381101561260e5781810151838201526020016125f6565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161264f8160178501602088016125f3565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161268c8160288401602088016125f3565b01602801949350505050565b60208152600082518060208401526126b78160408501602087016125f3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b8183823760009101908152919050565b80820281158282048414176107d9576107d96123e0565b60008161271f5761271f6123e0565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea26469706673582212206416c4e08f97752b4bb06159524dac058d3dccd8775e57ef1b01505751ebf7af64736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x000000000000000000000000000000000000000000000000000000000000000a", - "0xaedcc9e7897c0d335bdc5d92fe3a8b4f23727fe558cd1c19f332b28716a30559": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0xf5e61edb9c9cc6bfbae4463e9a2b1dd6ac3b44ddef38f18016e56ba0363910d9": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x64494413541ff93b31aa309254e3fed72a7456e9845988b915b4c7a7ceba8814": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5", - "0x60b9d94c75b7b3f721925089391e4644cd890cb5e6466f9596dfbd2c54e0b280": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x3412d5605ac6cd444957cedb533e5dacad6378b4bc819ebe3652188a665066d6": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5", - "0x4b63b79f1e338a49559dcd3193ac9eecc50d0f275d24e97cc8c319e5a31a8bd0": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0xdae2aa361dfd1ca020a396615627d436107c35eff9fe7738a3512819782d706a": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5", - "0x800d5dfe4bba53eedee06cd4546a27da8de00f12db83f56062976d4493fda899": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0xc3ad33e20b0c56a223ad5104fff154aa010f8715b9c981fd38fdc60a4d1a52fc": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5" - } - }, - { - "accountName": "keyless Deployer", - "balance": "0", - "nonce": "1", - "address": "0x20E7077d25fe79C5F6c2D3ae4905E96aA7C89c13" - }, - { - "accountName": "deployer", - "balance": "100000000000000000000000", - "nonce": "8", - "address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" - } - ] - } \ No newline at end of file diff --git a/config/environments/local/local.node.config.toml b/config/environments/local/local.node.config.toml index cc03b03701..3e0112cab5 100644 --- a/config/environments/local/local.node.config.toml +++ b/config/environments/local/local.node.config.toml @@ -69,15 +69,6 @@ MaxMemAligns = 236585 MaxArithmetics = 236585 MaxBinaries = 473170 MaxSteps = 7570538 -WeightBatchBytesSize = 1 -WeightCumulativeGasUsed = 1 -WeightKeccakHashes = 1 -WeightPoseidonHashes = 1 -WeightPoseidonPaddings = 1 -WeightMemAligns = 1 -WeightArithmetics = 1 -WeightBinaries = 1 -WeightSteps = 1 TxLifetimeCheckTimeout = "10m" MaxTxLifetime = "3h" [Sequencer.Finalizer] @@ -95,8 +86,6 @@ MaxTxLifetime = "3h" [Sequencer.DBManager] PoolRetrievalInterval = "500ms" L2ReorgRetrievalInterval = "5s" - [Sequencer.Worker] - ResourceCostMultiplier = 1000 [Sequencer.EffectiveGasPrice] MaxBreakEvenGasPriceDeviationPercentage = 10 L1GasPriceFactor = 0.25 @@ -108,8 +97,8 @@ MaxTxLifetime = "3h" WaitPeriodSendSequence = "5s" LastBatchVirtualizationTimeMaxWaitPeriod = "5s" MaxTxSizeForL1 = 131072 -SenderAddress = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" -PrivateKeys = [{Path = "/pk/sequencer.keystore", Password = "testonly"}] +L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" +PrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"} [Aggregator] Host = "0.0.0.0" diff --git a/config/environments/mainnet/example.env b/config/environments/mainnet/example.env deleted file mode 100644 index 95557a442c..0000000000 --- a/config/environments/mainnet/example.env +++ /dev/null @@ -1,9 +0,0 @@ -ZKEVM_NETWORK = "mainnet" -# URL of a JSON RPC for Ethereum mainnet -ZKEVM_NODE_ETHERMAN_URL = "http://your.L1node.url" -# PATH WHERE THE STATEDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_STATEDB_DATA_DIR = "/path/to/persistent/data/statedb" -# PATH WHERE THE POOLDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_POOLDB_DATA_DIR = "/path/to/persistent/data/pooldb" -# OPTIONAL, UNCOMENT IF YOU WANT TO DO ADVANCED CONFIG -# ZKEVM_ADVANCED_CONFIG_DIR = "/should/be/same/path/as/ZKEVM_CONFIG_DIR" \ No newline at end of file diff --git a/config/environments/mainnet/node.config.toml b/config/environments/mainnet/node.config.toml deleted file mode 100644 index 145a433ecb..0000000000 --- a/config/environments/mainnet/node.config.toml +++ /dev/null @@ -1,77 +0,0 @@ -[Log] -Environment = "development" # "production" or "development" -Level = "info" -Outputs = ["stderr"] - -[StateDB] -User = "state_user" -Password = "state_password" -Name = "state_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 - -[Pool] -MaxTxBytesSize=100132 -MaxTxDataBytesSize=100000 -DefaultMinGasPriceAllowed = 1000000000 -MinAllowedGasPriceInterval = "5m" -PollMinAllowedGasPriceInterval = "15s" - [Pool.DB] - User = "pool_user" - Password = "pool_password" - Name = "pool_db" - Host = "zkevm-pool-db" - Port = "5432" - EnableLog = false - MaxConns = 200 - -[Etherman] -URL = "http://your.L1node.url" -MultiGasProvider = false - [Etherman.Etherscan] - ApiKey = "" - -[RPC] -Host = "0.0.0.0" -Port = 8545 -ReadTimeout = "60s" -WriteTimeout = "60s" -MaxRequestsPerIPAndSecond = 5000 -SequencerNodeURI = "https://zkevm-rpc.com" -EnableL2SuggestedGasPricePolling = false - [RPC.WebSockets] - Enabled = true - Port = 8546 - -[Synchronizer] -SyncInterval = "2s" -SyncChunkSize = 100 -TrustedSequencerURL = "" # If it is empty or not specified, then the value is read from the smc - -[MTClient] -URI = "zkevm-prover:50061" - -[Executor] -URI = "zkevm-prover:50071" -MaxResourceExhaustedAttempts = 3 -WaitOnResourceExhaustion = "1s" -MaxGRPCMessageSize = 100000000 - -[Metrics] -Host = "0.0.0.0" -Port = 9091 -Enabled = false -ProfilingHost = "0.0.0.0" -ProfilingPort = 6060 -ProfilingEnabled = false - -[HashDB] -User = "prover_user" -Password = "prover_pass" -Name = "prover_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 \ No newline at end of file diff --git a/config/environments/mainnet/postgresql.conf b/config/environments/mainnet/postgresql.conf deleted file mode 100644 index 51dff68697..0000000000 --- a/config/environments/mainnet/postgresql.conf +++ /dev/null @@ -1,815 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, run "pg_ctl reload", or execute -# "SELECT pg_reload_conf()". Some parameters, which are marked below, -# require a server shutdown and restart to take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: B = bytes Time units: us = microseconds -# kB = kilobytes ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# TB = terabytes h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = '*' - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -#port = 5432 # (change requires restart) -max_connections = 100 # (change requires restart) -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories - # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - TCP settings - -# see "man tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default -#tcp_user_timeout = 0 # TCP_USER_TIMEOUT, in milliseconds; - # 0 selects the system default - -#client_connection_check_interval = 0 # time between checks for client - # disconnection while running queries; - # 0 for never - -# - Authentication - - -#authentication_timeout = 1min # 1s-600s -#password_encryption = scram-sha-256 # scram-sha-256 or md5 -#db_user_namespace = off - -# GSSAPI using Kerberos -#krb_server_keyfile = 'FILE:${sysconfdir}/krb5.keytab' -#krb_caseins_users = off - -# - SSL - - -#ssl = off -#ssl_ca_file = '' -#ssl_cert_file = 'server.crt' -#ssl_crl_file = '' -#ssl_crl_dir = '' -#ssl_key_file = 'server.key' -#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers -#ssl_prefer_server_ciphers = on -#ssl_ecdh_curve = 'prime256v1' -#ssl_min_protocol_version = 'TLSv1.2' -#ssl_max_protocol_version = '' -#ssl_dh_params_file = '' -#ssl_passphrase_command = '' -#ssl_passphrase_command_supports_reload = off - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -shared_buffers = 8GB # min 128kB - # (change requires restart) -#huge_pages = try # on, off, or try - # (change requires restart) -#huge_page_size = 0 # zero for system default - # (change requires restart) -temp_buffers = 64MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Caution: it is not advisable to set max_prepared_transactions nonzero unless -# you actively intend to use prepared transactions. -work_mem = 104857kB # min 64kB -#hash_mem_multiplier = 2.0 # 1-1000.0 multiplier on hash table work_mem -maintenance_work_mem = 2GB # min 1MB -#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem -#logical_decoding_work_mem = 64MB # min 64kB -#max_stack_depth = 2MB # min 100kB -#shared_memory_type = mmap # the default is the first option - # supported by the operating system: - # mmap - # sysv - # windows - # (change requires restart) -dynamic_shared_memory_type = posix # the default is usually the first option - # supported by the operating system: - # posix - # sysv - # windows - # mmap - # (change requires restart) -#min_dynamic_shared_memory = 0MB # (change requires restart) - -# - Disk - - -#temp_file_limit = -1 # limits per-process temp file space - # in kilobytes, or -1 for no limit - -# - Kernel Resources - - -#max_files_per_process = 1000 # min 64 - # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0 # 0-100 milliseconds (0 disables) -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 2 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # max buffers written/round, 0 disables -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round -#bgwriter_flush_after = 512kB # measured in pages, 0 disables - -# - Asynchronous Behavior - - -#backend_flush_after = 0 # measured in pages, 0 disables -effective_io_concurrency = 300 # 1-1000; 0 disables prefetching -#maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching -max_worker_processes = 16 # (change requires restart) -max_parallel_workers_per_gather = 4 # taken from max_parallel_workers -max_parallel_maintenance_workers = 4 # taken from max_parallel_workers -max_parallel_workers = 16 # maximum number of max_worker_processes that - # can be used in parallel operations -#parallel_leader_participation = on -#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate - # (change requires restart) - - -#------------------------------------------------------------------------------ -# WRITE-AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = replica # minimal, replica, or logical - # (change requires restart) -#fsync = on # flush data to disk for crash safety - # (turning this off can cause - # unrecoverable data corruption) -#synchronous_commit = on # synchronization level; - # off, local, remote_write, remote_apply, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux and FreeBSD) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_log_hints = off # also do full page writes of non-critical updates - # (change requires restart) -#wal_compression = off # enables compression of full-page writes; - # off, pglz, lz4, zstd, or on -#wal_init_zero = on # zero-fill new WAL files -#wal_recycle = on # recycle WAL files -wal_buffers = 16MB # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds -#wal_writer_flush_after = 1MB # measured in pages, 0 disables -#wal_skip_threshold = 2MB - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_timeout = 5min # range 30s-1d -checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_flush_after = 256kB # measured in pages, 0 disables -#checkpoint_warning = 30s # 0 disables -max_wal_size = 8GB -min_wal_size = 2GB - -# - Prefetching during recovery - - -#recovery_prefetch = try # prefetch pages referenced in the WAL? -#wal_decode_buffer_size = 512kB # lookahead window used for prefetching - # (change requires restart) - -# - Archiving - - -#archive_mode = off # enables archiving; off, on, or always - # (change requires restart) -#archive_library = '' # library to use to archive a logfile segment - # (empty string indicates archive_command should - # be used) -#archive_command = '' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - -# - Archive Recovery - - -# These are only used in recovery mode. - -#restore_command = '' # command to use to restore an archived logfile segment - # placeholders: %p = path of file to restore - # %f = file name only - # e.g. 'cp /mnt/server/archivedir/%f %p' -#archive_cleanup_command = '' # command to execute at every restartpoint -#recovery_end_command = '' # command to execute at completion of recovery - -# - Recovery Target - - -# Set these only when performing a targeted recovery. - -#recovery_target = '' # 'immediate' to end recovery as soon as a - # consistent state is reached - # (change requires restart) -#recovery_target_name = '' # the named restore point to which recovery will proceed - # (change requires restart) -#recovery_target_time = '' # the time stamp up to which recovery will proceed - # (change requires restart) -#recovery_target_xid = '' # the transaction ID up to which recovery will proceed - # (change requires restart) -#recovery_target_lsn = '' # the WAL LSN up to which recovery will proceed - # (change requires restart) -#recovery_target_inclusive = on # Specifies whether to stop: - # just after the specified recovery target (on) - # just before the recovery target (off) - # (change requires restart) -#recovery_target_timeline = 'latest' # 'current', 'latest', or timeline ID - # (change requires restart) -#recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown' - # (change requires restart) - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Servers - - -# Set these on the primary and on any standby that will send replication data. - -#max_wal_senders = 10 # max number of walsender processes - # (change requires restart) -#max_replication_slots = 10 # max number of replication slots - # (change requires restart) -#wal_keep_size = 0 # in megabytes; 0 disables -#max_slot_wal_keep_size = -1 # in megabytes; -1 disables -#wal_sender_timeout = 60s # in milliseconds; 0 disables -#track_commit_timestamp = off # collect timestamp of transaction commit - # (change requires restart) - -# - Primary Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # method to choose sync standbys, number of sync standbys, - # and comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a primary server. - -#primary_conninfo = '' # connection string to sending server -#primary_slot_name = '' # replication slot on sending server -#promote_trigger_file = '' # file name whose presence ends recovery -#hot_standby = on # "off" disallows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_create_temp_slot = off # create temp slot if primary_slot_name - # is not set -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts -#wal_receiver_timeout = 60s # time that receiver waits for - # communication from primary - # in milliseconds; 0 disables -#wal_retrieve_retry_interval = 5s # time to wait before retrying to - # retrieve WAL after a failed attempt -#recovery_min_apply_delay = 0 # minimum delay for applying changes during recovery - -# - Subscribers - - -# These settings are ignored on a publisher. - -#max_logical_replication_workers = 4 # taken from max_worker_processes - # (change requires restart) -#max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_async_append = on -#enable_bitmapscan = on -#enable_gathermerge = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_incremental_sort = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_memoize = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_parallel_append = on -#enable_parallel_hash = on -#enable_partition_pruning = on -#enable_partitionwise_join = off -#enable_partitionwise_aggregate = off -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -random_page_cost = 1.1 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#parallel_setup_cost = 1000.0 # same scale as above -#parallel_tuple_cost = 0.1 # same scale as above -#min_parallel_table_scan_size = 8MB -#min_parallel_index_scan_size = 512kB -effective_cache_size = 24GB - -#jit_above_cost = 100000 # perform JIT compilation if available - # and query more expensive than this; - # -1 disables -#jit_inline_above_cost = 500000 # inline small functions if query is - # more expensive than this; -1 disables -#jit_optimize_above_cost = 500000 # use expensive JIT optimizations if - # query is more expensive than this; - # -1 disables - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#jit = on # allow JIT compilation -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses -#plan_cache_mode = auto # auto, force_generic_plan or - # force_custom_plan -#recursive_worktable_factor = 10.0 # range 0.001-1000000 - - -#------------------------------------------------------------------------------ -# REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, jsonlog, syslog, and - # eventlog, depending on platform. - # csvlog and jsonlog require - # logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr, jsonlog, - # and csvlog into log files. Required - # to be on for csvlogs and jsonlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' -#syslog_sequence_numbers = on -#syslog_split_messages = on - -# This is only relevant when logging to eventlog (Windows): -# (change requires restart) -#event_source = 'PostgreSQL' - -# - When to Log - - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - -#log_min_duration_sample = -1 # -1 is disabled, 0 logs a sample of statements - # and their durations, > 0 logs only a sample of - # statements running at least this number - # of milliseconds; - # sample fraction is determined by log_statement_sample_rate - -#log_statement_sample_rate = 1.0 # fraction of logged statements exceeding - # log_min_duration_sample to be logged; - # 1.0 logs all such statements, 0.0 never logs - - -#log_transaction_sample_rate = 0.0 # fraction of transactions whose statements - # are logged regardless of their duration; 1.0 logs all - # statements from all transactions, 0.0 never logs - -#log_startup_progress_interval = 10s # Time between progress updates for - # long-running startup operations. - # 0 disables the feature, > 0 indicates - # the interval in milliseconds. - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_autovacuum_min_duration = 10min # log autovacuum activity; - # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#log_checkpoints = on -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -#log_line_prefix = '%m [%p] ' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %b = backend type - # %p = process ID - # %P = process ID of parallel group leader - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %n = timestamp with milliseconds (as a Unix epoch) - # %Q = query ID (0 if none or not computed) - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_recovery_conflict_waits = off # log standby recovery conflict waits - # >= deadlock_timeout -#log_parameter_max_length = -1 # when logging statements, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_parameter_max_length_on_error = 0 # when logging an error, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_statement = 'none' # none, ddl, mod, all -#log_replication_commands = off -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -log_timezone = 'Etc/UTC' - - -#------------------------------------------------------------------------------ -# PROCESS TITLE -#------------------------------------------------------------------------------ - -#cluster_name = '' # added to process titles if nonempty - # (change requires restart) -#update_process_title = on - - -#------------------------------------------------------------------------------ -# STATISTICS -#------------------------------------------------------------------------------ - -# - Cumulative Query and Index Statistics - - -#track_activities = on -#track_activity_query_size = 1024 # (change requires restart) -#track_counts = on -#track_io_timing = off -#track_wal_io_timing = off -#track_functions = none # none, pl, all -#stats_fetch_consistency = cache - - -# - Monitoring - - -#compute_query_id = auto -#log_statement_stats = off -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts - # before vacuum; -1 disables insert - # vacuums -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table - # size before insert vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age - # before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error -#search_path = '"$user", public' # schema names -#row_security = on -#default_table_access_method = 'heap' -#default_tablespace = '' # a tablespace name, '' uses the default -#default_toast_compression = 'pglz' # 'pglz' or 'lz4' -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled -#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled -#idle_session_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_table_age = 150000000 -#vacuum_freeze_min_age = 50000000 -#vacuum_failsafe_age = 1600000000 -#vacuum_multixact_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_failsafe_age = 1600000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' -#gin_pending_list_limit = 4MB - -# - Locale and Formatting - - -datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -timezone = 'Etc/UTC' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 1 # min -15, max 3; any value >0 actually - # selects precise output mode -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = 'en_US.utf8' # locale for system error message - # strings -lc_monetary = 'en_US.utf8' # locale for monetary formatting -lc_numeric = 'en_US.utf8' # locale for number formatting -lc_time = 'en_US.utf8' # locale for time formatting - -# default configuration for text search -default_text_search_config = 'pg_catalog.english' - -# - Shared Library Preloading - - -#local_preload_libraries = '' -#session_preload_libraries = '' -#shared_preload_libraries = '' # (change requires restart) -#jit_provider = 'llvmjit' # JIT library to use - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#extension_destdir = '' # prepend path when loading extensions - # and shared objects (added by Debian) -#gin_fuzzy_search_limit = 0 - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_relation = -2 # negative values mean - # (max_pred_locks_per_transaction - # / -max_pred_locks_per_relation) - 1 -#max_pred_locks_per_page = 2 # min 0 - - -#------------------------------------------------------------------------------ -# VERSION AND PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? -#data_sync_retry = off # retry or panic on failure to fsync - # data? - # (change requires restart) -#recovery_init_sync_method = fsync # fsync, syncfs (Linux 5.8+) - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. Note that these are directives, not variable -# assignments, so they can usefully be given more than once. - -#include_dir = '...' # include files ending in '.conf' from - # a directory, e.g., 'conf.d' -#include_if_exists = '...' # include file only if it exists -#include = '...' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/config/environments/mainnet/prover.config.json b/config/environments/mainnet/prover.config.json deleted file mode 100644 index 0aec07e541..0000000000 --- a/config/environments/mainnet/prover.config.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "runProverServer": false, - "runProverServerMock": false, - "runProverClient": false, - - "runExecutorServer": true, - "runExecutorClient": false, - "runExecutorClientMultithread": false, - - "runHashDBServer": true, - "runHashDBTest": false, - - "runAggregatorServer": false, - "runAggregatorClient": false, - - "runFileGenProof": false, - "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": false, - "saveRequestToFile": false, - "saveInputToFile": false, - "saveDbReadsToFile": false, - "saveDbReadsToFileOnChange": false, - "saveOutputToFile": false, - "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": "127.0.0.1", - - "inputFile": "input_executor.json", - "outputPath": "output", - "cmPolsFile_disabled": "zkevm.commit", - "cmPolsFileC12a_disabled": "zkevm.c12a.commit", - "cmPolsFileRecursive1_disabled": "zkevm.recursive1.commit", - "constPolsFile": "zkevm.const", - "constPolsC12aFile": "zkevm.c12a.const", - "constPolsRecursive1File": "zkevm.recursive1.const", - "mapConstPolsFile": false, - "constantsTreeFile": "zkevm.consttree", - "constantsTreeC12aFile": "zkevm.c12a.consttree", - "constantsTreeRecursive1File": "zkevm.recursive1.consttree", - "mapConstantsTreeFile": false, - "starkFile": "zkevm.prove.json", - "starkZkIn": "zkevm.proof.zkin.json", - "starkZkInC12a":"zkevm.c12a.zkin.proof.json", - "starkFileRecursive1": "zkevm.recursive1.proof.json", - "verifierFile": "zkevm.verifier.dat", - "verifierFileRecursive1": "zkevm.recursive1.verifier.dat", - "witnessFile_disabled": "zkevm.witness.wtns", - "witnessFileRecursive1": "zkevm.recursive1.witness.wtns", - "execC12aFile": "zkevm.c12a.exec", - "execRecursive1File": "zkevm.recursive1.exec", - "starkVerifierFile": "zkevm.g16.0001.zkey", - "publicStarkFile": "zkevm.public.json", - "publicFile": "public.json", - "proofFile": "proof.json", - "keccakScriptFile": "keccak_script.json", - "keccakPolsFile_DISABLED": "keccak_pols.json", - "keccakConnectionsFile": "keccak_connections.json", - "starkInfoFile": "zkevm.starkinfo.json", - "starkInfoC12aFile": "zkevm.c12a.starkinfo.json", - "starkInfoRecursive1File": "zkevm.recursive1.starkinfo.json", - "databaseURL": "postgresql://prover_user:prover_pass@zkevm-state-db:5432/prover_db", - "dbNodesTableName": "state.nodes", - "dbProgramTableName": "state.program", - "dbAsyncWrite": false, - "dbMultiWrite": true, - "dbConnectionsPool": true, - "dbNumberOfPoolConnections": 30, - "dbMetrics": true, - "dbClearCache": false, - "dbGetTree": true, - "dbReadOnly": false, - "dbMTCacheSize": 8192, - "dbProgramCacheSize": 1024, - "cleanerPollingPeriod": 600, - "requestsPersistence": 3600, - "maxExecutorThreads": 20, - "maxProverThreads": 8, - "maxHashDBThreads": 8, - "ECRecoverPrecalc": true, - "ECRecoverPrecalcNThreads": 16, - "dbMultiWriteSinglePosition": false -} diff --git a/config/environments/testnet/example.env b/config/environments/testnet/example.env deleted file mode 100644 index bf0db2e035..0000000000 --- a/config/environments/testnet/example.env +++ /dev/null @@ -1,9 +0,0 @@ -ZKEVM_NETWORK = "testnet" -# URL of a JSON RPC for Goerli -ZKEVM_NODE_ETHERMAN_URL = "http://your.L1node.url" -# PATH WHERE THE STATEDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_STATEDB_DATA_DIR = "/path/to/persistent/data/statedb" -# PATH WHERE THE POOLDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_POOLDB_DATA_DIR = "/path/to/persistent/data/pooldb" -# OPTIONAL, UNCOMENT IF YOU WANT TO DO ADVANCED CONFIG -# ZKEVM_ADVANCED_CONFIG_DIR = "/should/be/same/path/as/ZKEVM_CONFIG_DIR" \ No newline at end of file diff --git a/config/environments/testnet/node.config.toml b/config/environments/testnet/node.config.toml deleted file mode 100644 index 4566baa5f6..0000000000 --- a/config/environments/testnet/node.config.toml +++ /dev/null @@ -1,78 +0,0 @@ -[Log] -Environment = "development" # "production" or "development" -Level = "info" -Outputs = ["stderr"] - -[StateDB] -User = "state_user" -Password = "state_password" -Name = "state_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 - -[Pool] -IntervalToRefreshBlockedAddresses = "5m" -IntervalToRefreshGasPrices = "5s" -MaxTxBytesSize=100132 -MaxTxDataBytesSize=100000 -DefaultMinGasPriceAllowed = 1000000000 -MinAllowedGasPriceInterval = "5m" -PollMinAllowedGasPriceInterval = "15s" - [Pool.DB] - User = "pool_user" - Password = "pool_password" - Name = "pool_db" - Host = "zkevm-pool-db" - Port = "5432" - EnableLog = false - MaxConns = 200 - -[Etherman] -URL = "http://your.L1node.url" -MultiGasProvider = false - [Etherman.Etherscan] - ApiKey = "" - -[RPC] -Host = "0.0.0.0" -Port = 8545 -ReadTimeout = "60s" -WriteTimeout = "60s" -MaxRequestsPerIPAndSecond = 5000 -SequencerNodeURI = "https://rpc.public.zkevm-test.net/" -EnableL2SuggestedGasPricePolling = false - [RPC.WebSockets] - Enabled = true - Port = 8546 - -[Synchronizer] -SyncInterval = "2s" -SyncChunkSize = 100 - -[MTClient] -URI = "zkevm-prover:50061" - -[Executor] -URI = "zkevm-prover:50071" -MaxResourceExhaustedAttempts = 3 -WaitOnResourceExhaustion = "1s" -MaxGRPCMessageSize = 100000000 - -[Metrics] -Host = "0.0.0.0" -Port = 9091 -Enabled = false -ProfilingHost = "0.0.0.0" -ProfilingPort = 6060 -ProfilingEnabled = false - -[HashDB] -User = "prover_user" -Password = "prover_pass" -Name = "prover_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 \ No newline at end of file diff --git a/config/environments/testnet/postgresql.conf b/config/environments/testnet/postgresql.conf deleted file mode 100644 index 51dff68697..0000000000 --- a/config/environments/testnet/postgresql.conf +++ /dev/null @@ -1,815 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, run "pg_ctl reload", or execute -# "SELECT pg_reload_conf()". Some parameters, which are marked below, -# require a server shutdown and restart to take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: B = bytes Time units: us = microseconds -# kB = kilobytes ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# TB = terabytes h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = '*' - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -#port = 5432 # (change requires restart) -max_connections = 100 # (change requires restart) -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories - # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - TCP settings - -# see "man tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default -#tcp_user_timeout = 0 # TCP_USER_TIMEOUT, in milliseconds; - # 0 selects the system default - -#client_connection_check_interval = 0 # time between checks for client - # disconnection while running queries; - # 0 for never - -# - Authentication - - -#authentication_timeout = 1min # 1s-600s -#password_encryption = scram-sha-256 # scram-sha-256 or md5 -#db_user_namespace = off - -# GSSAPI using Kerberos -#krb_server_keyfile = 'FILE:${sysconfdir}/krb5.keytab' -#krb_caseins_users = off - -# - SSL - - -#ssl = off -#ssl_ca_file = '' -#ssl_cert_file = 'server.crt' -#ssl_crl_file = '' -#ssl_crl_dir = '' -#ssl_key_file = 'server.key' -#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers -#ssl_prefer_server_ciphers = on -#ssl_ecdh_curve = 'prime256v1' -#ssl_min_protocol_version = 'TLSv1.2' -#ssl_max_protocol_version = '' -#ssl_dh_params_file = '' -#ssl_passphrase_command = '' -#ssl_passphrase_command_supports_reload = off - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -shared_buffers = 8GB # min 128kB - # (change requires restart) -#huge_pages = try # on, off, or try - # (change requires restart) -#huge_page_size = 0 # zero for system default - # (change requires restart) -temp_buffers = 64MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Caution: it is not advisable to set max_prepared_transactions nonzero unless -# you actively intend to use prepared transactions. -work_mem = 104857kB # min 64kB -#hash_mem_multiplier = 2.0 # 1-1000.0 multiplier on hash table work_mem -maintenance_work_mem = 2GB # min 1MB -#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem -#logical_decoding_work_mem = 64MB # min 64kB -#max_stack_depth = 2MB # min 100kB -#shared_memory_type = mmap # the default is the first option - # supported by the operating system: - # mmap - # sysv - # windows - # (change requires restart) -dynamic_shared_memory_type = posix # the default is usually the first option - # supported by the operating system: - # posix - # sysv - # windows - # mmap - # (change requires restart) -#min_dynamic_shared_memory = 0MB # (change requires restart) - -# - Disk - - -#temp_file_limit = -1 # limits per-process temp file space - # in kilobytes, or -1 for no limit - -# - Kernel Resources - - -#max_files_per_process = 1000 # min 64 - # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0 # 0-100 milliseconds (0 disables) -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 2 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # max buffers written/round, 0 disables -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round -#bgwriter_flush_after = 512kB # measured in pages, 0 disables - -# - Asynchronous Behavior - - -#backend_flush_after = 0 # measured in pages, 0 disables -effective_io_concurrency = 300 # 1-1000; 0 disables prefetching -#maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching -max_worker_processes = 16 # (change requires restart) -max_parallel_workers_per_gather = 4 # taken from max_parallel_workers -max_parallel_maintenance_workers = 4 # taken from max_parallel_workers -max_parallel_workers = 16 # maximum number of max_worker_processes that - # can be used in parallel operations -#parallel_leader_participation = on -#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate - # (change requires restart) - - -#------------------------------------------------------------------------------ -# WRITE-AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = replica # minimal, replica, or logical - # (change requires restart) -#fsync = on # flush data to disk for crash safety - # (turning this off can cause - # unrecoverable data corruption) -#synchronous_commit = on # synchronization level; - # off, local, remote_write, remote_apply, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux and FreeBSD) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_log_hints = off # also do full page writes of non-critical updates - # (change requires restart) -#wal_compression = off # enables compression of full-page writes; - # off, pglz, lz4, zstd, or on -#wal_init_zero = on # zero-fill new WAL files -#wal_recycle = on # recycle WAL files -wal_buffers = 16MB # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds -#wal_writer_flush_after = 1MB # measured in pages, 0 disables -#wal_skip_threshold = 2MB - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_timeout = 5min # range 30s-1d -checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_flush_after = 256kB # measured in pages, 0 disables -#checkpoint_warning = 30s # 0 disables -max_wal_size = 8GB -min_wal_size = 2GB - -# - Prefetching during recovery - - -#recovery_prefetch = try # prefetch pages referenced in the WAL? -#wal_decode_buffer_size = 512kB # lookahead window used for prefetching - # (change requires restart) - -# - Archiving - - -#archive_mode = off # enables archiving; off, on, or always - # (change requires restart) -#archive_library = '' # library to use to archive a logfile segment - # (empty string indicates archive_command should - # be used) -#archive_command = '' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - -# - Archive Recovery - - -# These are only used in recovery mode. - -#restore_command = '' # command to use to restore an archived logfile segment - # placeholders: %p = path of file to restore - # %f = file name only - # e.g. 'cp /mnt/server/archivedir/%f %p' -#archive_cleanup_command = '' # command to execute at every restartpoint -#recovery_end_command = '' # command to execute at completion of recovery - -# - Recovery Target - - -# Set these only when performing a targeted recovery. - -#recovery_target = '' # 'immediate' to end recovery as soon as a - # consistent state is reached - # (change requires restart) -#recovery_target_name = '' # the named restore point to which recovery will proceed - # (change requires restart) -#recovery_target_time = '' # the time stamp up to which recovery will proceed - # (change requires restart) -#recovery_target_xid = '' # the transaction ID up to which recovery will proceed - # (change requires restart) -#recovery_target_lsn = '' # the WAL LSN up to which recovery will proceed - # (change requires restart) -#recovery_target_inclusive = on # Specifies whether to stop: - # just after the specified recovery target (on) - # just before the recovery target (off) - # (change requires restart) -#recovery_target_timeline = 'latest' # 'current', 'latest', or timeline ID - # (change requires restart) -#recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown' - # (change requires restart) - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Servers - - -# Set these on the primary and on any standby that will send replication data. - -#max_wal_senders = 10 # max number of walsender processes - # (change requires restart) -#max_replication_slots = 10 # max number of replication slots - # (change requires restart) -#wal_keep_size = 0 # in megabytes; 0 disables -#max_slot_wal_keep_size = -1 # in megabytes; -1 disables -#wal_sender_timeout = 60s # in milliseconds; 0 disables -#track_commit_timestamp = off # collect timestamp of transaction commit - # (change requires restart) - -# - Primary Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # method to choose sync standbys, number of sync standbys, - # and comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a primary server. - -#primary_conninfo = '' # connection string to sending server -#primary_slot_name = '' # replication slot on sending server -#promote_trigger_file = '' # file name whose presence ends recovery -#hot_standby = on # "off" disallows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_create_temp_slot = off # create temp slot if primary_slot_name - # is not set -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts -#wal_receiver_timeout = 60s # time that receiver waits for - # communication from primary - # in milliseconds; 0 disables -#wal_retrieve_retry_interval = 5s # time to wait before retrying to - # retrieve WAL after a failed attempt -#recovery_min_apply_delay = 0 # minimum delay for applying changes during recovery - -# - Subscribers - - -# These settings are ignored on a publisher. - -#max_logical_replication_workers = 4 # taken from max_worker_processes - # (change requires restart) -#max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_async_append = on -#enable_bitmapscan = on -#enable_gathermerge = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_incremental_sort = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_memoize = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_parallel_append = on -#enable_parallel_hash = on -#enable_partition_pruning = on -#enable_partitionwise_join = off -#enable_partitionwise_aggregate = off -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -random_page_cost = 1.1 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#parallel_setup_cost = 1000.0 # same scale as above -#parallel_tuple_cost = 0.1 # same scale as above -#min_parallel_table_scan_size = 8MB -#min_parallel_index_scan_size = 512kB -effective_cache_size = 24GB - -#jit_above_cost = 100000 # perform JIT compilation if available - # and query more expensive than this; - # -1 disables -#jit_inline_above_cost = 500000 # inline small functions if query is - # more expensive than this; -1 disables -#jit_optimize_above_cost = 500000 # use expensive JIT optimizations if - # query is more expensive than this; - # -1 disables - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#jit = on # allow JIT compilation -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses -#plan_cache_mode = auto # auto, force_generic_plan or - # force_custom_plan -#recursive_worktable_factor = 10.0 # range 0.001-1000000 - - -#------------------------------------------------------------------------------ -# REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, jsonlog, syslog, and - # eventlog, depending on platform. - # csvlog and jsonlog require - # logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr, jsonlog, - # and csvlog into log files. Required - # to be on for csvlogs and jsonlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' -#syslog_sequence_numbers = on -#syslog_split_messages = on - -# This is only relevant when logging to eventlog (Windows): -# (change requires restart) -#event_source = 'PostgreSQL' - -# - When to Log - - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - -#log_min_duration_sample = -1 # -1 is disabled, 0 logs a sample of statements - # and their durations, > 0 logs only a sample of - # statements running at least this number - # of milliseconds; - # sample fraction is determined by log_statement_sample_rate - -#log_statement_sample_rate = 1.0 # fraction of logged statements exceeding - # log_min_duration_sample to be logged; - # 1.0 logs all such statements, 0.0 never logs - - -#log_transaction_sample_rate = 0.0 # fraction of transactions whose statements - # are logged regardless of their duration; 1.0 logs all - # statements from all transactions, 0.0 never logs - -#log_startup_progress_interval = 10s # Time between progress updates for - # long-running startup operations. - # 0 disables the feature, > 0 indicates - # the interval in milliseconds. - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_autovacuum_min_duration = 10min # log autovacuum activity; - # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#log_checkpoints = on -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -#log_line_prefix = '%m [%p] ' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %b = backend type - # %p = process ID - # %P = process ID of parallel group leader - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %n = timestamp with milliseconds (as a Unix epoch) - # %Q = query ID (0 if none or not computed) - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_recovery_conflict_waits = off # log standby recovery conflict waits - # >= deadlock_timeout -#log_parameter_max_length = -1 # when logging statements, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_parameter_max_length_on_error = 0 # when logging an error, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_statement = 'none' # none, ddl, mod, all -#log_replication_commands = off -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -log_timezone = 'Etc/UTC' - - -#------------------------------------------------------------------------------ -# PROCESS TITLE -#------------------------------------------------------------------------------ - -#cluster_name = '' # added to process titles if nonempty - # (change requires restart) -#update_process_title = on - - -#------------------------------------------------------------------------------ -# STATISTICS -#------------------------------------------------------------------------------ - -# - Cumulative Query and Index Statistics - - -#track_activities = on -#track_activity_query_size = 1024 # (change requires restart) -#track_counts = on -#track_io_timing = off -#track_wal_io_timing = off -#track_functions = none # none, pl, all -#stats_fetch_consistency = cache - - -# - Monitoring - - -#compute_query_id = auto -#log_statement_stats = off -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts - # before vacuum; -1 disables insert - # vacuums -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table - # size before insert vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age - # before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error -#search_path = '"$user", public' # schema names -#row_security = on -#default_table_access_method = 'heap' -#default_tablespace = '' # a tablespace name, '' uses the default -#default_toast_compression = 'pglz' # 'pglz' or 'lz4' -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled -#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled -#idle_session_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_table_age = 150000000 -#vacuum_freeze_min_age = 50000000 -#vacuum_failsafe_age = 1600000000 -#vacuum_multixact_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_failsafe_age = 1600000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' -#gin_pending_list_limit = 4MB - -# - Locale and Formatting - - -datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -timezone = 'Etc/UTC' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 1 # min -15, max 3; any value >0 actually - # selects precise output mode -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = 'en_US.utf8' # locale for system error message - # strings -lc_monetary = 'en_US.utf8' # locale for monetary formatting -lc_numeric = 'en_US.utf8' # locale for number formatting -lc_time = 'en_US.utf8' # locale for time formatting - -# default configuration for text search -default_text_search_config = 'pg_catalog.english' - -# - Shared Library Preloading - - -#local_preload_libraries = '' -#session_preload_libraries = '' -#shared_preload_libraries = '' # (change requires restart) -#jit_provider = 'llvmjit' # JIT library to use - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#extension_destdir = '' # prepend path when loading extensions - # and shared objects (added by Debian) -#gin_fuzzy_search_limit = 0 - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_relation = -2 # negative values mean - # (max_pred_locks_per_transaction - # / -max_pred_locks_per_relation) - 1 -#max_pred_locks_per_page = 2 # min 0 - - -#------------------------------------------------------------------------------ -# VERSION AND PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? -#data_sync_retry = off # retry or panic on failure to fsync - # data? - # (change requires restart) -#recovery_init_sync_method = fsync # fsync, syncfs (Linux 5.8+) - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. Note that these are directives, not variable -# assignments, so they can usefully be given more than once. - -#include_dir = '...' # include files ending in '.conf' from - # a directory, e.g., 'conf.d' -#include_if_exists = '...' # include file only if it exists -#include = '...' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/config/environments/testnet/prover.config.json b/config/environments/testnet/prover.config.json deleted file mode 100644 index 0aec07e541..0000000000 --- a/config/environments/testnet/prover.config.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "runProverServer": false, - "runProverServerMock": false, - "runProverClient": false, - - "runExecutorServer": true, - "runExecutorClient": false, - "runExecutorClientMultithread": false, - - "runHashDBServer": true, - "runHashDBTest": false, - - "runAggregatorServer": false, - "runAggregatorClient": false, - - "runFileGenProof": false, - "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": false, - "saveRequestToFile": false, - "saveInputToFile": false, - "saveDbReadsToFile": false, - "saveDbReadsToFileOnChange": false, - "saveOutputToFile": false, - "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": "127.0.0.1", - - "inputFile": "input_executor.json", - "outputPath": "output", - "cmPolsFile_disabled": "zkevm.commit", - "cmPolsFileC12a_disabled": "zkevm.c12a.commit", - "cmPolsFileRecursive1_disabled": "zkevm.recursive1.commit", - "constPolsFile": "zkevm.const", - "constPolsC12aFile": "zkevm.c12a.const", - "constPolsRecursive1File": "zkevm.recursive1.const", - "mapConstPolsFile": false, - "constantsTreeFile": "zkevm.consttree", - "constantsTreeC12aFile": "zkevm.c12a.consttree", - "constantsTreeRecursive1File": "zkevm.recursive1.consttree", - "mapConstantsTreeFile": false, - "starkFile": "zkevm.prove.json", - "starkZkIn": "zkevm.proof.zkin.json", - "starkZkInC12a":"zkevm.c12a.zkin.proof.json", - "starkFileRecursive1": "zkevm.recursive1.proof.json", - "verifierFile": "zkevm.verifier.dat", - "verifierFileRecursive1": "zkevm.recursive1.verifier.dat", - "witnessFile_disabled": "zkevm.witness.wtns", - "witnessFileRecursive1": "zkevm.recursive1.witness.wtns", - "execC12aFile": "zkevm.c12a.exec", - "execRecursive1File": "zkevm.recursive1.exec", - "starkVerifierFile": "zkevm.g16.0001.zkey", - "publicStarkFile": "zkevm.public.json", - "publicFile": "public.json", - "proofFile": "proof.json", - "keccakScriptFile": "keccak_script.json", - "keccakPolsFile_DISABLED": "keccak_pols.json", - "keccakConnectionsFile": "keccak_connections.json", - "starkInfoFile": "zkevm.starkinfo.json", - "starkInfoC12aFile": "zkevm.c12a.starkinfo.json", - "starkInfoRecursive1File": "zkevm.recursive1.starkinfo.json", - "databaseURL": "postgresql://prover_user:prover_pass@zkevm-state-db:5432/prover_db", - "dbNodesTableName": "state.nodes", - "dbProgramTableName": "state.program", - "dbAsyncWrite": false, - "dbMultiWrite": true, - "dbConnectionsPool": true, - "dbNumberOfPoolConnections": 30, - "dbMetrics": true, - "dbClearCache": false, - "dbGetTree": true, - "dbReadOnly": false, - "dbMTCacheSize": 8192, - "dbProgramCacheSize": 1024, - "cleanerPollingPeriod": 600, - "requestsPersistence": 3600, - "maxExecutorThreads": 20, - "maxProverThreads": 8, - "maxHashDBThreads": 8, - "ECRecoverPrecalc": true, - "ECRecoverPrecalcNThreads": 16, - "dbMultiWriteSinglePosition": false -} diff --git a/config/gen_json_schema.go b/config/gen_json_schema.go index a57a20c002..c4054c450c 100644 --- a/config/gen_json_schema.go +++ b/config/gen_json_schema.go @@ -5,7 +5,9 @@ import ( "os" "reflect" - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/ethereum/go-ethereum/common" "github.com/invopop/jsonschema" "github.com/urfave/cli/v2" ) @@ -33,7 +35,7 @@ type ConfigJsonSchemaGenerater[T any] struct { // NewNodeConfigJsonSchemaGenerater returns a new class for generating json-schema of the node config file (.toml) func NewNodeConfigJsonSchemaGenerater() ConfigJsonSchemaGenerater[Config] { res := ConfigJsonSchemaGenerater[Config]{} - res.repoName = "github.com/0xPolygonHermez/zkevm-node" + res.repoName = "github.com/0xPolygon/cdk-validium-node" res.repoNameSuffix = "/config/config" res.addCodeCommentsToSchema = true res.pathSourceCode = "./" @@ -50,7 +52,7 @@ func NewNodeConfigJsonSchemaGenerater() ConfigJsonSchemaGenerater[Config] { // NewNetworkConfigJsonSchemaGenerater returns a new class for generating json-schema of the network-custom config file (.json) func NewNetworkConfigJsonSchemaGenerater() ConfigJsonSchemaGenerater[GenesisFromJSON] { res := ConfigJsonSchemaGenerater[GenesisFromJSON]{} - res.repoName = "github.com/0xPolygonHermez/zkevm-node" + res.repoName = "github.com/0xPolygon/cdk-validium-node" res.repoNameSuffix = "/config/config" res.addCodeCommentsToSchema = true res.pathSourceCode = "./" @@ -200,6 +202,7 @@ func fillDefaultValuesPartial(schema *jsonschema.Schema, default_config interfac return } for _, key := range schema.Properties.Keys() { + log.Debugf("fillDefaultValuesPartial: key: %s", key) value, ok := schema.Properties.Get(key) if ok { value_schema, _ := value.(*jsonschema.Schema) @@ -207,9 +210,16 @@ func fillDefaultValuesPartial(schema *jsonschema.Schema, default_config interfac if default_value.IsValid() && variantFieldIsSet(&value_schema.Default) { switch value_schema.Type { case "array": - if !default_value.IsZero() && !default_value.IsNil() { - def_value := default_value.Interface() - value_schema.Default = def_value + if default_value.Kind() == reflect.ValueOf(common.Address{}).Kind() { + if !default_value.IsZero() { + def_value := default_value.Interface() + value_schema.Default = def_value + } + } else { + if !default_value.IsZero() && !default_value.IsNil() { + def_value := default_value.Interface() + value_schema.Default = def_value + } } case "object": fillDefaultValuesPartial(value_schema, default_value.Interface()) diff --git a/config/gen_json_schema_test.go b/config/gen_json_schema_test.go index a5f2632f66..6347d2db4f 100644 --- a/config/gen_json_schema_test.go +++ b/config/gen_json_schema_test.go @@ -8,7 +8,8 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/ethereum/go-ethereum/common" "github.com/invopop/jsonschema" "github.com/mitchellh/mapstructure" "github.com/spf13/viper" @@ -16,6 +17,10 @@ import ( "github.com/urfave/cli/v2" ) +type TestConfigWithAddress struct { + L2Coinbase common.Address `mapstructure:"L2Coinbase"` +} + type MySectionConfig struct { } @@ -85,12 +90,45 @@ f1_another_name="value_f1" f2_another_name=5678 ` +func TestGenerateJsonSchemaWithAEthAddressEmpty(t *testing.T) { + cli := cli.NewContext(nil, nil, nil) + generator := ConfigJsonSchemaGenerater[TestConfigWithAddress]{ + repoName: "github.com/0xPolygon/cdk-validium-node/config/", + cleanRequiredField: true, + addCodeCommentsToSchema: true, + pathSourceCode: "./", + repoNameSuffix: "config/", + defaultValues: &TestConfigWithAddress{}, + } + schema, err := generator.GenerateJsonSchema(cli) + require.NoError(t, err) + require.NotNil(t, schema) +} + +func TestGenerateJsonSchemaWithAEthAddress(t *testing.T) { + cli := cli.NewContext(nil, nil, nil) + adr := common.HexToAddress("0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266") + generator := ConfigJsonSchemaGenerater[TestConfigWithAddress]{ + repoName: "github.com/0xPolygon/cdk-validium-node/config/", + cleanRequiredField: true, + addCodeCommentsToSchema: true, + pathSourceCode: "./", + repoNameSuffix: "config/", + defaultValues: &TestConfigWithAddress{ + L2Coinbase: adr, + }, + } + schema, err := generator.GenerateJsonSchema(cli) + require.NoError(t, err) + require.NotNil(t, schema) +} + func TestGenerateJsonSchemaCommentsWithDurationItem(t *testing.T) { cli := cli.NewContext(nil, nil, nil) duration, err := time.ParseDuration("1m") require.NoError(t, err) generator := ConfigJsonSchemaGenerater[ConfigWithDurationAndAComplexArray]{ - repoName: "github.com/0xPolygonHermez/zkevm-node/config/", + repoName: "github.com/0xPolygon/cdk-validium-node/config/", cleanRequiredField: true, addCodeCommentsToSchema: true, pathSourceCode: "./", @@ -112,7 +150,7 @@ func TestGenerateJsonSchemaCommentsWithComplexArrays(t *testing.T) { cli := cli.NewContext(nil, nil, nil) PrivateKeys := []KeystoreFileConfigExample{{Path: "/pk/sequencer.keystore", Password: "testonly"}} generator := ConfigJsonSchemaGenerater[ConfigWithDurationAndAComplexArray]{ - repoName: "github.com/0xPolygonHermez/zkevm-node/config/", + repoName: "github.com/0xPolygon/cdk-validium-node/config/", cleanRequiredField: true, addCodeCommentsToSchema: true, pathSourceCode: "./", @@ -142,7 +180,7 @@ func TestGenerateJsonSchemaCommentsWithComplexArrays(t *testing.T) { func TestGenerateJsonSchemaCommentsWithArrays(t *testing.T) { cli := cli.NewContext(nil, nil, nil) generator := ConfigJsonSchemaGenerater[ExapmleTestWithSimpleArrays]{ - repoName: "github.com/0xPolygonHermez/zkevm-node/config/", + repoName: "github.com/0xPolygon/cdk-validium-node/config/", cleanRequiredField: true, addCodeCommentsToSchema: true, pathSourceCode: "./", @@ -164,7 +202,7 @@ func TestGenerateJsonSchemaCommentsWithArrays(t *testing.T) { func TestGenerateJsonSchemaCommentsWithMultiplesLines(t *testing.T) { cli := cli.NewContext(nil, nil, nil) generator := ConfigJsonSchemaGenerater[MyTestConfig]{ - repoName: "github.com/0xPolygonHermez/zkevm-node/config/", + repoName: "github.com/0xPolygon/cdk-validium-node/config/", cleanRequiredField: true, addCodeCommentsToSchema: true, pathSourceCode: "./", @@ -319,7 +357,7 @@ func TestGenerateJsonSchemaInjectDefaultValue2stLevel(t *testing.T) { generator.pathSourceCode = "../" // This is a hack, we are not at root folder, then to store the comment is joining .. with reponame // and doesn't find out the comment - generator.repoName = "github.com/0xPolygonHermez/zkevm-node/config/" + generator.repoName = "github.com/0xPolygon/cdk-validium-node/config/" generator.repoNameSuffix = "/config" generator.defaultValues.Log.Level = "mylevel" schema, err := generator.GenerateJsonSchema(cli) diff --git a/config/mainnetgenesis.go b/config/mainnetgenesis.go deleted file mode 100644 index a27e7b739e..0000000000 --- a/config/mainnetgenesis.go +++ /dev/null @@ -1,107 +0,0 @@ -package config - -// MainnetNetworkConfigJSON is the hardcoded network configuration to be used for the official mainnet setup -const MainnetNetworkConfigJSON = ` -{ - "l1Config" : { - "chainId": 1, - "polygonZkEVMAddress": "0x5132A183E9F3CB7C848b0AAC5Ae0c4f0491B7aB2", - "maticTokenAddress": "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0", - "polygonZkEVMGlobalExitRootAddress": "0x580bda1e7A0CFAe92Fa7F6c20A3794F169CE3CFb" - }, - "root": "0x3f86b09b43e3e49a41fc20a07579b79eba044253367817d5c241d23c0e2bc5c9", - "genesisBlockNumber": 16896721, - "genesis": [ - { - "contractName": "PolygonZkEVMDeployer", - "balance": "0", - "nonce": "4", - "address": "0xCB19eDdE626906eB1EE52357a27F62dd519608C2", - "bytecode": "0x6080604052600436106100705760003560e01c8063715018a61161004e578063715018a6146100e65780638da5cb5b146100fb578063e11ae6cb14610126578063f2fde38b1461013957600080fd5b80632b79805a146100755780634a94d4871461008a5780636d07dbf81461009d575b600080fd5b610088610083366004610927565b610159565b005b6100886100983660046109c7565b6101cb565b3480156100a957600080fd5b506100bd6100b8366004610a1e565b61020d565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b50610088610220565b34801561010757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100bd565b610088610134366004610a40565b610234565b34801561014557600080fd5b50610088610154366004610a90565b61029b565b610161610357565b600061016e8585856103d8565b905061017a8183610537565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527fba82f25fed02cd2a23d9f5d11c2ef588d22af5437cbf23bfe61d87257c480e4c9060200160405180910390a15050505050565b6101d3610357565b6101de83838361057b565b506040517f25adb19089b6a549831a273acdf7908cff8b7ee5f551f8d1d37996cf01c5df5b90600090a1505050565b600061021983836105a9565b9392505050565b610228610357565b61023260006105b6565b565b61023c610357565b60006102498484846103d8565b60405173ffffffffffffffffffffffffffffffffffffffff821681529091507fba82f25fed02cd2a23d9f5d11c2ef588d22af5437cbf23bfe61d87257c480e4c9060200160405180910390a150505050565b6102a3610357565b73ffffffffffffffffffffffffffffffffffffffff811661034b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610354816105b6565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610342565b600083471015610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610342565b81516000036104af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610342565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff8116610219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610342565b6060610219838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525061062b565b60606105a1848484604051806060016040528060298152602001610b3d6029913961062b565b949350505050565b6000610219838330610744565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060824710156106bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610342565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516106e69190610acf565b60006040518083038185875af1925050503d8060008114610723576040519150601f19603f3d011682016040523d82523d6000602084013e610728565b606091505b50915091506107398783838761076e565b979650505050505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b606083156108045782516000036107fd5773ffffffffffffffffffffffffffffffffffffffff85163b6107fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610342565b50816105a1565b6105a183838151156108195781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103429190610aeb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261088d57600080fd5b813567ffffffffffffffff808211156108a8576108a861084d565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156108ee576108ee61084d565b8160405283815286602085880101111561090757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806080858703121561093d57600080fd5b8435935060208501359250604085013567ffffffffffffffff8082111561096357600080fd5b61096f8883890161087c565b9350606087013591508082111561098557600080fd5b506109928782880161087c565b91505092959194509250565b803573ffffffffffffffffffffffffffffffffffffffff811681146109c257600080fd5b919050565b6000806000606084860312156109dc57600080fd5b6109e58461099e565b9250602084013567ffffffffffffffff811115610a0157600080fd5b610a0d8682870161087c565b925050604084013590509250925092565b60008060408385031215610a3157600080fd5b50508035926020909101359150565b600080600060608486031215610a5557600080fd5b8335925060208401359150604084013567ffffffffffffffff811115610a7a57600080fd5b610a868682870161087c565b9150509250925092565b600060208284031215610aa257600080fd5b6102198261099e565b60005b83811015610ac6578181015183820152602001610aae565b50506000910152565b60008251610ae1818460208701610aab565b9190910192915050565b6020815260008251806020840152610b0a816040850160208701610aab565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a26469706673582212203e70ce334e8ec9d8d03e87415afd36dce4e82633bd277b08937095a6bd66367764736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000004c1665d6651ecefa59b9b3041951608468b18891" - } - }, - { - "contractName": "ProxyAdmin", - "balance": "0", - "nonce": "1", - "address": "0x0F99738B2Fc14D77308337f3e2596b63aE7BCC4A", - "bytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461012b57806399a88ec41461013e578063f2fde38b1461015e578063f3b7dead1461017e57600080fd5b8063204e1c7a14610080578063715018a6146100c95780637eff275e146100e05780638da5cb5b14610100575b600080fd5b34801561008c57600080fd5b506100a061009b366004610608565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d557600080fd5b506100de610255565b005b3480156100ec57600080fd5b506100de6100fb36600461062c565b610269565b34801561010c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100a0565b6100de610139366004610694565b6102f7565b34801561014a57600080fd5b506100de61015936600461062c565b61038c565b34801561016a57600080fd5b506100de610179366004610608565b6103e8565b34801561018a57600080fd5b506100a0610199366004610608565b6104a4565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b50915091508161023957600080fd5b8080602001905181019061024d9190610788565b949350505050565b61025d6104f0565b6102676000610571565b565b6102716104f0565b6040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690638f283970906024015b600060405180830381600087803b1580156102db57600080fd5b505af11580156102ef573d6000803e3d6000fd5b505050505050565b6102ff6104f0565b6040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690634f1ef28690349061035590869086906004016107a5565b6000604051808303818588803b15801561036e57600080fd5b505af1158015610382573d6000803e3d6000fd5b5050505050505050565b6103946104f0565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690633659cfe6906024016102c1565b6103f06104f0565b73ffffffffffffffffffffffffffffffffffffffff8116610498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104a181610571565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b60005473ffffffffffffffffffffffffffffffffffffffff163314610267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161048f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811681146104a157600080fd5b60006020828403121561061a57600080fd5b8135610625816105e6565b9392505050565b6000806040838503121561063f57600080fd5b823561064a816105e6565b9150602083013561065a816105e6565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156106a957600080fd5b83356106b4816105e6565b925060208401356106c4816105e6565b9150604084013567ffffffffffffffff808211156106e157600080fd5b818601915086601f8301126106f557600080fd5b81358181111561070757610707610665565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561074d5761074d610665565b8160405282815289602084870101111561076657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561079a57600080fd5b8151610625816105e6565b73ffffffffffffffffffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b818110156107ef578581018301518582016060015282016107d3565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010192505050939250505056fea2646970667358221220372a0e10eebea1b7fa43ae4c976994e6ed01d85eedc3637b83f01d3f06be442064736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000bba0935fa93eb23de7990b47f0d96a8f75766d13" - } - }, - { - "contractName": "PolygonZkEVMBridge implementation", - "balance": "0", - "nonce": "1", - "address": "0x5ac4182A1dd41AeEf465E40B82fd326BF66AB82C", - "bytecode": "0x6080604052600436106200019f5760003560e01c8063647c576c11620000e7578063be5831c71162000089578063dbc169761162000060578063dbc169761462000639578063ee25560b1462000651578063fb570834146200068257600080fd5b8063be5831c714620005ae578063cd58657914620005ea578063d02103ca146200060157600080fd5b80639e34070f11620000be5780639e34070f146200050a578063aaa13cc2146200054f578063bab161bf146200057457600080fd5b8063647c576c146200048657806379e2cf9714620004ab57806381b1c17414620004c357600080fd5b80632d2c9d94116200015157806334ac9cf2116200012857806334ac9cf2146200034b5780633ae05047146200037a5780633e197043146200039257600080fd5b80632d2c9d9414620002765780632dfdf0b5146200029b578063318aee3d14620002c257600080fd5b806322e95f2c116200018657806322e95f2c14620001ef578063240ff378146200023a5780632cffd02e146200025157600080fd5b806315064c9614620001a45780632072f6c514620001d5575b600080fd5b348015620001b157600080fd5b50606854620001c09060ff1681565b60405190151581526020015b60405180910390f35b348015620001e257600080fd5b50620001ed620006a7565b005b348015620001fc57600080fd5b50620002146200020e366004620032db565b62000705565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001620001cc565b620001ed6200024b36600462003372565b620007a8565b3480156200025e57600080fd5b50620001ed6200027036600462003409565b620009d0565b3480156200028357600080fd5b50620001ed6200029536600462003409565b62000f74565b348015620002a857600080fd5b50620002b360535481565b604051908152602001620001cc565b348015620002cf57600080fd5b5062000319620002e1366004620034ef565b606b6020526000908152604090205463ffffffff811690640100000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6040805163ffffffff909316835273ffffffffffffffffffffffffffffffffffffffff909116602083015201620001cc565b3480156200035857600080fd5b50606c54620002149073ffffffffffffffffffffffffffffffffffffffff1681565b3480156200038757600080fd5b50620002b362001178565b3480156200039f57600080fd5b50620002b3620003b136600462003526565b6040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b3480156200049357600080fd5b50620001ed620004a5366004620035b0565b6200125e565b348015620004b857600080fd5b50620001ed620014ad565b348015620004d057600080fd5b5062000214620004e236600462003600565b606a6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156200051757600080fd5b50620001c06200052936600462003600565b600881901c600090815260696020526040902054600160ff9092169190911b9081161490565b3480156200055c57600080fd5b50620002146200056e3660046200361a565b620014e7565b3480156200058157600080fd5b506068546200059890610100900463ffffffff1681565b60405163ffffffff9091168152602001620001cc565b348015620005bb57600080fd5b506068546200059890790100000000000000000000000000000000000000000000000000900463ffffffff1681565b620001ed620005fb366004620036ce565b620016d3565b3480156200060e57600080fd5b50606854620002149065010000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b3480156200064657600080fd5b50620001ed62001c37565b3480156200065e57600080fd5b50620002b36200067036600462003600565b60696020526000908152604090205481565b3480156200068f57600080fd5b50620001c0620006a136600462003770565b62001c93565b606c5473ffffffffffffffffffffffffffffffffffffffff163314620006f9576040517fe2e8106b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362001d7c565b565b6040805160e084901b7fffffffff0000000000000000000000000000000000000000000000000000000016602080830191909152606084901b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602483015282516018818403018152603890920183528151918101919091206000908152606a909152205473ffffffffffffffffffffffffffffffffffffffff165b92915050565b60685460ff1615620007e6576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff8681166101009092041614806200080c5750600263ffffffff861610155b1562000844576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b6001606860019054906101000a900463ffffffff163388883488886053546040516200089a9998979695949392919062003806565b60405180910390a1620009b8620009b26001606860019054906101000a900463ffffffff16338989348989604051620008d592919062003881565b60405180910390206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b62001e10565b8215620009c957620009c962001f27565b5050505050565b60685460ff161562000a0e576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000a258b8b8b8b8b8b8b8b8b8b8b600062001ffc565b73ffffffffffffffffffffffffffffffffffffffff861662000b01576040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff861690859060405162000a7a9190620038e6565b60006040518083038185875af1925050503d806000811462000ab9576040519150601f19603f3d011682016040523d82523d6000602084013e62000abe565b606091505b505090508062000afa576040517f6747a28800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5062000efc565b60685463ffffffff61010090910481169088160362000b435762000b3d73ffffffffffffffffffffffffffffffffffffffff87168585620021ed565b62000efc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b166024820152600090603801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152606a90935291205490915073ffffffffffffffffffffffffffffffffffffffff168062000e6e576000808062000c1886880188620039fb565b92509250925060008584848460405162000c329062003292565b62000c409392919062003abd565b8190604051809103906000f590508015801562000c61573d6000803e3d6000fd5b506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c81166004830152602482018c9052919250908216906340c10f1990604401600060405180830381600087803b15801562000cd757600080fd5b505af115801562000cec573d6000803e3d6000fd5b5050505080606a600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180604001604052808e63ffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff16815250606b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050507f490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a398d8d838b8b60405162000e5c95949392919062003afa565b60405180910390a15050505062000ef9565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018790528216906340c10f1990604401600060405180830381600087803b15801562000edf57600080fd5b505af115801562000ef4573d6000803e3d6000fd5b505050505b50505b6040805163ffffffff8c811682528916602082015273ffffffffffffffffffffffffffffffffffffffff88811682840152861660608201526080810185905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a15050505050505050505050565b60685460ff161562000fb2576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000fc98b8b8b8b8b8b8b8b8b8b8b600162001ffc565b60008473ffffffffffffffffffffffffffffffffffffffff1684888a868660405160240162000ffc949392919062003b42565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1806b5f200000000000000000000000000000000000000000000000000000000179052516200107f9190620038e6565b60006040518083038185875af1925050503d8060008114620010be576040519150601f19603f3d011682016040523d82523d6000602084013e620010c3565b606091505b5050905080620010ff576040517f37e391c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805163ffffffff8d811682528a16602082015273ffffffffffffffffffffffffffffffffffffffff89811682840152871660608201526080810186905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a1505050505050505050505050565b605354600090819081805b602081101562001255578083901c600116600103620011e65760338160208110620011b257620011b262003b8a565b0154604080516020810192909252810185905260600160405160208183030381529060405280519060200120935062001213565b60408051602081018690529081018390526060016040516020818303038152906040528051906020012093505b604080516020810184905290810183905260600160405160208183030381529060405280519060200120915080806200124c9062003be8565b91505062001183565b50919392505050565b600054610100900460ff16158080156200127f5750600054600160ff909116105b806200129b5750303b1580156200129b575060005460ff166001145b6200132d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156200138c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b606880547fffffffffffffff000000000000000000000000000000000000000000000000ff1661010063ffffffff8716027fffffffffffffff0000000000000000000000000000000000000000ffffffffff16176501000000000073ffffffffffffffffffffffffffffffffffffffff8681169190910291909117909155606c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001691841691909117905562001443620022c3565b8015620014a757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b605354606854790100000000000000000000000000000000000000000000000000900463ffffffff16101562000703576200070362001f27565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b1660248201526000908190603801604051602081830303815290604052805190602001209050600060ff60f81b3083604051806020016200157d9062003292565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f909101166040819052620015c8908d908d908d908d908d9060200162003c23565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262001606929160200162003c64565b604051602081830303815290604052805190602001206040516020016200168f94939291907fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101209a9950505050505050505050565b60685460ff161562001711576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200171b62002366565b60685463ffffffff888116610100909204161480620017415750600263ffffffff881610155b1562001779576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060608773ffffffffffffffffffffffffffffffffffffffff8816620017df57883414620017d5576040517fb89240f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000925062001ad9565b341562001818576040517f798ee6f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8089166000908152606b602090815260409182902082518084019093525463ffffffff811683526401000000009004909216918101829052901562001908576040517f9dc29fac000000000000000000000000000000000000000000000000000000008152336004820152602481018b905273ffffffffffffffffffffffffffffffffffffffff8a1690639dc29fac90604401600060405180830381600087803b158015620018db57600080fd5b505af1158015620018f0573d6000803e3d6000fd5b50505050806020015194508060000151935062001ad7565b85156200191d576200191d898b8989620023db565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8b16906370a0823190602401602060405180830381865afa1580156200198b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620019b1919062003c97565b9050620019d773ffffffffffffffffffffffffffffffffffffffff8b1633308e620028f9565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8c16906370a0823190602401602060405180830381865afa15801562001a45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a6b919062003c97565b905062001a79828262003cb1565b6068548c9850610100900463ffffffff169650935062001a998762002959565b62001aa48c62002a71565b62001aaf8d62002b7e565b60405160200162001ac39392919062003abd565b604051602081830303815290604052945050505b505b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b600084868e8e868860535460405162001b1b98979695949392919062003cc7565b60405180910390a162001c0f620009b2600085878f8f8789805190602001206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b861562001c205762001c2062001f27565b5050505062001c2e60018055565b50505050505050565b606c5473ffffffffffffffffffffffffffffffffffffffff16331462001c89576040517fe2e8106b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362002c80565b600084815b602081101562001d6e57600163ffffffff8616821c8116900362001d0a5785816020811062001ccb5762001ccb62003b8a565b60200201358260405160200162001cec929190918252602082015260400190565b60405160208183030381529060405280519060200120915062001d59565b8186826020811062001d205762001d2062003b8a565b602002013560405160200162001d40929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b8062001d658162003be8565b91505062001c98565b50821490505b949350505050565b60685460ff161562001dba576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b80600162001e216020600262003e79565b62001e2d919062003cb1565b6053541062001e68576040517fef5ccf6600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060536000815462001e7b9062003be8565b9182905550905060005b602081101562001f17578082901c60011660010362001ebd57826033826020811062001eb55762001eb562003b8a565b015550505050565b6033816020811062001ed35762001ed362003b8a565b01546040805160208101929092528101849052606001604051602081830303815290604052805190602001209250808062001f0e9062003be8565b91505062001e85565b5062001f2262003e87565b505050565b6053546068805463ffffffff909216790100000000000000000000000000000000000000000000000000027fffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179081905573ffffffffffffffffffffffffffffffffffffffff65010000000000909104166333d6247d62001fad62001178565b6040518263ffffffff1660e01b815260040162001fcc91815260200190565b600060405180830381600087803b15801562001fe757600080fd5b505af1158015620014a7573d6000803e3d6000fd5b6200200d8b63ffffffff1662002d10565b6068546040805160208082018e90528183018d9052825180830384018152606083019384905280519101207f257b363200000000000000000000000000000000000000000000000000000000909252606481019190915260009165010000000000900473ffffffffffffffffffffffffffffffffffffffff169063257b3632906084016020604051808303816000875af1158015620020b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620020d6919062003c97565b90508060000362002112576040517e2f6fad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff88811661010090920416146200215c576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606854600090610100900463ffffffff166200217a5750896200217d565b508a5b620021a66200219d848c8c8c8c8c8c8c604051620008d592919062003881565b8f8f8462001c93565b620021dd576040517fe0417cec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905262001f229084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915262002d75565b600054610100900460ff166200235c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6200070362002e88565b600260015403620023d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162001324565b6002600155565b6000620023ec600482848662003eb6565b620023f79162003ee2565b90507f2afa5331000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601620026765760008080808080806200245a896004818d62003eb6565b81019062002469919062003f2b565b96509650965096509650965096503373ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614620024dd576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff861630146200252d576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a851462002567576040517f03fffc4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff89811660248301528881166044830152606482018890526084820187905260ff861660a483015260c4820185905260e48083018590528351808403909101815261010490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd505accf000000000000000000000000000000000000000000000000000000001790529151918e1691620026229190620038e6565b6000604051808303816000865af19150503d806000811462002661576040519150601f19603f3d011682016040523d82523d6000602084013e62002666565b606091505b50505050505050505050620009c9565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f8fcbaf0c0000000000000000000000000000000000000000000000000000000014620026f2576040517fe282c0ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808080808080806200270a8a6004818e62003eb6565b81019062002719919062003f86565b975097509750975097509750975097503373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146200278f576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff87163014620027df576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8a811660248301528981166044830152606482018990526084820188905286151560a483015260ff861660c483015260e482018590526101048083018590528351808403909101815261012490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8fcbaf0c000000000000000000000000000000000000000000000000000000001790529151918f1691620028a39190620038e6565b6000604051808303816000865af19150503d8060008114620028e2576040519150601f19603f3d011682016040523d82523d6000602084013e620028e7565b606091505b50505050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052620014a79085907f23b872dd000000000000000000000000000000000000000000000000000000009060840162002240565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f06fdde03000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff861691620029dd9190620038e6565b600060405180830381855afa9150503d806000811462002a1a576040519150601f19603f3d011682016040523d82523d6000602084013e62002a1f565b606091505b50915091508162002a66576040518060400160405280600781526020017f4e4f5f4e414d450000000000000000000000000000000000000000000000000081525062001d74565b62001d748162002f21565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f95d89b41000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff86169162002af59190620038e6565b600060405180830381855afa9150503d806000811462002b32576040519150601f19603f3d011682016040523d82523d6000602084013e62002b37565b606091505b50915091508162002a66576040518060400160405280600981526020017f4e4f5f53594d424f4c000000000000000000000000000000000000000000000081525062001d74565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f313ce5670000000000000000000000000000000000000000000000000000000017905290516000918291829173ffffffffffffffffffffffffffffffffffffffff86169162002c019190620038e6565b600060405180830381855afa9150503d806000811462002c3e576040519150601f19603f3d011682016040523d82523d6000602084013e62002c43565b606091505b509150915081801562002c57575080516020145b62002c6457601262001d74565b8080602001905181019062001d74919062004012565b60018055565b60685460ff1662002cbd576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b600881901c60008181526069602052604081208054600160ff861690811b91821892839055929091908183169003620009c9576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600062002dd9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620031119092919063ffffffff16565b80519091501562001f22578080602001905181019062002dfa919062004032565b62001f22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162001324565b600054610100900460ff1662002c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6060604082511062002f435781806020019051810190620007a2919062004052565b8151602003620030d35760005b60208110801562002f9b575082818151811062002f715762002f7162003b8a565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b1562002fb6578062002fad8162003be8565b91505062002f50565b8060000362002ffa57505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e4700000000000000000000000000006020820152919050565b60008167ffffffffffffffff81111562003018576200301862003891565b6040519080825280601f01601f19166020018201604052801562003043576020820181803683370190505b50905060005b82811015620030cb5784818151811062003067576200306762003b8a565b602001015160f81c60f81b82828151811062003087576200308762003b8a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080620030c28162003be8565b91505062003049565b509392505050565b505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e470000000000000000000000000000602082015290565b919050565b606062001d748484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051620031489190620038e6565b60006040518083038185875af1925050503d806000811462003187576040519150601f19603f3d011682016040523d82523d6000602084013e6200318c565b606091505b50915091506200319f87838387620031aa565b979650505050505050565b60608315620032455782516000036200323d5773ffffffffffffffffffffffffffffffffffffffff85163b6200323d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162001324565b508162001d74565b62001d7483838151156200325c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620013249190620040d2565b611b6680620040e883390190565b803563ffffffff811681146200310c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114620032d857600080fd5b50565b60008060408385031215620032ef57600080fd5b620032fa83620032a0565b915060208301356200330c81620032b5565b809150509250929050565b8015158114620032d857600080fd5b60008083601f8401126200333957600080fd5b50813567ffffffffffffffff8111156200335257600080fd5b6020830191508360208285010111156200336b57600080fd5b9250929050565b6000806000806000608086880312156200338b57600080fd5b6200339686620032a0565b94506020860135620033a881620032b5565b93506040860135620033ba8162003317565b9250606086013567ffffffffffffffff811115620033d757600080fd5b620033e58882890162003326565b969995985093965092949392505050565b806104008101831015620007a257600080fd5b60008060008060008060008060008060006105208c8e0312156200342c57600080fd5b620034388d8d620033f6565b9a50620034496104008d01620032a0565b99506104208c013598506104408c013597506200346a6104608d01620032a0565b96506104808c01356200347d81620032b5565b95506200348e6104a08d01620032a0565b94506104c08c0135620034a181620032b5565b93506104e08c013592506105008c013567ffffffffffffffff811115620034c757600080fd5b620034d58e828f0162003326565b915080935050809150509295989b509295989b9093969950565b6000602082840312156200350257600080fd5b81356200350f81620032b5565b9392505050565b60ff81168114620032d857600080fd5b600080600080600080600060e0888a0312156200354257600080fd5b87356200354f8162003516565b96506200355f60208901620032a0565b955060408801356200357181620032b5565b94506200358160608901620032a0565b935060808801356200359381620032b5565b9699959850939692959460a0840135945060c09093013592915050565b600080600060608486031215620035c657600080fd5b620035d184620032a0565b92506020840135620035e381620032b5565b91506040840135620035f581620032b5565b809150509250925092565b6000602082840312156200361357600080fd5b5035919050565b600080600080600080600060a0888a0312156200363657600080fd5b6200364188620032a0565b965060208801356200365381620032b5565b9550604088013567ffffffffffffffff808211156200367157600080fd5b6200367f8b838c0162003326565b909750955060608a01359150808211156200369957600080fd5b50620036a88a828b0162003326565b9094509250506080880135620036be8162003516565b8091505092959891949750929550565b600080600080600080600060c0888a031215620036ea57600080fd5b620036f588620032a0565b965060208801356200370781620032b5565b95506040880135945060608801356200372081620032b5565b93506080880135620037328162003317565b925060a088013567ffffffffffffffff8111156200374f57600080fd5b6200375d8a828b0162003326565b989b979a50959850939692959293505050565b60008060008061046085870312156200378857600080fd5b843593506200379b8660208701620033f6565b9250620037ac6104208601620032a0565b939692955092936104400135925050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600061010060ff8c16835263ffffffff808c16602085015273ffffffffffffffffffffffffffffffffffffffff808c166040860152818b166060860152808a166080860152508760a08501528160c0850152620038678285018789620037bd565b925080851660e085015250509a9950505050505050505050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60005b83811015620038dd578181015183820152602001620038c3565b50506000910152565b60008251620038fa818460208701620038c0565b9190910192915050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156200394e576200394e62003891565b604052919050565b600067ffffffffffffffff82111562003973576200397362003891565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112620039b157600080fd5b8135620039c8620039c28262003956565b62003904565b818152846020838601011115620039de57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121562003a1157600080fd5b833567ffffffffffffffff8082111562003a2a57600080fd5b62003a38878388016200399f565b9450602086013591508082111562003a4f57600080fd5b5062003a5e868287016200399f565b9250506040840135620035f58162003516565b6000815180845262003a8b816020860160208601620038c0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60608152600062003ad2606083018662003a71565b828103602084015262003ae6818662003a71565b91505060ff83166040830152949350505050565b63ffffffff86168152600073ffffffffffffffffffffffffffffffffffffffff8087166020840152808616604084015250608060608301526200319f608083018486620037bd565b73ffffffffffffffffffffffffffffffffffffffff8516815263ffffffff8416602082015260606040820152600062003b80606083018486620037bd565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362003c1c5762003c1c62003bb9565b5060010190565b60608152600062003c39606083018789620037bd565b828103602084015262003c4e818688620037bd565b91505060ff831660408301529695505050505050565b6000835162003c78818460208801620038c0565b83519083019062003c8e818360208801620038c0565b01949350505050565b60006020828403121562003caa57600080fd5b5051919050565b81810381811115620007a257620007a262003bb9565b600061010060ff8b16835263ffffffff808b16602085015273ffffffffffffffffffffffffffffffffffffffff808b166040860152818a1660608601528089166080860152508660a08501528160c085015262003d278285018762003a71565b925080851660e085015250509998505050505050505050565b600181815b8085111562003d9f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003d835762003d8362003bb9565b8085161562003d9157918102915b93841c939080029062003d45565b509250929050565b60008262003db857506001620007a2565b8162003dc757506000620007a2565b816001811462003de0576002811462003deb5762003e0b565b6001915050620007a2565b60ff84111562003dff5762003dff62003bb9565b50506001821b620007a2565b5060208310610133831016604e8410600b841016171562003e30575081810a620007a2565b62003e3c838362003d40565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003e715762003e7162003bb9565b029392505050565b60006200350f838362003da7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000808585111562003ec757600080fd5b8386111562003ed557600080fd5b5050820193919092039150565b7fffffffff00000000000000000000000000000000000000000000000000000000813581811691600485101562003f235780818660040360031b1b83161692505b505092915050565b600080600080600080600060e0888a03121562003f4757600080fd5b873562003f5481620032b5565b9650602088013562003f6681620032b5565b955060408801359450606088013593506080880135620035938162003516565b600080600080600080600080610100898b03121562003fa457600080fd5b883562003fb181620032b5565b9750602089013562003fc381620032b5565b96506040890135955060608901359450608089013562003fe38162003317565b935060a089013562003ff58162003516565b979a969950949793969295929450505060c08201359160e0013590565b6000602082840312156200402557600080fd5b81516200350f8162003516565b6000602082840312156200404557600080fd5b81516200350f8162003317565b6000602082840312156200406557600080fd5b815167ffffffffffffffff8111156200407d57600080fd5b8201601f810184136200408f57600080fd5b8051620040a0620039c28262003956565b818152856020838501011115620040b657600080fd5b620040c9826020830160208601620038c0565b95945050505050565b6020815260006200350f602083018462003a7156fe6101006040523480156200001257600080fd5b5060405162001b6638038062001b6683398101604081905262000035916200028d565b82826003620000458382620003a1565b506004620000548282620003a1565b50503360c0525060ff811660e052466080819052620000739062000080565b60a052506200046d915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620000ad6200012e565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6060600380546200013f9062000312565b80601f01602080910402602001604051908101604052809291908181526020018280546200016d9062000312565b8015620001be5780601f106200019257610100808354040283529160200191620001be565b820191906000526020600020905b815481529060010190602001808311620001a057829003601f168201915b5050505050905090565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f057600080fd5b81516001600160401b03808211156200020d576200020d620001c8565b604051601f8301601f19908116603f01168101908282118183101715620002385762000238620001c8565b816040528381526020925086838588010111156200025557600080fd5b600091505b838210156200027957858201830151818301840152908201906200025a565b600093810190920192909252949350505050565b600080600060608486031215620002a357600080fd5b83516001600160401b0380821115620002bb57600080fd5b620002c987838801620001de565b94506020860151915080821115620002e057600080fd5b50620002ef86828701620001de565b925050604084015160ff811681146200030757600080fd5b809150509250925092565b600181811c908216806200032757607f821691505b6020821081036200034857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039c57600081815260208120601f850160051c81016020861015620003775750805b601f850160051c820191505b81811015620003985782815560010162000383565b5050505b505050565b81516001600160401b03811115620003bd57620003bd620001c8565b620003d581620003ce845462000312565b846200034e565b602080601f8311600181146200040d5760008415620003f45750858301515b600019600386901b1c1916600185901b17855562000398565b600085815260208120601f198616915b828110156200043e578886015182559484019460019091019084016200041d565b50858210156200045d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516116aa620004bc6000396000610237015260008181610307015281816105c001526106a70152600061053a015260008181610379015261050401526116aa6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063a457c2d71161008c578063d505accf11610066578063d505accf1461039b578063dd62ed3e146103ae578063ffa1ad74146103f457600080fd5b8063a457c2d71461034e578063a9059cbb14610361578063cd0d00961461037457600080fd5b806395d89b41116100bd57806395d89b41146102e75780639dc29fac146102ef578063a3c573eb1461030257600080fd5b806370a08231146102915780637ecebe00146102c757600080fd5b806330adf81f1161012f5780633644e515116101145780633644e51514610261578063395093511461026957806340c10f191461027c57600080fd5b806330adf81f14610209578063313ce5671461023057600080fd5b806318160ddd1161016057806318160ddd146101bd57806320606b70146101cf57806323b872dd146101f657600080fd5b806306fdde031461017c578063095ea7b31461019a575b600080fd5b610184610430565b60405161019191906113e4565b60405180910390f35b6101ad6101a8366004611479565b6104c2565b6040519015158152602001610191565b6002545b604051908152602001610191565b6101c17f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6101ad6102043660046114a3565b6104dc565b6101c17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610191565b6101c1610500565b6101ad610277366004611479565b61055c565b61028f61028a366004611479565b6105a8565b005b6101c161029f3660046114df565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101c16102d53660046114df565b60056020526000908152604090205481565b610184610680565b61028f6102fd366004611479565b61068f565b6103297f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610191565b6101ad61035c366004611479565b61075e565b6101ad61036f366004611479565b61082f565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61028f6103a9366004611501565b61083d565b6101c16103bc366004611574565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101846040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b60606003805461043f906115a7565b80601f016020809104026020016040519081016040528092919081815260200182805461046b906115a7565b80156104b85780601f1061048d576101008083540402835291602001916104b8565b820191906000526020600020905b81548152906001019060200180831161049b57829003601f168201915b5050505050905090565b6000336104d0818585610b73565b60019150505b92915050565b6000336104ea858285610d27565b6104f5858585610dfe565b506001949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000004614610537576105324661106d565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104d090829086906105a3908790611629565b610b73565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610672576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d4272696467650000000000000000000000000000000060648201526084015b60405180910390fd5b61067c8282611135565b5050565b60606004805461043f906115a7565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d427269646765000000000000000000000000000000006064820152608401610669565b61067c8282611228565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610669565b6104f58286868403610b73565b6000336104d0818585610dfe565b834211156108cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f546f6b656e577261707065643a3a7065726d69743a204578706972656420706560448201527f726d6974000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260056020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a9190866109268361163c565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610991610500565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019190915260428101839052606201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff89169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa158015610a55573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590610ad057508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f546f6b656e577261707065643a3a7065726d69743a20496e76616c696420736960448201527f676e6174757265000000000000000000000000000000000000000000000000006064820152608401610669565b610b678a8a8a610b73565b50505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8316610c15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610df85781811015610deb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610669565b610df88484848403610b73565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610ea1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610f44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610df8565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611098610430565b8051602091820120604080518082018252600181527f310000000000000000000000000000000000000000000000000000000000000090840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b73ffffffffffffffffffffffffffffffffffffffff82166111b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610669565b80600260008282546111c49190611629565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff82166112cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205481811015611381576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610d1a565b600060208083528351808285015260005b81811015611411578581018301518582016040015282016113f5565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461147457600080fd5b919050565b6000806040838503121561148c57600080fd5b61149583611450565b946020939093013593505050565b6000806000606084860312156114b857600080fd5b6114c184611450565b92506114cf60208501611450565b9150604084013590509250925092565b6000602082840312156114f157600080fd5b6114fa82611450565b9392505050565b600080600080600080600060e0888a03121561151c57600080fd5b61152588611450565b965061153360208901611450565b95506040880135945060608801359350608088013560ff8116811461155757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561158757600080fd5b61159083611450565b915061159e60208401611450565b90509250929050565b600181811c908216806115bb57607f821691505b6020821081036115f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156104d6576104d66115fa565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361166d5761166d6115fa565b506001019056fea26469706673582212208d88fee561cff7120d381c345cfc534cef8229a272dc5809d4bbb685ad67141164736f6c63430008110033a2646970667358221220d9b3ca7b13ec80ac58634ddf0ecebe71e209a71f532614949b9e720413f50c8364736f6c63430008110033" - }, - { - "contractName": "PolygonZkEVMBridge proxy", - "balance": "200000000000000000000000000", - "nonce": "1", - "address": "0x2a3DD3EB832aF982ec71669E178424b10Dca2EDe", - "bytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461088b565b610135565b61006b6100a33660046108a6565b61017f565b3480156100b457600080fd5b506100bd6101f3565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461088b565b610231565b34801561011257600080fd5b506100bd61025e565b6101236102d4565b61013361012e6103ab565b6103b5565b565b61013d6103d9565b73ffffffffffffffffffffffffffffffffffffffff1633036101775761017481604051806020016040528060008152506000610419565b50565b61017461011b565b6101876103d9565b73ffffffffffffffffffffffffffffffffffffffff1633036101eb576101e68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610419915050565b505050565b6101e661011b565b60006101fd6103d9565b73ffffffffffffffffffffffffffffffffffffffff163303610226576102216103ab565b905090565b61022e61011b565b90565b6102396103d9565b73ffffffffffffffffffffffffffffffffffffffff1633036101775761017481610444565b60006102686103d9565b73ffffffffffffffffffffffffffffffffffffffff163303610226576102216103d9565b60606102b183836040518060600160405280602781526020016109bb602791396104a5565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6102dc6103d9565b73ffffffffffffffffffffffffffffffffffffffff163303610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b600061022161052a565b3660008037600080366000845af43d6000803e8080156103d4573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b61042283610552565b60008251118061042f5750805b156101e65761043e838361028c565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61046d6103d9565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a16101748161059f565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516104cf919061094d565b600060405180830381855af49150503d806000811461050a576040519150601f19603f3d011682016040523d82523d6000602084013e61050f565b606091505b5091509150610520868383876106ab565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6103fd565b61055b81610753565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff8116610642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103a2565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b6060831561074157825160000361073a5773ffffffffffffffffffffffffffffffffffffffff85163b61073a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103a2565b508161074b565b61074b838361081e565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff81163b6107f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103a2565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610665565b81511561082e5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a29190610969565b803573ffffffffffffffffffffffffffffffffffffffff8116811461088657600080fd5b919050565b60006020828403121561089d57600080fd5b6102b182610862565b6000806000604084860312156108bb57600080fd5b6108c484610862565b9250602084013567ffffffffffffffff808211156108e157600080fd5b818601915086601f8301126108f557600080fd5b81358181111561090457600080fd5b87602082850101111561091657600080fd5b6020830194508093505050509250925092565b60005b8381101561094457818101518382015260200161092c565b50506000910152565b6000825161095f818460208701610929565b9190910192915050565b6020815260008251806020840152610988816040850160208701610929565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a1af0d6cb4f1e31496a4c5c1448913bce4bd6ad3a39e47c6f7190c114d6f9bf464736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000068": "0x00000000000000a40d5f56745a118d0906a34e69aec8c0db1cb8fa0000000100", - "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x0000000000000000000000000f99738b2fc14d77308337f3e2596b63ae7bcc4a", - "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000005ac4182a1dd41aeef465e40b82fd326bf66ab82c" - } - }, - { - "contractName": "PolygonZkEVMGlobalExitRootL2 implementation", - "balance": "0", - "nonce": "1", - "address": "0x0200143Fa295EE4dffEF22eE2616c2E008D81688", - "bytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806301fd904414610051578063257b36321461006d57806333d6247d1461008d578063a3c573eb146100a2575b600080fd5b61005a60015481565b6040519081526020015b60405180910390f35b61005a61007b366004610162565b60006020819052908152604090205481565b6100a061009b366004610162565b6100ee565b005b6100c97f0000000000000000000000002a3dd3eb832af982ec71669e178424b10dca2ede81565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610064565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002a3dd3eb832af982ec71669e178424b10dca2ede161461015d576040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600155565b60006020828403121561017457600080fd5b503591905056fea2646970667358221220a187fc278346c1b61c449ea3641002b6eac2bda3351a122a12c35099f933696864736f6c63430008110033" - }, - { - "contractName": "PolygonZkEVMGlobalExitRootL2 proxy", - "balance": "0", - "nonce": "1", - "address": "0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa", - "bytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106ca565b610118565b61005b6100933660046106e5565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106ca565b61020b565b3480156100f557600080fd5b506100ad610235565b610106610292565b610116610111610331565b61033b565b565b61012061035f565b6001600160a01b0316336001600160a01b031614156101575761015481604051806020016040528060008152506000610392565b50565b6101546100fe565b61016761035f565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610392915050565b505050565b6101c36100fe565b60006101da61035f565b6001600160a01b0316336001600160a01b03161415610200576101fb610331565b905090565b6102086100fe565b90565b61021361035f565b6001600160a01b0316336001600160a01b0316141561015757610154816103f1565b600061023f61035f565b6001600160a01b0316336001600160a01b03161415610200576101fb61035f565b606061028583836040518060600160405280602781526020016107e460279139610445565b9392505050565b3b151590565b61029a61035f565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb610519565b3660008037600080366000845af43d6000803e80801561035a573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61039b83610541565b6040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a26000825111806103dc5750805b156101c3576103eb8383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61041a61035f565b604080516001600160a01b03928316815291841660208301520160405180910390a1610154816105e9565b6060833b6104a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610328565b600080856001600160a01b0316856040516104bf9190610794565b600060405180830381855af49150503d80600081146104fa576040519150601f19603f3d011682016040523d82523d6000602084013e6104ff565b606091505b509150915061050f828286610675565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610383565b803b6105a55760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610328565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b03811661064e5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610328565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036105c8565b60608315610684575081610285565b8251156106945782518084602001fd5b8160405162461bcd60e51b815260040161032891906107b0565b80356001600160a01b03811681146106c557600080fd5b919050565b6000602082840312156106dc57600080fd5b610285826106ae565b6000806000604084860312156106fa57600080fd5b610703846106ae565b9250602084013567ffffffffffffffff8082111561072057600080fd5b818601915086601f83011261073457600080fd5b81358181111561074357600080fd5b87602082850101111561075557600080fd5b6020830194508093505050509250925092565b60005b8381101561078357818101518382015260200161076b565b838111156103eb5750506000910152565b600082516107a6818460208701610768565b9190910192915050565b60208152600082518060208401526107cf816040850160208701610768565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204675187caf3a43285d9a2c1844a981e977bd52a85ff073e7fc649f73847d70a464736f6c63430008090033", - "storage": { - "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x0000000000000000000000000f99738b2fc14d77308337f3e2596b63ae7bcc4a", - "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000000200143fa295ee4dffef22ee2616c2e008d81688" - } - }, - { - "contractName": "PolygonZkEVMTimelock", - "balance": "0", - "nonce": "1", - "address": "0xBBa0935Fa93Eb23de7990b47F0D96a8f75766d13", - "bytecode": "0x6080604052600436106101c65760003560e01c806364d62353116100f7578063b1c5f42711610095578063d547741f11610064578063d547741f14610661578063e38335e514610681578063f23a6e6114610694578063f27a0c92146106d957600080fd5b8063b1c5f427146105af578063bc197c81146105cf578063c4d252f514610614578063d45c44351461063457600080fd5b80638f61f4f5116100d15780638f61f4f5146104e157806391d1485414610515578063a217fddf14610566578063b08e51c01461057b57600080fd5b806364d62353146104815780638065657f146104a15780638f2a0bb0146104c157600080fd5b8063248a9ca31161016457806331d507501161013e57806331d50750146103c857806336568abe146103e85780633a6aae7214610408578063584b153e1461046157600080fd5b8063248a9ca3146103475780632ab0f529146103775780632f2ff15d146103a857600080fd5b80630d3cf6fc116101a05780630d3cf6fc1461026b578063134008d31461029f57806313bc9f20146102b2578063150b7a02146102d257600080fd5b806301d5062a146101d257806301ffc9a7146101f457806307bd02651461022957600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004611c52565b6106ee565b005b34801561020057600080fd5b5061021461020f366004611cc7565b610783565b60405190151581526020015b60405180910390f35b34801561023557600080fd5b5061025d7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610220565b34801561027757600080fd5b5061025d7f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101f26102ad366004611d09565b6107df565b3480156102be57600080fd5b506102146102cd366004611d75565b6108d7565b3480156102de57600080fd5b506103166102ed366004611e9a565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610220565b34801561035357600080fd5b5061025d610362366004611d75565b60009081526020819052604090206001015490565b34801561038357600080fd5b50610214610392366004611d75565b6000908152600160208190526040909120541490565b3480156103b457600080fd5b506101f26103c3366004611f02565b6108fd565b3480156103d457600080fd5b506102146103e3366004611d75565b610927565b3480156103f457600080fd5b506101f2610403366004611f02565b610940565b34801561041457600080fd5b5061043c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610220565b34801561046d57600080fd5b5061021461047c366004611d75565b6109f8565b34801561048d57600080fd5b506101f261049c366004611d75565b610a0e565b3480156104ad57600080fd5b5061025d6104bc366004611d09565b610ade565b3480156104cd57600080fd5b506101f26104dc366004611f73565b610b1d565b3480156104ed57600080fd5b5061025d7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561052157600080fd5b50610214610530366004611f02565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b34801561057257600080fd5b5061025d600081565b34801561058757600080fd5b5061025d7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156105bb57600080fd5b5061025d6105ca366004612025565b610d4f565b3480156105db57600080fd5b506103166105ea36600461214e565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561062057600080fd5b506101f261062f366004611d75565b610d94565b34801561064057600080fd5b5061025d61064f366004611d75565b60009081526001602052604090205490565b34801561066d57600080fd5b506101f261067c366004611f02565b610e8f565b6101f261068f366004612025565b610eb4565b3480156106a057600080fd5b506103166106af3660046121f8565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b3480156106e557600080fd5b5061025d611161565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161071881611244565b6000610728898989898989610ade565b90506107348184611251565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610770969594939291906122a6565b60405180910390a3505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e00000000000000000000000000000000000000000000000000000000014806107d957506107d98261139e565b92915050565b600080527fdae2aa361dfd1ca020a396615627d436107c35eff9fe7738a3512819782d70696020527f5ba6852781629bcdcd4bdaa6de76d786f1c64b16acdac474e55bebc0ea157951547fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e639060ff1661085c5761085c8133611435565b600061086c888888888888610ade565b905061087881856114ed565b6108848888888861162a565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516108bc94939291906122f1565b60405180910390a36108cd8161172e565b5050505050505050565b6000818152600160205260408120546001811180156108f65750428111155b9392505050565b60008281526020819052604090206001015461091881611244565b61092283836117d7565b505050565b60008181526001602052604081205481905b1192915050565b73ffffffffffffffffffffffffffffffffffffffff811633146109ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6109f482826118c7565b5050565b6000818152600160208190526040822054610939565b333014610a9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201527f62652074696d656c6f636b00000000000000000000000000000000000000000060648201526084016109e1565b60025460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1600255565b6000868686868686604051602001610afb969594939291906122a6565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1610b4781611244565b888714610bd6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b888514610c65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b6000610c778b8b8b8b8b8b8b8b610d4f565b9050610c838184611251565b60005b8a811015610d415780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610cc357610cc3612331565b9050602002016020810190610cd89190612360565b8d8d86818110610cea57610cea612331565b905060200201358c8c87818110610d0357610d03612331565b9050602002810190610d15919061237b565b8c8b604051610d29969594939291906122a6565b60405180910390a3610d3a8161240f565b9050610c86565b505050505050505050505050565b60008888888888888888604051602001610d709897969594939291906124f7565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610dbe81611244565b610dc7826109f8565b610e53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20636160448201527f6e6e6f742062652063616e63656c6c656400000000000000000000000000000060648201526084016109e1565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610eaa81611244565b61092283836118c7565b600080527fdae2aa361dfd1ca020a396615627d436107c35eff9fe7738a3512819782d70696020527f5ba6852781629bcdcd4bdaa6de76d786f1c64b16acdac474e55bebc0ea157951547fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e639060ff16610f3157610f318133611435565b878614610fc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b87841461104f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b60006110618a8a8a8a8a8a8a8a610d4f565b905061106d81856114ed565b60005b8981101561114b5760008b8b8381811061108c5761108c612331565b90506020020160208101906110a19190612360565b905060008a8a848181106110b7576110b7612331565b9050602002013590503660008a8a868181106110d5576110d5612331565b90506020028101906110e7919061237b565b915091506110f78484848461162a565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588686868660405161112e94939291906122f1565b60405180910390a350505050806111449061240f565b9050611070565b506111558161172e565b50505050505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff161580159061123257507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315064c966040518163ffffffff1660e01b8152600401602060405180830381865afa15801561120e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123291906125be565b1561123d5750600090565b5060025490565b61124e8133611435565b50565b61125a82610927565b156112e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201527f7265616479207363686564756c6564000000000000000000000000000000000060648201526084016109e1565b6112ef611161565b81101561137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e7460448201527f2064656c6179000000000000000000000000000000000000000000000000000060648201526084016109e1565b61138881426125e0565b6000928352600160205260409092209190915550565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806107d957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107d9565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109f4576114738161197e565b61147e83602061199d565b60405160200161148f929190612617565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526109e191600401612698565b6114f6826108d7565b611582576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20697360448201527f206e6f742072656164790000000000000000000000000000000000000000000060648201526084016109e1565b80158061159e5750600081815260016020819052604090912054145b6109f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e67206465706560448201527f6e64656e6379000000000000000000000000000000000000000000000000000060648201526084016109e1565b60008473ffffffffffffffffffffffffffffffffffffffff168484846040516116549291906126e9565b60006040518083038185875af1925050503d8060008114611691576040519150601f19603f3d011682016040523d82523d6000602084013e611696565b606091505b5050905080611727576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e67207460448201527f72616e73616374696f6e2072657665727465640000000000000000000000000060648201526084016109e1565b5050505050565b611737816108d7565b6117c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20697360448201527f206e6f742072656164790000000000000000000000000000000000000000000060648201526084016109e1565b600090815260016020819052604090912055565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109f45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556118693390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156109f45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606107d973ffffffffffffffffffffffffffffffffffffffff831660145b606060006119ac8360026126f9565b6119b79060026125e0565b67ffffffffffffffff8111156119cf576119cf611d8e565b6040519080825280601f01601f1916602001820160405280156119f9576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611a3057611a30612331565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611a9357611a93612331565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611acf8460026126f9565b611ada9060016125e0565b90505b6001811115611b77577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611b1b57611b1b612331565b1a60f81b828281518110611b3157611b31612331565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611b7081612710565b9050611add565b5083156108f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109e1565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c0457600080fd5b919050565b60008083601f840112611c1b57600080fd5b50813567ffffffffffffffff811115611c3357600080fd5b602083019150836020828501011115611c4b57600080fd5b9250929050565b600080600080600080600060c0888a031215611c6d57600080fd5b611c7688611be0565b965060208801359550604088013567ffffffffffffffff811115611c9957600080fd5b611ca58a828b01611c09565b989b979a50986060810135976080820135975060a09091013595509350505050565b600060208284031215611cd957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146108f657600080fd5b60008060008060008060a08789031215611d2257600080fd5b611d2b87611be0565b955060208701359450604087013567ffffffffffffffff811115611d4e57600080fd5b611d5a89828a01611c09565b979a9699509760608101359660809091013595509350505050565b600060208284031215611d8757600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611e0457611e04611d8e565b604052919050565b600082601f830112611e1d57600080fd5b813567ffffffffffffffff811115611e3757611e37611d8e565b611e6860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611dbd565b818152846020838601011115611e7d57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611eb057600080fd5b611eb985611be0565b9350611ec760208601611be0565b925060408501359150606085013567ffffffffffffffff811115611eea57600080fd5b611ef687828801611e0c565b91505092959194509250565b60008060408385031215611f1557600080fd5b82359150611f2560208401611be0565b90509250929050565b60008083601f840112611f4057600080fd5b50813567ffffffffffffffff811115611f5857600080fd5b6020830191508360208260051b8501011115611c4b57600080fd5b600080600080600080600080600060c08a8c031215611f9157600080fd5b893567ffffffffffffffff80821115611fa957600080fd5b611fb58d838e01611f2e565b909b50995060208c0135915080821115611fce57600080fd5b611fda8d838e01611f2e565b909950975060408c0135915080821115611ff357600080fd5b506120008c828d01611f2e565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561204157600080fd5b883567ffffffffffffffff8082111561205957600080fd5b6120658c838d01611f2e565b909a50985060208b013591508082111561207e57600080fd5b61208a8c838d01611f2e565b909850965060408b01359150808211156120a357600080fd5b506120b08b828c01611f2e565b999c989b509699959896976060870135966080013595509350505050565b600082601f8301126120df57600080fd5b8135602067ffffffffffffffff8211156120fb576120fb611d8e565b8160051b61210a828201611dbd565b928352848101820192828101908785111561212457600080fd5b83870192505b848310156121435782358252918301919083019061212a565b979650505050505050565b600080600080600060a0868803121561216657600080fd5b61216f86611be0565b945061217d60208701611be0565b9350604086013567ffffffffffffffff8082111561219a57600080fd5b6121a689838a016120ce565b945060608801359150808211156121bc57600080fd5b6121c889838a016120ce565b935060808801359150808211156121de57600080fd5b506121eb88828901611e0c565b9150509295509295909350565b600080600080600060a0868803121561221057600080fd5b61221986611be0565b945061222760208701611be0565b93506040860135925060608601359150608086013567ffffffffffffffff81111561225157600080fd5b6121eb88828901611e0c565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a0604082015260006122dc60a08301868861225d565b60608301949094525060800152949350505050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152600061232760608301848661225d565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561237257600080fd5b6108f682611be0565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126123b057600080fd5b83018035915067ffffffffffffffff8211156123cb57600080fd5b602001915036819003821315611c4b57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612440576124406123e0565b5060010190565b81835260006020808501808196508560051b810191508460005b878110156124ea57828403895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18836030181126124a057600080fd5b8701858101903567ffffffffffffffff8111156124bc57600080fd5b8036038213156124cb57600080fd5b6124d686828461225d565b9a87019a9550505090840190600101612461565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b8110156125455773ffffffffffffffffffffffffffffffffffffffff61253084611be0565b1682526020928301929091019060010161250a565b5083810360208501528881527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89111561257e57600080fd5b8860051b9150818a602083013701828103602090810160408501526125a69082018789612447565b60608401959095525050608001529695505050505050565b6000602082840312156125d057600080fd5b815180151581146108f657600080fd5b808201808211156107d9576107d96123e0565b60005b8381101561260e5781810151838201526020016125f6565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161264f8160178501602088016125f3565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161268c8160288401602088016125f3565b01602801949350505050565b60208152600082518060208401526126b78160408501602087016125f3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b8183823760009101908152919050565b80820281158282048414176107d9576107d96123e0565b60008161271f5761271f6123e0565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea26469706673582212206416c4e08f97752b4bb06159524dac058d3dccd8775e57ef1b01505751ebf7af64736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000d2f00", - "0x33d4aa03df3f12c4f615b40676f67fdafecd3edb5a9c0ca2a47a923dae33a023": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x9fa2d8034dbcb437bee38d61fbd100910e1342ffc07f128aa1b8e6790b7f3f68": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x64494413541ff93b31aa309254e3fed72a7456e9845988b915b4c7a7ceba8814": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5", - "0x531a7c25761aa4b0f2310edca9bb25e1e3ceb49ad4b0422aec866b3ce7567c87": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x3412d5605ac6cd444957cedb533e5dacad6378b4bc819ebe3652188a665066d6": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5", - "0xedbedc78c4240c7613622a35de050b48bd6c6d9a31b3d485b68fbbed54a4802d": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0xdae2aa361dfd1ca020a396615627d436107c35eff9fe7738a3512819782d706a": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5", - "0x76616448da8d124a07383c26a6b2433b3259de946aa40f51524ec96ee05e871a": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0xc3ad33e20b0c56a223ad5104fff154aa010f8715b9c981fd38fdc60a4d1a52fc": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5" - } - }, - { - "accountName": "keyless Deployer", - "balance": "0", - "nonce": "1", - "address": "0x9d90066e7478496e2284E54c3548106bb4F90E50" - }, - { - "accountName": "deployer", - "balance": "0", - "nonce": "8", - "address": "0x4c1665d6651ecEfa59B9B3041951608468b18891" - } - ] - } -` diff --git a/config/network.go b/config/network.go index 57f1ac8488..ceb9a18e13 100644 --- a/config/network.go +++ b/config/network.go @@ -7,10 +7,10 @@ import ( "io" "os" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/urfave/cli/v2" ) @@ -31,8 +31,6 @@ type NetworkConfig struct { type network string -const mainnet network = "mainnet" -const testnet network = "testnet" const custom network = "custom" // GenesisFromJSON is the config file for network_custom @@ -65,10 +63,6 @@ type genesisAccountFromJSON struct { func (cfg *Config) loadNetworkConfig(ctx *cli.Context) { var networkJSON string switch ctx.String(FlagNetwork) { - case string(mainnet): - networkJSON = MainnetNetworkConfigJSON - case string(testnet): - networkJSON = TestnetNetworkConfigJSON case string(custom): var err error networkJSON, err = loadGenesisFileAsString(ctx) @@ -76,7 +70,7 @@ func (cfg *Config) loadNetworkConfig(ctx *cli.Context) { panic(err.Error()) } default: - log.Fatalf("unsupported --network value. Must be one of: [%s, %s, %s]", mainnet, testnet, custom) + log.Fatalf("unsupported --network value. Must be %s", custom) } config, err := loadGenesisFromJSONString(networkJSON) if err != nil { diff --git a/config/network_test.go b/config/network_test.go index 2f062654df..742244ace5 100644 --- a/config/network_test.go +++ b/config/network_test.go @@ -5,9 +5,9 @@ import ( "os" "testing" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" "github.com/urfave/cli/v2" @@ -27,9 +27,10 @@ func TestLoadCustomNetworkConfig(t *testing.T) { "genesisBlockNumber": 69, "l1Config" : { "chainId": 420, - "polygonZkEVMAddress": "0xc949254d682d8c9ad5682521675b8f43b102aec4", + "cdkValidiumAddress": "0xc949254d682d8c9ad5682521675b8f43b102aec4", "maticTokenAddress": "0xc949254d682d8c9ad5682521675b8f43b102aec4", - "polygonZkEVMGlobalExitRootAddress": "0xc949254d682d8c9ad5682521675b8f43b102aec4" + "polygonZkEVMGlobalExitRootAddress": "0xc949254d682d8c9ad5682521675b8f43b102aec4", + "cdkDataCommitteeContract": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" }, "genesis": [ { @@ -74,9 +75,10 @@ func TestLoadCustomNetworkConfig(t *testing.T) { L2BridgeAddr: common.HexToAddress("0x9d98deabc42dd696deb9e40b4f1cab7ddbf55988"), L1Config: etherman.L1Config{ L1ChainID: 420, - ZkEVMAddr: common.HexToAddress("0xc949254d682d8c9ad5682521675b8f43b102aec4"), + CDKValidiumAddr: common.HexToAddress("0xc949254d682d8c9ad5682521675b8f43b102aec4"), MaticAddr: common.HexToAddress("0xc949254d682d8c9ad5682521675b8f43b102aec4"), GlobalExitRootManagerAddr: common.HexToAddress("0xc949254d682d8c9ad5682521675b8f43b102aec4"), + DataCommitteeAddr: common.HexToAddress("0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6"), }, Genesis: state.Genesis{ Root: common.HexToHash("0xBEEF"), diff --git a/config/testnetgenesis.go b/config/testnetgenesis.go deleted file mode 100644 index 869850a10a..0000000000 --- a/config/testnetgenesis.go +++ /dev/null @@ -1,108 +0,0 @@ -package config - -// TestnetNetworkConfigJSON is the hardcoded network configuration to be used for the official mainnet setup -const TestnetNetworkConfigJSON = ` -{ - "l1Config" : { - "chainId": 5, - "polygonZkEVMAddress": "0xa997cfD539E703921fD1e3Cf25b4c241a27a4c7A", - "maticTokenAddress": "0x1319D23c2F7034F52Eb07399702B040bA278Ca49", - "polygonZkEVMGlobalExitRootAddress": "0x4d9427DCA0406358445bC0a8F88C26b704004f74" - }, - "root": "0x13a14c4a8288e782863d7ce916d224546c69dc428fbfa7115a0cc33a27a05b26", - "genesisBlockNumber": 8572998, - "genesis": [ - { - "contractName": "PolygonZkEVMDeployer", - "balance": "0", - "nonce": "4", - "address": "0x39877a0c3cd148476DaA2475c77c478C62eC7509", - "bytecode": "0x6080604052600436106100705760003560e01c8063715018a61161004e578063715018a6146100e65780638da5cb5b146100fb578063e11ae6cb14610126578063f2fde38b1461013957600080fd5b80632b79805a146100755780634a94d4871461008a5780636d07dbf81461009d575b600080fd5b610088610083366004610927565b610159565b005b6100886100983660046109c7565b6101cb565b3480156100a957600080fd5b506100bd6100b8366004610a1e565b61020d565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b50610088610220565b34801561010757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100bd565b610088610134366004610a40565b610234565b34801561014557600080fd5b50610088610154366004610a90565b61029b565b610161610357565b600061016e8585856103d8565b905061017a8183610537565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527fba82f25fed02cd2a23d9f5d11c2ef588d22af5437cbf23bfe61d87257c480e4c9060200160405180910390a15050505050565b6101d3610357565b6101de83838361057b565b506040517f25adb19089b6a549831a273acdf7908cff8b7ee5f551f8d1d37996cf01c5df5b90600090a1505050565b600061021983836105a9565b9392505050565b610228610357565b61023260006105b6565b565b61023c610357565b60006102498484846103d8565b60405173ffffffffffffffffffffffffffffffffffffffff821681529091507fba82f25fed02cd2a23d9f5d11c2ef588d22af5437cbf23bfe61d87257c480e4c9060200160405180910390a150505050565b6102a3610357565b73ffffffffffffffffffffffffffffffffffffffff811661034b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610354816105b6565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610342565b600083471015610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610342565b81516000036104af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610342565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff8116610219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610342565b6060610219838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525061062b565b60606105a1848484604051806060016040528060298152602001610b3d6029913961062b565b949350505050565b6000610219838330610744565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060824710156106bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610342565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516106e69190610acf565b60006040518083038185875af1925050503d8060008114610723576040519150601f19603f3d011682016040523d82523d6000602084013e610728565b606091505b50915091506107398783838761076e565b979650505050505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b606083156108045782516000036107fd5773ffffffffffffffffffffffffffffffffffffffff85163b6107fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610342565b50816105a1565b6105a183838151156108195781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103429190610aeb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261088d57600080fd5b813567ffffffffffffffff808211156108a8576108a861084d565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156108ee576108ee61084d565b8160405283815286602085880101111561090757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806080858703121561093d57600080fd5b8435935060208501359250604085013567ffffffffffffffff8082111561096357600080fd5b61096f8883890161087c565b9350606087013591508082111561098557600080fd5b506109928782880161087c565b91505092959194509250565b803573ffffffffffffffffffffffffffffffffffffffff811681146109c257600080fd5b919050565b6000806000606084860312156109dc57600080fd5b6109e58461099e565b9250602084013567ffffffffffffffff811115610a0157600080fd5b610a0d8682870161087c565b925050604084013590509250925092565b60008060408385031215610a3157600080fd5b50508035926020909101359150565b600080600060608486031215610a5557600080fd5b8335925060208401359150604084013567ffffffffffffffff811115610a7a57600080fd5b610a868682870161087c565b9150509250925092565b600060208284031215610aa257600080fd5b6102198261099e565b60005b83811015610ac6578181015183820152602001610aae565b50506000910152565b60008251610ae1818460208701610aab565b9190910192915050565b6020815260008251806020840152610b0a816040850160208701610aab565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a26469706673582212200b8e3cd6bd762444a7eeff86e1cfcd7e1ce9524b715dcb70b2a4c2b70fd5188464736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000a0b02b28920812324f1cc3255bd8840867d3f227" - } - }, - { - "contractName": "ProxyAdmin", - "balance": "0", - "nonce": "1", - "address": "0x40797c2f93298a44a893F43EdF1B33B63d7BA333", - "bytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461012b57806399a88ec41461013e578063f2fde38b1461015e578063f3b7dead1461017e57600080fd5b8063204e1c7a14610080578063715018a6146100c95780637eff275e146100e05780638da5cb5b14610100575b600080fd5b34801561008c57600080fd5b506100a061009b366004610608565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d557600080fd5b506100de610255565b005b3480156100ec57600080fd5b506100de6100fb36600461062c565b610269565b34801561010c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100a0565b6100de610139366004610694565b6102f7565b34801561014a57600080fd5b506100de61015936600461062c565b61038c565b34801561016a57600080fd5b506100de610179366004610608565b6103e8565b34801561018a57600080fd5b506100a0610199366004610608565b6104a4565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b50915091508161023957600080fd5b8080602001905181019061024d9190610788565b949350505050565b61025d6104f0565b6102676000610571565b565b6102716104f0565b6040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690638f283970906024015b600060405180830381600087803b1580156102db57600080fd5b505af11580156102ef573d6000803e3d6000fd5b505050505050565b6102ff6104f0565b6040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690634f1ef28690349061035590869086906004016107a5565b6000604051808303818588803b15801561036e57600080fd5b505af1158015610382573d6000803e3d6000fd5b5050505050505050565b6103946104f0565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690633659cfe6906024016102c1565b6103f06104f0565b73ffffffffffffffffffffffffffffffffffffffff8116610498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104a181610571565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b60005473ffffffffffffffffffffffffffffffffffffffff163314610267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161048f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811681146104a157600080fd5b60006020828403121561061a57600080fd5b8135610625816105e6565b9392505050565b6000806040838503121561063f57600080fd5b823561064a816105e6565b9150602083013561065a816105e6565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156106a957600080fd5b83356106b4816105e6565b925060208401356106c4816105e6565b9150604084013567ffffffffffffffff808211156106e157600080fd5b818601915086601f8301126106f557600080fd5b81358181111561070757610707610665565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561074d5761074d610665565b8160405282815289602084870101111561076657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561079a57600080fd5b8151610625816105e6565b73ffffffffffffffffffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b818110156107ef578581018301518582016060015282016107d3565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010192505050939250505056fea2646970667358221220babd4ff1f5daee002b96cc86d8bb6c2c2c210ae3132df5ea384713352f7f15fe64736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x00000000000000000000000002245d7b6cb0b6870d1e28ac877ee355b9588869" - } - }, - { - "contractName": "PolygonZkEVMBridge implementation", - "balance": "0", - "nonce": "1", - "address": "0x39e780D8800f7396e8B7530A8925B14025AedC77", - "bytecode": "0x6080604052600436106200019f5760003560e01c8063647c576c11620000e7578063be5831c71162000089578063dbc169761162000060578063dbc169761462000639578063ee25560b1462000651578063fb570834146200068257600080fd5b8063be5831c714620005ae578063cd58657914620005ea578063d02103ca146200060157600080fd5b80639e34070f11620000be5780639e34070f146200050a578063aaa13cc2146200054f578063bab161bf146200057457600080fd5b8063647c576c146200048657806379e2cf9714620004ab57806381b1c17414620004c357600080fd5b80632d2c9d94116200015157806334ac9cf2116200012857806334ac9cf2146200034b5780633ae05047146200037a5780633e197043146200039257600080fd5b80632d2c9d9414620002765780632dfdf0b5146200029b578063318aee3d14620002c257600080fd5b806322e95f2c116200018657806322e95f2c14620001ef578063240ff378146200023a5780632cffd02e146200025157600080fd5b806315064c9614620001a45780632072f6c514620001d5575b600080fd5b348015620001b157600080fd5b50606854620001c09060ff1681565b60405190151581526020015b60405180910390f35b348015620001e257600080fd5b50620001ed620006a7565b005b348015620001fc57600080fd5b50620002146200020e366004620032db565b62000705565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001620001cc565b620001ed6200024b36600462003372565b620007a8565b3480156200025e57600080fd5b50620001ed6200027036600462003409565b620009d0565b3480156200028357600080fd5b50620001ed6200029536600462003409565b62000f74565b348015620002a857600080fd5b50620002b360535481565b604051908152602001620001cc565b348015620002cf57600080fd5b5062000319620002e1366004620034ef565b606b6020526000908152604090205463ffffffff811690640100000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6040805163ffffffff909316835273ffffffffffffffffffffffffffffffffffffffff909116602083015201620001cc565b3480156200035857600080fd5b50606c54620002149073ffffffffffffffffffffffffffffffffffffffff1681565b3480156200038757600080fd5b50620002b362001178565b3480156200039f57600080fd5b50620002b3620003b136600462003526565b6040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b3480156200049357600080fd5b50620001ed620004a5366004620035b0565b6200125e565b348015620004b857600080fd5b50620001ed620014ad565b348015620004d057600080fd5b5062000214620004e236600462003600565b606a6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156200051757600080fd5b50620001c06200052936600462003600565b600881901c600090815260696020526040902054600160ff9092169190911b9081161490565b3480156200055c57600080fd5b50620002146200056e3660046200361a565b620014e7565b3480156200058157600080fd5b506068546200059890610100900463ffffffff1681565b60405163ffffffff9091168152602001620001cc565b348015620005bb57600080fd5b506068546200059890790100000000000000000000000000000000000000000000000000900463ffffffff1681565b620001ed620005fb366004620036ce565b620016d3565b3480156200060e57600080fd5b50606854620002149065010000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b3480156200064657600080fd5b50620001ed62001c37565b3480156200065e57600080fd5b50620002b36200067036600462003600565b60696020526000908152604090205481565b3480156200068f57600080fd5b50620001c0620006a136600462003770565b62001c93565b606c5473ffffffffffffffffffffffffffffffffffffffff163314620006f9576040517fe2e8106b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362001d7c565b565b6040805160e084901b7fffffffff0000000000000000000000000000000000000000000000000000000016602080830191909152606084901b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602483015282516018818403018152603890920183528151918101919091206000908152606a909152205473ffffffffffffffffffffffffffffffffffffffff165b92915050565b60685460ff1615620007e6576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff8681166101009092041614806200080c5750600263ffffffff861610155b1562000844576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b6001606860019054906101000a900463ffffffff163388883488886053546040516200089a9998979695949392919062003806565b60405180910390a1620009b8620009b26001606860019054906101000a900463ffffffff16338989348989604051620008d592919062003881565b60405180910390206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b62001e10565b8215620009c957620009c962001f27565b5050505050565b60685460ff161562000a0e576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000a258b8b8b8b8b8b8b8b8b8b8b600062001ffc565b73ffffffffffffffffffffffffffffffffffffffff861662000b01576040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff861690859060405162000a7a9190620038e6565b60006040518083038185875af1925050503d806000811462000ab9576040519150601f19603f3d011682016040523d82523d6000602084013e62000abe565b606091505b505090508062000afa576040517f6747a28800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5062000efc565b60685463ffffffff61010090910481169088160362000b435762000b3d73ffffffffffffffffffffffffffffffffffffffff87168585620021ed565b62000efc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b166024820152600090603801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152606a90935291205490915073ffffffffffffffffffffffffffffffffffffffff168062000e6e576000808062000c1886880188620039fb565b92509250925060008584848460405162000c329062003292565b62000c409392919062003abd565b8190604051809103906000f590508015801562000c61573d6000803e3d6000fd5b506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c81166004830152602482018c9052919250908216906340c10f1990604401600060405180830381600087803b15801562000cd757600080fd5b505af115801562000cec573d6000803e3d6000fd5b5050505080606a600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180604001604052808e63ffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff16815250606b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050507f490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a398d8d838b8b60405162000e5c95949392919062003afa565b60405180910390a15050505062000ef9565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018790528216906340c10f1990604401600060405180830381600087803b15801562000edf57600080fd5b505af115801562000ef4573d6000803e3d6000fd5b505050505b50505b6040805163ffffffff8c811682528916602082015273ffffffffffffffffffffffffffffffffffffffff88811682840152861660608201526080810185905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a15050505050505050505050565b60685460ff161562000fb2576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000fc98b8b8b8b8b8b8b8b8b8b8b600162001ffc565b60008473ffffffffffffffffffffffffffffffffffffffff1684888a868660405160240162000ffc949392919062003b42565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1806b5f200000000000000000000000000000000000000000000000000000000179052516200107f9190620038e6565b60006040518083038185875af1925050503d8060008114620010be576040519150601f19603f3d011682016040523d82523d6000602084013e620010c3565b606091505b5050905080620010ff576040517f37e391c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805163ffffffff8d811682528a16602082015273ffffffffffffffffffffffffffffffffffffffff89811682840152871660608201526080810186905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a1505050505050505050505050565b605354600090819081805b602081101562001255578083901c600116600103620011e65760338160208110620011b257620011b262003b8a565b0154604080516020810192909252810185905260600160405160208183030381529060405280519060200120935062001213565b60408051602081018690529081018390526060016040516020818303038152906040528051906020012093505b604080516020810184905290810183905260600160405160208183030381529060405280519060200120915080806200124c9062003be8565b91505062001183565b50919392505050565b600054610100900460ff16158080156200127f5750600054600160ff909116105b806200129b5750303b1580156200129b575060005460ff166001145b6200132d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156200138c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b606880547fffffffffffffff000000000000000000000000000000000000000000000000ff1661010063ffffffff8716027fffffffffffffff0000000000000000000000000000000000000000ffffffffff16176501000000000073ffffffffffffffffffffffffffffffffffffffff8681169190910291909117909155606c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001691841691909117905562001443620022c3565b8015620014a757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b605354606854790100000000000000000000000000000000000000000000000000900463ffffffff16101562000703576200070362001f27565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b1660248201526000908190603801604051602081830303815290604052805190602001209050600060ff60f81b3083604051806020016200157d9062003292565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f909101166040819052620015c8908d908d908d908d908d9060200162003c23565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262001606929160200162003c64565b604051602081830303815290604052805190602001206040516020016200168f94939291907fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101209a9950505050505050505050565b60685460ff161562001711576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200171b62002366565b60685463ffffffff888116610100909204161480620017415750600263ffffffff881610155b1562001779576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060608773ffffffffffffffffffffffffffffffffffffffff8816620017df57883414620017d5576040517fb89240f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000925062001ad9565b341562001818576040517f798ee6f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8089166000908152606b602090815260409182902082518084019093525463ffffffff811683526401000000009004909216918101829052901562001908576040517f9dc29fac000000000000000000000000000000000000000000000000000000008152336004820152602481018b905273ffffffffffffffffffffffffffffffffffffffff8a1690639dc29fac90604401600060405180830381600087803b158015620018db57600080fd5b505af1158015620018f0573d6000803e3d6000fd5b50505050806020015194508060000151935062001ad7565b85156200191d576200191d898b8989620023db565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8b16906370a0823190602401602060405180830381865afa1580156200198b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620019b1919062003c97565b9050620019d773ffffffffffffffffffffffffffffffffffffffff8b1633308e620028f9565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8c16906370a0823190602401602060405180830381865afa15801562001a45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a6b919062003c97565b905062001a79828262003cb1565b6068548c9850610100900463ffffffff169650935062001a998762002959565b62001aa48c62002a71565b62001aaf8d62002b7e565b60405160200162001ac39392919062003abd565b604051602081830303815290604052945050505b505b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b600084868e8e868860535460405162001b1b98979695949392919062003cc7565b60405180910390a162001c0f620009b2600085878f8f8789805190602001206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b861562001c205762001c2062001f27565b5050505062001c2e60018055565b50505050505050565b606c5473ffffffffffffffffffffffffffffffffffffffff16331462001c89576040517fe2e8106b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362002c80565b600084815b602081101562001d6e57600163ffffffff8616821c8116900362001d0a5785816020811062001ccb5762001ccb62003b8a565b60200201358260405160200162001cec929190918252602082015260400190565b60405160208183030381529060405280519060200120915062001d59565b8186826020811062001d205762001d2062003b8a565b602002013560405160200162001d40929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b8062001d658162003be8565b91505062001c98565b50821490505b949350505050565b60685460ff161562001dba576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b80600162001e216020600262003e79565b62001e2d919062003cb1565b6053541062001e68576040517fef5ccf6600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060536000815462001e7b9062003be8565b9182905550905060005b602081101562001f17578082901c60011660010362001ebd57826033826020811062001eb55762001eb562003b8a565b015550505050565b6033816020811062001ed35762001ed362003b8a565b01546040805160208101929092528101849052606001604051602081830303815290604052805190602001209250808062001f0e9062003be8565b91505062001e85565b5062001f2262003e87565b505050565b6053546068805463ffffffff909216790100000000000000000000000000000000000000000000000000027fffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179081905573ffffffffffffffffffffffffffffffffffffffff65010000000000909104166333d6247d62001fad62001178565b6040518263ffffffff1660e01b815260040162001fcc91815260200190565b600060405180830381600087803b15801562001fe757600080fd5b505af1158015620014a7573d6000803e3d6000fd5b6200200d8b63ffffffff1662002d10565b6068546040805160208082018e90528183018d9052825180830384018152606083019384905280519101207f257b363200000000000000000000000000000000000000000000000000000000909252606481019190915260009165010000000000900473ffffffffffffffffffffffffffffffffffffffff169063257b3632906084016020604051808303816000875af1158015620020b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620020d6919062003c97565b90508060000362002112576040517e2f6fad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff88811661010090920416146200215c576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606854600090610100900463ffffffff166200217a5750896200217d565b508a5b620021a66200219d848c8c8c8c8c8c8c604051620008d592919062003881565b8f8f8462001c93565b620021dd576040517fe0417cec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905262001f229084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915262002d75565b600054610100900460ff166200235c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6200070362002e88565b600260015403620023d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162001324565b6002600155565b6000620023ec600482848662003eb6565b620023f79162003ee2565b90507f2afa5331000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601620026765760008080808080806200245a896004818d62003eb6565b81019062002469919062003f2b565b96509650965096509650965096503373ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614620024dd576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff861630146200252d576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a851462002567576040517f03fffc4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff89811660248301528881166044830152606482018890526084820187905260ff861660a483015260c4820185905260e48083018590528351808403909101815261010490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd505accf000000000000000000000000000000000000000000000000000000001790529151918e1691620026229190620038e6565b6000604051808303816000865af19150503d806000811462002661576040519150601f19603f3d011682016040523d82523d6000602084013e62002666565b606091505b50505050505050505050620009c9565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f8fcbaf0c0000000000000000000000000000000000000000000000000000000014620026f2576040517fe282c0ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808080808080806200270a8a6004818e62003eb6565b81019062002719919062003f86565b975097509750975097509750975097503373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146200278f576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff87163014620027df576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8a811660248301528981166044830152606482018990526084820188905286151560a483015260ff861660c483015260e482018590526101048083018590528351808403909101815261012490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8fcbaf0c000000000000000000000000000000000000000000000000000000001790529151918f1691620028a39190620038e6565b6000604051808303816000865af19150503d8060008114620028e2576040519150601f19603f3d011682016040523d82523d6000602084013e620028e7565b606091505b50505050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052620014a79085907f23b872dd000000000000000000000000000000000000000000000000000000009060840162002240565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f06fdde03000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff861691620029dd9190620038e6565b600060405180830381855afa9150503d806000811462002a1a576040519150601f19603f3d011682016040523d82523d6000602084013e62002a1f565b606091505b50915091508162002a66576040518060400160405280600781526020017f4e4f5f4e414d450000000000000000000000000000000000000000000000000081525062001d74565b62001d748162002f21565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f95d89b41000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff86169162002af59190620038e6565b600060405180830381855afa9150503d806000811462002b32576040519150601f19603f3d011682016040523d82523d6000602084013e62002b37565b606091505b50915091508162002a66576040518060400160405280600981526020017f4e4f5f53594d424f4c000000000000000000000000000000000000000000000081525062001d74565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f313ce5670000000000000000000000000000000000000000000000000000000017905290516000918291829173ffffffffffffffffffffffffffffffffffffffff86169162002c019190620038e6565b600060405180830381855afa9150503d806000811462002c3e576040519150601f19603f3d011682016040523d82523d6000602084013e62002c43565b606091505b509150915081801562002c57575080516020145b62002c6457601262001d74565b8080602001905181019062001d74919062004012565b60018055565b60685460ff1662002cbd576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b600881901c60008181526069602052604081208054600160ff861690811b91821892839055929091908183169003620009c9576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600062002dd9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620031119092919063ffffffff16565b80519091501562001f22578080602001905181019062002dfa919062004032565b62001f22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162001324565b600054610100900460ff1662002c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6060604082511062002f435781806020019051810190620007a2919062004052565b8151602003620030d35760005b60208110801562002f9b575082818151811062002f715762002f7162003b8a565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b1562002fb6578062002fad8162003be8565b91505062002f50565b8060000362002ffa57505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e4700000000000000000000000000006020820152919050565b60008167ffffffffffffffff81111562003018576200301862003891565b6040519080825280601f01601f19166020018201604052801562003043576020820181803683370190505b50905060005b82811015620030cb5784818151811062003067576200306762003b8a565b602001015160f81c60f81b82828151811062003087576200308762003b8a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080620030c28162003be8565b91505062003049565b509392505050565b505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e470000000000000000000000000000602082015290565b919050565b606062001d748484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051620031489190620038e6565b60006040518083038185875af1925050503d806000811462003187576040519150601f19603f3d011682016040523d82523d6000602084013e6200318c565b606091505b50915091506200319f87838387620031aa565b979650505050505050565b60608315620032455782516000036200323d5773ffffffffffffffffffffffffffffffffffffffff85163b6200323d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162001324565b508162001d74565b62001d7483838151156200325c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620013249190620040d2565b611b6680620040e883390190565b803563ffffffff811681146200310c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114620032d857600080fd5b50565b60008060408385031215620032ef57600080fd5b620032fa83620032a0565b915060208301356200330c81620032b5565b809150509250929050565b8015158114620032d857600080fd5b60008083601f8401126200333957600080fd5b50813567ffffffffffffffff8111156200335257600080fd5b6020830191508360208285010111156200336b57600080fd5b9250929050565b6000806000806000608086880312156200338b57600080fd5b6200339686620032a0565b94506020860135620033a881620032b5565b93506040860135620033ba8162003317565b9250606086013567ffffffffffffffff811115620033d757600080fd5b620033e58882890162003326565b969995985093965092949392505050565b806104008101831015620007a257600080fd5b60008060008060008060008060008060006105208c8e0312156200342c57600080fd5b620034388d8d620033f6565b9a50620034496104008d01620032a0565b99506104208c013598506104408c013597506200346a6104608d01620032a0565b96506104808c01356200347d81620032b5565b95506200348e6104a08d01620032a0565b94506104c08c0135620034a181620032b5565b93506104e08c013592506105008c013567ffffffffffffffff811115620034c757600080fd5b620034d58e828f0162003326565b915080935050809150509295989b509295989b9093969950565b6000602082840312156200350257600080fd5b81356200350f81620032b5565b9392505050565b60ff81168114620032d857600080fd5b600080600080600080600060e0888a0312156200354257600080fd5b87356200354f8162003516565b96506200355f60208901620032a0565b955060408801356200357181620032b5565b94506200358160608901620032a0565b935060808801356200359381620032b5565b9699959850939692959460a0840135945060c09093013592915050565b600080600060608486031215620035c657600080fd5b620035d184620032a0565b92506020840135620035e381620032b5565b91506040840135620035f581620032b5565b809150509250925092565b6000602082840312156200361357600080fd5b5035919050565b600080600080600080600060a0888a0312156200363657600080fd5b6200364188620032a0565b965060208801356200365381620032b5565b9550604088013567ffffffffffffffff808211156200367157600080fd5b6200367f8b838c0162003326565b909750955060608a01359150808211156200369957600080fd5b50620036a88a828b0162003326565b9094509250506080880135620036be8162003516565b8091505092959891949750929550565b600080600080600080600060c0888a031215620036ea57600080fd5b620036f588620032a0565b965060208801356200370781620032b5565b95506040880135945060608801356200372081620032b5565b93506080880135620037328162003317565b925060a088013567ffffffffffffffff8111156200374f57600080fd5b6200375d8a828b0162003326565b989b979a50959850939692959293505050565b60008060008061046085870312156200378857600080fd5b843593506200379b8660208701620033f6565b9250620037ac6104208601620032a0565b939692955092936104400135925050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600061010060ff8c16835263ffffffff808c16602085015273ffffffffffffffffffffffffffffffffffffffff808c166040860152818b166060860152808a166080860152508760a08501528160c0850152620038678285018789620037bd565b925080851660e085015250509a9950505050505050505050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60005b83811015620038dd578181015183820152602001620038c3565b50506000910152565b60008251620038fa818460208701620038c0565b9190910192915050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156200394e576200394e62003891565b604052919050565b600067ffffffffffffffff82111562003973576200397362003891565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112620039b157600080fd5b8135620039c8620039c28262003956565b62003904565b818152846020838601011115620039de57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121562003a1157600080fd5b833567ffffffffffffffff8082111562003a2a57600080fd5b62003a38878388016200399f565b9450602086013591508082111562003a4f57600080fd5b5062003a5e868287016200399f565b9250506040840135620035f58162003516565b6000815180845262003a8b816020860160208601620038c0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60608152600062003ad2606083018662003a71565b828103602084015262003ae6818662003a71565b91505060ff83166040830152949350505050565b63ffffffff86168152600073ffffffffffffffffffffffffffffffffffffffff8087166020840152808616604084015250608060608301526200319f608083018486620037bd565b73ffffffffffffffffffffffffffffffffffffffff8516815263ffffffff8416602082015260606040820152600062003b80606083018486620037bd565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362003c1c5762003c1c62003bb9565b5060010190565b60608152600062003c39606083018789620037bd565b828103602084015262003c4e818688620037bd565b91505060ff831660408301529695505050505050565b6000835162003c78818460208801620038c0565b83519083019062003c8e818360208801620038c0565b01949350505050565b60006020828403121562003caa57600080fd5b5051919050565b81810381811115620007a257620007a262003bb9565b600061010060ff8b16835263ffffffff808b16602085015273ffffffffffffffffffffffffffffffffffffffff808b166040860152818a1660608601528089166080860152508660a08501528160c085015262003d278285018762003a71565b925080851660e085015250509998505050505050505050565b600181815b8085111562003d9f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003d835762003d8362003bb9565b8085161562003d9157918102915b93841c939080029062003d45565b509250929050565b60008262003db857506001620007a2565b8162003dc757506000620007a2565b816001811462003de0576002811462003deb5762003e0b565b6001915050620007a2565b60ff84111562003dff5762003dff62003bb9565b50506001821b620007a2565b5060208310610133831016604e8410600b841016171562003e30575081810a620007a2565b62003e3c838362003d40565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003e715762003e7162003bb9565b029392505050565b60006200350f838362003da7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000808585111562003ec757600080fd5b8386111562003ed557600080fd5b5050820193919092039150565b7fffffffff00000000000000000000000000000000000000000000000000000000813581811691600485101562003f235780818660040360031b1b83161692505b505092915050565b600080600080600080600060e0888a03121562003f4757600080fd5b873562003f5481620032b5565b9650602088013562003f6681620032b5565b955060408801359450606088013593506080880135620035938162003516565b600080600080600080600080610100898b03121562003fa457600080fd5b883562003fb181620032b5565b9750602089013562003fc381620032b5565b96506040890135955060608901359450608089013562003fe38162003317565b935060a089013562003ff58162003516565b979a969950949793969295929450505060c08201359160e0013590565b6000602082840312156200402557600080fd5b81516200350f8162003516565b6000602082840312156200404557600080fd5b81516200350f8162003317565b6000602082840312156200406557600080fd5b815167ffffffffffffffff8111156200407d57600080fd5b8201601f810184136200408f57600080fd5b8051620040a0620039c28262003956565b818152856020838501011115620040b657600080fd5b620040c9826020830160208601620038c0565b95945050505050565b6020815260006200350f602083018462003a7156fe6101006040523480156200001257600080fd5b5060405162001b6638038062001b6683398101604081905262000035916200028d565b82826003620000458382620003a1565b506004620000548282620003a1565b50503360c0525060ff811660e052466080819052620000739062000080565b60a052506200046d915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620000ad6200012e565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6060600380546200013f9062000312565b80601f01602080910402602001604051908101604052809291908181526020018280546200016d9062000312565b8015620001be5780601f106200019257610100808354040283529160200191620001be565b820191906000526020600020905b815481529060010190602001808311620001a057829003601f168201915b5050505050905090565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f057600080fd5b81516001600160401b03808211156200020d576200020d620001c8565b604051601f8301601f19908116603f01168101908282118183101715620002385762000238620001c8565b816040528381526020925086838588010111156200025557600080fd5b600091505b838210156200027957858201830151818301840152908201906200025a565b600093810190920192909252949350505050565b600080600060608486031215620002a357600080fd5b83516001600160401b0380821115620002bb57600080fd5b620002c987838801620001de565b94506020860151915080821115620002e057600080fd5b50620002ef86828701620001de565b925050604084015160ff811681146200030757600080fd5b809150509250925092565b600181811c908216806200032757607f821691505b6020821081036200034857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039c57600081815260208120601f850160051c81016020861015620003775750805b601f850160051c820191505b81811015620003985782815560010162000383565b5050505b505050565b81516001600160401b03811115620003bd57620003bd620001c8565b620003d581620003ce845462000312565b846200034e565b602080601f8311600181146200040d5760008415620003f45750858301515b600019600386901b1c1916600185901b17855562000398565b600085815260208120601f198616915b828110156200043e578886015182559484019460019091019084016200041d565b50858210156200045d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516116aa620004bc6000396000610237015260008181610307015281816105c001526106a70152600061053a015260008181610379015261050401526116aa6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063a457c2d71161008c578063d505accf11610066578063d505accf1461039b578063dd62ed3e146103ae578063ffa1ad74146103f457600080fd5b8063a457c2d71461034e578063a9059cbb14610361578063cd0d00961461037457600080fd5b806395d89b41116100bd57806395d89b41146102e75780639dc29fac146102ef578063a3c573eb1461030257600080fd5b806370a08231146102915780637ecebe00146102c757600080fd5b806330adf81f1161012f5780633644e515116101145780633644e51514610261578063395093511461026957806340c10f191461027c57600080fd5b806330adf81f14610209578063313ce5671461023057600080fd5b806318160ddd1161016057806318160ddd146101bd57806320606b70146101cf57806323b872dd146101f657600080fd5b806306fdde031461017c578063095ea7b31461019a575b600080fd5b610184610430565b60405161019191906113e4565b60405180910390f35b6101ad6101a8366004611479565b6104c2565b6040519015158152602001610191565b6002545b604051908152602001610191565b6101c17f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6101ad6102043660046114a3565b6104dc565b6101c17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610191565b6101c1610500565b6101ad610277366004611479565b61055c565b61028f61028a366004611479565b6105a8565b005b6101c161029f3660046114df565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101c16102d53660046114df565b60056020526000908152604090205481565b610184610680565b61028f6102fd366004611479565b61068f565b6103297f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610191565b6101ad61035c366004611479565b61075e565b6101ad61036f366004611479565b61082f565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61028f6103a9366004611501565b61083d565b6101c16103bc366004611574565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101846040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b60606003805461043f906115a7565b80601f016020809104026020016040519081016040528092919081815260200182805461046b906115a7565b80156104b85780601f1061048d576101008083540402835291602001916104b8565b820191906000526020600020905b81548152906001019060200180831161049b57829003601f168201915b5050505050905090565b6000336104d0818585610b73565b60019150505b92915050565b6000336104ea858285610d27565b6104f5858585610dfe565b506001949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000004614610537576105324661106d565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104d090829086906105a3908790611629565b610b73565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610672576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d4272696467650000000000000000000000000000000060648201526084015b60405180910390fd5b61067c8282611135565b5050565b60606004805461043f906115a7565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d427269646765000000000000000000000000000000006064820152608401610669565b61067c8282611228565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610669565b6104f58286868403610b73565b6000336104d0818585610dfe565b834211156108cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f546f6b656e577261707065643a3a7065726d69743a204578706972656420706560448201527f726d6974000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260056020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a9190866109268361163c565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610991610500565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019190915260428101839052606201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff89169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa158015610a55573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590610ad057508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f546f6b656e577261707065643a3a7065726d69743a20496e76616c696420736960448201527f676e6174757265000000000000000000000000000000000000000000000000006064820152608401610669565b610b678a8a8a610b73565b50505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8316610c15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610df85781811015610deb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610669565b610df88484848403610b73565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610ea1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610f44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610df8565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611098610430565b8051602091820120604080518082018252600181527f310000000000000000000000000000000000000000000000000000000000000090840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b73ffffffffffffffffffffffffffffffffffffffff82166111b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610669565b80600260008282546111c49190611629565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff82166112cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205481811015611381576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610d1a565b600060208083528351808285015260005b81811015611411578581018301518582016040015282016113f5565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461147457600080fd5b919050565b6000806040838503121561148c57600080fd5b61149583611450565b946020939093013593505050565b6000806000606084860312156114b857600080fd5b6114c184611450565b92506114cf60208501611450565b9150604084013590509250925092565b6000602082840312156114f157600080fd5b6114fa82611450565b9392505050565b600080600080600080600060e0888a03121561151c57600080fd5b61152588611450565b965061153360208901611450565b95506040880135945060608801359350608088013560ff8116811461155757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561158757600080fd5b61159083611450565b915061159e60208401611450565b90509250929050565b600181811c908216806115bb57607f821691505b6020821081036115f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156104d6576104d66115fa565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361166d5761166d6115fa565b506001019056fea26469706673582212208d88fee561cff7120d381c345cfc534cef8229a272dc5809d4bbb685ad67141164736f6c63430008110033a2646970667358221220addfd62f466d34ee002afbb4ae37b6be56ad421fe773f800badeb4ce1025089864736f6c63430008110033" - }, - { - "contractName": "PolygonZkEVMBridge proxy", - "balance": "200000000000000000000000000", - "nonce": "1", - "address": "0xF6BEEeBB578e214CA9E23B0e9683454Ff88Ed2A7", - "bytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461088b565b610135565b61006b6100a33660046108a6565b61017f565b3480156100b457600080fd5b506100bd6101f3565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461088b565b610231565b34801561011257600080fd5b506100bd61025e565b6101236102d4565b61013361012e6103ab565b6103b5565b565b61013d6103d9565b73ffffffffffffffffffffffffffffffffffffffff1633036101775761017481604051806020016040528060008152506000610419565b50565b61017461011b565b6101876103d9565b73ffffffffffffffffffffffffffffffffffffffff1633036101eb576101e68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610419915050565b505050565b6101e661011b565b60006101fd6103d9565b73ffffffffffffffffffffffffffffffffffffffff163303610226576102216103ab565b905090565b61022e61011b565b90565b6102396103d9565b73ffffffffffffffffffffffffffffffffffffffff1633036101775761017481610444565b60006102686103d9565b73ffffffffffffffffffffffffffffffffffffffff163303610226576102216103d9565b60606102b183836040518060600160405280602781526020016109bb602791396104a5565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6102dc6103d9565b73ffffffffffffffffffffffffffffffffffffffff163303610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b600061022161052a565b3660008037600080366000845af43d6000803e8080156103d4573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b61042283610552565b60008251118061042f5750805b156101e65761043e838361028c565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61046d6103d9565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a16101748161059f565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516104cf919061094d565b600060405180830381855af49150503d806000811461050a576040519150601f19603f3d011682016040523d82523d6000602084013e61050f565b606091505b5091509150610520868383876106ab565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6103fd565b61055b81610753565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff8116610642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103a2565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b6060831561074157825160000361073a5773ffffffffffffffffffffffffffffffffffffffff85163b61073a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103a2565b508161074b565b61074b838361081e565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff81163b6107f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103a2565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610665565b81511561082e5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a29190610969565b803573ffffffffffffffffffffffffffffffffffffffff8116811461088657600080fd5b919050565b60006020828403121561089d57600080fd5b6102b182610862565b6000806000604084860312156108bb57600080fd5b6108c484610862565b9250602084013567ffffffffffffffff808211156108e157600080fd5b818601915086601f8301126108f557600080fd5b81358181111561090457600080fd5b87602082850101111561091657600080fd5b6020830194508093505050509250925092565b60005b8381101561094457818101518382015260200161092c565b50506000910152565b6000825161095f818460208701610929565b9190910192915050565b6020815260008251806020840152610988816040850160208701610929565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a1af0d6cb4f1e31496a4c5c1448913bce4bd6ad3a39e47c6f7190c114d6f9bf464736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000068": "0x00000000000000a40d5f56745a118d0906a34e69aec8c0db1cb8fa0000000100", - "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000040797c2f93298a44a893f43edf1b33b63d7ba333", - "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x00000000000000000000000039e780d8800f7396e8b7530a8925b14025aedc77" - } - }, - { - "contractName": "PolygonZkEVMGlobalExitRootL2 implementation", - "balance": "0", - "nonce": "1", - "address": "0x77Fc57b154fCF8320Df2C2e6C044AA50141c023b", - "bytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806301fd904414610051578063257b36321461006d57806333d6247d1461008d578063a3c573eb146100a2575b600080fd5b61005a60015481565b6040519081526020015b60405180910390f35b61005a61007b366004610162565b60006020819052908152604090205481565b6100a061009b366004610162565b6100ee565b005b6100c97f000000000000000000000000f6beeebb578e214ca9e23b0e9683454ff88ed2a781565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610064565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f6beeebb578e214ca9e23b0e9683454ff88ed2a7161461015d576040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600155565b60006020828403121561017457600080fd5b503591905056fea2646970667358221220a187fc278346c1b61c449ea3641002b6eac2bda3351a122a12c35099f933696864736f6c63430008110033" - }, - { - "contractName": "PolygonZkEVMGlobalExitRootL2 proxy", - "balance": "0", - "nonce": "1", - "address": "0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa", - "bytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106ca565b610118565b61005b6100933660046106e5565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106ca565b61020b565b3480156100f557600080fd5b506100ad610235565b610106610292565b610116610111610331565b61033b565b565b61012061035f565b6001600160a01b0316336001600160a01b031614156101575761015481604051806020016040528060008152506000610392565b50565b6101546100fe565b61016761035f565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610392915050565b505050565b6101c36100fe565b60006101da61035f565b6001600160a01b0316336001600160a01b03161415610200576101fb610331565b905090565b6102086100fe565b90565b61021361035f565b6001600160a01b0316336001600160a01b0316141561015757610154816103f1565b600061023f61035f565b6001600160a01b0316336001600160a01b03161415610200576101fb61035f565b606061028583836040518060600160405280602781526020016107e460279139610445565b9392505050565b3b151590565b61029a61035f565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb610519565b3660008037600080366000845af43d6000803e80801561035a573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61039b83610541565b6040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a26000825111806103dc5750805b156101c3576103eb8383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61041a61035f565b604080516001600160a01b03928316815291841660208301520160405180910390a1610154816105e9565b6060833b6104a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610328565b600080856001600160a01b0316856040516104bf9190610794565b600060405180830381855af49150503d80600081146104fa576040519150601f19603f3d011682016040523d82523d6000602084013e6104ff565b606091505b509150915061050f828286610675565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610383565b803b6105a55760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610328565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b03811661064e5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610328565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036105c8565b60608315610684575081610285565b8251156106945782518084602001fd5b8160405162461bcd60e51b815260040161032891906107b0565b80356001600160a01b03811681146106c557600080fd5b919050565b6000602082840312156106dc57600080fd5b610285826106ae565b6000806000604084860312156106fa57600080fd5b610703846106ae565b9250602084013567ffffffffffffffff8082111561072057600080fd5b818601915086601f83011261073457600080fd5b81358181111561074357600080fd5b87602082850101111561075557600080fd5b6020830194508093505050509250925092565b60005b8381101561078357818101518382015260200161076b565b838111156103eb5750506000910152565b600082516107a6818460208701610768565b9190910192915050565b60208152600082518060208401526107cf816040850160208701610768565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204675187caf3a43285d9a2c1844a981e977bd52a85ff073e7fc649f73847d70a464736f6c63430008090033", - "storage": { - "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000040797c2f93298a44a893f43edf1b33b63d7ba333", - "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x00000000000000000000000077fc57b154fcf8320df2c2e6c044aa50141c023b" - } - }, - { - "contractName": "PolygonZkEVMTimelock", - "balance": "0", - "nonce": "1", - "address": "0x02245d7B6CB0b6870d1e28AC877EE355b9588869", - "bytecode": "0x6080604052600436106101c65760003560e01c806364d62353116100f7578063b1c5f42711610095578063d547741f11610064578063d547741f14610661578063e38335e514610681578063f23a6e6114610694578063f27a0c92146106d957600080fd5b8063b1c5f427146105af578063bc197c81146105cf578063c4d252f514610614578063d45c44351461063457600080fd5b80638f61f4f5116100d15780638f61f4f5146104e157806391d1485414610515578063a217fddf14610566578063b08e51c01461057b57600080fd5b806364d62353146104815780638065657f146104a15780638f2a0bb0146104c157600080fd5b8063248a9ca31161016457806331d507501161013e57806331d50750146103c857806336568abe146103e85780633a6aae7214610408578063584b153e1461046157600080fd5b8063248a9ca3146103475780632ab0f529146103775780632f2ff15d146103a857600080fd5b80630d3cf6fc116101a05780630d3cf6fc1461026b578063134008d31461029f57806313bc9f20146102b2578063150b7a02146102d257600080fd5b806301d5062a146101d257806301ffc9a7146101f457806307bd02651461022957600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004611c12565b6106ee565b005b34801561020057600080fd5b5061021461020f366004611c87565b610783565b60405190151581526020015b60405180910390f35b34801561023557600080fd5b5061025d7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610220565b34801561027757600080fd5b5061025d7f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101f26102ad366004611cc9565b6107df565b3480156102be57600080fd5b506102146102cd366004611d35565b6108d7565b3480156102de57600080fd5b506103166102ed366004611e5a565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610220565b34801561035357600080fd5b5061025d610362366004611d35565b60009081526020819052604090206001015490565b34801561038357600080fd5b50610214610392366004611d35565b6000908152600160208190526040909120541490565b3480156103b457600080fd5b506101f26103c3366004611ec2565b6108fd565b3480156103d457600080fd5b506102146103e3366004611d35565b610927565b3480156103f457600080fd5b506101f2610403366004611ec2565b610940565b34801561041457600080fd5b5061043c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610220565b34801561046d57600080fd5b5061021461047c366004611d35565b6109f8565b34801561048d57600080fd5b506101f261049c366004611d35565b610a0e565b3480156104ad57600080fd5b5061025d6104bc366004611cc9565b610ade565b3480156104cd57600080fd5b506101f26104dc366004611f33565b610b1d565b3480156104ed57600080fd5b5061025d7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561052157600080fd5b50610214610530366004611ec2565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b34801561057257600080fd5b5061025d600081565b34801561058757600080fd5b5061025d7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156105bb57600080fd5b5061025d6105ca366004611fe5565b610d4f565b3480156105db57600080fd5b506103166105ea36600461210e565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561062057600080fd5b506101f261062f366004611d35565b610d94565b34801561064057600080fd5b5061025d61064f366004611d35565b60009081526001602052604090205490565b34801561066d57600080fd5b506101f261067c366004611ec2565b610e8f565b6101f261068f366004611fe5565b610eb4565b3480156106a057600080fd5b506103166106af3660046121b8565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b3480156106e557600080fd5b5061025d611161565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161071881611204565b6000610728898989898989610ade565b90506107348184611211565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161077096959493929190612266565b60405180910390a3505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e00000000000000000000000000000000000000000000000000000000014806107d957506107d98261135e565b92915050565b600080527fdae2aa361dfd1ca020a396615627d436107c35eff9fe7738a3512819782d70696020527f5ba6852781629bcdcd4bdaa6de76d786f1c64b16acdac474e55bebc0ea157951547fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e639060ff1661085c5761085c81336113f5565b600061086c888888888888610ade565b905061087881856114ad565b610884888888886115ea565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516108bc94939291906122b1565b60405180910390a36108cd816116ee565b5050505050505050565b6000818152600160205260408120546001811180156108f65750428111155b9392505050565b60008281526020819052604090206001015461091881611204565b6109228383611797565b505050565b60008181526001602052604081205481905b1192915050565b73ffffffffffffffffffffffffffffffffffffffff811633146109ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6109f48282611887565b5050565b6000818152600160208190526040822054610939565b333014610a9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201527f62652074696d656c6f636b00000000000000000000000000000000000000000060648201526084016109e1565b60025460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1600255565b6000868686868686604051602001610afb96959493929190612266565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1610b4781611204565b888714610bd6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b888514610c65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b6000610c778b8b8b8b8b8b8b8b610d4f565b9050610c838184611211565b60005b8a811015610d415780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610cc357610cc36122f1565b9050602002016020810190610cd89190612320565b8d8d86818110610cea57610cea6122f1565b905060200201358c8c87818110610d0357610d036122f1565b9050602002810190610d15919061233b565b8c8b604051610d2996959493929190612266565b60405180910390a3610d3a816123cf565b9050610c86565b505050505050505050505050565b60008888888888888888604051602001610d709897969594939291906124b7565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610dbe81611204565b610dc7826109f8565b610e53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20636160448201527f6e6e6f742062652063616e63656c6c656400000000000000000000000000000060648201526084016109e1565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610eaa81611204565b6109228383611887565b600080527fdae2aa361dfd1ca020a396615627d436107c35eff9fe7738a3512819782d70696020527f5ba6852781629bcdcd4bdaa6de76d786f1c64b16acdac474e55bebc0ea157951547fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e639060ff16610f3157610f3181336113f5565b878614610fc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b87841461104f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160448201527f746368000000000000000000000000000000000000000000000000000000000060648201526084016109e1565b60006110618a8a8a8a8a8a8a8a610d4f565b905061106d81856114ad565b60005b8981101561114b5760008b8b8381811061108c5761108c6122f1565b90506020020160208101906110a19190612320565b905060008a8a848181106110b7576110b76122f1565b9050602002013590503660008a8a868181106110d5576110d56122f1565b90506020028101906110e7919061233b565b915091506110f7848484846115ea565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588686868660405161112e94939291906122b1565b60405180910390a35050505080611144906123cf565b9050611070565b50611155816116ee565b50505050505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315064c966040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f2919061257e565b156111fd5750600090565b5060025490565b61120e81336113f5565b50565b61121a82610927565b156112a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201527f7265616479207363686564756c6564000000000000000000000000000000000060648201526084016109e1565b6112af611161565b81101561133e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e7460448201527f2064656c6179000000000000000000000000000000000000000000000000000060648201526084016109e1565b61134881426125a0565b6000928352600160205260409092209190915550565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806107d957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107d9565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109f4576114338161193e565b61143e83602061195d565b60405160200161144f9291906125d7565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526109e191600401612658565b6114b6826108d7565b611542576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20697360448201527f206e6f742072656164790000000000000000000000000000000000000000000060648201526084016109e1565b80158061155e5750600081815260016020819052604090912054145b6109f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e67206465706560448201527f6e64656e6379000000000000000000000000000000000000000000000000000060648201526084016109e1565b60008473ffffffffffffffffffffffffffffffffffffffff168484846040516116149291906126a9565b60006040518083038185875af1925050503d8060008114611651576040519150601f19603f3d011682016040523d82523d6000602084013e611656565b606091505b50509050806116e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e67207460448201527f72616e73616374696f6e2072657665727465640000000000000000000000000060648201526084016109e1565b5050505050565b6116f7816108d7565b611783576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20697360448201527f206e6f742072656164790000000000000000000000000000000000000000000060648201526084016109e1565b600090815260016020819052604090912055565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109f45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556118293390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156109f45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606107d973ffffffffffffffffffffffffffffffffffffffff831660145b6060600061196c8360026126b9565b6119779060026125a0565b67ffffffffffffffff81111561198f5761198f611d4e565b6040519080825280601f01601f1916602001820160405280156119b9576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106119f0576119f06122f1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611a5357611a536122f1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611a8f8460026126b9565b611a9a9060016125a0565b90505b6001811115611b37577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611adb57611adb6122f1565b1a60f81b828281518110611af157611af16122f1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611b30816126d0565b9050611a9d565b5083156108f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109e1565b803573ffffffffffffffffffffffffffffffffffffffff81168114611bc457600080fd5b919050565b60008083601f840112611bdb57600080fd5b50813567ffffffffffffffff811115611bf357600080fd5b602083019150836020828501011115611c0b57600080fd5b9250929050565b600080600080600080600060c0888a031215611c2d57600080fd5b611c3688611ba0565b965060208801359550604088013567ffffffffffffffff811115611c5957600080fd5b611c658a828b01611bc9565b989b979a50986060810135976080820135975060a09091013595509350505050565b600060208284031215611c9957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146108f657600080fd5b60008060008060008060a08789031215611ce257600080fd5b611ceb87611ba0565b955060208701359450604087013567ffffffffffffffff811115611d0e57600080fd5b611d1a89828a01611bc9565b979a9699509760608101359660809091013595509350505050565b600060208284031215611d4757600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611dc457611dc4611d4e565b604052919050565b600082601f830112611ddd57600080fd5b813567ffffffffffffffff811115611df757611df7611d4e565b611e2860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611d7d565b818152846020838601011115611e3d57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611e7057600080fd5b611e7985611ba0565b9350611e8760208601611ba0565b925060408501359150606085013567ffffffffffffffff811115611eaa57600080fd5b611eb687828801611dcc565b91505092959194509250565b60008060408385031215611ed557600080fd5b82359150611ee560208401611ba0565b90509250929050565b60008083601f840112611f0057600080fd5b50813567ffffffffffffffff811115611f1857600080fd5b6020830191508360208260051b8501011115611c0b57600080fd5b600080600080600080600080600060c08a8c031215611f5157600080fd5b893567ffffffffffffffff80821115611f6957600080fd5b611f758d838e01611eee565b909b50995060208c0135915080821115611f8e57600080fd5b611f9a8d838e01611eee565b909950975060408c0135915080821115611fb357600080fd5b50611fc08c828d01611eee565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561200157600080fd5b883567ffffffffffffffff8082111561201957600080fd5b6120258c838d01611eee565b909a50985060208b013591508082111561203e57600080fd5b61204a8c838d01611eee565b909850965060408b013591508082111561206357600080fd5b506120708b828c01611eee565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261209f57600080fd5b8135602067ffffffffffffffff8211156120bb576120bb611d4e565b8160051b6120ca828201611d7d565b92835284810182019282810190878511156120e457600080fd5b83870192505b84831015612103578235825291830191908301906120ea565b979650505050505050565b600080600080600060a0868803121561212657600080fd5b61212f86611ba0565b945061213d60208701611ba0565b9350604086013567ffffffffffffffff8082111561215a57600080fd5b61216689838a0161208e565b9450606088013591508082111561217c57600080fd5b61218889838a0161208e565b9350608088013591508082111561219e57600080fd5b506121ab88828901611dcc565b9150509295509295909350565b600080600080600060a086880312156121d057600080fd5b6121d986611ba0565b94506121e760208701611ba0565b93506040860135925060608601359150608086013567ffffffffffffffff81111561221157600080fd5b6121ab88828901611dcc565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a06040820152600061229c60a08301868861221d565b60608301949094525060800152949350505050565b73ffffffffffffffffffffffffffffffffffffffff851681528360208201526060604082015260006122e760608301848661221d565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561233257600080fd5b6108f682611ba0565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261237057600080fd5b83018035915067ffffffffffffffff82111561238b57600080fd5b602001915036819003821315611c0b57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612400576124006123a0565b5060010190565b81835260006020808501808196508560051b810191508460005b878110156124aa57828403895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe188360301811261246057600080fd5b8701858101903567ffffffffffffffff81111561247c57600080fd5b80360382131561248b57600080fd5b61249686828461221d565b9a87019a9550505090840190600101612421565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b8110156125055773ffffffffffffffffffffffffffffffffffffffff6124f084611ba0565b168252602092830192909101906001016124ca565b5083810360208501528881527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89111561253e57600080fd5b8860051b9150818a602083013701828103602090810160408501526125669082018789612407565b60608401959095525050608001529695505050505050565b60006020828403121561259057600080fd5b815180151581146108f657600080fd5b808201808211156107d9576107d96123a0565b60005b838110156125ce5781810151838201526020016125b6565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161260f8160178501602088016125b3565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161264c8160288401602088016125b3565b01602801949350505050565b60208152600082518060208401526126778160408501602087016125b3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b8183823760009101908152919050565b80820281158282048414176107d9576107d96123a0565b6000816126df576126df6123a0565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea2646970667358221220288c3dd40a2ba96edf066502722584177809ebdb47c0cf9ee8df6f07954c373064736f6c63430008110033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000015180", - "0xbdd73c6ebfb442c137537be0985acf11af8e6133078bc51ef9094071cb0ca475": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x92b79801e6a3d148a516c908cc0bbad93771fa74468b7757a14aa55532d092de": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x64494413541ff93b31aa309254e3fed72a7456e9845988b915b4c7a7ceba8814": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5", - "0x43e090632490f7d46c400129311fff008a7688bb3d4aebdf80607456b452cf04": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x3412d5605ac6cd444957cedb533e5dacad6378b4bc819ebe3652188a665066d6": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5", - "0x5af21cf0316499c6925cf9be0331b8bd150a1fa4c19d24a043b45f0cf15357c3": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0xdae2aa361dfd1ca020a396615627d436107c35eff9fe7738a3512819782d706a": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5", - "0xaf021eeb38644155cd697b3ce0ec4fdac818d29c448a9f9d9bafc293723c6cd8": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0xc3ad33e20b0c56a223ad5104fff154aa010f8715b9c981fd38fdc60a4d1a52fc": "0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5" - } - }, - { - "accountName": "keyless Deployer", - "balance": "0", - "nonce": "1", - "address": "0xB83a574B3966F7dc1d38d162FA154F2A57D608Bb" - }, - { - "accountName": "deployer", - "balance": "0", - "nonce": "8", - "address": "0xA0B02B28920812324f1cC3255bd8840867d3f227" - } - ] - } - -` diff --git a/db/db.go b/db/db.go index 1b1e1d3f7a..5596dc046d 100644 --- a/db/db.go +++ b/db/db.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/gobuffalo/packr/v2" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/pgxpool" diff --git a/db/logger.go b/db/logger.go index 06177005ae..a589c1352e 100644 --- a/db/logger.go +++ b/db/logger.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/jackc/pgx/v4" ) diff --git a/db/migrations/pool/supernets-0001.sql b/db/migrations/pool/supernets-0001.sql new file mode 100644 index 0000000000..ed8ca600f2 --- /dev/null +++ b/db/migrations/pool/supernets-0001.sql @@ -0,0 +1,20 @@ +-- +migrate Down +DROP TABLE IF EXISTS pool.acl CASCADE; +DROP TABLE IF EXISTS pool.policy CASCADE; + +-- +migrate Up +CREATE TABLE pool.policy +( + name VARCHAR PRIMARY KEY, + allow BOOLEAN NOT NULL DEFAULT false +); + +INSERT INTO pool.policy (name, allow) VALUES ('send_tx', false); +INSERT INTO pool.policy (name, allow) VALUES ('deploy', false); + +CREATE TABLE pool.acl +( + address VARCHAR, + policy VARCHAR, + PRIMARY KEY (address, policy) +); diff --git a/db/migrations/state/utils_test.go b/db/migrations/state/utils_test.go index 4284614d5e..884948e8c3 100644 --- a/db/migrations/state/utils_test.go +++ b/db/migrations/state/utils_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" "github.com/gobuffalo/packr/v2" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/stdlib" diff --git a/docker-compose.yml b/docker-compose.yml index 0755564b29..9af35920dc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -107,7 +107,7 @@ services: zkevm-prover: container_name: zkevm-prover restart: unless-stopped - image: hermeznetwork/zkevm-prover:v2.0.1 + image: hermeznetwork/zkevm-prover:v2.2.0-RC4 depends_on: zkevm-state-db: condition: service_healthy diff --git a/docs/components/databases.md b/docs/components/databases.md index 117a73b10b..2a18521a8e 100644 --- a/docs/components/databases.md +++ b/docs/components/databases.md @@ -12,7 +12,7 @@ Note the `environment` values will change per DB. The StateDB needs to generate some extra databases and tables (`merkletree`) for use with the MerkleTree/Executor service. -This is done via an sql file: [init_prover_db.sql](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/db/scripts/init_prover_db.sql) +This is done via an sql file: [init_prover_db.sql](https://github.com/0xPolygon/cdk-validium-node/blob/develop/db/scripts/init_prover_db.sql) ```yaml zkevm-state-db: diff --git a/docs/config-file/custom_network-config-doc.html b/docs/config-file/custom_network-config-doc.html index 76d3a20696..d64649be9f 100644 --- a/docs/config-file/custom_network-config-doc.html +++ b/docs/config-file/custom_network-config-doc.html @@ -1 +1 @@ - Schema Docs

GenesisFromJSON is the config file for network_custom

Type: string

L1: root hash of the genesis block


Type: integer

L1: block number of the genesis block


Type: array of object

L2: List of states contracts used to populate merkle tree at initial state

Each item of this array must be:


L1: configuration of the network
Type: integer

Chain ID of the L1 network


Type: array of integer

Address of the L1 contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the L1 Matic token Contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the L1 GlobalExitRootManager contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


\ No newline at end of file + Schema Docs

GenesisFromJSON is the config file for network_custom

Type: string

L1: root hash of the genesis block


Type: integer

L1: block number of the genesis block


Type: array of object

L2: List of states contracts used to populate merkle tree at initial state

Each item of this array must be:


L1: configuration of the network
Type: integer

Chain ID of the L1 network


Type: array of integer

Address of the L1 contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the L1 Matic token Contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the L1 GlobalExitRootManager contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the data availability committee contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


\ No newline at end of file diff --git a/docs/config-file/custom_network-config-doc.md b/docs/config-file/custom_network-config-doc.md index 872d8e0724..9a1f200b9a 100644 --- a/docs/config-file/custom_network-config-doc.md +++ b/docs/config-file/custom_network-config-doc.md @@ -90,19 +90,20 @@ must respect the following conditions **Type:** : `object` **Description:** L1: configuration of the network -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | ------------------------------------------------ | -| - [chainId](#L1Config_chainId ) | No | integer | No | - | Chain ID of the L1 network | -| - [polygonZkEVMAddress](#L1Config_polygonZkEVMAddress ) | No | array of integer | No | - | Address of the L1 contract | -| - [maticTokenAddress](#L1Config_maticTokenAddress ) | No | array of integer | No | - | Address of the L1 Matic token Contract | -| - [polygonZkEVMGlobalExitRootAddress](#L1Config_polygonZkEVMGlobalExitRootAddress ) | No | array of integer | No | - | Address of the L1 GlobalExitRootManager contract | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ----------------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | --------------------------------------------------- | +| - [chainId](#L1Config_chainId ) | No | integer | No | - | Chain ID of the L1 network | +| - [cdkValidiumAddress](#L1Config_cdkValidiumAddress ) | No | array of integer | No | - | Address of the L1 contract | +| - [maticTokenAddress](#L1Config_maticTokenAddress ) | No | array of integer | No | - | Address of the L1 Matic token Contract | +| - [polygonZkEVMGlobalExitRootAddress](#L1Config_polygonZkEVMGlobalExitRootAddress ) | No | array of integer | No | - | Address of the L1 GlobalExitRootManager contract | +| - [cdkDataCommitteeContract](#L1Config_cdkDataCommitteeContract ) | No | array of integer | No | - | Address of the data availability committee contract | ### 4.1. `L1Config.chainId` **Type:** : `integer` **Description:** Chain ID of the L1 network -### 4.2. `L1Config.polygonZkEVMAddress` +### 4.2. `L1Config.cdkValidiumAddress` **Type:** : `array of integer` **Description:** Address of the L1 contract @@ -117,5 +118,10 @@ must respect the following conditions **Type:** : `array of integer` **Description:** Address of the L1 GlobalExitRootManager contract +### 4.5. `L1Config.cdkDataCommitteeContract` + +**Type:** : `array of integer` +**Description:** Address of the data availability committee contract + ---------------------------------------------------------------------------------------------------------------------------- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) diff --git a/docs/config-file/custom_network-config-schema.json b/docs/config-file/custom_network-config-schema.json index 4f4d5e423e..3951a97216 100644 --- a/docs/config-file/custom_network-config-schema.json +++ b/docs/config-file/custom_network-config-schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "github.com/0xPolygonHermez/zkevm-node/config/config", + "$id": "github.com/0xPolygon/cdk-validium-node/config/config", "properties": { "root": { "type": "string", @@ -49,7 +49,7 @@ "type": "integer", "description": "Chain ID of the L1 network" }, - "polygonZkEVMAddress": { + "cdkValidiumAddress": { "items": { "type": "integer" }, @@ -75,6 +75,15 @@ "maxItems": 20, "minItems": 20, "description": "Address of the L1 GlobalExitRootManager contract" + }, + "cdkDataCommitteeContract": { + "items": { + "type": "integer" + }, + "type": "array", + "maxItems": 20, + "minItems": 20, + "description": "Address of the data availability committee contract" } }, "additionalProperties": false, diff --git a/docs/config-file/node-config-doc.html b/docs/config-file/node-config-doc.html index 04f2a688b7..a523880e6d 100644 --- a/docs/config-file/node-config-doc.html +++ b/docs/config-file/node-config-doc.html @@ -1,12 +1,12 @@ - Schema Docs

Config represents the configuration of the entire Hermez Node The file is TOML format You could find some examples:

Default: falseType: boolean

This define is a trusted node (true) or a permission less (false). If you don't known
set to false


Default: 0Type: integer

Last batch number before a forkid change (fork upgrade). That implies that
greater batch numbers are going to be trusted but no virtualized neither verified.
So after the batch number ForkUpgradeBatchNumber is virtualized and verified you could update
the system (SC,...) to new forkId and remove this value to allow the system to keep
Virtualizing and verifying the new batchs.
Check issue #2236 to known more
This value overwrite SequenceSender.ForkUpgradeBatchNumber


Default: 0Type: integer

Which is the new forkId


Configure Log level for all the services, allow also to store the logs in a file
Default: "development"Type: enum (of string)

Environment defining the log format ("production" or "development").
In development mode enables development mode (which makes DPanicLevel logs panic), uses a console encoder, writes to standard error, and disables sampling. Stacktraces are automatically included on logs of WarnLevel and above.
Check here

Must be one of:

  • "production"
  • "development"

Default: "info"Type: enum (of string)

Level of log. As lower value more logs are going to be generated

Must be one of:

  • "debug"
  • "info"
  • "warn"
  • "error"
  • "dpanic"
  • "panic"
  • "fatal"

Default: ["stderr"]Type: array of string

Outputs

Each item of this array must be:


Configuration of the etherman (client for access L1)
Default: "http://localhost:8545"Type: string

URL is the URL of the Ethereum node for L1


Default: falseType: boolean

allow that L1 gas price calculation use multiples sources


Configuration for use Etherscan as used as gas provider, basically it needs the API-KEY
Default: ""Type: string

Need API key to use etherscan, if it's empty etherscan is not used


Default: ""Type: string

URL of the etherscan API. Overwritten with a hardcoded URL: "https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey="


Configuration for ethereum transaction manager
Default: "1s"Type: string

FrequencyToMonitorTxs frequency of the resending failed txs


Examples:

"1m"
+ Schema Docs 

Config represents the configuration of the entire Hermez Node The file is TOML format You could find some examples:

Default: falseType: boolean

This define is a trusted node (true) or a permission less (false). If you don't known
set to false


Default: 0Type: integer

Last batch number before a forkid change (fork upgrade). That implies that
greater batch numbers are going to be trusted but no virtualized neither verified.
So after the batch number ForkUpgradeBatchNumber is virtualized and verified you could update
the system (SC,...) to new forkId and remove this value to allow the system to keep
Virtualizing and verifying the new batchs.
Check issue #2236 to known more
This value overwrite SequenceSender.ForkUpgradeBatchNumber


Default: 0Type: integer

Which is the new forkId


Configure Log level for all the services, allow also to store the logs in a file
Default: "development"Type: enum (of string)

Environment defining the log format ("production" or "development").
In development mode enables development mode (which makes DPanicLevel logs panic), uses a console encoder, writes to standard error, and disables sampling. Stacktraces are automatically included on logs of WarnLevel and above.
Check here

Must be one of:

  • "production"
  • "development"

Default: "info"Type: enum (of string)

Level of log. As lower value more logs are going to be generated

Must be one of:

  • "debug"
  • "info"
  • "warn"
  • "error"
  • "dpanic"
  • "panic"
  • "fatal"

Default: ["stderr"]Type: array of string

Outputs

Each item of this array must be:


Configuration of the etherman (client for access L1)
Default: "http://localhost:8545"Type: string

URL is the URL of the Ethereum node for L1


Default: falseType: boolean

allow that L1 gas price calculation use multiples sources


Configuration for use Etherscan as used as gas provider, basically it needs the API-KEY
Default: ""Type: string

Need API key to use etherscan, if it's empty etherscan is not used


Default: ""Type: string

URL of the etherscan API. Overwritten with a hardcoded URL: "https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey="


Configuration for ethereum transaction manager
Default: "1s"Type: string

FrequencyToMonitorTxs frequency of the resending failed txs


Examples:

"1m"
 
"300ms"
 

Default: "2m0s"Type: string

WaitTxToBeMined time to wait after transaction was sent to the ethereum


Examples:

"1m"
 
"300ms"
-

Type: array of object

PrivateKeys defines all the key store files that are going
to be read in order to provide the private keys to sign the L1 txs

Each item of this array must be:

Type: string

Path is the file path for the key store file


Type: string

Password is the password to decrypt the key store file



Default: 0Type: integer

ForcedGas is the amount of gas to be forced in case of gas estimation error


Pool service configuration
Default: "5m0s"Type: string

IntervalToRefreshBlockedAddresses is the time it takes to sync the
blocked address list from db to memory


Examples:

"1m"
+

Type: array of object

PrivateKeys defines all the key store files that are going
to be read in order to provide the private keys to sign the L1 txs

Each item of this array must be:

Type: string

Path is the file path for the key store file


Type: string

Password is the password to decrypt the key store file



Default: 0Type: integer

ForcedGas is the amount of gas to be forced in case of gas estimation error


Default: 1Type: number

GasPriceMarginFactor is used to multiply the suggested gas price provided by the network
in order to allow a different gas price to be set for all the transactions and making it
easier to have the txs prioritized in the pool, default value is 1.

ex:
suggested gas price: 100
GasPriceMarginFactor: 1
gas price = 100

suggested gas price: 100
GasPriceMarginFactor: 1.1
gas price = 110


Default: 0Type: integer

MaxGasPriceLimit helps avoiding transactions to be sent over an specified
gas price amount, default value is 0, which means no limit.
If the gas price provided by the network and adjusted by the GasPriceMarginFactor
is greater than this configuration, transaction will have its gas price set to
the value configured in this config as the limit.

ex:

suggested gas price: 100
gas price margin factor: 20%
max gas price limit: 150
tx gas price = 120

suggested gas price: 100
gas price margin factor: 20%
max gas price limit: 110
tx gas price = 110


Pool service configuration
Default: "5m0s"Type: string

IntervalToRefreshBlockedAddresses is the time it takes to sync the
blocked address list from db to memory


Examples:

"1m"
 
"300ms"
 

Default: "5s"Type: string

IntervalToRefreshGasPrices is the time to wait to refresh the gas prices


Examples:

"1m"
 
"300ms"
-

Default: 100132Type: integer

MaxTxBytesSize is the max size of a transaction in bytes


Default: 100000Type: integer

MaxTxDataBytesSize is the max size of the data field of a transaction in bytes


DB is the database configuration
Default: "pool_db"Type: string

Database name


Default: "pool_user"Type: string

Database User name


Default: "pool_password"Type: string

Database Password of the user


Default: "zkevm-pool-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


Default: 1000000000Type: integer

DefaultMinGasPriceAllowed is the default min gas price to suggest


Default: "5m0s"Type: string

MinAllowedGasPriceInterval is the interval to look back of the suggested min gas price for a tx


Examples:

"1m"
+

Default: 100132Type: integer

MaxTxBytesSize is the max size of a transaction in bytes


Default: 100000Type: integer

MaxTxDataBytesSize is the max size of the data field of a transaction in bytes


DB is the database configuration
Default: "pool_db"Type: string

Database name


Default: "pool_user"Type: string

Database User name


Default: "pool_password"Type: string

Database Password of the user


Default: "cdk-validium-pool-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


Default: 1000000000Type: integer

DefaultMinGasPriceAllowed is the default min gas price to suggest


Default: "5m0s"Type: string

MinAllowedGasPriceInterval is the interval to look back of the suggested min gas price for a tx


Examples:

"1m"
 
"300ms"
 

Default: "15s"Type: string

PollMinAllowedGasPriceInterval is the interval to poll the suggested min gas price for a tx


Examples:

"1m"
 
"300ms"
@@ -20,7 +20,7 @@
 
"300ms"
 

Default: 100Type: integer

BlocksAmountForTxsToBeDeleted is blocks amount after which txs will be deleted from the pool


Default: "12h0m0s"Type: string

FrequencyToCheckTxsForDelete is frequency with which txs will be checked for deleting


Examples:

"1m"
 
"300ms"
-

Default: 300Type: integer

MaxTxsPerBatch is the maximum amount of transactions in the batch


Default: 120000Type: integer

MaxBatchBytesSize is the maximum batch size in bytes
(subtracted bits of all types.Sequence fields excluding BatchL2Data from MaxTxSizeForL1)


Default: 30000000Type: integer

MaxCumulativeGasUsed is max gas amount used by batch


Default: 2145Type: integer

MaxKeccakHashes is max keccak hashes used by batch


Default: 252357Type: integer

MaxPoseidonHashes is max poseidon hashes batch can handle


Default: 135191Type: integer

MaxPoseidonPaddings is max poseidon paddings batch can handle


Default: 236585Type: integer

MaxMemAligns is max mem aligns batch can handle


Default: 236585Type: integer

MaxArithmetics is max arithmetics batch can handle


Default: 473170Type: integer

MaxBinaries is max binaries batch can handle


Default: 7570538Type: integer

MaxSteps is max steps batch can handle


Default: 1Type: integer

WeightBatchBytesSize is the cost weight for the BatchBytesSize batch resource


Default: 1Type: integer

WeightCumulativeGasUsed is the cost weight for the CumulativeGasUsed batch resource


Default: 1Type: integer

WeightKeccakHashes is the cost weight for the KeccakHashes batch resource


Default: 1Type: integer

WeightPoseidonHashes is the cost weight for the PoseidonHashes batch resource


Default: 1Type: integer

WeightPoseidonPaddings is the cost weight for the PoseidonPaddings batch resource


Default: 1Type: integer

WeightMemAligns is the cost weight for the MemAligns batch resource


Default: 1Type: integer

WeightArithmetics is the cost weight for the Arithmetics batch resource


Default: 1Type: integer

WeightBinaries is the cost weight for the Binaries batch resource


Default: 1Type: integer

WeightSteps is the cost weight for the Steps batch resource


Default: "10m0s"Type: string

TxLifetimeCheckTimeout is the time the sequencer waits to check txs lifetime


Examples:

"1m"
+

Default: 300Type: integer

MaxTxsPerBatch is the maximum amount of transactions in the batch


Default: 120000Type: integer

MaxBatchBytesSize is the maximum batch size in bytes
(subtracted bits of all types.Sequence fields excluding BatchL2Data from MaxTxSizeForL1)


Default: 30000000Type: integer

MaxCumulativeGasUsed is max gas amount used by batch


Default: 2145Type: integer

MaxKeccakHashes is max keccak hashes used by batch


Default: 252357Type: integer

MaxPoseidonHashes is max poseidon hashes batch can handle


Default: 135191Type: integer

MaxPoseidonPaddings is max poseidon paddings batch can handle


Default: 236585Type: integer

MaxMemAligns is max mem aligns batch can handle


Default: 236585Type: integer

MaxArithmetics is max arithmetics batch can handle


Default: 473170Type: integer

MaxBinaries is max binaries batch can handle


Default: 7570538Type: integer

MaxSteps is max steps batch can handle


Default: "10m0s"Type: string

TxLifetimeCheckTimeout is the time the sequencer waits to check txs lifetime


Examples:

"1m"
 
"300ms"
 

Default: "3h0m0s"Type: string

MaxTxLifetime is the time a tx can be in the sequencer memory


Examples:

"1m"
 
"300ms"
@@ -42,11 +42,11 @@
 
"300ms"
 

Default: "5s"Type: string

Examples:

"1m"
 
"300ms"
-

Worker's specific config properties
Default: 1000Type: number

ResourceCostMultiplier is the multiplier for the resource cost


EffectiveGasPrice is the config for the gas price
Default: 10Type: integer

MaxBreakEvenGasPriceDeviationPercentage is the max allowed deviation percentage BreakEvenGasPrice on re-calculation


Default: 0.25Type: number

L1GasPriceFactor is the percentage of the L1 gas price that will be used as the L2 min gas price


Default: 16Type: integer

ByteGasCost is the gas cost per byte


Default: 1Type: number

MarginFactor is the margin factor percentage to be added to the L2 min gas price


Default: falseType: boolean

Enabled is a flag to enable/disable the effective gas price


Default: 0Type: integer

DefaultMinGasPriceAllowed is the default min gas price to suggest
This value is assigned from [Pool].DefaultMinGasPriceAllowed


Configuration of the sequence sender service
Default: "5s"Type: string

WaitPeriodSendSequence is the time the sequencer waits until
trying to send a sequence to L1


Examples:

"1m"
+

EffectiveGasPrice is the config for the gas price
Default: 10Type: integer

MaxBreakEvenGasPriceDeviationPercentage is the max allowed deviation percentage BreakEvenGasPrice on re-calculation


Default: 0.25Type: number

L1GasPriceFactor is the percentage of the L1 gas price that will be used as the L2 min gas price


Default: 16Type: integer

ByteGasCost is the gas cost per byte


Default: 1Type: number

MarginFactor is the margin factor percentage to be added to the L2 min gas price


Default: falseType: boolean

Enabled is a flag to enable/disable the effective gas price


Default: 0Type: integer

DefaultMinGasPriceAllowed is the default min gas price to suggest
This value is assigned from [Pool].DefaultMinGasPriceAllowed


Configuration of the sequence sender service
Default: "5s"Type: string

WaitPeriodSendSequence is the time the sequencer waits until
trying to send a sequence to L1


Examples:

"1m"
 
"300ms"
 

Default: "5s"Type: string

LastBatchVirtualizationTimeMaxWaitPeriod is time since sequences should be sent


Examples:

"1m"
 
"300ms"
-

Default: 131072Type: integer

MaxTxSizeForL1 is the maximum size a single transaction can have. This field has
non-trivial consequences: larger transactions than 128KB are significantly harder and
more expensive to propagate; larger transactions also take more resources
to validate whether they fit into the pool or not.


Default: "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"Type: string

SenderAddress defines which private key the eth tx manager needs to use
to sign the L1 txs


Default: [{"Path": "/pk/sequencer.keystore", "Password": "testonly"}]Type: array of object

PrivateKeys defines all the key store files that are going
to be read in order to provide the private keys to sign the L1 txs

Each item of this array must be:

Type: string

Path is the file path for the key store file


Type: string

Password is the password to decrypt the key store file



Default: 0Type: integer

Batch number where there is a forkid change (fork upgrade)


Configuration of the aggregator service
Default: "0.0.0.0"Type: string

Host for the grpc server


Default: 50081Type: integer

Port for the grpc server


Default: "5s"Type: string

RetryTime is the time the aggregator main loop sleeps if there are no proofs to aggregate
or batches to generate proofs. It is also used in the isSynced loop


Examples:

"1m"
+

Default: 1000Type: integer

MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx


Type: array of integer

SenderAddress defines which private key the eth tx manager needs to use
to sign the L1 txs

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Default: "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"Type: array of integer

L2Coinbase defines which addess is going to receive the fees

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


PrivateKey defines all the key store files that are going to be read in order to provide the private keys to sign the L1 txs
Default: "/pk/sequencer.keystore"Type: string

Path is the file path for the key store file


Default: "testonly"Type: string

Password is the password to decrypt the key store file


Default: 0Type: integer

Batch number where there is a forkid change (fork upgrade)


Configuration of the aggregator service
Default: "0.0.0.0"Type: string

Host for the grpc server


Default: 50081Type: integer

Port for the grpc server


Default: "5s"Type: string

RetryTime is the time the aggregator main loop sleeps if there are no proofs to aggregate
or batches to generate proofs. It is also used in the isSynced loop


Examples:

"1m"
 
"300ms"
 

Default: "1m30s"Type: string

VerifyProofInterval is the interval of time to verify/send an proof in L1


Examples:

"1m"
 
"300ms"
@@ -56,12 +56,12 @@
 
"300ms"
 

Default: 0Type: integer

ChainID is the L2 ChainID provided by the Network Config


Default: 0Type: integer

ForkID is the L2 ForkID provided by the Network Config


Default: ""Type: string

SenderAddress defines which private key the eth tx manager needs to use
to sign the L1 txs


Default: "2m0s"Type: string

CleanupLockedProofsInterval is the interval of time to clean up locked proofs.


Examples:

"1m"
 
"300ms"
-

Default: "10m"Type: string

GeneratingProofCleanupThreshold represents the time interval after
which a proof in generating state is considered to be stuck and
allowed to be cleared.


Configuration of the genesis of the network. This is used to known the initial state of the network

L1: Configuration related to L1
Default: 0Type: integer

Chain ID of the L1 network


Type: array of integer

Address of the L1 contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the L1 Matic token Contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the L1 GlobalExitRootManager contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

DEPRECATED L2: address of the PolygonZkEVMGlobalExitRootL2 proxy smart contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

L2: address of the PolygonZkEVMBridge proxy smart contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


L1: Genesis of the rollup, first block number and root
Default: 0Type: integer

GenesisBlockNum is the block number where the polygonZKEVM smc was deployed on L1


Type: array of integer

Root hash of the genesis block

Must contain a minimum of 32 items

Must contain a maximum of 32 items

Each item of this array must be:


Type: array of object

Contracts to be deployed to L2

Each item of this array must be:


Configuration of the gas price suggester service
Default: "follower"Type: string

Default: 2000000000Type: integer

DefaultGasPriceWei is used to set the gas price to be used by the default gas pricer or as minimim gas price by the follower gas pricer.


Default: 0Type: integer

MaxGasPriceWei is used to limit the gas price returned by the follower gas pricer to a maximum value. It is ignored if 0.


Default: 0Type: integer

Default: 0Type: integer

Default: "10s"Type: string

Examples:

"1m"
+

Default: "10m"Type: string

GeneratingProofCleanupThreshold represents the time interval after
which a proof in generating state is considered to be stuck and
allowed to be cleared.


Configuration of the genesis of the network. This is used to known the initial state of the network

L1: Configuration related to L1
Default: 0Type: integer

Chain ID of the L1 network


Type: array of integer

Address of the L1 contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the L1 Matic token Contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the L1 GlobalExitRootManager contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

Address of the data availability committee contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

DEPRECATED L2: address of the PolygonZkEVMGlobalExitRootL2 proxy smart contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

L2: address of the PolygonZkEVMBridge proxy smart contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


L1: Genesis of the rollup, first block number and root
Default: 0Type: integer

GenesisBlockNum is the block number where the polygonZKEVM smc was deployed on L1


Type: array of integer

Root hash of the genesis block

Must contain a minimum of 32 items

Must contain a maximum of 32 items

Each item of this array must be:


Type: array of object

Contracts to be deployed to L2

Each item of this array must be:


Configuration of the gas price suggester service
Default: "follower"Type: string

Default: 2000000000Type: integer

DefaultGasPriceWei is used to set the gas price to be used by the default gas pricer or as minimim gas price by the follower gas pricer.


Default: 0Type: integer

MaxGasPriceWei is used to limit the gas price returned by the follower gas pricer to a maximum value. It is ignored if 0.


Default: 0Type: integer

Default: 0Type: integer

Default: "10s"Type: string

Examples:

"1m"
 
"300ms"
 

Default: "1h0m0s"Type: string

Examples:

"1m"
 
"300ms"
 

Default: "5m0s"Type: string

Examples:

"1m"
 
"300ms"
-

Default: 0.15Type: number

Configuration of the executor service
Default: "zkevm-prover:50071"Type: string

Default: 3Type: integer

MaxResourceExhaustedAttempts is the max number of attempts to make a transaction succeed because of resource exhaustion


Default: "1s"Type: string

WaitOnResourceExhaustion is the time to wait before retrying a transaction because of resource exhaustion


Examples:

"1m"
+

Default: 0.15Type: number

Configuration of the executor service
Default: "cdk-validium-prover:50071"Type: string

Default: 3Type: integer

MaxResourceExhaustedAttempts is the max number of attempts to make a transaction succeed because of resource exhaustion


Default: "1s"Type: string

WaitOnResourceExhaustion is the time to wait before retrying a transaction because of resource exhaustion


Examples:

"1m"
 
"300ms"
-

Default: 100000000Type: integer

Configuration of the merkle tree client service. Not use in the node, only for testing
Default: "zkevm-prover:50061"Type: string

URI is the server URI.


Configuration of the state database connection
Default: "state_db"Type: string

Database name


Default: "state_user"Type: string

Database User name


Default: "state_password"Type: string

Database Password of the user


Default: "zkevm-state-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


Configuration of the metrics service, basically is where is going to publish the metrics
Default: "0.0.0.0"Type: string

Host is the address to bind the metrics server


Default: 9091Type: integer

Port is the port to bind the metrics server


Default: falseType: boolean

Enabled is the flag to enable/disable the metrics server


Default: ""Type: string

ProfilingHost is the address to bind the profiling server


Default: 0Type: integer

ProfilingPort is the port to bind the profiling server


Default: falseType: boolean

ProfilingEnabled is the flag to enable/disable the profiling server


Configuration of the event database connection

DB is the database configuration
Default: ""Type: string

Database name


Default: ""Type: string

Database User name


Default: ""Type: string

Database Password of the user


Default: ""Type: string

Host address of database


Default: ""Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 0Type: integer

MaxConns is the maximum number of connections in the pool.


Configuration of the hash database connection
Default: "prover_db"Type: string

Database name


Default: "prover_user"Type: string

Database User name


Default: "prover_pass"Type: string

Database Password of the user


Default: "zkevm-state-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


\ No newline at end of file +
Default: 100000000Type: integer

Configuration of the merkle tree client service. Not use in the node, only for testing
Default: "cdk-validium-prover:50061"Type: string

URI is the server URI.


Configuration of the state database connection
Default: "state_db"Type: string

Database name


Default: "state_user"Type: string

Database User name


Default: "state_password"Type: string

Database Password of the user


Default: "cdk-validium-state-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


Configuration of the metrics service, basically is where is going to publish the metrics
Default: "0.0.0.0"Type: string

Host is the address to bind the metrics server


Default: 9091Type: integer

Port is the port to bind the metrics server


Default: falseType: boolean

Enabled is the flag to enable/disable the metrics server


Default: ""Type: string

ProfilingHost is the address to bind the profiling server


Default: 0Type: integer

ProfilingPort is the port to bind the profiling server


Default: falseType: boolean

ProfilingEnabled is the flag to enable/disable the profiling server


Configuration of the event database connection

DB is the database configuration
Default: ""Type: string

Database name


Default: ""Type: string

Database User name


Default: ""Type: string

Database Password of the user


Default: ""Type: string

Host address of database


Default: ""Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 0Type: integer

MaxConns is the maximum number of connections in the pool.


Configuration of the hash database connection
Default: "prover_db"Type: string

Database name


Default: "prover_user"Type: string

Database User name


Default: "prover_pass"Type: string

Database Password of the user


Default: "cdk-validium-state-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


\ No newline at end of file diff --git a/docs/config-file/node-config-doc.md b/docs/config-file/node-config-doc.md index 69c8f8bb43..ebe24b8533 100644 --- a/docs/config-file/node-config-doc.md +++ b/docs/config-file/node-config-doc.md @@ -5,28 +5,28 @@ [TOML format]: https://en.wikipedia.org/wiki/TOML -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| - [IsTrustedSequencer](#IsTrustedSequencer ) | No | boolean | No | - | This define is a trusted node (\`true\`) or a permission less (\`false\`). If you don't known
set to \`false\` | -| - [ForkUpgradeBatchNumber](#ForkUpgradeBatchNumber ) | No | integer | No | - | Last batch number before a forkid change (fork upgrade). That implies that
greater batch numbers are going to be trusted but no virtualized neither verified.
So after the batch number \`ForkUpgradeBatchNumber\` is virtualized and verified you could update
the system (SC,...) to new forkId and remove this value to allow the system to keep
Virtualizing and verifying the new batchs.
Check issue [#2236](https://github.com/0xPolygonHermez/zkevm-node/issues/2236) to known more
This value overwrite \`SequenceSender.ForkUpgradeBatchNumber\` | -| - [ForkUpgradeNewForkId](#ForkUpgradeNewForkId ) | No | integer | No | - | Which is the new forkId | -| - [Log](#Log ) | No | object | No | - | Configure Log level for all the services, allow also to store the logs in a file | -| - [Etherman](#Etherman ) | No | object | No | - | Configuration of the etherman (client for access L1) | -| - [EthTxManager](#EthTxManager ) | No | object | No | - | Configuration for ethereum transaction manager | -| - [Pool](#Pool ) | No | object | No | - | Pool service configuration | -| - [RPC](#RPC ) | No | object | No | - | Configuration for RPC service. THis one offers a extended Ethereum JSON-RPC API interface to interact with the node | -| - [Synchronizer](#Synchronizer ) | No | object | No | - | Configuration of service \`Syncrhonizer\`. For this service is also really important the value of \`IsTrustedSequencer\`
because depending of this values is going to ask to a trusted node for trusted transactions or not | -| - [Sequencer](#Sequencer ) | No | object | No | - | Configuration of the sequencer service | -| - [SequenceSender](#SequenceSender ) | No | object | No | - | Configuration of the sequence sender service | -| - [Aggregator](#Aggregator ) | No | object | No | - | Configuration of the aggregator service | -| - [NetworkConfig](#NetworkConfig ) | No | object | No | - | Configuration of the genesis of the network. This is used to known the initial state of the network | -| - [L2GasPriceSuggester](#L2GasPriceSuggester ) | No | object | No | - | Configuration of the gas price suggester service | -| - [Executor](#Executor ) | No | object | No | - | Configuration of the executor service | -| - [MTClient](#MTClient ) | No | object | No | - | Configuration of the merkle tree client service. Not use in the node, only for testing | -| - [StateDB](#StateDB ) | No | object | No | - | Configuration of the state database connection | -| - [Metrics](#Metrics ) | No | object | No | - | Configuration of the metrics service, basically is where is going to publish the metrics | -| - [EventLog](#EventLog ) | No | object | No | - | Configuration of the event database connection | -| - [HashDB](#HashDB ) | No | object | No | - | Configuration of the hash database connection | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ---------------------------------------------------- | ------- | ------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| - [IsTrustedSequencer](#IsTrustedSequencer ) | No | boolean | No | - | This define is a trusted node (\`true\`) or a permission less (\`false\`). If you don't known
set to \`false\` | +| - [ForkUpgradeBatchNumber](#ForkUpgradeBatchNumber ) | No | integer | No | - | Last batch number before a forkid change (fork upgrade). That implies that
greater batch numbers are going to be trusted but no virtualized neither verified.
So after the batch number \`ForkUpgradeBatchNumber\` is virtualized and verified you could update
the system (SC,...) to new forkId and remove this value to allow the system to keep
Virtualizing and verifying the new batchs.
Check issue [#2236](https://github.com/0xPolygon/cdk-validium-node/issues/2236) to known more
This value overwrite \`SequenceSender.ForkUpgradeBatchNumber\` | +| - [ForkUpgradeNewForkId](#ForkUpgradeNewForkId ) | No | integer | No | - | Which is the new forkId | +| - [Log](#Log ) | No | object | No | - | Configure Log level for all the services, allow also to store the logs in a file | +| - [Etherman](#Etherman ) | No | object | No | - | Configuration of the etherman (client for access L1) | +| - [EthTxManager](#EthTxManager ) | No | object | No | - | Configuration for ethereum transaction manager | +| - [Pool](#Pool ) | No | object | No | - | Pool service configuration | +| - [RPC](#RPC ) | No | object | No | - | Configuration for RPC service. THis one offers a extended Ethereum JSON-RPC API interface to interact with the node | +| - [Synchronizer](#Synchronizer ) | No | object | No | - | Configuration of service \`Syncrhonizer\`. For this service is also really important the value of \`IsTrustedSequencer\`
because depending of this values is going to ask to a trusted node for trusted transactions or not | +| - [Sequencer](#Sequencer ) | No | object | No | - | Configuration of the sequencer service | +| - [SequenceSender](#SequenceSender ) | No | object | No | - | Configuration of the sequence sender service | +| - [Aggregator](#Aggregator ) | No | object | No | - | Configuration of the aggregator service | +| - [NetworkConfig](#NetworkConfig ) | No | object | No | - | Configuration of the genesis of the network. This is used to known the initial state of the network | +| - [L2GasPriceSuggester](#L2GasPriceSuggester ) | No | object | No | - | Configuration of the gas price suggester service | +| - [Executor](#Executor ) | No | object | No | - | Configuration of the executor service | +| - [MTClient](#MTClient ) | No | object | No | - | Configuration of the merkle tree client service. Not use in the node, only for testing | +| - [StateDB](#StateDB ) | No | object | No | - | Configuration of the state database connection | +| - [Metrics](#Metrics ) | No | object | No | - | Configuration of the metrics service, basically is where is going to publish the metrics | +| - [EventLog](#EventLog ) | No | object | No | - | Configuration of the event database connection | +| - [HashDB](#HashDB ) | No | object | No | - | Configuration of the hash database connection | ## 1. `IsTrustedSequencer` @@ -53,7 +53,7 @@ greater batch numbers are going to be trusted but no virtualized neither verifie So after the batch number `ForkUpgradeBatchNumber` is virtualized and verified you could update the system (SC,...) to new forkId and remove this value to allow the system to keep Virtualizing and verifying the new batchs. -Check issue [#2236](https://github.com/0xPolygonHermez/zkevm-node/issues/2236) to known more +Check issue [#2236](https://github.com/0xPolygon/cdk-validium-node/issues/2236) to known more This value overwrite `SequenceSender.ForkUpgradeBatchNumber` **Example setting the default value** (0): @@ -224,12 +224,14 @@ Url="" **Type:** : `object` **Description:** Configuration for ethereum transaction manager -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| --------------------------------------------------------------- | ------- | --------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| - [FrequencyToMonitorTxs](#EthTxManager_FrequencyToMonitorTxs ) | No | string | No | - | Duration | -| - [WaitTxToBeMined](#EthTxManager_WaitTxToBeMined ) | No | string | No | - | Duration | -| - [PrivateKeys](#EthTxManager_PrivateKeys ) | No | array of object | No | - | PrivateKeys defines all the key store files that are going
to be read in order to provide the private keys to sign the L1 txs | -| - [ForcedGas](#EthTxManager_ForcedGas ) | No | integer | No | - | ForcedGas is the amount of gas to be forced in case of gas estimation error | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| --------------------------------------------------------------- | ------- | --------------- | ---------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| - [FrequencyToMonitorTxs](#EthTxManager_FrequencyToMonitorTxs ) | No | string | No | - | Duration | +| - [WaitTxToBeMined](#EthTxManager_WaitTxToBeMined ) | No | string | No | - | Duration | +| - [PrivateKeys](#EthTxManager_PrivateKeys ) | No | array of object | No | - | PrivateKeys defines all the key store files that are going
to be read in order to provide the private keys to sign the L1 txs | +| - [ForcedGas](#EthTxManager_ForcedGas ) | No | integer | No | - | ForcedGas is the amount of gas to be forced in case of gas estimation error | +| - [GasPriceMarginFactor](#EthTxManager_GasPriceMarginFactor ) | No | number | No | - | GasPriceMarginFactor is used to multiply the suggested gas price provided by the network
in order to allow a different gas price to be set for all the transactions and making it
easier to have the txs prioritized in the pool, default value is 1.

ex:
suggested gas price: 100
GasPriceMarginFactor: 1
gas price = 100

suggested gas price: 100
GasPriceMarginFactor: 1.1
gas price = 110 | +| - [MaxGasPriceLimit](#EthTxManager_MaxGasPriceLimit ) | No | integer | No | - | MaxGasPriceLimit helps avoiding transactions to be sent over an specified
gas price amount, default value is 0, which means no limit.
If the gas price provided by the network and adjusted by the GasPriceMarginFactor
is greater than this configuration, transaction will have its gas price set to
the value configured in this config as the limit.

ex:

suggested gas price: 100
gas price margin factor: 20%
max gas price limit: 150
tx gas price = 120

suggested gas price: 100
gas price margin factor: 20%
max gas price limit: 110
tx gas price = 110 | ### 6.1. `EthTxManager.FrequencyToMonitorTxs` @@ -335,6 +337,61 @@ to be read in order to provide the private keys to sign the L1 txs ForcedGas=0 ``` +### 6.5. `EthTxManager.GasPriceMarginFactor` + +**Type:** : `number` + +**Default:** `1` + +**Description:** GasPriceMarginFactor is used to multiply the suggested gas price provided by the network +in order to allow a different gas price to be set for all the transactions and making it +easier to have the txs prioritized in the pool, default value is 1. + +ex: +suggested gas price: 100 +GasPriceMarginFactor: 1 +gas price = 100 + +suggested gas price: 100 +GasPriceMarginFactor: 1.1 +gas price = 110 + +**Example setting the default value** (1): +``` +[EthTxManager] +GasPriceMarginFactor=1 +``` + +### 6.6. `EthTxManager.MaxGasPriceLimit` + +**Type:** : `integer` + +**Default:** `0` + +**Description:** MaxGasPriceLimit helps avoiding transactions to be sent over an specified +gas price amount, default value is 0, which means no limit. +If the gas price provided by the network and adjusted by the GasPriceMarginFactor +is greater than this configuration, transaction will have its gas price set to +the value configured in this config as the limit. + +ex: + +suggested gas price: 100 +gas price margin factor: 20% +max gas price limit: 150 +tx gas price = 120 + +suggested gas price: 100 +gas price margin factor: 20% +max gas price limit: 110 +tx gas price = 110 + +**Example setting the default value** (0): +``` +[EthTxManager] +MaxGasPriceLimit=0 +``` + ## 7. `[Pool]` **Type:** : `object` @@ -495,14 +552,14 @@ Password="pool_password" **Type:** : `string` -**Default:** `"zkevm-pool-db"` +**Default:** `"cdk-validium-pool-db"` **Description:** Host address of database -**Example setting the default value** ("zkevm-pool-db"): +**Example setting the default value** ("cdk-validium-pool-db"): ``` [Pool.DB] -Host="zkevm-pool-db" +Host="cdk-validium-pool-db" ``` #### 7.5.5. `Pool.DB.Port` @@ -953,20 +1010,10 @@ TrustedSequencerURL="" | - [MaxArithmetics](#Sequencer_MaxArithmetics ) | No | integer | No | - | MaxArithmetics is max arithmetics batch can handle | | - [MaxBinaries](#Sequencer_MaxBinaries ) | No | integer | No | - | MaxBinaries is max binaries batch can handle | | - [MaxSteps](#Sequencer_MaxSteps ) | No | integer | No | - | MaxSteps is max steps batch can handle | -| - [WeightBatchBytesSize](#Sequencer_WeightBatchBytesSize ) | No | integer | No | - | WeightBatchBytesSize is the cost weight for the BatchBytesSize batch resource | -| - [WeightCumulativeGasUsed](#Sequencer_WeightCumulativeGasUsed ) | No | integer | No | - | WeightCumulativeGasUsed is the cost weight for the CumulativeGasUsed batch resource | -| - [WeightKeccakHashes](#Sequencer_WeightKeccakHashes ) | No | integer | No | - | WeightKeccakHashes is the cost weight for the KeccakHashes batch resource | -| - [WeightPoseidonHashes](#Sequencer_WeightPoseidonHashes ) | No | integer | No | - | WeightPoseidonHashes is the cost weight for the PoseidonHashes batch resource | -| - [WeightPoseidonPaddings](#Sequencer_WeightPoseidonPaddings ) | No | integer | No | - | WeightPoseidonPaddings is the cost weight for the PoseidonPaddings batch resource | -| - [WeightMemAligns](#Sequencer_WeightMemAligns ) | No | integer | No | - | WeightMemAligns is the cost weight for the MemAligns batch resource | -| - [WeightArithmetics](#Sequencer_WeightArithmetics ) | No | integer | No | - | WeightArithmetics is the cost weight for the Arithmetics batch resource | -| - [WeightBinaries](#Sequencer_WeightBinaries ) | No | integer | No | - | WeightBinaries is the cost weight for the Binaries batch resource | -| - [WeightSteps](#Sequencer_WeightSteps ) | No | integer | No | - | WeightSteps is the cost weight for the Steps batch resource | | - [TxLifetimeCheckTimeout](#Sequencer_TxLifetimeCheckTimeout ) | No | string | No | - | Duration | | - [MaxTxLifetime](#Sequencer_MaxTxLifetime ) | No | string | No | - | Duration | | - [Finalizer](#Sequencer_Finalizer ) | No | object | No | - | Finalizer's specific config properties | | - [DBManager](#Sequencer_DBManager ) | No | object | No | - | DBManager's specific config properties | -| - [Worker](#Sequencer_Worker ) | No | object | No | - | Worker's specific config properties | | - [EffectiveGasPrice](#Sequencer_EffectiveGasPrice ) | No | object | No | - | EffectiveGasPrice is the config for the gas price | ### 10.1. `Sequencer.WaitPeriodPoolIsEmpty` @@ -1177,133 +1224,7 @@ MaxBinaries=473170 MaxSteps=7570538 ``` -### 10.14. `Sequencer.WeightBatchBytesSize` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** WeightBatchBytesSize is the cost weight for the BatchBytesSize batch resource - -**Example setting the default value** (1): -``` -[Sequencer] -WeightBatchBytesSize=1 -``` - -### 10.15. `Sequencer.WeightCumulativeGasUsed` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** WeightCumulativeGasUsed is the cost weight for the CumulativeGasUsed batch resource - -**Example setting the default value** (1): -``` -[Sequencer] -WeightCumulativeGasUsed=1 -``` - -### 10.16. `Sequencer.WeightKeccakHashes` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** WeightKeccakHashes is the cost weight for the KeccakHashes batch resource - -**Example setting the default value** (1): -``` -[Sequencer] -WeightKeccakHashes=1 -``` - -### 10.17. `Sequencer.WeightPoseidonHashes` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** WeightPoseidonHashes is the cost weight for the PoseidonHashes batch resource - -**Example setting the default value** (1): -``` -[Sequencer] -WeightPoseidonHashes=1 -``` - -### 10.18. `Sequencer.WeightPoseidonPaddings` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** WeightPoseidonPaddings is the cost weight for the PoseidonPaddings batch resource - -**Example setting the default value** (1): -``` -[Sequencer] -WeightPoseidonPaddings=1 -``` - -### 10.19. `Sequencer.WeightMemAligns` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** WeightMemAligns is the cost weight for the MemAligns batch resource - -**Example setting the default value** (1): -``` -[Sequencer] -WeightMemAligns=1 -``` - -### 10.20. `Sequencer.WeightArithmetics` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** WeightArithmetics is the cost weight for the Arithmetics batch resource - -**Example setting the default value** (1): -``` -[Sequencer] -WeightArithmetics=1 -``` - -### 10.21. `Sequencer.WeightBinaries` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** WeightBinaries is the cost weight for the Binaries batch resource - -**Example setting the default value** (1): -``` -[Sequencer] -WeightBinaries=1 -``` - -### 10.22. `Sequencer.WeightSteps` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** WeightSteps is the cost weight for the Steps batch resource - -**Example setting the default value** (1): -``` -[Sequencer] -WeightSteps=1 -``` - -### 10.23. `Sequencer.TxLifetimeCheckTimeout` +### 10.14. `Sequencer.TxLifetimeCheckTimeout` **Title:** Duration @@ -1329,7 +1250,7 @@ WeightSteps=1 TxLifetimeCheckTimeout="10m0s" ``` -### 10.24. `Sequencer.MaxTxLifetime` +### 10.15. `Sequencer.MaxTxLifetime` **Title:** Duration @@ -1355,7 +1276,7 @@ TxLifetimeCheckTimeout="10m0s" MaxTxLifetime="3h0m0s" ``` -### 10.25. `[Sequencer.Finalizer]` +### 10.16. `[Sequencer.Finalizer]` **Type:** : `object` **Description:** Finalizer's specific config properties @@ -1374,7 +1295,7 @@ MaxTxLifetime="3h0m0s" | - [TimestampResolution](#Sequencer_Finalizer_TimestampResolution ) | No | string | No | - | Duration | | - [StopSequencerOnBatchNum](#Sequencer_Finalizer_StopSequencerOnBatchNum ) | No | integer | No | - | StopSequencerOnBatchNum specifies the batch number where the Sequencer will stop to process more transactions and generate new batches. The Sequencer will halt after it closes the batch equal to this number | -#### 10.25.1. `Sequencer.Finalizer.GERDeadlineTimeout` +#### 10.16.1. `Sequencer.Finalizer.GERDeadlineTimeout` **Title:** Duration @@ -1400,7 +1321,7 @@ MaxTxLifetime="3h0m0s" GERDeadlineTimeout="5s" ``` -#### 10.25.2. `Sequencer.Finalizer.ForcedBatchDeadlineTimeout` +#### 10.16.2. `Sequencer.Finalizer.ForcedBatchDeadlineTimeout` **Title:** Duration @@ -1426,7 +1347,7 @@ GERDeadlineTimeout="5s" ForcedBatchDeadlineTimeout="1m0s" ``` -#### 10.25.3. `Sequencer.Finalizer.SleepDuration` +#### 10.16.3. `Sequencer.Finalizer.SleepDuration` **Title:** Duration @@ -1452,7 +1373,7 @@ ForcedBatchDeadlineTimeout="1m0s" SleepDuration="100ms" ``` -#### 10.25.4. `Sequencer.Finalizer.ResourcePercentageToCloseBatch` +#### 10.16.4. `Sequencer.Finalizer.ResourcePercentageToCloseBatch` **Type:** : `integer` @@ -1466,7 +1387,7 @@ SleepDuration="100ms" ResourcePercentageToCloseBatch=10 ``` -#### 10.25.5. `Sequencer.Finalizer.GERFinalityNumberOfBlocks` +#### 10.16.5. `Sequencer.Finalizer.GERFinalityNumberOfBlocks` **Type:** : `integer` @@ -1480,7 +1401,7 @@ ResourcePercentageToCloseBatch=10 GERFinalityNumberOfBlocks=64 ``` -#### 10.25.6. `Sequencer.Finalizer.ClosingSignalsManagerWaitForCheckingL1Timeout` +#### 10.16.6. `Sequencer.Finalizer.ClosingSignalsManagerWaitForCheckingL1Timeout` **Title:** Duration @@ -1506,7 +1427,7 @@ GERFinalityNumberOfBlocks=64 ClosingSignalsManagerWaitForCheckingL1Timeout="10s" ``` -#### 10.25.7. `Sequencer.Finalizer.ClosingSignalsManagerWaitForCheckingGER` +#### 10.16.7. `Sequencer.Finalizer.ClosingSignalsManagerWaitForCheckingGER` **Title:** Duration @@ -1532,7 +1453,7 @@ ClosingSignalsManagerWaitForCheckingL1Timeout="10s" ClosingSignalsManagerWaitForCheckingGER="10s" ``` -#### 10.25.8. `Sequencer.Finalizer.ClosingSignalsManagerWaitForCheckingForcedBatches` +#### 10.16.8. `Sequencer.Finalizer.ClosingSignalsManagerWaitForCheckingForcedBatches` **Title:** Duration @@ -1558,7 +1479,7 @@ ClosingSignalsManagerWaitForCheckingGER="10s" ClosingSignalsManagerWaitForCheckingForcedBatches="10s" ``` -#### 10.25.9. `Sequencer.Finalizer.ForcedBatchesFinalityNumberOfBlocks` +#### 10.16.9. `Sequencer.Finalizer.ForcedBatchesFinalityNumberOfBlocks` **Type:** : `integer` @@ -1572,7 +1493,7 @@ ClosingSignalsManagerWaitForCheckingForcedBatches="10s" ForcedBatchesFinalityNumberOfBlocks=64 ``` -#### 10.25.10. `Sequencer.Finalizer.TimestampResolution` +#### 10.16.10. `Sequencer.Finalizer.TimestampResolution` **Title:** Duration @@ -1598,7 +1519,7 @@ ForcedBatchesFinalityNumberOfBlocks=64 TimestampResolution="10s" ``` -#### 10.25.11. `Sequencer.Finalizer.StopSequencerOnBatchNum` +#### 10.16.11. `Sequencer.Finalizer.StopSequencerOnBatchNum` **Type:** : `integer` @@ -1612,7 +1533,7 @@ TimestampResolution="10s" StopSequencerOnBatchNum=0 ``` -### 10.26. `[Sequencer.DBManager]` +### 10.17. `[Sequencer.DBManager]` **Type:** : `object` **Description:** DBManager's specific config properties @@ -1622,7 +1543,7 @@ StopSequencerOnBatchNum=0 | - [PoolRetrievalInterval](#Sequencer_DBManager_PoolRetrievalInterval ) | No | string | No | - | Duration | | - [L2ReorgRetrievalInterval](#Sequencer_DBManager_L2ReorgRetrievalInterval ) | No | string | No | - | Duration | -#### 10.26.1. `Sequencer.DBManager.PoolRetrievalInterval` +#### 10.17.1. `Sequencer.DBManager.PoolRetrievalInterval` **Title:** Duration @@ -1646,7 +1567,7 @@ StopSequencerOnBatchNum=0 PoolRetrievalInterval="500ms" ``` -#### 10.26.2. `Sequencer.DBManager.L2ReorgRetrievalInterval` +#### 10.17.2. `Sequencer.DBManager.L2ReorgRetrievalInterval` **Title:** Duration @@ -1670,30 +1591,7 @@ PoolRetrievalInterval="500ms" L2ReorgRetrievalInterval="5s" ``` -### 10.27. `[Sequencer.Worker]` - -**Type:** : `object` -**Description:** Worker's specific config properties - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| --------------------------------------------------------------------- | ------- | ------ | ---------- | ---------- | -------------------------------------------------------------- | -| - [ResourceCostMultiplier](#Sequencer_Worker_ResourceCostMultiplier ) | No | number | No | - | ResourceCostMultiplier is the multiplier for the resource cost | - -#### 10.27.1. `Sequencer.Worker.ResourceCostMultiplier` - -**Type:** : `number` - -**Default:** `1000` - -**Description:** ResourceCostMultiplier is the multiplier for the resource cost - -**Example setting the default value** (1000): -``` -[Sequencer.Worker] -ResourceCostMultiplier=1000 -``` - -### 10.28. `[Sequencer.EffectiveGasPrice]` +### 10.18. `[Sequencer.EffectiveGasPrice]` **Type:** : `object` **Description:** EffectiveGasPrice is the config for the gas price @@ -1707,7 +1605,7 @@ ResourceCostMultiplier=1000 | - [Enabled](#Sequencer_EffectiveGasPrice_Enabled ) | No | boolean | No | - | Enabled is a flag to enable/disable the effective gas price | | - [DefaultMinGasPriceAllowed](#Sequencer_EffectiveGasPrice_DefaultMinGasPriceAllowed ) | No | integer | No | - | DefaultMinGasPriceAllowed is the default min gas price to suggest
This value is assigned from [Pool].DefaultMinGasPriceAllowed | -#### 10.28.1. `Sequencer.EffectiveGasPrice.MaxBreakEvenGasPriceDeviationPercentage` +#### 10.18.1. `Sequencer.EffectiveGasPrice.MaxBreakEvenGasPriceDeviationPercentage` **Type:** : `integer` @@ -1721,7 +1619,7 @@ ResourceCostMultiplier=1000 MaxBreakEvenGasPriceDeviationPercentage=10 ``` -#### 10.28.2. `Sequencer.EffectiveGasPrice.L1GasPriceFactor` +#### 10.18.2. `Sequencer.EffectiveGasPrice.L1GasPriceFactor` **Type:** : `number` @@ -1735,7 +1633,7 @@ MaxBreakEvenGasPriceDeviationPercentage=10 L1GasPriceFactor=0.25 ``` -#### 10.28.3. `Sequencer.EffectiveGasPrice.ByteGasCost` +#### 10.18.3. `Sequencer.EffectiveGasPrice.ByteGasCost` **Type:** : `integer` @@ -1749,7 +1647,7 @@ L1GasPriceFactor=0.25 ByteGasCost=16 ``` -#### 10.28.4. `Sequencer.EffectiveGasPrice.MarginFactor` +#### 10.18.4. `Sequencer.EffectiveGasPrice.MarginFactor` **Type:** : `number` @@ -1763,7 +1661,7 @@ ByteGasCost=16 MarginFactor=1 ``` -#### 10.28.5. `Sequencer.EffectiveGasPrice.Enabled` +#### 10.18.5. `Sequencer.EffectiveGasPrice.Enabled` **Type:** : `boolean` @@ -1777,7 +1675,7 @@ MarginFactor=1 Enabled=false ``` -#### 10.28.6. `Sequencer.EffectiveGasPrice.DefaultMinGasPriceAllowed` +#### 10.18.6. `Sequencer.EffectiveGasPrice.DefaultMinGasPriceAllowed` **Type:** : `integer` @@ -1797,14 +1695,15 @@ DefaultMinGasPriceAllowed=0 **Type:** : `object` **Description:** Configuration of the sequence sender service -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------------------------------------- | ------- | --------------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| - [WaitPeriodSendSequence](#SequenceSender_WaitPeriodSendSequence ) | No | string | No | - | Duration | -| - [LastBatchVirtualizationTimeMaxWaitPeriod](#SequenceSender_LastBatchVirtualizationTimeMaxWaitPeriod ) | No | string | No | - | Duration | -| - [MaxTxSizeForL1](#SequenceSender_MaxTxSizeForL1 ) | No | integer | No | - | MaxTxSizeForL1 is the maximum size a single transaction can have. This field has
non-trivial consequences: larger transactions than 128KB are significantly harder and
more expensive to propagate; larger transactions also take more resources
to validate whether they fit into the pool or not. | -| - [SenderAddress](#SequenceSender_SenderAddress ) | No | string | No | - | SenderAddress defines which private key the eth tx manager needs to use
to sign the L1 txs | -| - [PrivateKeys](#SequenceSender_PrivateKeys ) | No | array of object | No | - | PrivateKeys defines all the key store files that are going
to be read in order to provide the private keys to sign the L1 txs | -| - [ForkUpgradeBatchNumber](#SequenceSender_ForkUpgradeBatchNumber ) | No | integer | No | - | Batch number where there is a forkid change (fork upgrade) | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ------------------------------------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------- | +| - [WaitPeriodSendSequence](#SequenceSender_WaitPeriodSendSequence ) | No | string | No | - | Duration | +| - [LastBatchVirtualizationTimeMaxWaitPeriod](#SequenceSender_LastBatchVirtualizationTimeMaxWaitPeriod ) | No | string | No | - | Duration | +| - [MaxBatchesForL1](#SequenceSender_MaxBatchesForL1 ) | No | integer | No | - | MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx | +| - [SenderAddress](#SequenceSender_SenderAddress ) | No | array of integer | No | - | SenderAddress defines which private key the eth tx manager needs to use
to sign the L1 txs | +| - [L2Coinbase](#SequenceSender_L2Coinbase ) | No | array of integer | No | - | L2Coinbase defines which addess is going to receive the fees | +| - [PrivateKey](#SequenceSender_PrivateKey ) | No | object | No | - | PrivateKey defines all the key store files that are going
to be read in order to provide the private keys to sign the L1 txs | +| - [ForkUpgradeBatchNumber](#SequenceSender_ForkUpgradeBatchNumber ) | No | integer | No | - | Batch number where there is a forkid change (fork upgrade) | ### 11.1. `SequenceSender.WaitPeriodSendSequence` @@ -1859,86 +1758,80 @@ WaitPeriodSendSequence="5s" LastBatchVirtualizationTimeMaxWaitPeriod="5s" ``` -### 11.3. `SequenceSender.MaxTxSizeForL1` +### 11.3. `SequenceSender.MaxBatchesForL1` **Type:** : `integer` -**Default:** `131072` +**Default:** `1000` -**Description:** MaxTxSizeForL1 is the maximum size a single transaction can have. This field has -non-trivial consequences: larger transactions than 128KB are significantly harder and -more expensive to propagate; larger transactions also take more resources -to validate whether they fit into the pool or not. +**Description:** MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx -**Example setting the default value** (131072): +**Example setting the default value** (1000): ``` [SequenceSender] -MaxTxSizeForL1=131072 +MaxBatchesForL1=1000 ``` ### 11.4. `SequenceSender.SenderAddress` -**Type:** : `string` +**Type:** : `array of integer` +**Description:** SenderAddress defines which private key the eth tx manager needs to use +to sign the L1 txs + +### 11.5. `SequenceSender.L2Coinbase` + +**Type:** : `array of integer` **Default:** `"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"` -**Description:** SenderAddress defines which private key the eth tx manager needs to use -to sign the L1 txs +**Description:** L2Coinbase defines which addess is going to receive the fees **Example setting the default value** ("0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"): ``` [SequenceSender] -SenderAddress="0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" +L2Coinbase="0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" ``` -### 11.5. `SequenceSender.PrivateKeys` - -**Type:** : `array of object` +### 11.6. `[SequenceSender.PrivateKey]` -**Default:** `[{"Path": "/pk/sequencer.keystore", "Password": "testonly"}]` - -**Description:** PrivateKeys defines all the key store files that are going +**Type:** : `object` +**Description:** PrivateKey defines all the key store files that are going to be read in order to provide the private keys to sign the L1 txs -**Example setting the default value** ([{"Path": "/pk/sequencer.keystore", "Password": "testonly"}]): -``` -[SequenceSender] -PrivateKeys=[{"Path": "/pk/sequencer.keystore", "Password": "testonly"}] -``` +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| -------------------------------------------------- | ------- | ------ | ---------- | ---------- | ------------------------------------------------------ | +| - [Path](#SequenceSender_PrivateKey_Path ) | No | string | No | - | Path is the file path for the key store file | +| - [Password](#SequenceSender_PrivateKey_Password ) | No | string | No | - | Password is the password to decrypt the key store file | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +#### 11.6.1. `SequenceSender.PrivateKey.Path` -| Each item of this array must be | Description | -| ------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| [PrivateKeys items](#SequenceSender_PrivateKeys_items) | KeystoreFileConfig has all the information needed to load a private key from a k ... | +**Type:** : `string` -#### 11.5.1. [SequenceSender.PrivateKeys.PrivateKeys items] +**Default:** `"/pk/sequencer.keystore"` -**Type:** : `object` -**Description:** KeystoreFileConfig has all the information needed to load a private key from a key store file +**Description:** Path is the file path for the key store file -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| --------------------------------------------------------- | ------- | ------ | ---------- | ---------- | ------------------------------------------------------ | -| - [Path](#SequenceSender_PrivateKeys_items_Path ) | No | string | No | - | Path is the file path for the key store file | -| - [Password](#SequenceSender_PrivateKeys_items_Password ) | No | string | No | - | Password is the password to decrypt the key store file | +**Example setting the default value** ("/pk/sequencer.keystore"): +``` +[SequenceSender.PrivateKey] +Path="/pk/sequencer.keystore" +``` -##### 11.5.1.1. `SequenceSender.PrivateKeys.PrivateKeys items.Path` +#### 11.6.2. `SequenceSender.PrivateKey.Password` **Type:** : `string` -**Description:** Path is the file path for the key store file -##### 11.5.1.2. `SequenceSender.PrivateKeys.PrivateKeys items.Password` +**Default:** `"testonly"` -**Type:** : `string` **Description:** Password is the password to decrypt the key store file -### 11.6. `SequenceSender.ForkUpgradeBatchNumber` +**Example setting the default value** ("testonly"): +``` +[SequenceSender.PrivateKey] +Password="testonly" +``` + +### 11.7. `SequenceSender.ForkUpgradeBatchNumber` **Type:** : `integer` @@ -2229,12 +2122,13 @@ GeneratingProofCleanupThreshold="10m" **Type:** : `object` **Description:** L1: Configuration related to L1 -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | ------------------------------------------------ | -| - [chainId](#NetworkConfig_l1Config_chainId ) | No | integer | No | - | Chain ID of the L1 network | -| - [polygonZkEVMAddress](#NetworkConfig_l1Config_polygonZkEVMAddress ) | No | array of integer | No | - | Address of the L1 contract | -| - [maticTokenAddress](#NetworkConfig_l1Config_maticTokenAddress ) | No | array of integer | No | - | Address of the L1 Matic token Contract | -| - [polygonZkEVMGlobalExitRootAddress](#NetworkConfig_l1Config_polygonZkEVMGlobalExitRootAddress ) | No | array of integer | No | - | Address of the L1 GlobalExitRootManager contract | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ------------------------------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | --------------------------------------------------- | +| - [chainId](#NetworkConfig_l1Config_chainId ) | No | integer | No | - | Chain ID of the L1 network | +| - [cdkValidiumAddress](#NetworkConfig_l1Config_cdkValidiumAddress ) | No | array of integer | No | - | Address of the L1 contract | +| - [maticTokenAddress](#NetworkConfig_l1Config_maticTokenAddress ) | No | array of integer | No | - | Address of the L1 Matic token Contract | +| - [polygonZkEVMGlobalExitRootAddress](#NetworkConfig_l1Config_polygonZkEVMGlobalExitRootAddress ) | No | array of integer | No | - | Address of the L1 GlobalExitRootManager contract | +| - [cdkDataCommitteeContract](#NetworkConfig_l1Config_cdkDataCommitteeContract ) | No | array of integer | No | - | Address of the data availability committee contract | #### 13.1.1. `NetworkConfig.l1Config.chainId` @@ -2250,7 +2144,7 @@ GeneratingProofCleanupThreshold="10m" chainId=0 ``` -#### 13.1.2. `NetworkConfig.l1Config.polygonZkEVMAddress` +#### 13.1.2. `NetworkConfig.l1Config.cdkValidiumAddress` **Type:** : `array of integer` **Description:** Address of the L1 contract @@ -2265,6 +2159,11 @@ chainId=0 **Type:** : `array of integer` **Description:** Address of the L1 GlobalExitRootManager contract +#### 13.1.5. `NetworkConfig.l1Config.cdkDataCommitteeContract` + +**Type:** : `array of integer` +**Description:** Address of the data availability committee contract + ### 13.2. `NetworkConfig.L2GlobalExitRootManagerAddr` **Type:** : `array of integer` @@ -2322,7 +2221,7 @@ GenesisBlockNum=0 | ------------------------------------------------------------------- | ------------------------------------------------------------------------- | | [GenesisActions items](#NetworkConfig_Genesis_GenesisActions_items) | GenesisAction represents one of the values set on the SMT during genesis. | -##### 13.4.3.1. [NetworkConfig.Genesis.GenesisActions.GenesisActions items] +##### 13.4.3.1. [NetworkConfig.Genesis.GenesisActions.GenesisActions items] **Type:** : `object` **Description:** GenesisAction represents one of the values set on the SMT during genesis. @@ -2556,12 +2455,12 @@ Factor=0.15 **Type:** : `string` -**Default:** `"zkevm-prover:50071"` +**Default:** `"cdk-validium-prover:50071"` -**Example setting the default value** ("zkevm-prover:50071"): +**Example setting the default value** ("cdk-validium-prover:50071"): ``` [Executor] -URI="zkevm-prover:50071" +URI="cdk-validium-prover:50071" ``` ### 15.2. `Executor.MaxResourceExhaustedAttempts` @@ -2629,14 +2528,14 @@ MaxGRPCMessageSize=100000000 **Type:** : `string` -**Default:** `"zkevm-prover:50061"` +**Default:** `"cdk-validium-prover:50061"` **Description:** URI is the server URI. -**Example setting the default value** ("zkevm-prover:50061"): +**Example setting the default value** ("cdk-validium-prover:50061"): ``` [MTClient] -URI="zkevm-prover:50061" +URI="cdk-validium-prover:50061" ``` ## 17. `[StateDB]` @@ -2700,14 +2599,14 @@ Password="state_password" **Type:** : `string` -**Default:** `"zkevm-state-db"` +**Default:** `"cdk-validium-state-db"` **Description:** Host address of database -**Example setting the default value** ("zkevm-state-db"): +**Example setting the default value** ("cdk-validium-state-db"): ``` [StateDB] -Host="zkevm-state-db" +Host="cdk-validium-state-db" ``` ### 17.5. `StateDB.Port` @@ -3033,14 +2932,14 @@ Password="prover_pass" **Type:** : `string` -**Default:** `"zkevm-state-db"` +**Default:** `"cdk-validium-state-db"` **Description:** Host address of database -**Example setting the default value** ("zkevm-state-db"): +**Example setting the default value** ("cdk-validium-state-db"): ``` [HashDB] -Host="zkevm-state-db" +Host="cdk-validium-state-db" ``` ### 20.5. `HashDB.Port` diff --git a/docs/config-file/node-config-schema.json b/docs/config-file/node-config-schema.json index bed2336c99..bc67d77c3e 100644 --- a/docs/config-file/node-config-schema.json +++ b/docs/config-file/node-config-schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "github.com/0xPolygonHermez/zkevm-node/config/config", + "$id": "github.com/0xPolygon/cdk-validium-node/config/config", "properties": { "IsTrustedSequencer": { "type": "boolean", @@ -9,7 +9,7 @@ }, "ForkUpgradeBatchNumber": { "type": "integer", - "description": "Last batch number before a forkid change (fork upgrade). That implies that\ngreater batch numbers are going to be trusted but no virtualized neither verified.\nSo after the batch number `ForkUpgradeBatchNumber` is virtualized and verified you could update\nthe system (SC,...) to new forkId and remove this value to allow the system to keep\nVirtualizing and verifying the new batchs.\nCheck issue [#2236](https://github.com/0xPolygonHermez/zkevm-node/issues/2236) to known more\nThis value overwrite `SequenceSender.ForkUpgradeBatchNumber`", + "description": "Last batch number before a forkid change (fork upgrade). That implies that\ngreater batch numbers are going to be trusted but no virtualized neither verified.\nSo after the batch number `ForkUpgradeBatchNumber` is virtualized and verified you could update\nthe system (SC,...) to new forkId and remove this value to allow the system to keep\nVirtualizing and verifying the new batchs.\nCheck issue [#2236](https://github.com/0xPolygon/cdk-validium-node/issues/2236) to known more\nThis value overwrite `SequenceSender.ForkUpgradeBatchNumber`", "default": 0 }, "ForkUpgradeNewForkId": { @@ -136,6 +136,16 @@ "type": "integer", "description": "ForcedGas is the amount of gas to be forced in case of gas estimation error", "default": 0 + }, + "GasPriceMarginFactor": { + "type": "number", + "description": "GasPriceMarginFactor is used to multiply the suggested gas price provided by the network\nin order to allow a different gas price to be set for all the transactions and making it\neasier to have the txs prioritized in the pool, default value is 1.\n\nex:\nsuggested gas price: 100\nGasPriceMarginFactor: 1\ngas price = 100\n\nsuggested gas price: 100\nGasPriceMarginFactor: 1.1\ngas price = 110", + "default": 1 + }, + "MaxGasPriceLimit": { + "type": "integer", + "description": "MaxGasPriceLimit helps avoiding transactions to be sent over an specified\ngas price amount, default value is 0, which means no limit.\nIf the gas price provided by the network and adjusted by the GasPriceMarginFactor\nis greater than this configuration, transaction will have its gas price set to\nthe value configured in this config as the limit.\n\nex:\n\nsuggested gas price: 100\ngas price margin factor: 20%\nmax gas price limit: 150\ntx gas price = 120\n\nsuggested gas price: 100\ngas price margin factor: 20%\nmax gas price limit: 110\ntx gas price = 110", + "default": 0 } }, "additionalProperties": false, @@ -194,7 +204,7 @@ "Host": { "type": "string", "description": "Host address of database", - "default": "zkevm-pool-db" + "default": "cdk-validium-pool-db" }, "Port": { "type": "string", @@ -444,51 +454,6 @@ "description": "MaxSteps is max steps batch can handle", "default": 7570538 }, - "WeightBatchBytesSize": { - "type": "integer", - "description": "WeightBatchBytesSize is the cost weight for the BatchBytesSize batch resource", - "default": 1 - }, - "WeightCumulativeGasUsed": { - "type": "integer", - "description": "WeightCumulativeGasUsed is the cost weight for the CumulativeGasUsed batch resource", - "default": 1 - }, - "WeightKeccakHashes": { - "type": "integer", - "description": "WeightKeccakHashes is the cost weight for the KeccakHashes batch resource", - "default": 1 - }, - "WeightPoseidonHashes": { - "type": "integer", - "description": "WeightPoseidonHashes is the cost weight for the PoseidonHashes batch resource", - "default": 1 - }, - "WeightPoseidonPaddings": { - "type": "integer", - "description": "WeightPoseidonPaddings is the cost weight for the PoseidonPaddings batch resource", - "default": 1 - }, - "WeightMemAligns": { - "type": "integer", - "description": "WeightMemAligns is the cost weight for the MemAligns batch resource", - "default": 1 - }, - "WeightArithmetics": { - "type": "integer", - "description": "WeightArithmetics is the cost weight for the Arithmetics batch resource", - "default": 1 - }, - "WeightBinaries": { - "type": "integer", - "description": "WeightBinaries is the cost weight for the Binaries batch resource", - "default": 1 - }, - "WeightSteps": { - "type": "integer", - "description": "WeightSteps is the cost weight for the Steps batch resource", - "default": 1 - }, "TxLifetimeCheckTimeout": { "type": "string", "title": "Duration", @@ -631,18 +596,6 @@ "type": "object", "description": "DBManager's specific config properties" }, - "Worker": { - "properties": { - "ResourceCostMultiplier": { - "type": "number", - "description": "ResourceCostMultiplier is the multiplier for the resource cost", - "default": 1000 - } - }, - "additionalProperties": false, - "type": "object", - "description": "Worker's specific config properties" - }, "EffectiveGasPrice": { "properties": { "MaxBreakEvenGasPriceDeviationPercentage": { @@ -707,40 +660,46 @@ "300ms" ] }, - "MaxTxSizeForL1": { + "MaxBatchesForL1": { "type": "integer", - "description": "MaxTxSizeForL1 is the maximum size a single transaction can have. This field has\nnon-trivial consequences: larger transactions than 128KB are significantly harder and\nmore expensive to propagate; larger transactions also take more resources\nto validate whether they fit into the pool or not.", - "default": 131072 + "description": "MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx", + "default": 1000 }, "SenderAddress": { - "type": "string", - "description": "SenderAddress defines which private key the eth tx manager needs to use\nto sign the L1 txs", - "default": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" + "items": { + "type": "integer" + }, + "type": "array", + "maxItems": 20, + "minItems": 20, + "description": "SenderAddress defines which private key the eth tx manager needs to use\nto sign the L1 txs" }, - "PrivateKeys": { + "L2Coinbase": { "items": { - "properties": { - "Path": { - "type": "string", - "description": "Path is the file path for the key store file" - }, - "Password": { - "type": "string", - "description": "Password is the password to decrypt the key store file" - } - }, - "additionalProperties": false, - "type": "object", - "description": "KeystoreFileConfig has all the information needed to load a private key from a key store file" + "type": "integer" }, "type": "array", - "description": "PrivateKeys defines all the key store files that are going\nto be read in order to provide the private keys to sign the L1 txs", - "default": [ - { - "Path": "/pk/sequencer.keystore", - "Password": "testonly" + "maxItems": 20, + "minItems": 20, + "description": "L2Coinbase defines which addess is going to receive the fees", + "default": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" + }, + "PrivateKey": { + "properties": { + "Path": { + "type": "string", + "description": "Path is the file path for the key store file", + "default": "/pk/sequencer.keystore" + }, + "Password": { + "type": "string", + "description": "Password is the password to decrypt the key store file", + "default": "testonly" } - ] + }, + "additionalProperties": false, + "type": "object", + "description": "PrivateKey defines all the key store files that are going\nto be read in order to provide the private keys to sign the L1 txs" }, "ForkUpgradeBatchNumber": { "type": "integer", @@ -859,7 +818,7 @@ "description": "Chain ID of the L1 network", "default": 0 }, - "polygonZkEVMAddress": { + "cdkValidiumAddress": { "items": { "type": "integer" }, @@ -885,6 +844,15 @@ "maxItems": 20, "minItems": 20, "description": "Address of the L1 GlobalExitRootManager contract" + }, + "cdkDataCommitteeContract": { + "items": { + "type": "integer" + }, + "type": "array", + "maxItems": 20, + "minItems": 20, + "description": "Address of the data availability committee contract" } }, "additionalProperties": false, @@ -1041,7 +1009,7 @@ "properties": { "URI": { "type": "string", - "default": "zkevm-prover:50071" + "default": "cdk-validium-prover:50071" }, "MaxResourceExhaustedAttempts": { "type": "integer", @@ -1072,7 +1040,7 @@ "URI": { "type": "string", "description": "URI is the server URI.", - "default": "zkevm-prover:50061" + "default": "cdk-validium-prover:50061" } }, "additionalProperties": false, @@ -1099,7 +1067,7 @@ "Host": { "type": "string", "description": "Host address of database", - "default": "zkevm-state-db" + "default": "cdk-validium-state-db" }, "Port": { "type": "string", @@ -1227,7 +1195,7 @@ "Host": { "type": "string", "description": "Host address of database", - "default": "zkevm-state-db" + "default": "cdk-validium-state-db" }, "Port": { "type": "string", diff --git a/docs/json-rpc-endpoints.md b/docs/json-rpc-endpoints.md index 798ba49412..9ffb7df191 100644 --- a/docs/json-rpc-endpoints.md +++ b/docs/json-rpc-endpoints.md @@ -13,8 +13,8 @@ If the endpoint is not in the list below, it means this specific endpoint is not - `eth_blockNumber` - `eth_call` - - _doesn't support state override at the moment and pending block. Will be implemented [#1990](https://github.com/0xPolygonHermez/zkevm-node/issues/1990)_ - - _doesn't support `from` values that are smart contract addresses. Will be implemented [#2017](https://github.com/0xPolygonHermez/zkevm-node/issues/2017)_ + - _doesn't support state override at the moment and pending block. Will be implemented [#1990](https://github.com/0xPolygon/cdk-validium-node/issues/1990)_ + - _doesn't support `from` values that are smart contract addresses. Will be implemented [#2017](https://github.com/0xPolygon/cdk-validium-node/issues/2017)_ - `eth_chainId` - `eth_estimateGas` _* if the block number is set to pending we assume it is the latest_ - `eth_gasPrice` diff --git a/docs/modes.md b/docs/modes.md index 3d264912c6..e440bc8cf4 100644 --- a/docs/modes.md +++ b/docs/modes.md @@ -19,7 +19,7 @@ By default the config files found in the repository will spin up the Node in JSO This will syncronize with the Trusted Sequencer (run by Polygon). -Use the default [testnet config file](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/config/environments/testnet/node.config.toml), and make sure the following values are set to: +Use the default [testnet config file](https://github.com/0xPolygon/cdk-validium-node/blob/develop/config/environments/testnet/node.config.toml), and make sure the following values are set to: ```toml [RPC] @@ -27,7 +27,7 @@ Use the default [testnet config file](https://github.com/0xPolygonHermez/zkevm-n SequencerNodeURI = "https://public.zkevm-test.net:2083" ``` -Same goes for the Prover Config ([prover-config.json](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/config/environments/testnet/testnet.prover.config.json)): +Same goes for the Prover Config ([prover-config.json](https://github.com/0xPolygon/cdk-validium-node/blob/develop/config/environments/testnet/testnet.prover.config.json)): ```json { @@ -78,7 +78,7 @@ Machine 1: #### Machine 1 -Use default [prover config](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/config/environments/testnet/prover.config.json) but change the following values (`runProverServer` set to true, rest false): +Use default [prover config](https://github.com/0xPolygon/cdk-validium-node/blob/develop/config/environments/testnet/prover.config.json) but change the following values (`runProverServer` set to true, rest false): For *only* Prover Config (`only-prover-config.json`): diff --git a/docs/production-setup.md b/docs/production-setup.md deleted file mode 100644 index 1d66ee8e56..0000000000 --- a/docs/production-setup.md +++ /dev/null @@ -1,102 +0,0 @@ -# Production Setup - -This guide describes how to run a node that: - -- Synchronizes the network -- Expose a JSON RPC interface, acting as an archive node - -Note that sequencing and proving functionalities are not covered in this document **yet**. - -## Requirements - -- A machine to run the zkEVM node with the following requirements: - - Hardware: 32G RAM, 4 cores, 128G Disk with high IOPS (as the network is super young the current disk requirements are quite low, but they will increase overtime. Also note that this requirement is true if the DBs run on the same machine, but it's recommended to run Postgres on dedicated infra). Currently ARM-based CPUs are not supported - - Software: Ubuntu 22.04, Docker -- A L1 node: we recommend using geth, but what it's actually needed is access to a JSON RPC interface for the L1 network (Goerli for zkEVM testnet, Ethereum mainnet for zkEVM mainnet) - -## Setup - -This is the most straightforward path to run a zkEVM node, and it's perfectly fine for most use cases, however if you are interested in providing service to many users it's recommended to do some tweaking over the default configuration. Furthermore, this is quite opinionated, feel free to run this software in a different way, for instance it's not needed to use Docker, you could use the Go and C++ binaries directly. - -tl;dr: - -```bash -# DOWNLOAD ARTIFACTS -ZKEVM_NET=mainnet -ZKEVM_DIR=./path/to/install # CHANGE THIS -ZKEVM_CONFIG_DIR=./path/to/config # CHANGE THIS -curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip -cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env - -# EDIT THIS env file: -nano $ZKEVM_CONFIG_DIR/.env - -# RUN: -docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml up -d -``` - -Explained step by step: - -1. Define network: `ZKEVM_NET=testnet` or `ZKEVM_NET=mainnet` -2. Define installation path: `ZKEVM_DIR=./path/to/install` -3. Define a config directory: `ZKEVM_CONFIG_DIR=./path/to/config` -4. It's recommended to source this env vars in your `~/.bashrc`, `~/.zshrc` or whatever you're using -5. Download and extract the artifacts: `curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip`. Note you may need to install `unzip` for this command to work -6. Copy the file with the env parameters: `cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env` -7. Edit the env file, with your favourite editor. The example will use nano: `nano $ZKEVM_CONFIG_DIR/.env`. This file contains the configuration that anyone should modify. For advanced configuration: - 1. Copy the config files into the config directory `cp $ZKEVM_DIR/$ZKEVM_NET/config/environments/testnet/* $ZKEVM_CONFIG_DIR/` - 2. Make sure the modify the `ZKEVM_ADVANCED_CONFIG_DIR` from `$ZKEVM_CONFIG_DIR/.env` with the correct path - 3. Edit the different configuration files -8. Run the node: `docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml up -d`. You may need to run this command using `sudo` depending on your Docker setup. -9. Make sure that all components are running: `docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml ps`. You should see the following containers: - 1. zkevm-rpc - 2. zkevm-sync - 3. zkevm-state-db - 4. zkevm-pool-db - 5. zkevm-prover - -If everything has gone as expected you should be able to run queries to the JSON RPC at `http://localhost:8545`. For instance you can run the following query that fetches the latest synchronized L2 block, if you call this every few seconds, you should see the number increasing: - -`curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}' http://localhost:8545` - -## Troubleshooting - -- It's possible that the machine you're using already uses some of the necessary ports. In this case you can change them directly at `$ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml` -- If one or more containers are crashing please check the logs using `docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml logs ` - -## Stop - -```bash -docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml down -``` - -## Updating - -In order to update the software, you have to repeat the steps of the setup, but taking care of not overriding the config that you have modified. Basically, instead of running `cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env`, check if the variables of `$ZKEVM_DIR/$ZKEVM_NET/example.env` have been renamed or there are new ones, and update `$ZKEVM_CONFIG_DIR/.env` accordingly. - -## Advanced setup - -> DISCLAIMER: right now this part of the documentation attempts to give ideas on how to improve the setup for better performance, but is far from being a detailed guide on how to achieve this. Please open issues requesting more details if you don't understand how to achieve something. We will keep improving this doc for sure! - -There are some fundamental changes that can be done towards the basic setup, in order to get better performance and scale better: - -### DB - -In the basic setup, there are Postgres being instanciated as Docker containers. For better performance is recommended to: - -- Run dedicated instances for Postgres. To achieve this you will need to: - - Remove the Postgres services (`zkevm-pool-db` and `zkevm-state-db`) from the `docker-compose.yml` - - Instantiate Postgres elsewhere (note that you will have to create credentials and run some queries to make this work, following the config files and docker-compose should give a clear idea of what to do) - - Update the `node.config.toml` to use the correct URI for both DBs - - Update `prover.config.json` to use the correct URI for the state DB -- Use a setup of Postgres that allows to have separated endpoints for read / write replicas - -### JSON RPC - -Unlike the synchronizer, that needs to have only one instance running (having more than one synchronizer running at the same time connected to the same DB can be fatal), the JSON RPC can scale horizontally. - -There can be as many instances of it as needed, but in order to not introduce other bottlenecks, it's important to consider the following: - -- Read replicas of the State DB should be used -- Synchronizer should have an exclusive instance of `zkevm-prover` -- JSON RPCs should scale in correlation with instances of `zkevm-prover`. The most obvious way to do so is by having a dedicated `zkevm-prover` for each `zkevm-rpc`. But depending on the payload of your solution it could be worth to have `1 zkevm-rpc : many zkevm-prover` or `many zkevm-rpc : 1 zkevm-prover`, ... For reference, the `zkevm-prover` implements the EVM, and therefore will be heavily used when calling endpoints such as `eth_call`. On the other hand, there are other endpoints that relay on the `zkevm-state-db` diff --git a/docs/running_local.md b/docs/running_local.md deleted file mode 100644 index f7c2d63464..0000000000 --- a/docs/running_local.md +++ /dev/null @@ -1,233 +0,0 @@ -# Steps to run/develop on the environment locally - -# Warning: - ->Currently the Executor/Prover does not run on ARM-powered Macs. For Windows users, WSL/WSL2 use is not recommended. - -## Overview - -This documentation will help you running the following components: - -- zkEVM Node Databases -- Explorer Databases -- L1 Network -- Prover -- zkEVM Node components -- Explorers - -## Requirements - -The current version of the environment requires `go`, `docker` and `docker-compose` to be previously installed, check the links below to understand how to install them: - -- -- -- - -The `zkevm-node` docker image must be built at least once and every time a change is made to the code. -If you haven't build the `zkevm-node` image yet, you must run: - -```bash -make build-docker -``` - -## A look at how the binary works: - -The `zkevm-node` allows certain commands to interact with smart contracts, run certain components, create encryption files and print out debug information. - -To interact with the binary program we provide docker compose files, and a Makefile to spin up/down the different services and components, ensuring a smooth deployment locally and better interface in command line for developers. - -## Controlling the environment - -> All the data is stored inside of each docker container, this means once you remove the container, the data will be lost. - -To run the environment: - -The `test/` directory contains scripts and files for developing and debugging. - -```bash -cd test/ -``` - -Then: - -```bash -make run -``` - -To stop the environment: - -```bash -make stop -``` - -To restart the environment: - -```bash -make restart -``` - -## Sample data - -The `make run` will execute the containers needed to run the environment but this will not execute anything else, so the L2 will be basically empty. - -If you need sample data already deployed to the network, we have the following scripts: - -**To add some examples of transactions and smart contracts:** - -```bash -make deploy-sc -``` - -**To deploy a full a uniswap environment:** - -```bash -make deploy-uniswap -``` - -**To grant the Matic smart contract a set amount of tokens, run:** - -```bash -make run-approve-matic -``` - -## Accessing the environment - -- **Databases**: - - zkEVM Node *State* Database - - `Type:` Postgres DB - - `User:` state_user - - `Password:` state_password - - `Database:` state-db - - `Host:` localhost - - `Port:` 5432 - - `Url:` - - zkEVM Node *Pool* Database - - `Type:` Postgres DB - - `User:` pool_user - - `Password:` pool_password - - `Database:` pool_db - - `Host:` localhost - - `Port:` 5433 - - `Url:` - - zkEVM Node *JSON-RPC* Database - - `Type:` Postgres DB - - `User:` rpc_user - - `Password:` rpc_password - - `Database:` rpc_db - - `Host:` localhost - - `Port:` 5434 - - `Url:` - - Explorer L1 Database - - `Type:` Postgres DB - - `User:` l1_explorer_user - - `Password:` l1_explorer_password - - `Database:` l1_explorer_db - - `Host:` localhost - - `Port:` 5435 - - `Url:` - - Explorer L2 Database - - `Type:` Postgres DB - - `User:` l2_explorer_user - - `Password:` l2_explorer_password - - `Database:` l2_explorer_db - - `Host:` localhost - - `Port:` 5436 - - `Url:` -- **Networks**: - - L1 Network - - `Type:` Geth - - `Host:` localhost - - `Port:` 8545 - - `Url:` - - zkEVM Node - - `Type:` JSON RPC - - `Host:` localhost - - `Port:` 8123 - - `Url:` -- **Explorers**: - - Explorer L1 - - `Type:` Web - - `Host:` localhost - - `Port:` 4000 - - `Url:` - - Explorer L2 - - `Type:` Web - - `Host:` localhost - - `Port:` 4001 - - `Url:` -- Prover - - `Type:` Mock - - `Host:` localhost - - `Port:` Depending on the prover image, if it's mock or not: - - Prod prover: 50052 for Prover, 50061 for Merkle Tree, 50071 for Executor - - Mock prover: 43061 for MT, 43071 for Executor - - `Url:` -## Metamask - -> Metamask requires the network to be running while configuring it, so make sure your network is running before starting. - -To configure your Metamask to use your local environment, follow these steps: - -1. Log in to your Metamask wallet -2. Click on your account picture and then on Settings -3. On the left menu, click on Networks -4. Click on `Add Network` button -5. Fill up the L2 network information - 1. `Network Name:` Polygon zkEVM - Local - 2. `New RPC URL:` - 3. `ChainID:` 1001 - 4. `Currency Symbol:` ETH - 5. `Block Explorer URL:` -6. Click on Save -7. Click on `Add Network` button -8. Fill up the L1 network information - 1. `Network Name:` Geth - Local - 2. `New RPC URL:` - 3. `ChainID:` 1337 - 4. `Currency Symbol:` ETH -9. Click on Save - -## L1 Addresses - -| Address | Description | -|---|---| -| 0x610178dA211FEF7D417bC0e6FeD39F05609AD788 | Proof of Efficiency | -| 0xff0EE8ea08cEf5cb4322777F5CC3E8A584B8A4A0 | Bridge | -| 0x5FbDB2315678afecb367f032d93F642f64180aa3 | Matic token | -| 0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6 | GlobalExitRootManager | - -## Deployer Account - -| Address | Private Key | -|---|---| -| 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 | 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | - -## Sequencer Account - -| Address | Private Key | -|---|---| -| 0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D | 0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e | - -## Accounts - -| Address | Private Key | -|---|---| -| 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 | 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d | -| 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC | 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a | -| 0x90F79bf6EB2c4f870365E785982E1f101E93b906 | 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6 | -| 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 | 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a | -| 0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc | 0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba | -| 0x976EA74026E726554dB657fA54763abd0C3a0aa9 | 0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e | -| 0x14dC79964da2C08b23698B3D3cc7Ca32193d9955 | 0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356 | -| 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f | 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 | -| 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 | 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 | -| 0xBcd4042DE499D14e55001CcbB24a551F3b954096 | 0xf214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897 | -| 0x71bE63f3384f5fb98995898A86B02Fb2426c5788 | 0x701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2bdf6f192c82 | -| 0xFABB0ac9d68B0B445fB7357272Ff202C5651694a | 0xa267530f49f8280200edf313ee7af6b827f2a8bce2897751d06a843f644967b1 | -| 0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec | 0x47c99abed3324a2707c28affff1267e45918ec8c3f20b8aa892e8b065d2942dd | -| 0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097 | 0xc526ee95bf44d8fc405a158bb884d9d1238d99f0612e9f33d006bb0789009aaa | -| 0xcd3B766CCDd6AE721141F452C550Ca635964ce71 | 0x8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61 | -| 0x2546BcD3c84621e976D8185a91A922aE77ECEc30 | 0xea6c44ac03bff858b476bba40716402b03e41b8e97e276d1baec7c37d42484a0 | -| 0xbDA5747bFD65F08deb54cb465eB87D40e51B197E | 0x689af8efa8c651a91ad287602527f3af2fe9f6501a7ac4b061667b5a93e037fd | -| 0xdD2FD4581271e230360230F9337D5c0430Bf44C0 | 0xde9be858da4a475276426320d5e9262ecfc3ba460bfac56360bfa6c4c28b4ee0 | -| 0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199 | 0xdf57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e | diff --git a/encoding/encoding.go b/encoding/encoding.go index 9bcb9d31e8..57548a977a 100644 --- a/encoding/encoding.go +++ b/encoding/encoding.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/cdk-validium-node/hex" "github.com/ethereum/go-ethereum/common" ) diff --git a/etherman/config.go b/etherman/config.go index 44b7b60bb6..3ac0d2d7fe 100644 --- a/etherman/config.go +++ b/etherman/config.go @@ -1,6 +1,6 @@ package etherman -import "github.com/0xPolygonHermez/zkevm-node/etherman/etherscan" +import "github.com/0xPolygon/cdk-validium-node/etherman/etherscan" // Config represents the configuration of the etherman type Config struct { diff --git a/etherman/datacommittee.go b/etherman/datacommittee.go new file mode 100644 index 0000000000..a990dbe52f --- /dev/null +++ b/etherman/datacommittee.go @@ -0,0 +1,64 @@ +package etherman + +import ( + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" +) + +// DataCommitteeMember represents a member of the Data Committee +type DataCommitteeMember struct { + Addr common.Address + URL string +} + +// DataCommittee represents a specific committee +type DataCommittee struct { + AddressesHash common.Hash + Members []DataCommitteeMember + RequiredSignatures uint64 +} + +// GetCurrentDataCommittee return the currently registered data committee +func (etherMan *Client) GetCurrentDataCommittee() (*DataCommittee, error) { + addrsHash, err := etherMan.DataCommittee.CommitteeHash(&bind.CallOpts{Pending: false}) + if err != nil { + return nil, fmt.Errorf("error getting CommitteeHash from L1 SC: %w", err) + } + reqSign, err := etherMan.DataCommittee.RequiredAmountOfSignatures(&bind.CallOpts{Pending: false}) + if err != nil { + return nil, fmt.Errorf("error getting RequiredAmountOfSignatures from L1 SC: %w", err) + } + members, err := etherMan.GetCurrentDataCommitteeMembers() + if err != nil { + return nil, err + } + + return &DataCommittee{ + AddressesHash: common.Hash(addrsHash), + RequiredSignatures: reqSign.Uint64(), + Members: members, + }, nil +} + +// GetCurrentDataCommitteeMembers return the currently registered data committee members +func (etherMan *Client) GetCurrentDataCommitteeMembers() ([]DataCommitteeMember, error) { + members := []DataCommitteeMember{} + nMembers, err := etherMan.DataCommittee.GetAmountOfMembers(&bind.CallOpts{Pending: false}) + if err != nil { + return nil, fmt.Errorf("error getting GetAmountOfMembers from L1 SC: %w", err) + } + for i := int64(0); i < nMembers.Int64(); i++ { + member, err := etherMan.DataCommittee.Members(&bind.CallOpts{Pending: false}, big.NewInt(i)) + if err != nil { + return nil, fmt.Errorf("error getting Members %d from L1 SC: %w", i, err) + } + members = append(members, DataCommitteeMember{ + Addr: member.Addr, + URL: member.Url, + }) + } + return members, nil +} diff --git a/etherman/datacommittee_test.go b/etherman/datacommittee_test.go new file mode 100644 index 0000000000..c66953553e --- /dev/null +++ b/etherman/datacommittee_test.go @@ -0,0 +1,49 @@ +package etherman + +import ( + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestUpdateDataCommitteeEvent(t *testing.T) { + // Set up testing environment + etherman, ethBackend, auth, _, _, da := newTestingEnv() + + // Update the committee + requiredAmountOfSignatures := big.NewInt(2) + URLs := []string{"1", "2", "3"} + addrs := []common.Address{ + common.HexToAddress("0x1"), + common.HexToAddress("0x2"), + common.HexToAddress("0x3"), + } + addrsBytes := []byte{} + for _, addr := range addrs { + addrsBytes = append(addrsBytes, addr.Bytes()...) + } + _, err := da.SetupCommittee(auth, requiredAmountOfSignatures, URLs, addrsBytes) + require.NoError(t, err) + ethBackend.Commit() + + // Assert the committee update + actualSetup, err := etherman.GetCurrentDataCommittee() + require.NoError(t, err) + expectedMembers := []DataCommitteeMember{} + expectedSetup := DataCommittee{ + RequiredSignatures: uint64(len(URLs) - 1), + AddressesHash: crypto.Keccak256Hash(addrsBytes), + } + for i, url := range URLs { + expectedMembers = append(expectedMembers, DataCommitteeMember{ + URL: url, + Addr: addrs[i], + }) + } + expectedSetup.Members = expectedMembers + assert.Equal(t, expectedSetup, *actualSetup) +} diff --git a/etherman/etherman.go b/etherman/etherman.go index fd159cbe89..3228e14db3 100644 --- a/etherman/etherman.go +++ b/etherman/etherman.go @@ -2,6 +2,7 @@ package etherman import ( "context" + "crypto/ecdsa" "encoding/json" "errors" "fmt" @@ -12,17 +13,18 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/etherman/etherscan" - "github.com/0xPolygonHermez/zkevm-node/etherman/ethgasstation" - "github.com/0xPolygonHermez/zkevm-node/etherman/metrics" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/matic" - "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/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/etherman/etherscan" + "github.com/0xPolygon/cdk-validium-node/etherman/ethgasstation" + "github.com/0xPolygon/cdk-validium-node/etherman/metrics" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkdatacommittee" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/matic" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/polygonzkevmglobalexitroot" + ethmanTypes "github.com/0xPolygon/cdk-validium-node/etherman/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -118,11 +120,13 @@ type L1Config struct { // Chain ID of the L1 network L1ChainID uint64 `json:"chainId"` // Address of the L1 contract - ZkEVMAddr common.Address `json:"polygonZkEVMAddress"` + CDKValidiumAddr common.Address `json:"cdkValidiumAddress"` // Address of the L1 Matic token Contract MaticAddr common.Address `json:"maticTokenAddress"` // Address of the L1 GlobalExitRootManager contract GlobalExitRootManagerAddr common.Address `json:"polygonZkEVMGlobalExitRootAddress"` + // Address of the data availability committee contract + DataCommitteeAddr common.Address `json:"cdkDataCommitteeContract"` } type externalGasProviders struct { @@ -133,9 +137,10 @@ type externalGasProviders struct { // Client is a simple implementation of EtherMan. type Client struct { EthClient ethereumClient - ZkEVM *polygonzkevm.Polygonzkevm + CDKValidium *cdkvalidium.Cdkvalidium GlobalExitRootManager *polygonzkevmglobalexitroot.Polygonzkevmglobalexitroot Matic *matic.Matic + DataCommittee *cdkdatacommittee.Cdkdatacommittee SCAddresses []common.Address GasProviders externalGasProviders @@ -153,7 +158,7 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { return nil, err } // Create smc clients - poe, err := polygonzkevm.NewPolygonzkevm(l1Config.ZkEVMAddr, ethClient) + poe, err := cdkvalidium.NewCdkvalidium(l1Config.CDKValidiumAddr, ethClient) if err != nil { return nil, err } @@ -165,8 +170,12 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { if err != nil { return nil, err } + dataCommittee, err := cdkdatacommittee.NewCdkdatacommittee(l1Config.DataCommitteeAddr, ethClient) + if err != nil { + return nil, err + } var scAddresses []common.Address - scAddresses = append(scAddresses, l1Config.ZkEVMAddr, l1Config.GlobalExitRootManagerAddr) + scAddresses = append(scAddresses, l1Config.CDKValidiumAddr, l1Config.GlobalExitRootManagerAddr) gProviders := []ethereum.GasPricer{ethClient} if cfg.MultiGasProvider { @@ -182,9 +191,10 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { return &Client{ EthClient: ethClient, - ZkEVM: poe, + CDKValidium: poe, Matic: matic, GlobalExitRootManager: globalExitRoot, + DataCommittee: dataCommittee, SCAddresses: scAddresses, GasProviders: externalGasProviders{ MultiGasProvider: cfg.MultiGasProvider, @@ -214,7 +224,7 @@ func (etherMan *Client) VerifyGenBlockNumber(ctx context.Context, genBlockNumber if len(logs) == 0 { return false, fmt.Errorf("the specified genBlockNumber in config file does not contain any forkID event. Please use the proper blockNumber.") } - zkevmVersion, err := etherMan.ZkEVM.ParseUpdateZkEVMVersion(logs[0]) + zkevmVersion, err := etherMan.CDKValidium.ParseUpdateZkEVMVersion(logs[0]) if err != nil { log.Error("error parsing the forkID event") return false, err @@ -242,7 +252,7 @@ func (etherMan *Client) GetForks(ctx context.Context, genBlockNumber uint64) ([] } var forks []state.ForkIDInterval for i, l := range logs { - zkevmVersion, err := etherMan.ZkEVM.ParseUpdateZkEVMVersion(l) + zkevmVersion, err := etherMan.CDKValidium.ParseUpdateZkEVMVersion(l) if err != nil { return []state.ForkIDInterval{}, err } @@ -406,7 +416,7 @@ func (etherMan *Client) processEvent(ctx context.Context, vLog types.Log, blocks func (etherMan *Client) updateZkevmVersion(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("UpdateZkEVMVersion event detected") - zkevmVersion, err := etherMan.ZkEVM.ParseUpdateZkEVMVersion(vLog) + zkevmVersion, err := etherMan.CDKValidium.ParseUpdateZkEVMVersion(vLog) if err != nil { log.Error("error parsing UpdateZkEVMVersion event. Error: ", err) return err @@ -487,14 +497,19 @@ func (etherMan *Client) WaitTxToBeMined(ctx context.Context, tx *types.Transacti } // EstimateGasSequenceBatches estimates gas for sending batches -func (etherMan *Client) EstimateGasSequenceBatches(sender common.Address, sequences []ethmanTypes.Sequence) (*types.Transaction, error) { +func (etherMan *Client) EstimateGasSequenceBatches( + sender common.Address, + sequences []ethmanTypes.Sequence, + l2Coinbase common.Address, + committeeSignaturesAndAddrs []byte, +) (*types.Transaction, error) { opts, err := etherMan.getAuthByAddress(sender) if err == ErrNotFound { return nil, ErrPrivateKeyNotFound } opts.NoSend = true - tx, err := etherMan.sequenceBatches(opts, sequences) + tx, err := etherMan.sequenceBatches(opts, sequences, l2Coinbase, committeeSignaturesAndAddrs) if err != nil { return nil, err } @@ -503,7 +518,12 @@ func (etherMan *Client) EstimateGasSequenceBatches(sender common.Address, sequen } // BuildSequenceBatchesTxData builds a []bytes to be sent to the PoE SC method SequenceBatches. -func (etherMan *Client) BuildSequenceBatchesTxData(sender common.Address, sequences []ethmanTypes.Sequence) (to *common.Address, data []byte, err error) { +func (etherMan *Client) BuildSequenceBatchesTxData( + sender common.Address, + sequences []ethmanTypes.Sequence, + l2Coinbase common.Address, + committeeSignaturesAndAddrs []byte, +) (to *common.Address, data []byte, err error) { opts, err := etherMan.getAuthByAddress(sender) if err == ErrNotFound { return nil, nil, fmt.Errorf("failed to build sequence batches, err: %w", ErrPrivateKeyNotFound) @@ -514,7 +534,7 @@ func (etherMan *Client) BuildSequenceBatchesTxData(sender common.Address, sequen opts.GasLimit = uint64(1) opts.GasPrice = big.NewInt(1) - tx, err := etherMan.sequenceBatches(opts, sequences) + tx, err := etherMan.sequenceBatches(opts, sequences, l2Coinbase, committeeSignaturesAndAddrs) if err != nil { return nil, nil, err } @@ -522,11 +542,16 @@ func (etherMan *Client) BuildSequenceBatchesTxData(sender common.Address, sequen return tx.To(), tx.Data(), nil } -func (etherMan *Client) sequenceBatches(opts bind.TransactOpts, sequences []ethmanTypes.Sequence) (*types.Transaction, error) { - var batches []polygonzkevm.PolygonZkEVMBatchData +func (etherMan *Client) sequenceBatches( + opts bind.TransactOpts, + sequences []ethmanTypes.Sequence, + l2Coinbase common.Address, + committeeSignaturesAndAddrs []byte, +) (*types.Transaction, error) { + var batches []cdkvalidium.CDKValidiumBatchData for _, seq := range sequences { - batch := polygonzkevm.PolygonZkEVMBatchData{ - Transactions: seq.BatchL2Data, + batch := cdkvalidium.CDKValidiumBatchData{ + TransactionsHash: crypto.Keccak256Hash(seq.BatchL2Data), GlobalExitRoot: seq.GlobalExitRoot, Timestamp: uint64(seq.Timestamp), MinForcedTimestamp: uint64(seq.ForcedBatchTimestamp), @@ -535,11 +560,15 @@ func (etherMan *Client) sequenceBatches(opts bind.TransactOpts, sequences []ethm batches = append(batches, batch) } - tx, err := etherMan.ZkEVM.SequenceBatches(&opts, batches, opts.From) + tx, err := etherMan.CDKValidium.SequenceBatches(&opts, batches, l2Coinbase, committeeSignaturesAndAddrs) if err != nil { if parsedErr, ok := tryParseError(err); ok { err = parsedErr } + err = fmt.Errorf( + "error sequencing batches: %w, committeeSignaturesAndAddrs %s", + err, common.Bytes2Hex(committeeSignaturesAndAddrs), + ) } return tx, err @@ -571,7 +600,7 @@ func (etherMan *Client) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVe const pendStateNum = 0 // TODO hardcoded for now until we implement the pending state feature - tx, err := etherMan.ZkEVM.VerifyBatchesTrustedAggregator( + tx, err := etherMan.CDKValidium.VerifyBatchesTrustedAggregator( &opts, pendStateNum, lastVerifiedBatch, @@ -611,7 +640,7 @@ func convertProof(p string) ([24][32]byte, error) { // GetSendSequenceFee get super/trusted sequencer fee func (etherMan *Client) GetSendSequenceFee(numBatches uint64) (*big.Int, error) { - f, err := etherMan.ZkEVM.BatchFee(&bind.CallOpts{Pending: false}) + f, err := etherMan.CDKValidium.BatchFee(&bind.CallOpts{Pending: false}) if err != nil { return nil, err } @@ -621,12 +650,12 @@ func (etherMan *Client) GetSendSequenceFee(numBatches uint64) (*big.Int, error) // TrustedSequencer gets trusted sequencer address func (etherMan *Client) TrustedSequencer() (common.Address, error) { - return etherMan.ZkEVM.TrustedSequencer(&bind.CallOpts{Pending: false}) + return etherMan.CDKValidium.TrustedSequencer(&bind.CallOpts{Pending: false}) } func (etherMan *Client) forcedBatchEvent(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("ForceBatch event detected") - fb, err := etherMan.ZkEVM.ParseForceBatch(vLog) + fb, err := etherMan.CDKValidium.ParseForceBatch(vLog) if err != nil { return err } @@ -649,7 +678,7 @@ func (etherMan *Client) forcedBatchEvent(ctx context.Context, vLog types.Log, bl txData := tx.Data() // Extract coded txs. // Load contract ABI - abi, err := abi.JSON(strings.NewReader(polygonzkevm.PolygonzkevmABI)) + abi, err := abi.JSON(strings.NewReader(cdkvalidium.CdkvalidiumABI)) if err != nil { return err } @@ -697,7 +726,7 @@ func (etherMan *Client) forcedBatchEvent(ctx context.Context, vLog types.Log, bl func (etherMan *Client) sequencedBatchesEvent(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("SequenceBatches event detected") - sb, err := etherMan.ZkEVM.ParseSequenceBatches(vLog) + sb, err := etherMan.CDKValidium.ParseSequenceBatches(vLog) if err != nil { return err } @@ -742,7 +771,7 @@ func (etherMan *Client) sequencedBatchesEvent(ctx context.Context, vLog types.Lo func decodeSequences(txData []byte, lastBatchNumber uint64, sequencer common.Address, txHash common.Hash, nonce uint64) ([]SequencedBatch, error) { // Extract coded txs. // Load contract ABI - abi, err := abi.JSON(strings.NewReader(polygonzkevm.PolygonzkevmABI)) + abi, err := abi.JSON(strings.NewReader(cdkvalidium.CdkvalidiumABI)) if err != nil { return nil, err } @@ -758,7 +787,7 @@ func decodeSequences(txData []byte, lastBatchNumber uint64, sequencer common.Add if err != nil { return nil, err } - var sequences []polygonzkevm.PolygonZkEVMBatchData + var sequences []cdkvalidium.CDKValidiumBatchData bytedata, err := json.Marshal(data[0]) if err != nil { return nil, err @@ -772,12 +801,12 @@ func decodeSequences(txData []byte, lastBatchNumber uint64, sequencer common.Add for i, seq := range sequences { bn := lastBatchNumber - uint64(len(sequences)-(i+1)) sequencedBatches[i] = SequencedBatch{ - BatchNumber: bn, - SequencerAddr: sequencer, - TxHash: txHash, - Nonce: nonce, - Coinbase: coinbase, - PolygonZkEVMBatchData: seq, + BatchNumber: bn, + SequencerAddr: sequencer, + TxHash: txHash, + Nonce: nonce, + Coinbase: coinbase, + CDKValidiumBatchData: seq, } } @@ -786,7 +815,7 @@ func decodeSequences(txData []byte, lastBatchNumber uint64, sequencer common.Add func (etherMan *Client) verifyBatchesTrustedAggregatorEvent(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("TrustedVerifyBatches event detected") - vb, err := etherMan.ZkEVM.ParseVerifyBatchesTrustedAggregator(vLog) + vb, err := etherMan.CDKValidium.ParseVerifyBatchesTrustedAggregator(vLog) if err != nil { return err } @@ -821,7 +850,7 @@ func (etherMan *Client) verifyBatchesTrustedAggregatorEvent(ctx context.Context, func (etherMan *Client) forceSequencedBatchesEvent(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("SequenceForceBatches event detect") - fsb, err := etherMan.ZkEVM.ParseSequenceForceBatches(vLog) + fsb, err := etherMan.CDKValidium.ParseSequenceForceBatches(vLog) if err != nil { return err } @@ -868,7 +897,7 @@ func (etherMan *Client) forceSequencedBatchesEvent(ctx context.Context, vLog typ func decodeSequencedForceBatches(txData []byte, lastBatchNumber uint64, sequencer common.Address, txHash common.Hash, block *types.Block, nonce uint64) ([]SequencedForceBatch, error) { // Extract coded txs. // Load contract ABI - abi, err := abi.JSON(strings.NewReader(polygonzkevm.PolygonzkevmABI)) + abi, err := abi.JSON(strings.NewReader(cdkvalidium.CdkvalidiumABI)) if err != nil { return nil, err } @@ -885,7 +914,7 @@ func decodeSequencedForceBatches(txData []byte, lastBatchNumber uint64, sequence return nil, err } - var forceBatches []polygonzkevm.PolygonZkEVMForcedBatchData + var forceBatches []cdkvalidium.CDKValidiumForcedBatchData bytedata, err := json.Marshal(data[0]) if err != nil { return nil, err @@ -899,12 +928,12 @@ func decodeSequencedForceBatches(txData []byte, lastBatchNumber uint64, sequence for i, force := range forceBatches { bn := lastBatchNumber - uint64(len(forceBatches)-(i+1)) sequencedForcedBatches[i] = SequencedForceBatch{ - BatchNumber: bn, - Coinbase: sequencer, - TxHash: txHash, - Timestamp: time.Unix(int64(block.Time()), 0), - Nonce: nonce, - PolygonZkEVMForcedBatchData: force, + BatchNumber: bn, + Coinbase: sequencer, + TxHash: txHash, + Timestamp: time.Unix(int64(block.Time()), 0), + Nonce: nonce, + CDKValidiumForcedBatchData: force, } } return sequencedForcedBatches, nil @@ -949,12 +978,12 @@ func (etherMan *Client) EthBlockByNumber(ctx context.Context, blockNumber uint64 // GetLastBatchTimestamp function allows to retrieve the lastTimestamp value in the smc func (etherMan *Client) GetLastBatchTimestamp() (uint64, error) { - return etherMan.ZkEVM.LastTimestamp(&bind.CallOpts{Pending: false}) + return etherMan.CDKValidium.LastTimestamp(&bind.CallOpts{Pending: false}) } // GetLatestBatchNumber function allows to retrieve the latest proposed batch in the smc func (etherMan *Client) GetLatestBatchNumber() (uint64, error) { - return etherMan.ZkEVM.LastBatchSequenced(&bind.CallOpts{Pending: false}) + return etherMan.CDKValidium.LastBatchSequenced(&bind.CallOpts{Pending: false}) } // GetLatestBlockNumber gets the latest block number from the ethereum @@ -977,7 +1006,7 @@ func (etherMan *Client) GetLatestBlockTimestamp(ctx context.Context) (uint64, er // GetLatestVerifiedBatchNum gets latest verified batch from ethereum func (etherMan *Client) GetLatestVerifiedBatchNum() (uint64, error) { - return etherMan.ZkEVM.LastVerifiedBatch(&bind.CallOpts{Pending: false}) + return etherMan.CDKValidium.LastVerifiedBatch(&bind.CallOpts{Pending: false}) } // GetTx function get ethereum tx @@ -999,7 +1028,7 @@ func (etherMan *Client) ApproveMatic(ctx context.Context, account common.Address if etherMan.GasProviders.MultiGasProvider { opts.GasPrice = etherMan.GetL1GasPrice(ctx) } - tx, err := etherMan.Matic.Approve(&opts, etherMan.l1Cfg.ZkEVMAddr, maticAmount) + tx, err := etherMan.Matic.Approve(&opts, etherMan.l1Cfg.CDKValidiumAddr, maticAmount) if err != nil { if parsedErr, ok := tryParseError(err); ok { err = parsedErr @@ -1012,12 +1041,12 @@ func (etherMan *Client) ApproveMatic(ctx context.Context, account common.Address // GetTrustedSequencerURL Gets the trusted sequencer url from rollup smc func (etherMan *Client) GetTrustedSequencerURL() (string, error) { - return etherMan.ZkEVM.TrustedSequencerURL(&bind.CallOpts{Pending: false}) + return etherMan.CDKValidium.TrustedSequencerURL(&bind.CallOpts{Pending: false}) } // GetL2ChainID returns L2 Chain ID func (etherMan *Client) GetL2ChainID() (uint64, error) { - return etherMan.ZkEVM.ChainID(&bind.CallOpts{Pending: false}) + return etherMan.CDKValidium.ChainID(&bind.CallOpts{Pending: false}) } // GetL1GasPrice gets the l1 gas price @@ -1119,15 +1148,15 @@ func (etherMan *Client) AddOrReplaceAuth(auth bind.TransactOpts) error { } // LoadAuthFromKeyStore loads an authorization from a key store file -func (etherMan *Client) LoadAuthFromKeyStore(path, password string) (*bind.TransactOpts, error) { - auth, err := newAuthFromKeystore(path, password, etherMan.l1Cfg.L1ChainID) +func (etherMan *Client) LoadAuthFromKeyStore(path, password string) (*bind.TransactOpts, *ecdsa.PrivateKey, error) { + auth, pk, err := newAuthFromKeystore(path, password, etherMan.l1Cfg.L1ChainID) if err != nil { - return nil, err + return nil, nil, err } log.Infof("loaded authorization for address: %v", auth.From.String()) etherMan.auth[auth.From] = auth - return &auth, nil + return &auth, pk, nil } // newKeyFromKeystore creates an instance of a keystore key from a keystore file @@ -1148,20 +1177,20 @@ func newKeyFromKeystore(path, password string) (*keystore.Key, error) { } // newAuthFromKeystore an authorization instance from a keystore file -func newAuthFromKeystore(path, password string, chainID uint64) (bind.TransactOpts, error) { +func newAuthFromKeystore(path, password string, chainID uint64) (bind.TransactOpts, *ecdsa.PrivateKey, error) { log.Infof("reading key from: %v", path) key, err := newKeyFromKeystore(path, password) if err != nil { - return bind.TransactOpts{}, err + return bind.TransactOpts{}, nil, err } if key == nil { - return bind.TransactOpts{}, nil + return bind.TransactOpts{}, nil, nil } auth, err := bind.NewKeyedTransactorWithChainID(key.PrivateKey, new(big.Int).SetUint64(chainID)) if err != nil { - return bind.TransactOpts{}, err + return bind.TransactOpts{}, nil, err } - return *auth, nil + return *auth, key.PrivateKey, nil } // getAuthByAddress tries to get an authorization from the authorizations map diff --git a/etherman/etherman_test.go b/etherman/etherman_test.go index 7912fdd30d..b140ecaebe 100644 --- a/etherman/etherman_test.go +++ b/etherman/etherman_test.go @@ -9,13 +9,14 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmbridge" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkdatacommittee" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/polygonzkevmbridge" + ethmanTypes "github.com/0xPolygon/cdk-validium-node/etherman/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/constants" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" @@ -38,7 +39,14 @@ func init() { } // This function prepare the blockchain, the wallet with funds and deploy the smc -func newTestingEnv() (ethman *Client, ethBackend *backends.SimulatedBackend, auth *bind.TransactOpts, maticAddr common.Address, br *polygonzkevmbridge.Polygonzkevmbridge) { +func newTestingEnv() ( + ethman *Client, + ethBackend *backends.SimulatedBackend, + auth *bind.TransactOpts, + maticAddr common.Address, + br *polygonzkevmbridge.Polygonzkevmbridge, + da *cdkdatacommittee.Cdkdatacommittee, +) { privateKey, err := crypto.GenerateKey() if err != nil { log.Fatal(err) @@ -47,7 +55,7 @@ func newTestingEnv() (ethman *Client, ethBackend *backends.SimulatedBackend, aut if err != nil { log.Fatal(err) } - ethman, ethBackend, maticAddr, br, err = NewSimulatedEtherman(Config{}, auth) + ethman, ethBackend, maticAddr, br, da, err = NewSimulatedEtherman(Config{}, auth) if err != nil { log.Fatal(err) } @@ -55,12 +63,13 @@ func newTestingEnv() (ethman *Client, ethBackend *backends.SimulatedBackend, aut if err != nil { log.Fatal(err) } - return ethman, ethBackend, auth, maticAddr, br + + return ethman, ethBackend, auth, maticAddr, br, da } func TestGEREvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, br := newTestingEnv() + etherman, ethBackend, auth, _, br, _ := newTestingEnv() // Read currentBlock ctx := context.Background() @@ -89,19 +98,19 @@ func TestGEREvent(t *testing.T) { func TestForcedBatchEvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, _ := newTestingEnv() + etherman, ethBackend, auth, _, _, _ := newTestingEnv() // Read currentBlock ctx := context.Background() initBlock, err := etherman.EthClient.BlockByNumber(ctx, nil) require.NoError(t, err) - amount, err := etherman.ZkEVM.GetForcedBatchFee(&bind.CallOpts{Pending: false}) + amount, err := etherman.CDKValidium.GetForcedBatchFee(&bind.CallOpts{Pending: false}) require.NoError(t, err) rawTxs := "f84901843b9aca00827b0c945fbdb2315678afecb367f032d93f642f64180aa380a46057361d00000000000000000000000000000000000000000000000000000000000000048203e9808073efe1fa2d3e27f26f32208550ea9b0274d49050b816cadab05a771f4275d0242fd5d92b3fb89575c070e6c930587c520ee65a3aa8cfe382fcad20421bf51d621c" data, err := hex.DecodeString(rawTxs) require.NoError(t, err) - _, err = etherman.ZkEVM.ForceBatch(auth, data, amount) + _, err = etherman.CDKValidium.ForceBatch(auth, data, amount) require.NoError(t, err) // Mine the tx in a block @@ -125,7 +134,7 @@ func TestForcedBatchEvent(t *testing.T) { func TestSequencedBatchesEvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, br := newTestingEnv() + etherman, ethBackend, auth, _, br, _ := newTestingEnv() // Read currentBlock ctx := context.Background() @@ -143,12 +152,12 @@ func TestSequencedBatchesEvent(t *testing.T) { ger, err := etherman.GlobalExitRootManager.GetLastGlobalExitRoot(nil) require.NoError(t, err) - amount, err := etherman.ZkEVM.GetForcedBatchFee(&bind.CallOpts{Pending: false}) + amount, err := etherman.CDKValidium.GetForcedBatchFee(&bind.CallOpts{Pending: false}) require.NoError(t, err) rawTxs := "f84901843b9aca00827b0c945fbdb2315678afecb367f032d93f642f64180aa380a46057361d00000000000000000000000000000000000000000000000000000000000000048203e9808073efe1fa2d3e27f26f32208550ea9b0274d49050b816cadab05a771f4275d0242fd5d92b3fb89575c070e6c930587c520ee65a3aa8cfe382fcad20421bf51d621c" data, err := hex.DecodeString(rawTxs) require.NoError(t, err) - _, err = etherman.ZkEVM.ForceBatch(auth, data, amount) + _, err = etherman.CDKValidium.ForceBatch(auth, data, amount) require.NoError(t, err) require.NoError(t, err) ethBackend.Commit() @@ -160,20 +169,20 @@ func TestSequencedBatchesEvent(t *testing.T) { blocks, _, err := etherman.GetRollupInfoByBlockRange(ctx, initBlock.NumberU64(), ¤tBlockNumber) require.NoError(t, err) t.Log("Blocks: ", blocks) - var sequences []polygonzkevm.PolygonZkEVMBatchData - sequences = append(sequences, polygonzkevm.PolygonZkEVMBatchData{ + var sequences []cdkvalidium.CDKValidiumBatchData + sequences = append(sequences, cdkvalidium.CDKValidiumBatchData{ GlobalExitRoot: ger, Timestamp: currentBlock.Time(), MinForcedTimestamp: uint64(blocks[2].ForcedBatches[0].ForcedAt.Unix()), - Transactions: common.Hex2Bytes(rawTxs), + TransactionsHash: crypto.Keccak256Hash(common.Hex2Bytes(rawTxs)), }) - sequences = append(sequences, polygonzkevm.PolygonZkEVMBatchData{ + sequences = append(sequences, cdkvalidium.CDKValidiumBatchData{ GlobalExitRoot: ger, Timestamp: currentBlock.Time() + 1, MinForcedTimestamp: 0, - Transactions: common.Hex2Bytes(rawTxs), + TransactionsHash: crypto.Keccak256Hash(common.Hex2Bytes(rawTxs)), }) - _, err = etherman.ZkEVM.SequenceBatches(auth, sequences, auth.From) + _, err = etherman.CDKValidium.SequenceBatches(auth, sequences, auth.From, []byte{}) require.NoError(t, err) // Mine the tx in a block @@ -188,7 +197,7 @@ func TestSequencedBatchesEvent(t *testing.T) { t.Log("Blocks: ", blocks) assert.Equal(t, 4, len(blocks)) assert.Equal(t, 1, len(blocks[3].SequencedBatches)) - assert.Equal(t, common.Hex2Bytes(rawTxs), blocks[3].SequencedBatches[0][1].Transactions) + assert.Equal(t, crypto.Keccak256Hash(common.Hex2Bytes(rawTxs)), common.Hash(blocks[3].SequencedBatches[0][1].TransactionsHash)) assert.Equal(t, currentBlock.Time(), blocks[3].SequencedBatches[0][0].Timestamp) assert.Equal(t, ger, blocks[3].SequencedBatches[0][0].GlobalExitRoot) assert.Equal(t, auth.From, blocks[3].SequencedBatches[0][0].Coinbase) @@ -199,7 +208,7 @@ func TestSequencedBatchesEvent(t *testing.T) { func TestVerifyBatchEvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, _ := newTestingEnv() + etherman, ethBackend, auth, _, _, _ := newTestingEnv() // Read currentBlock ctx := context.Background() @@ -208,19 +217,19 @@ func TestVerifyBatchEvent(t *testing.T) { require.NoError(t, err) rawTxs := "f84901843b9aca00827b0c945fbdb2315678afecb367f032d93f642f64180aa380a46057361d00000000000000000000000000000000000000000000000000000000000000048203e9808073efe1fa2d3e27f26f32208550ea9b0274d49050b816cadab05a771f4275d0242fd5d92b3fb89575c070e6c930587c520ee65a3aa8cfe382fcad20421bf51d621c" - tx := polygonzkevm.PolygonZkEVMBatchData{ + tx := cdkvalidium.CDKValidiumBatchData{ GlobalExitRoot: common.Hash{}, Timestamp: initBlock.Time(), MinForcedTimestamp: 0, - Transactions: common.Hex2Bytes(rawTxs), + TransactionsHash: crypto.Keccak256Hash(common.Hex2Bytes(rawTxs)), } - _, err = etherman.ZkEVM.SequenceBatches(auth, []polygonzkevm.PolygonZkEVMBatchData{tx}, auth.From) + _, err = etherman.CDKValidium.SequenceBatches(auth, []cdkvalidium.CDKValidiumBatchData{tx}, auth.From, []byte{}) require.NoError(t, err) // Mine the tx in a block ethBackend.Commit() - _, err = etherman.ZkEVM.VerifyBatchesTrustedAggregator(auth, uint64(0), uint64(0), uint64(1), [32]byte{}, [32]byte{}, [24][32]byte{}) + _, err = etherman.CDKValidium.VerifyBatchesTrustedAggregator(auth, uint64(0), uint64(0), uint64(1), [32]byte{}, [32]byte{}, [24][32]byte{}) require.NoError(t, err) // Mine the tx in a block @@ -245,19 +254,19 @@ func TestVerifyBatchEvent(t *testing.T) { func TestSequenceForceBatchesEvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, _ := newTestingEnv() + etherman, ethBackend, auth, _, _, _ := newTestingEnv() // Read currentBlock ctx := context.Background() initBlock, err := etherman.EthClient.BlockByNumber(ctx, nil) require.NoError(t, err) - amount, err := etherman.ZkEVM.GetForcedBatchFee(&bind.CallOpts{Pending: false}) + amount, err := etherman.CDKValidium.GetForcedBatchFee(&bind.CallOpts{Pending: false}) require.NoError(t, err) rawTxs := "f84901843b9aca00827b0c945fbdb2315678afecb367f032d93f642f64180aa380a46057361d00000000000000000000000000000000000000000000000000000000000000048203e9808073efe1fa2d3e27f26f32208550ea9b0274d49050b816cadab05a771f4275d0242fd5d92b3fb89575c070e6c930587c520ee65a3aa8cfe382fcad20421bf51d621c" data, err := hex.DecodeString(rawTxs) require.NoError(t, err) - _, err = etherman.ZkEVM.ForceBatch(auth, data, amount) + _, err = etherman.CDKValidium.ForceBatch(auth, data, amount) require.NoError(t, err) ethBackend.Commit() @@ -273,12 +282,12 @@ func TestSequenceForceBatchesEvent(t *testing.T) { require.NoError(t, err) t.Log("Blocks: ", blocks) - forceBatchData := polygonzkevm.PolygonZkEVMForcedBatchData{ + forceBatchData := cdkvalidium.CDKValidiumForcedBatchData{ Transactions: blocks[1].ForcedBatches[0].RawTxsData, GlobalExitRoot: blocks[1].ForcedBatches[0].GlobalExitRoot, MinForcedTimestamp: uint64(blocks[1].ForcedBatches[0].ForcedAt.Unix()), } - _, err = etherman.ZkEVM.SequenceForceBatches(auth, []polygonzkevm.PolygonZkEVMForcedBatchData{forceBatchData}) + _, err = etherman.CDKValidium.SequenceForceBatches(auth, []cdkvalidium.CDKValidiumForcedBatchData{forceBatchData}) require.NoError(t, err) ethBackend.Commit() @@ -297,7 +306,7 @@ func TestSequenceForceBatchesEvent(t *testing.T) { func TestSendSequences(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, br := newTestingEnv() + etherman, ethBackend, auth, _, br, _ := newTestingEnv() // Read currentBlock ctx := context.Background() @@ -326,7 +335,7 @@ func TestSendSequences(t *testing.T) { Timestamp: int64(currentBlock.Time() - 1), BatchL2Data: batchL2Data, } - tx, err := etherman.sequenceBatches(*auth, []ethmanTypes.Sequence{sequence}) + tx, err := etherman.sequenceBatches(*auth, []ethmanTypes.Sequence{sequence}, auth.From, []byte{}) require.NoError(t, err) log.Debug("TX: ", tx.Hash()) ethBackend.Commit() @@ -350,7 +359,7 @@ func TestSendSequences(t *testing.T) { func TestGasPrice(t *testing.T) { // Set up testing environment - etherman, _, _, _, _ := newTestingEnv() + etherman, _, _, _, _, _ := newTestingEnv() etherscanM := new(etherscanMock) ethGasStationM := new(ethGasStationMock) etherman.GasProviders.Providers = []ethereum.GasPricer{etherman.EthClient, etherscanM, ethGasStationM} @@ -369,7 +378,7 @@ func TestGasPrice(t *testing.T) { func TestErrorEthGasStationPrice(t *testing.T) { // Set up testing environment - etherman, _, _, _, _ := newTestingEnv() + etherman, _, _, _, _, _ := newTestingEnv() ethGasStationM := new(ethGasStationMock) etherman.GasProviders.Providers = []ethereum.GasPricer{etherman.EthClient, ethGasStationM} ctx := context.Background() @@ -388,7 +397,7 @@ func TestErrorEthGasStationPrice(t *testing.T) { func TestErrorEtherScanPrice(t *testing.T) { // Set up testing environment - etherman, _, _, _, _ := newTestingEnv() + etherman, _, _, _, _, _ := newTestingEnv() etherscanM := new(etherscanMock) ethGasStationM := new(ethGasStationMock) etherman.GasProviders.Providers = []ethereum.GasPricer{etherman.EthClient, etherscanM, ethGasStationM} @@ -402,7 +411,7 @@ func TestErrorEtherScanPrice(t *testing.T) { func TestGetForks(t *testing.T) { // Set up testing environment - etherman, _, _, _, _ := newTestingEnv() + etherman, _, _, _, _, _ := newTestingEnv() ctx := context.Background() forks, err := etherman.GetForks(ctx, 0) require.NoError(t, err) diff --git a/etherman/etherscan/etherscan.go b/etherman/etherscan/etherscan.go index 6f721cbbe2..36ab663bad 100644 --- a/etherman/etherscan/etherscan.go +++ b/etherman/etherscan/etherscan.go @@ -8,7 +8,7 @@ import ( "math/big" "net/http" - "github.com/0xPolygonHermez/zkevm-node/encoding" + "github.com/0xPolygon/cdk-validium-node/encoding" ) type etherscanResponse struct { diff --git a/etherman/etherscan/etherscan_test.go b/etherman/etherscan/etherscan_test.go index c55999b1f7..4a59c65aa6 100644 --- a/etherman/etherscan/etherscan_test.go +++ b/etherman/etherscan/etherscan_test.go @@ -8,7 +8,7 @@ import ( "net/http/httptest" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/etherman/ethgasstation/ethgasstation.go b/etherman/ethgasstation/ethgasstation.go index 571ca2dfe4..c330f787da 100644 --- a/etherman/ethgasstation/ethgasstation.go +++ b/etherman/ethgasstation/ethgasstation.go @@ -8,7 +8,7 @@ import ( "math/big" "net/http" - "github.com/0xPolygonHermez/zkevm-node/encoding" + "github.com/0xPolygon/cdk-validium-node/encoding" ) type ethGasStationResponse struct { diff --git a/etherman/ethgasstation/ethgasstation_test.go b/etherman/ethgasstation/ethgasstation_test.go index eaffadfdff..29bb1f0b99 100644 --- a/etherman/ethgasstation/ethgasstation_test.go +++ b/etherman/ethgasstation/ethgasstation_test.go @@ -8,7 +8,7 @@ import ( "net/http/httptest" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/etherman/metrics/metrics.go b/etherman/metrics/metrics.go index cd7e8c4846..a156c835a1 100644 --- a/etherman/metrics/metrics.go +++ b/etherman/metrics/metrics.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/cdk-validium-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/etherman/simulated.go b/etherman/simulated.go index 28e316286f..77172215b3 100644 --- a/etherman/simulated.go +++ b/etherman/simulated.go @@ -5,11 +5,12 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/matic" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/mockverifier" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmbridge" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmglobalexitroot" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkdatacommittee" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/matic" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/mockverifier" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/polygonzkevmbridge" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/polygonzkevmglobalexitroot" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" @@ -19,10 +20,17 @@ import ( // NewSimulatedEtherman creates an etherman that uses a simulated blockchain. It's important to notice that the ChainID of the auth // must be 1337. The address that holds the auth will have an initial balance of 10 ETH -func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (etherman *Client, ethBackend *backends.SimulatedBackend, maticAddr common.Address, br *polygonzkevmbridge.Polygonzkevmbridge, err error) { +func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) ( + etherman *Client, + ethBackend *backends.SimulatedBackend, + maticAddr common.Address, + br *polygonzkevmbridge.Polygonzkevmbridge, + da *cdkdatacommittee.Cdkdatacommittee, + err error, +) { if auth == nil { // read only client - return &Client{}, nil, common.Address{}, nil, nil + return &Client{}, nil, common.Address{}, nil, nil, nil } // 10000000 ETH in wei balance, _ := new(big.Int).SetString("10000000000000000000000000", 10) //nolint:gomnd @@ -35,20 +43,34 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (etherman *Client blockGasLimit := uint64(999999999999999999) //nolint:gomnd client := backends.NewSimulatedBackend(genesisAlloc, blockGasLimit) + // DAC Setup + dataCommitteeAddr, _, da, err := cdkdatacommittee.DeployCdkdatacommittee(auth, client) + if err != nil { + return nil, nil, common.Address{}, nil, nil, err + } + _, err = da.Initialize(auth) + if err != nil { + return nil, nil, common.Address{}, nil, nil, err + } + _, err = da.SetupCommittee(auth, big.NewInt(0), []string{}, []byte{}) + if err != nil { + return nil, nil, common.Address{}, nil, nil, err + } + // Deploy contracts const maticDecimalPlaces = 18 totalSupply, _ := new(big.Int).SetString("10000000000000000000000000000", 10) //nolint:gomnd maticAddr, _, maticContract, err := matic.DeployMatic(auth, client, "Matic Token", "MATIC", maticDecimalPlaces, totalSupply) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } rollupVerifierAddr, _, _, err := mockverifier.DeployMockverifier(auth, client) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } nonce, err := client.PendingNonceAt(context.TODO(), auth.From) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } const posBridge = 1 calculatedBridgeAddr := crypto.CreateAddress(auth.From, nonce+posBridge) @@ -57,22 +79,21 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (etherman *Client genesis := common.HexToHash("0xfd3434cd8f67e59d73488a2b8da242dd1f02849ea5dd99f0ca22c836c3d5b4a9") // Random value. Needs to be different to 0x0 exitManagerAddr, _, globalExitRoot, err := polygonzkevmglobalexitroot.DeployPolygonzkevmglobalexitroot(auth, client, calculatedPoEAddr, calculatedBridgeAddr) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } bridgeAddr, _, br, err := polygonzkevmbridge.DeployPolygonzkevmbridge(auth, client) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } - poeAddr, _, poe, err := polygonzkevm.DeployPolygonzkevm(auth, client, exitManagerAddr, maticAddr, rollupVerifierAddr, bridgeAddr, 1000, 1) //nolint + poeAddr, _, poe, err := cdkvalidium.DeployCdkvalidium(auth, client, exitManagerAddr, maticAddr, rollupVerifierAddr, bridgeAddr, dataCommitteeAddr, 1000, 1) //nolint if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } _, err = br.Initialize(auth, 0, exitManagerAddr, poeAddr) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } - - poeParams := polygonzkevm.PolygonZkEVMInitializePackedParameters{ + poeParams := cdkvalidium.CDKValidiumInitializePackedParameters{ Admin: auth.From, TrustedSequencer: auth.From, PendingStateTimeout: 10000, //nolint:gomnd @@ -81,15 +102,15 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (etherman *Client } _, err = poe.Initialize(auth, poeParams, genesis, "http://localhost", "L2", "v1") //nolint:gomnd if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } if calculatedBridgeAddr != bridgeAddr { - return nil, nil, common.Address{}, nil, fmt.Errorf("bridgeAddr (%s) is different from the expected contract address (%s)", + return nil, nil, common.Address{}, nil, nil, fmt.Errorf("bridgeAddr (%s) is different from the expected contract address (%s)", bridgeAddr.String(), calculatedBridgeAddr.String()) } if calculatedPoEAddr != poeAddr { - return nil, nil, common.Address{}, nil, fmt.Errorf("poeAddr (%s) is different from the expected contract address (%s)", + return nil, nil, common.Address{}, nil, nil, fmt.Errorf("poeAddr (%s) is different from the expected contract address (%s)", poeAddr.String(), calculatedPoEAddr.String()) } @@ -97,29 +118,30 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (etherman *Client approvedAmount, _ := new(big.Int).SetString("10000000000000000000000", 10) //nolint:gomnd _, err = maticContract.Approve(auth, bridgeAddr, approvedAmount) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } _, err = maticContract.Approve(auth, poeAddr, approvedAmount) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } _, err = poe.ActivateForceBatches(auth) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } client.Commit() c := &Client{ EthClient: client, - ZkEVM: poe, + CDKValidium: poe, Matic: maticContract, GlobalExitRootManager: globalExitRoot, - SCAddresses: []common.Address{poeAddr, exitManagerAddr}, + DataCommittee: da, + SCAddresses: []common.Address{poeAddr, exitManagerAddr, dataCommitteeAddr}, auth: map[common.Address]bind.TransactOpts{}, } err = c.AddOrReplaceAuth(*auth) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } - return c, client, maticAddr, br, nil + return c, client, maticAddr, br, da, nil } diff --git a/etherman/smartcontracts/abi/cdkdatacommittee.abi b/etherman/smartcontracts/abi/cdkdatacommittee.abi new file mode 100644 index 0000000000..76d893ffc9 --- /dev/null +++ b/etherman/smartcontracts/abi/cdkdatacommittee.abi @@ -0,0 +1,226 @@ +[ + { + "inputs": [], + "name": "CommitteeAddressDoesntExist", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyURLNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyRequiredSignatures", + "type": "error" + }, + { + "inputs": [], + "name": "UnexpectedAddrsAndSignaturesSize", + "type": "error" + }, + { + "inputs": [], + "name": "UnexpectedAddrsBytesLength", + "type": "error" + }, + { + "inputs": [], + "name": "UnexpectedCommitteeHash", + "type": "error" + }, + { + "inputs": [], + "name": "WrongAddrOrder", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "committeeHash", + "type": "bytes32" + } + ], + "name": "CommitteeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "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" + }, + { + "inputs": [], + "name": "committeeHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAmountOfMembers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "members", + "outputs": [ + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requiredAmountOfSignatures", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requiredAmountOfSignatures", + "type": "uint256" + }, + { + "internalType": "string[]", + "name": "urls", + "type": "string[]" + }, + { + "internalType": "bytes", + "name": "addrsBytes", + "type": "bytes" + } + ], + "name": "setupCommittee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "signedHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signaturesAndAddrs", + "type": "bytes" + } + ], + "name": "verifySignatures", + "outputs": [], + "stateMutability": "view", + "type": "function" + } + ] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/cdkvalidium.abi b/etherman/smartcontracts/abi/cdkvalidium.abi new file mode 100644 index 0000000000..6f62f5344b --- /dev/null +++ b/etherman/smartcontracts/abi/cdkvalidium.abi @@ -0,0 +1,1732 @@ +[ + { + "inputs": [ + { + "internalType": "contract IPolygonZkEVMGlobalExitRoot", + "name": "_globalExitRootManager", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "_matic", + "type": "address" + }, + { + "internalType": "contract IVerifierRollup", + "name": "_rollupVerifier", + "type": "address" + }, + { + "internalType": "contract IPolygonZkEVMBridge", + "name": "_bridgeAddress", + "type": "address" + }, + { + "internalType": "contract ICDKDataCommittee", + "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": "contract IPolygonZkEVMBridge", + "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": "contract ICDKDataCommittee", + "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": "contract IPolygonZkEVMGlobalExitRoot", + "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": "struct CDKValidium.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": "contract IERC20Upgradeable", + "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": "contract IVerifierRollup", + "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": "struct CDKValidium.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": "struct CDKValidium.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" + } + ] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/polygonzkevm.abi b/etherman/smartcontracts/abi/polygonzkevm.abi deleted file mode 100644 index 3007afc823..0000000000 --- a/etherman/smartcontracts/abi/polygonzkevm.abi +++ /dev/null @@ -1,1709 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract IPolygonZkEVMGlobalExitRoot", - "name": "_globalExitRootManager", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "_matic", - "type": "address" - }, - { - "internalType": "contract IVerifierRollup", - "name": "_rollupVerifier", - "type": "address" - }, - { - "internalType": "contract IPolygonZkEVMBridge", - "name": "_bridgeAddress", - "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": "contract IPolygonZkEVMBridge", - "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": "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": "contract IPolygonZkEVMGlobalExitRoot", - "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": "struct PolygonZkEVM.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": "contract IERC20Upgradeable", - "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": "contract IVerifierRollup", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "transactions", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "globalExitRoot", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "minForcedTimestamp", - "type": "uint64" - } - ], - "internalType": "struct PolygonZkEVM.BatchData[]", - "name": "batches", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "l2Coinbase", - "type": "address" - } - ], - "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": "struct PolygonZkEVM.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" - } -] \ No newline at end of file diff --git a/etherman/smartcontracts/bin/cdkdatacommittee.bin b/etherman/smartcontracts/bin/cdkdatacommittee.bin new file mode 100644 index 0000000000..0418d412ab --- /dev/null +++ b/etherman/smartcontracts/bin/cdkdatacommittee.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b506115e0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638129fc1c11610076578063c7a823e01161005b578063c7a823e01461015a578063dce1e2b61461016d578063f2fde38b1461017557600080fd5b80638129fc1c1461012a5780638da5cb5b1461013257600080fd5b8063609d4544116100a7578063609d4544146101025780636beedd3914610119578063715018a61461012257600080fd5b8063078fba2a146100c35780635daf08ca146100d8575b600080fd5b6100d66100d1366004610fa9565b610188565b005b6100eb6100e6366004611054565b61048c565b6040516100f992919061106d565b60405180910390f35b61010b60665481565b6040519081526020016100f9565b61010b60655481565b6100d661055e565b6100d6610572565b60335460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f9565b6100d66101683660046110f6565b610709565b60675461010b565b6100d6610183366004611142565b61095c565b610190610a10565b82858110156101cb576040517f2e7dcd6e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101d66014826111ae565b821461020e576040517f2ab6a12900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61021a60676000610eb5565b6000805b828110156104305760006102336014836111ae565b905060008682876102456014836111c5565b92610252939291906111d8565b61025b91611202565b60601c90508888848181106102725761027261124a565b90506020028101906102849190611279565b90506000036102bf576040517fb54b70e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610324576040517fd53cfbe000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809350606760405180604001604052808b8b878181106103465761034661124a565b90506020028101906103589190611279565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505073ffffffffffffffffffffffffffffffffffffffff851660209283015283546001810185559381522081519192600202019081906103cc90826113af565b5060209190910151600190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550819050610428816114c9565b91505061021e565b508383604051610441929190611501565b6040519081900381206066819055606589905581527f831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db6579060200160405180910390a150505050505050565b6067818154811061049c57600080fd5b90600052602060002090600202016000915090508060000180546104bf9061130d565b80601f01602080910402602001604051908101604052809291908181526020018280546104eb9061130d565b80156105385780601f1061050d57610100808354040283529160200191610538565b820191906000526020600020905b81548152906001019060200180831161051b57829003601f168201915b5050506001909301549192505073ffffffffffffffffffffffffffffffffffffffff1682565b610566610a10565b6105706000610a91565b565b600054610100900460ff16158080156105925750600054600160ff909116105b806105ac5750303b1580156105ac575060005460ff166001145b61063d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561069b57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6106a3610b08565b801561070657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000606554604161071a91906111ae565b90508082108061073e575060146107318284611511565b61073b9190611553565b15155b15610775576040517f6b8eec4600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606654610784838381876111d8565b604051610792929190611501565b6040518091039020146107d1576040517f6b156b2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060146107e08486611511565b6107ea9190611567565b905060005b60655481101561095357600061086a88888861080c6041876111ae565b90604161081981896111ae565b61082391906111c5565b92610830939291906111d8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ba892505050565b90506000845b848110156109065760006108856014836111ae565b61088f90896111c5565b905060008a828b6108a16014836111c5565b926108ae939291906111d8565b6108b791611202565b60601c905073ffffffffffffffffffffffffffffffffffffffff851681036108f1576108e48360016111c5565b9750600193505050610906565b505080806108fe906114c9565b915050610870565b508061093e576040517f8431721300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050808061094b906114c9565b9150506107ef565b50505050505050565b610964610a10565b73ffffffffffffffffffffffffffffffffffffffff8116610a07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610634565b61070681610a91565b60335473ffffffffffffffffffffffffffffffffffffffff163314610570576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610634565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610634565b61057033610a91565b6000806000610bb78585610bce565b91509150610bc481610c13565b5090505b92915050565b6000808251604103610c045760208301516040840151606085015160001a610bf887828585610dc6565b94509450505050610c0c565b506000905060025b9250929050565b6000816004811115610c2757610c2761157b565b03610c2f5750565b6001816004811115610c4357610c4361157b565b03610caa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610634565b6002816004811115610cbe57610cbe61157b565b03610d25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610634565b6003816004811115610d3957610d3961157b565b03610706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610634565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610dfd5750600090506003610eac565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610e51573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116610ea557600060019250925050610eac565b9150600090505b94509492505050565b508054600082556002029060005260206000209081019061070691905b80821115610f19576000610ee68282610f1d565b506001810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600201610ed2565b5090565b508054610f299061130d565b6000825580601f10610f39575050565b601f01602090049060005260206000209081019061070691905b80821115610f195760008155600101610f53565b60008083601f840112610f7957600080fd5b50813567ffffffffffffffff811115610f9157600080fd5b602083019150836020828501011115610c0c57600080fd5b600080600080600060608688031215610fc157600080fd5b85359450602086013567ffffffffffffffff80821115610fe057600080fd5b818801915088601f830112610ff457600080fd5b81358181111561100357600080fd5b8960208260051b850101111561101857600080fd5b60208301965080955050604088013591508082111561103657600080fd5b5061104388828901610f67565b969995985093965092949392505050565b60006020828403121561106657600080fd5b5035919050565b604081526000835180604084015260005b8181101561109b576020818701810151606086840101520161107e565b5060006060828501015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505073ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b60008060006040848603121561110b57600080fd5b83359250602084013567ffffffffffffffff81111561112957600080fd5b61113586828701610f67565b9497909650939450505050565b60006020828403121561115457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461117857600080fd5b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610bc857610bc861117f565b80820180821115610bc857610bc861117f565b600080858511156111e857600080fd5b838611156111f557600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156112425780818660140360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126112ae57600080fd5b83018035915067ffffffffffffffff8211156112c957600080fd5b602001915036819003821315610c0c57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600181811c9082168061132157607f821691505b60208210810361135a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156113aa57600081815260208120601f850160051c810160208610156113875750805b601f850160051c820191505b818110156113a657828155600101611393565b5050505b505050565b815167ffffffffffffffff8111156113c9576113c96112de565b6113dd816113d7845461130d565b84611360565b602080601f83116001811461143057600084156113fa5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556113a6565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561147d5788860151825594840194600190910190840161145e565b50858210156114b957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114fa576114fa61117f565b5060010190565b8183823760009101908152919050565b81810381811115610bc857610bc861117f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261156257611562611524565b500690565b60008261157657611576611524565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220a54a2ecac47f39fb27609b998291b1e8046737fbc346d3fc4d56c25e13d40d7e64736f6c63430008140033 \ No newline at end of file diff --git a/etherman/smartcontracts/bin/cdkvalidium.bin b/etherman/smartcontracts/bin/cdkvalidium.bin new file mode 100644 index 0000000000..2999c3900f --- /dev/null +++ b/etherman/smartcontracts/bin/cdkvalidium.bin @@ -0,0 +1 @@ +6101606040523480156200001257600080fd5b5060405162006185380380620061858339810160408190526200003591620000ac565b6001600160a01b0396871660c05294861660805292851660a05290841660e052909216610100526001600160401b039182166101205216610140526200014f565b6001600160a01b03811681146200008c57600080fd5b50565b80516001600160401b0381168114620000a757600080fd5b919050565b600080600080600080600060e0888a031215620000c857600080fd5b8751620000d58162000076565b6020890151909750620000e88162000076565b6040890151909650620000fb8162000076565b60608901519095506200010e8162000076565b6080890151909450620001218162000076565b92506200013160a089016200008f565b91506200014160c089016200008f565b905092959891949750929550565b60805160a05160c05160e051610100516101205161014051615f566200022f600039600081816106c801528181610e1e015261321b0152600081816108350152610df40152600081816105d301526119a00152600081816107fb01528181611bf0015281816138b40152614d300152600081816109a101528181610f91015281816111620152818161177b0152818161220f01528181613a9c015261498d015260008181610a4e0152818161415901526145b10152600081816108f101528181611bbe0152818161270001528181613a7001526142470152615f566000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c8063837a4738116101ff578063c754c7ed1161011a578063e7a7ed02116100ad578063f14916d61161007c578063f14916d614610ab0578063f2fde38b14610ac3578063f851a44014610ad6578063f8b823e414610af657600080fd5b8063e7a7ed0214610a19578063e8bf92ed14610a49578063eaeb077b14610a70578063ed6b010414610a8357600080fd5b8063d2e129f9116100e9578063d2e129f9146109c3578063d8d1091b146109d6578063d939b315146109e9578063dbc1697614610a1157600080fd5b8063c754c7ed1461092e578063c89e42df1461095a578063cfa8ed471461096d578063d02103ca1461099c57600080fd5b8063a3c573eb11610192578063b4d63f5811610161578063b4d63f5814610885578063b6b0b097146108ec578063ba58ae3914610913578063c0ed84e01461092657600080fd5b8063a3c573eb146107f6578063ada8f9191461081d578063adc879e914610830578063afd23cbe1461085757600080fd5b806399f5634e116101ce57806399f5634e146107b55780639aa972a3146107bd5780639c9f3dfe146107d0578063a066215c146107e357600080fd5b8063837a4738146106ea578063841b24d71461075f5780638c3d73011461078f5780638da5cb5b1461079757600080fd5b8063458c0477116102ef5780636046916911610282578063715018a611610251578063715018a6146106945780637215541a1461069c5780637fcb3653146106af578063831c7ead146106c357600080fd5b80636046916914610646578063621dd4111461064e5780636b8616ce146106615780636ff512cc1461068157600080fd5b80634e487706116102be5780634e487706146105f55780635392c5e014610608578063542028d5146106365780635ec919581461063e57600080fd5b8063458c0477146105875780634a1a89a71461059b5780634a910e6a146105bb5780634df61d24146105ce57600080fd5b80632987898311610367578063394218e911610336578063394218e914610519578063423fa8561461052c578063438a53991461054c578063456052671461055f57600080fd5b806329878983146104b45780632b0006fa146104e05780632c1f816a146104f3578063383b3be81461050657600080fd5b80631816b7e5116103a35780631816b7e51461043357806319d8ac6114610448578063220d78991461045c578063267822471461046f57600080fd5b80630a0d9fbe146103ca578063107bf28c1461040157806315064c9614610416575b600080fd5b606f546103e390610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b610409610aff565b6040516103f8919061535c565b606f546104239060ff1681565b60405190151581526020016103f8565b610446610441366004615376565b610b8d565b005b6073546103e39067ffffffffffffffff1681565b61040961046a3660046153b2565b610ca5565b607b5461048f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103f8565b60745461048f9068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104466104ee366004615417565b610e7c565b61044661050136600461547f565b61104c565b6104236105143660046154f9565b61125a565b6104466105273660046154f9565b6112b0565b6073546103e39068010000000000000000900467ffffffffffffffff1681565b61044661055a366004615581565b611434565b6073546103e390700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546103e39067ffffffffffffffff1681565b6079546103e39068010000000000000000900467ffffffffffffffff1681565b6104466105c93660046154f9565b611cb1565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b6104466106033660046154f9565b611d64565b6106286106163660046154f9565b60756020526000908152604090205481565b6040519081526020016103f8565b610409611ee8565b610446611ef5565b610628611ff5565b61044661065c366004615417565b61200b565b61062861066f3660046154f9565b60716020526000908152604090205481565b61044661068f366004615633565b612393565b610446612468565b6104466106aa3660046154f9565b61247c565b6074546103e39067ffffffffffffffff1681565b6103e37f000000000000000000000000000000000000000000000000000000000000000081565b6107336106f836600461564e565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff95861681529490931660208501529183015260608201526080016103f8565b6079546103e3907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6104466125ec565b60335473ffffffffffffffffffffffffffffffffffffffff1661048f565b6106286126b8565b6104466107cb36600461547f565b612811565b6104466107de3660046154f9565b6128c2565b6104466107f13660046154f9565b612a3e565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b61044661082b366004615633565b612b44565b6103e37f000000000000000000000000000000000000000000000000000000000000000081565b606f54610872906901000000000000000000900461ffff1681565b60405161ffff90911681526020016103f8565b6108c66108933660046154f9565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff92831660208501529116908201526060016103f8565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b61042361092136600461564e565b612c08565b6103e3612c92565b607b546103e39074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b61044661096836600461574a565b612ce7565b606f5461048f906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b6104466109d136600461577f565b612d74565b6104466109e4366004615832565b6132bf565b6079546103e390700100000000000000000000000000000000900467ffffffffffffffff1681565b610446613861565b6073546103e3907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b610446610a7e3660046158a7565b61393a565b607b54610423907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b610446610abe366004615633565b613d30565b610446610ad1366004615633565b613e02565b607a5461048f9073ffffffffffffffffffffffffffffffffffffffff1681565b61062860705481565b60778054610b0c906158f3565b80601f0160208091040260200160405190810160405280929190818152602001828054610b38906158f3565b8015610b855780601f10610b5a57610100808354040283529160200191610b85565b820191906000526020600020905b815481529060010190602001808311610b6857829003601f168201915b505050505081565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610bde576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88161ffff161080610bf757506103ff8161ffff16115b15610c2e576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffff16690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b67ffffffffffffffff8086166000818152607260205260408082205493881682529020546060929115801590610cd9575081155b15610d10576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610d47576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d5084612c08565b610d86576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481019690965260548601929092527fffffffffffffffff00000000000000000000000000000000000000000000000060c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610ed9576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ee7868686868686613eb6565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff86811691821790925560009081526075602052604090208390556079541615610f6257607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b158015610fea57600080fd5b505af1158015610ffe573d6000803e3d6000fd5b505060405184815233925067ffffffffffffffff871691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe906020015b60405180910390a3505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146110a9576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110b88787878787878761427a565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561113357607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156111bb57600080fd5b505af11580156111cf573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a800000000000000000000000000000000000000000000000001790555050604051828152339067ffffffffffffffff8616907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a350505050505050565b60795467ffffffffffffffff8281166000908152607860205260408120549092429261129e9270010000000000000000000000000000000090920481169116615975565b67ffffffffffffffff16111592915050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611301576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611348576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166113b75760795467ffffffffffffffff78010000000000000000000000000000000000000000000000009091048116908216106113b7576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610c9a565b606f5460ff1615611471576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f546b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146114d1576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600081900361150d576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e8811115611549576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000082048116600081815260726020526040812054838516949293700100000000000000000000000000000000909304909216919082905b868110156119625760008c8c838181106115b1576115b161599d565b9050608002018036038101906115c791906159cc565b606081015190915067ffffffffffffffff161561173857846115e881615a3d565b955050600081600001518260200151836060015160405160200161164493929190928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146116cd576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8087166000908152607160205260408082209190915560608401519084015190821691161015611732576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611836565b6020810151158015906117ff575060208101516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063257b3632906024016020604051808303816000875af11580156117d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fd9190615a64565b155b15611836576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8667ffffffffffffffff16816040015167ffffffffffffffff161080611869575042816040015167ffffffffffffffff16115b156118a0576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838160000151826020015183604001518e60405160200161192f9594939291909485526020850193909352604084019190915260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166060808401919091521b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166068820152607c0190565b6040516020818303038152906040528051906020012093508060400151965050808061195a90615a7d565b915050611595565b506040517fc7a823e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063c7a823e0906119d99085908c908c90600401615afe565b60006040518083038186803b1580156119f157600080fd5b505afa158015611a05573d6000803e3d6000fd5b505050508584611a159190615975565b60735490945067ffffffffffffffff780100000000000000000000000000000000000000000000000090910481169084161115611a7e576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611a8a8285615b21565b611a9e9067ffffffffffffffff1688615b42565b604080516060810182528581524267ffffffffffffffff908116602080840191825260738054680100000000000000009081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585167fffffffffffffffffffffffffffffffff000000000000000000000000000000009384161795851684029590951790945583548c8416911617930292909217905590915082811690851614611b9457607380547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8716021790555b611be6333083607054611ba79190615b55565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169291906146b4565b611bee614796565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611c5657600080fd5b505af1158015611c6a573d6000803e3d6000fd5b505060405167ffffffffffffffff881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a2505050505050505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611d5857606f5460ff1615611d19576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611d228161125a565b611d58576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611d6181614843565b50565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611db5576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611dfc576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16611e6757607b5467ffffffffffffffff74010000000000000000000000000000000000000000909104811690821610611e67576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610c9a565b60768054610b0c906158f3565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611f46576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b547c0100000000000000000000000000000000000000000000000000000000900460ff16611fa2576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b600060705460646120069190615b55565b905090565b606f5460ff1615612048576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff858116600090815260726020526040902060010154429261209592780100000000000000000000000000000000000000000000000090910481169116615975565b67ffffffffffffffff1611156120d7576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e86120e48686615b21565b67ffffffffffffffff161115612126576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612134868686868686613eb6565b61213d84614a56565b607954700100000000000000000000000000000000900467ffffffffffffffff1660000361228557607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff868116918217909255600090815260756020526040902083905560795416156121e057607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b15801561226857600080fd5b505af115801561227c573d6000803e3d6000fd5b50505050612355565b61228d614796565b6079805467ffffffffffffffff169060006122a783615a3d565b825467ffffffffffffffff9182166101009390930a92830292820219169190911790915560408051608081018252428316815287831660208083019182528284018981526060840189815260795487166000908152607890935294909120925183549251861668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009093169516949094171781559151600183015551600290910155505b604051828152339067ffffffffffffffff8616907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f59669060200161103c565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146123e4576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610c9a565b612470614c36565b61247a6000614cb7565b565b60335473ffffffffffffffffffffffffffffffffffffffff1633146125e45760006124a5612c92565b90508067ffffffffffffffff168267ffffffffffffffff16116124f4576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000009091048116908316118061253a575067ffffffffffffffff80831660009081526072602052604090206001015416155b15612571576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80831660009081526072602052604090206001015442916125a09162093a809116615975565b67ffffffffffffffff1611156125e2576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b611d61614d2e565b607b5473ffffffffffffffffffffffffffffffffffffffff16331461263d576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061276b9190615a64565b90506000612777612c92565b60735467ffffffffffffffff6801000000000000000082048116916127cf9170010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000900416615b21565b6127d99190615975565b6127e39190615b21565b67ffffffffffffffff169050806000036128005760009250505090565b61280a8183615b9b565b9250505090565b606f5460ff161561284e576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61285d8787878787878761427a565b67ffffffffffffffff84166000908152607560209081526040918290205482519081529081018490527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a16128b9614d2e565b50505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612913576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff8216111561295a576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166129c15760795467ffffffffffffffff7001000000000000000000000000000000009091048116908216106129c1576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607980547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610c9a565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612a8f576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808167ffffffffffffffff161115612ad6576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010067ffffffffffffffff8416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610c9a565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612b95576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610c9a565b600067ffffffff0000000167ffffffffffffffff8316108015612c40575067ffffffff00000001604083901c67ffffffffffffffff16105b8015612c61575067ffffffff00000001608083901c67ffffffffffffffff16105b8015612c78575067ffffffff0000000160c083901c105b15612c8557506001919050565b506000919050565b919050565b60795460009067ffffffffffffffff1615612cd6575060795467ffffffffffffffff9081166000908152607860205260409020546801000000000000000090041690565b5060745467ffffffffffffffff1690565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612d38576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6076612d448282615bfd565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610c9a919061535c565b600054610100900460ff1615808015612d945750600054600160ff909116105b80612dae5750303b158015612dae575060005460ff166001145b612e3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015612e9d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b612eaa6020880188615633565b607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612eff6040880160208901615633565b606f805473ffffffffffffffffffffffffffffffffffffffff929092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055612f646080880160608901615633565b6074805473ffffffffffffffffffffffffffffffffffffffff9290921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad8690556076612fef8682615bfd565b506077612ffc8582615bfd565b5062093a806130116060890160408a016154f9565b67ffffffffffffffff161115613053576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61306360608801604089016154f9565b6079805467ffffffffffffffff92909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff90921691909117905562093a806130c560a0890160808a016154f9565b67ffffffffffffffff161115613107576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61311760a08801608089016154f9565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff939093169290920291909117905567016345785d8a0000607055606f80547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000ff166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c01000000000006978000000000000000000000000000000000000000001790556131f6614db6565b7fed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd660007f0000000000000000000000000000000000000000000000000000000000000000858560405161324c9493929190615d17565b60405180910390a180156128b957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff161561331c576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1615613359576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819003613395576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88111156133d1576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff7801000000000000000000000000000000000000000000000000820481169161341c918491700100000000000000000000000000000000900416615d4f565b1115613454576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000008204811660008181526072602052604081205491937001000000000000000000000000000000009004909216915b848110156136fe5760008787838181106134b4576134b461599d565b90506020028101906134c69190615d62565b6134cf90615da0565b9050836134db81615a3d565b8251805160209182012081850151604080870151905194995091945060009361353d9386939101928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146135c6576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff86166000908152607160205260408120556135eb600189615b42565b840361365a5742607b60149054906101000a900467ffffffffffffffff1684604001516136189190615975565b67ffffffffffffffff16111561365a576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016608083015233901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c0160405160208183030381529060405280519060200120945050505080806136f690615a7d565b915050613498565b506137098484615975565b6073805467ffffffffffffffff4281167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092168217808455604080516060810182528781526020808201958652680100000000000000009384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921693871693909317179091558554938916700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146138b2576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561391a57600080fd5b505af115801561392e573d6000803e3d6000fd5b5050505061247a614e56565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613997576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16156139d4576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006139de611ff5565b905081811115613a1a576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388831115613a56576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613a9873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163330846146b4565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b299190615a64565b60738054919250780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16906018613b6383615a3d565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508484604051613b9a929190615e30565b60408051918290038220602083015281018290527fffffffffffffffff0000000000000000000000000000000000000000000000004260c01b166060820152606801604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206073547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1660009081526071909352912055323303613cca57607354604080518381523360208201526060918101829052600091810191909152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a2613d29565b607360189054906101000a900467ffffffffffffffff1667ffffffffffffffff167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc93182338888604051613d209493929190615e40565b60405180910390a25b5050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314613d81576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610c9a565b613e0a614c36565b73ffffffffffffffffffffffffffffffffffffffff8116613ead576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612e36565b611d6181614cb7565b600080613ec1612c92565b905067ffffffffffffffff881615613f915760795467ffffffffffffffff9081169089161115613f1d576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8089166000908152607860205260409020600281015481549094509091898116680100000000000000009092041614613f8b576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50614032565b67ffffffffffffffff8716600090815260756020526040902054915081613fe4576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168767ffffffffffffffff161115614032576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168667ffffffffffffffff161161407f576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061408e8888888689610ca5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040516140c39190615e76565b602060405180830381855afa1580156140e0573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906141039190615a64565b61410d9190615e88565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a9161418f91899190600401615e9c565b602060405180830381865afa1580156141ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141d09190615ed7565b614206576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61426e33614214858b615b21565b67ffffffffffffffff166142266126b8565b6142309190615b55565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169190614ee5565b50505050505050505050565b600067ffffffffffffffff8816156143485760795467ffffffffffffffff90811690891611156142d6576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5067ffffffffffffffff8088166000908152607860205260409020600281015481549092888116680100000000000000009092041614614342576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506143e4565b5067ffffffffffffffff85166000908152607560205260409020548061439a576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60745467ffffffffffffffff90811690871611156143e4576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff908116908816118061441657508767ffffffffffffffff168767ffffffffffffffff1611155b8061443d575060795467ffffffffffffffff68010000000000000000909104811690881611155b15614474576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8781166000908152607860205260409020546801000000000000000090048116908616146144d7576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006144e68787878588610ca5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161451b9190615e76565b602060405180830381855afa158015614538573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061455b9190615a64565b6145659190615e88565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a916145e791889190600401615e9c565b602060405180830381865afa158015614604573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146289190615ed7565b61465e576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff891660009081526078602052604090206002015485900361426e576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526147909085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614f40565b50505050565b60795467ffffffffffffffff68010000000000000000820481169116111561247a576079546000906147df9068010000000000000000900467ffffffffffffffff166001615975565b90506147ea8161125a565b15611d615760795460009060029061480d90849067ffffffffffffffff16615b21565b6148179190615ef9565b6148219083615975565b905061482c8161125a565b1561483e5761483a81614843565b5050565b61483a825b60795467ffffffffffffffff68010000000000000000909104811690821611158061487d575060795467ffffffffffffffff908116908216115b156148b4576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff818116600081815260786020908152604080832080546074805468010000000000000000928390049098167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090981688179055600282015487865260759094529382902092909255607980547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169390940292909217909255600182015490517f33d6247d00000000000000000000000000000000000000000000000000000000815260048101919091529091907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156149e657600080fd5b505af11580156149fa573d6000803e3d6000fd5b505050508267ffffffffffffffff168167ffffffffffffffff167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e8460020154604051614a4991815260200190565b60405180910390a3505050565b6000614a60612c92565b905081600080614a708484615b21565b606f5467ffffffffffffffff9182169250600091614a949161010090041642615b42565b90505b8467ffffffffffffffff168467ffffffffffffffff1614614b1f5767ffffffffffffffff80851660009081526072602052604090206001810154909116821015614afd57600181015468010000000000000000900467ffffffffffffffff169450614b19565b614b078686615b21565b67ffffffffffffffff16935050614b1f565b50614a97565b6000614b2b8484615b42565b905083811015614b8257808403600c8111614b465780614b49565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281614b7857614b78615b6c565b0460705550614bf2565b838103600c8111614b935780614b96565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281614bcd57614bcd615b6c565b04905080607054670de0b6b3a76400000281614beb57614beb615b6c565b0460705550505b683635c9adc5dea000006070541115614c1757683635c9adc5dea000006070556128b9565b633b9aca0060705410156128b957633b9aca0060705550505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff16331461247a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612e36565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015614d9657600080fd5b505af1158015614daa573d6000803e3d6000fd5b5050505061247a61504c565b600054610100900460ff16614e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612e36565b61247a33614cb7565b606f5460ff16614e92576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052614f3b9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640161470e565b505050565b6000614fa2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166150df9092919063ffffffff16565b805190915015614f3b5780806020019051810190614fc09190615ed7565b614f3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612e36565b606f5460ff1615615089576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b60606150ee84846000856150f6565b949350505050565b606082471015615188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612e36565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516151b19190615e76565b60006040518083038185875af1925050503d80600081146151ee576040519150601f19603f3d011682016040523d82523d6000602084013e6151f3565b606091505b50915091506152048783838761520f565b979650505050505050565b606083156152a557825160000361529e5773ffffffffffffffffffffffffffffffffffffffff85163b61529e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612e36565b50816150ee565b6150ee83838151156152ba5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e36919061535c565b60005b838110156153095781810151838201526020016152f1565b50506000910152565b6000815180845261532a8160208601602086016152ee565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061536f6020830184615312565b9392505050565b60006020828403121561538857600080fd5b813561ffff8116811461536f57600080fd5b803567ffffffffffffffff81168114612c8d57600080fd5b600080600080600060a086880312156153ca57600080fd5b6153d38661539a565b94506153e16020870161539a565b94979496505050506040830135926060810135926080909101359150565b80610300810183101561541157600080fd5b92915050565b6000806000806000806103a0878903121561543157600080fd5b61543a8761539a565b95506154486020880161539a565b94506154566040880161539a565b935060608701359250608087013591506154738860a089016153ff565b90509295509295509295565b60008060008060008060006103c0888a03121561549b57600080fd5b6154a48861539a565b96506154b26020890161539a565b95506154c06040890161539a565b94506154ce6060890161539a565b93506080880135925060a088013591506154eb8960c08a016153ff565b905092959891949750929550565b60006020828403121561550b57600080fd5b61536f8261539a565b803573ffffffffffffffffffffffffffffffffffffffff81168114612c8d57600080fd5b60008083601f84011261554a57600080fd5b50813567ffffffffffffffff81111561556257600080fd5b60208301915083602082850101111561557a57600080fd5b9250929050565b60008060008060006060868803121561559957600080fd5b853567ffffffffffffffff808211156155b157600080fd5b818801915088601f8301126155c557600080fd5b8135818111156155d457600080fd5b8960208260071b85010111156155e957600080fd5b602083019750809650506155ff60208901615514565b9450604088013591508082111561561557600080fd5b5061562288828901615538565b969995985093965092949392505050565b60006020828403121561564557600080fd5b61536f82615514565b60006020828403121561566057600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff808411156156b1576156b1615667565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156156f7576156f7615667565b8160405280935085815286868601111561571057600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261573b57600080fd5b61536f83833560208501615696565b60006020828403121561575c57600080fd5b813567ffffffffffffffff81111561577357600080fd5b6150ee8482850161572a565b60008060008060008086880361012081121561579a57600080fd5b60a08112156157a857600080fd5b5086955060a0870135945060c087013567ffffffffffffffff808211156157ce57600080fd5b6157da8a838b0161572a565b955060e08901359150808211156157f057600080fd5b6157fc8a838b0161572a565b945061010089013591508082111561581357600080fd5b5061582089828a01615538565b979a9699509497509295939492505050565b6000806020838503121561584557600080fd5b823567ffffffffffffffff8082111561585d57600080fd5b818501915085601f83011261587157600080fd5b81358181111561588057600080fd5b8660208260051b850101111561589557600080fd5b60209290920196919550909350505050565b6000806000604084860312156158bc57600080fd5b833567ffffffffffffffff8111156158d357600080fd5b6158df86828701615538565b909790965060209590950135949350505050565b600181811c9082168061590757607f821691505b602082108103615940577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff81811683821601908082111561599657615996615946565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000608082840312156159de57600080fd5b6040516080810181811067ffffffffffffffff82111715615a0157615a01615667565b80604052508235815260208301356020820152615a206040840161539a565b6040820152615a316060840161539a565b60608201529392505050565b600067ffffffffffffffff808316818103615a5a57615a5a615946565b6001019392505050565b600060208284031215615a7657600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615aae57615aae615946565b5060010190565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b838152604060208201526000615b18604083018486615ab5565b95945050505050565b67ffffffffffffffff82811682821603908082111561599657615996615946565b8181038181111561541157615411615946565b808202811582820484141761541157615411615946565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615baa57615baa615b6c565b500490565b601f821115614f3b57600081815260208120601f850160051c81016020861015615bd65750805b601f850160051c820191505b81811015615bf557828155600101615be2565b505050505050565b815167ffffffffffffffff811115615c1757615c17615667565b615c2b81615c2584546158f3565b84615baf565b602080601f831160018114615c7e5760008415615c485750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615bf5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615ccb57888601518255948401946001909101908401615cac565b5085821015615d0757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600067ffffffffffffffff808716835280861660208401525060606040830152615d45606083018486615ab5565b9695505050505050565b8082018082111561541157615411615946565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615d9657600080fd5b9190910192915050565b600060608236031215615db257600080fd5b6040516060810167ffffffffffffffff8282108183111715615dd657615dd6615667565b816040528435915080821115615deb57600080fd5b50830136601f820112615dfd57600080fd5b615e0c36823560208401615696565b82525060208301356020820152615e256040840161539a565b604082015292915050565b8183823760009101908152919050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000615d45606083018486615ab5565b60008251615d968184602087016152ee565b600082615e9757615e97615b6c565b500690565b61032081016103008085843782018360005b6001811015615ecd578151835260209283019290910190600101615eae565b5050509392505050565b600060208284031215615ee957600080fd5b8151801515811461536f57600080fd5b600067ffffffffffffffff80841680615f1457615f14615b6c565b9216919091049291505056fea2646970667358221220c54659be0c71b5f48f3f4d4bfee20a108aa9b5b089c2412703866a273f30c4f964736f6c63430008140033 \ No newline at end of file diff --git a/etherman/smartcontracts/bin/polygonzkevm.bin b/etherman/smartcontracts/bin/polygonzkevm.bin deleted file mode 100644 index ab66043ce4..0000000000 --- a/etherman/smartcontracts/bin/polygonzkevm.bin +++ /dev/null @@ -1 +0,0 @@ -6101406040523480156200001257600080fd5b5060405162006078380380620060788339810160408190526200003591620000a5565b6001600160a01b0395861660c05293851660805291841660a05290921660e0526001600160401b0391821661010052166101205262000131565b6001600160a01b03811681146200008557600080fd5b50565b80516001600160401b0381168114620000a057600080fd5b919050565b60008060008060008060c08789031215620000bf57600080fd5b8651620000cc816200006f565b6020880151909650620000df816200006f565b6040880151909550620000f2816200006f565b606088015190945062000105816200006f565b9250620001156080880162000088565b91506200012560a0880162000088565b90509295509295509295565b60805160a05160c05160e0516101005161012051615e79620001ff6000396000818161069601528181610dec01526131760152600081816108030152610dc20152600081816107c901528181611d910152818161380f0152614c8f01526000818161096f01528181610f5f01528181611130015281816119990152818161216a015281816139f70152614759015260008181610a1c015281816140b4015261450c0152600081816108bf01528181611d5f0152818161265b015281816139cb01526141a20152615e796000f3fe608060405234801561001057600080fd5b50600436106103ba5760003560e01c8063841b24d7116101f4578063c754c7ed1161011a578063e7a7ed02116100ad578063f14916d61161007c578063f14916d614610a7e578063f2fde38b14610a91578063f851a44014610aa4578063f8b823e414610ac457600080fd5b8063e7a7ed02146109e7578063e8bf92ed14610a17578063eaeb077b14610a3e578063ed6b010414610a5157600080fd5b8063d2e129f9116100e9578063d2e129f914610991578063d8d1091b146109a4578063d939b315146109b7578063dbc16976146109df57600080fd5b8063c754c7ed146108fc578063c89e42df14610928578063cfa8ed471461093b578063d02103ca1461096a57600080fd5b8063a3c573eb11610192578063b4d63f5811610161578063b4d63f5814610853578063b6b0b097146108ba578063ba58ae39146108e1578063c0ed84e0146108f457600080fd5b8063a3c573eb146107c4578063ada8f919146107eb578063adc879e9146107fe578063afd23cbe1461082557600080fd5b806399f5634e116101ce57806399f5634e146107835780639aa972a31461078b5780639c9f3dfe1461079e578063a066215c146107b157600080fd5b8063841b24d71461072d5780638c3d73011461075d5780638da5cb5b1461076557600080fd5b80634a1a89a7116102e4578063621dd411116102775780637215541a116102465780637215541a1461066a5780637fcb36531461067d578063831c7ead14610691578063837a4738146106b857600080fd5b8063621dd4111461061c5780636b8616ce1461062f5780636ff512cc1461064f578063715018a61461066257600080fd5b8063542028d5116102b3578063542028d5146105f15780635e9145c9146105f95780635ec919581461060c578063604691691461061457600080fd5b80634a1a89a71461057d5780634a910e6a1461059d5780634e487706146105b05780635392c5e0146105c357600080fd5b8063298789831161035c578063394218e91161032b578063394218e91461050e578063423fa856146105215780634560526714610541578063458c04771461056957600080fd5b806329878983146104a95780632b0006fa146104d55780632c1f816a146104e8578063383b3be8146104fb57600080fd5b80631816b7e5116103985780631816b7e51461042857806319d8ac611461043d578063220d789914610451578063267822471461046457600080fd5b80630a0d9fbe146103bf578063107bf28c146103f657806315064c961461040b575b600080fd5b606f546103d890610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6103fe610acd565b6040516103ed91906152bb565b606f546104189060ff1681565b60405190151581526020016103ed565b61043b6104363660046152d5565b610b5b565b005b6073546103d89067ffffffffffffffff1681565b6103fe61045f366004615311565b610c73565b607b546104849073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103ed565b6074546104849068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b61043b6104e3366004615376565b610e4a565b61043b6104f63660046153de565b61101a565b610418610509366004615458565b611228565b61043b61051c366004615458565b61127e565b6073546103d89068010000000000000000900467ffffffffffffffff1681565b6073546103d890700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546103d89067ffffffffffffffff1681565b6079546103d89068010000000000000000900467ffffffffffffffff1681565b61043b6105ab366004615458565b611402565b61043b6105be366004615458565b6114b5565b6105e36105d1366004615458565b60756020526000908152604090205481565b6040519081526020016103ed565b6103fe611639565b61043b6106073660046154e3565b611646565b61043b611e50565b6105e3611f50565b61043b61062a366004615376565b611f66565b6105e361063d366004615458565b60716020526000908152604090205481565b61043b61065d366004615537565b6122ee565b61043b6123c3565b61043b610678366004615458565b6123d7565b6074546103d89067ffffffffffffffff1681565b6103d87f000000000000000000000000000000000000000000000000000000000000000081565b6107016106c6366004615552565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff95861681529490931660208501529183015260608201526080016103ed565b6079546103d8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b61043b612547565b60335473ffffffffffffffffffffffffffffffffffffffff16610484565b6105e3612613565b61043b6107993660046153de565b61276c565b61043b6107ac366004615458565b61281d565b61043b6107bf366004615458565b612999565b6104847f000000000000000000000000000000000000000000000000000000000000000081565b61043b6107f9366004615537565b612a9f565b6103d87f000000000000000000000000000000000000000000000000000000000000000081565b606f54610840906901000000000000000000900461ffff1681565b60405161ffff90911681526020016103ed565b610894610861366004615458565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff92831660208501529116908201526060016103ed565b6104847f000000000000000000000000000000000000000000000000000000000000000081565b6104186108ef366004615552565b612b63565b6103d8612bed565b607b546103d89074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b61043b610936366004615645565b612c42565b606f54610484906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104847f000000000000000000000000000000000000000000000000000000000000000081565b61043b61099f3660046156bc565b612ccf565b61043b6109b236600461576f565b61321a565b6079546103d890700100000000000000000000000000000000900467ffffffffffffffff1681565b61043b6137bc565b6073546103d8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6104847f000000000000000000000000000000000000000000000000000000000000000081565b61043b610a4c3660046157b1565b613895565b607b54610418907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b61043b610a8c366004615537565b613c8b565b61043b610a9f366004615537565b613d5d565b607a546104849073ffffffffffffffffffffffffffffffffffffffff1681565b6105e360705481565b60778054610ada906157fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610b06906157fd565b8015610b535780601f10610b2857610100808354040283529160200191610b53565b820191906000526020600020905b815481529060010190602001808311610b3657829003601f168201915b505050505081565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610bac576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88161ffff161080610bc557506103ff8161ffff16115b15610bfc576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffff16690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b67ffffffffffffffff8086166000818152607260205260408082205493881682529020546060929115801590610ca7575081155b15610cde576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610d15576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1e84612b63565b610d54576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481019690965260548601929092527fffffffffffffffff00000000000000000000000000000000000000000000000060c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610ea7576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610eb5868686868686613e11565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff86811691821790925560009081526075602052604090208390556079541615610f3057607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b158015610fb857600080fd5b505af1158015610fcc573d6000803e3d6000fd5b505060405184815233925067ffffffffffffffff871691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe906020015b60405180910390a3505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611077576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611086878787878787876141d5565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561110157607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b15801561118957600080fd5b505af115801561119d573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a800000000000000000000000000000000000000000000000001790555050604051828152339067ffffffffffffffff8616907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a350505050505050565b60795467ffffffffffffffff8281166000908152607860205260408120549092429261126c927001000000000000000000000000000000009092048116911661587f565b67ffffffffffffffff16111592915050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146112cf576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611316576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166113855760795467ffffffffffffffff7801000000000000000000000000000000000000000000000000909104811690821610611385576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610c68565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146114a957606f5460ff161561146a576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61147381611228565b6114a9576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114b28161460f565b50565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611506576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff8216111561154d576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166115b857607b5467ffffffffffffffff740100000000000000000000000000000000000000009091048116908216106115b8576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610c68565b60768054610ada906157fd565b606f5460ff1615611683576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f546b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146116e3576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600081900361171f576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e881111561175b576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000082048116600081815260726020526040812054838516949293700100000000000000000000000000000000909304909216919082905b86811015611bab5760008a8a838181106117c3576117c36158a7565b90506020028101906117d591906158d6565b6117de90615914565b8051805160209091012060608201519192509067ffffffffffffffff1615611956578561180a816159a1565b9650506000818360200151846060015160405160200161186293929190928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff8a166000908152607190935291205490915081146118eb576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8088166000908152607160205260408082209190915560608501519085015190821691161015611950576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611a93565b602082015115801590611a1d575060208201516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063257b3632906024016020604051808303816000875af11580156119f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1b91906159c8565b155b15611a54576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151516201d4c01015611a93576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8767ffffffffffffffff16826040015167ffffffffffffffff161080611ac6575042826040015167ffffffffffffffff16115b15611afd576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602082810151604080850151815193840189905290830184905260608084019290925260c01b7fffffffffffffffff0000000000000000000000000000000000000000000000001660808301528b901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c016040516020818303038152906040528051906020012094508160400151975050508080611ba3906159e1565b9150506117a7565b50611bb6868561587f565b60735490945067ffffffffffffffff780100000000000000000000000000000000000000000000000090910481169084161115611c1f576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c2b8285615a19565b611c3f9067ffffffffffffffff1688615a3a565b604080516060810182528581524267ffffffffffffffff908116602080840191825260738054680100000000000000009081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585167fffffffffffffffffffffffffffffffff000000000000000000000000000000009384161795851684029590951790945583548c8416911617930292909217905590915082811690851614611d3557607380547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8716021790555b611d87333083607054611d489190615a4d565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016929190614822565b611d8f614904565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611df757600080fd5b505af1158015611e0b573d6000803e3d6000fd5b505060405167ffffffffffffffff881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a250505050505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611ea1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b547c0100000000000000000000000000000000000000000000000000000000900460ff16611efd576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b60006070546064611f619190615a4d565b905090565b606f5460ff1615611fa3576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff8581166000908152607260205260409020600101544292611ff09278010000000000000000000000000000000000000000000000009091048116911661587f565b67ffffffffffffffff161115612032576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e861203f8686615a19565b67ffffffffffffffff161115612081576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61208f868686868686613e11565b612098846149b5565b607954700100000000000000000000000000000000900467ffffffffffffffff166000036121e057607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561213b57607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156121c357600080fd5b505af11580156121d7573d6000803e3d6000fd5b505050506122b0565b6121e8614904565b6079805467ffffffffffffffff16906000612202836159a1565b825467ffffffffffffffff9182166101009390930a92830292820219169190911790915560408051608081018252428316815287831660208083019182528284018981526060840189815260795487166000908152607890935294909120925183549251861668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009093169516949094171781559151600183015551600290910155505b604051828152339067ffffffffffffffff8616907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f59669060200161100a565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461233f576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610c68565b6123cb614b95565b6123d56000614c16565b565b60335473ffffffffffffffffffffffffffffffffffffffff16331461253f576000612400612bed565b90508067ffffffffffffffff168267ffffffffffffffff161161244f576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000090910481169083161180612495575067ffffffffffffffff80831660009081526072602052604090206001015416155b156124cc576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80831660009081526072602052604090206001015442916124fb9162093a80911661587f565b67ffffffffffffffff16111561253d576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b6114b2614c8d565b607b5473ffffffffffffffffffffffffffffffffffffffff163314612598576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156126a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c691906159c8565b905060006126d2612bed565b60735467ffffffffffffffff68010000000000000000820481169161272a9170010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000900416615a19565b612734919061587f565b61273e9190615a19565b67ffffffffffffffff1690508060000361275b5760009250505090565b6127658183615a93565b9250505090565b606f5460ff16156127a9576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127b8878787878787876141d5565b67ffffffffffffffff84166000908152607560209081526040918290205482519081529081018490527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a1612814614c8d565b50505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461286e576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff821611156128b5576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1661291c5760795467ffffffffffffffff70010000000000000000000000000000000090910481169082161061291c576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607980547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610c68565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146129ea576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808167ffffffffffffffff161115612a31576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010067ffffffffffffffff8416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610c68565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612af0576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610c68565b600067ffffffff0000000167ffffffffffffffff8316108015612b9b575067ffffffff00000001604083901c67ffffffffffffffff16105b8015612bbc575067ffffffff00000001608083901c67ffffffffffffffff16105b8015612bd3575067ffffffff0000000160c083901c105b15612be057506001919050565b506000919050565b919050565b60795460009067ffffffffffffffff1615612c31575060795467ffffffffffffffff9081166000908152607860205260409020546801000000000000000090041690565b5060745467ffffffffffffffff1690565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612c93576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6076612c9f8282615af5565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610c6891906152bb565b600054610100900460ff1615808015612cef5750600054600160ff909116105b80612d095750303b158015612d09575060005460ff166001145b612d9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015612df857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b612e056020880188615537565b607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612e5a6040880160208901615537565b606f805473ffffffffffffffffffffffffffffffffffffffff929092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055612ebf6080880160608901615537565b6074805473ffffffffffffffffffffffffffffffffffffffff9290921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad8690556076612f4a8682615af5565b506077612f578582615af5565b5062093a80612f6c6060890160408a01615458565b67ffffffffffffffff161115612fae576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612fbe6060880160408901615458565b6079805467ffffffffffffffff92909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff90921691909117905562093a8061302060a0890160808a01615458565b67ffffffffffffffff161115613062576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61307260a0880160808901615458565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff939093169290920291909117905567016345785d8a0000607055606f80547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000ff166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c0100000000000697800000000000000000000000000000000000000000179055613151614d15565b7fed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd660007f000000000000000000000000000000000000000000000000000000000000000085856040516131a79493929190615c58565b60405180910390a1801561281457600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613277576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16156132b4576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190036132f0576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e881111561332c576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff78010000000000000000000000000000000000000000000000008204811691613377918491700100000000000000000000000000000000900416615c90565b11156133af576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000008204811660008181526072602052604081205491937001000000000000000000000000000000009004909216915b8481101561365957600087878381811061340f5761340f6158a7565b90506020028101906134219190615ca3565b61342a90615cd7565b905083613436816159a1565b825180516020918201208185015160408087015190519499509194506000936134989386939101928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff8916600090815260719093529120549091508114613521576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8616600090815260716020526040812055613546600189615a3a565b84036135b55742607b60149054906101000a900467ffffffffffffffff168460400151613573919061587f565b67ffffffffffffffff1611156135b5576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016608083015233901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c016040516020818303038152906040528051906020012094505050508080613651906159e1565b9150506133f3565b50613664848461587f565b6073805467ffffffffffffffff4281167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092168217808455604080516060810182528781526020808201958652680100000000000000009384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921693871693909317179091558554938916700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461380d576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561387557600080fd5b505af1158015613889573d6000803e3d6000fd5b505050506123d5614db5565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff16156138f2576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff161561392f576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613939611f50565b905081811115613975576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113888311156139b1576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6139f373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084614822565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a8491906159c8565b60738054919250780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16906018613abe836159a1565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508484604051613af5929190615d53565b60408051918290038220602083015281018290527fffffffffffffffff0000000000000000000000000000000000000000000000004260c01b166060820152606801604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206073547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1660009081526071909352912055323303613c2557607354604080518381523360208201526060918101829052600091810191909152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a2613c84565b607360189054906101000a900467ffffffffffffffff1667ffffffffffffffff167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc93182338888604051613c7b9493929190615d63565b60405180910390a25b5050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314613cdc576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610c68565b613d65614b95565b73ffffffffffffffffffffffffffffffffffffffff8116613e08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612d91565b6114b281614c16565b600080613e1c612bed565b905067ffffffffffffffff881615613eec5760795467ffffffffffffffff9081169089161115613e78576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8089166000908152607860205260409020600281015481549094509091898116680100000000000000009092041614613ee6576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50613f8d565b67ffffffffffffffff8716600090815260756020526040902054915081613f3f576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168767ffffffffffffffff161115613f8d576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168667ffffffffffffffff1611613fda576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613fe98888888689610c73565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161401e9190615d99565b602060405180830381855afa15801561403b573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061405e91906159c8565b6140689190615dab565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a916140ea91899190600401615dbf565b602060405180830381865afa158015614107573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061412b9190615dfa565b614161576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6141c93361416f858b615a19565b67ffffffffffffffff16614181612613565b61418b9190615a4d565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169190614e44565b50505050505050505050565b600067ffffffffffffffff8816156142a35760795467ffffffffffffffff9081169089161115614231576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5067ffffffffffffffff808816600090815260786020526040902060028101548154909288811668010000000000000000909204161461429d576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061433f565b5067ffffffffffffffff8516600090815260756020526040902054806142f5576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60745467ffffffffffffffff908116908716111561433f576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff908116908816118061437157508767ffffffffffffffff168767ffffffffffffffff1611155b80614398575060795467ffffffffffffffff68010000000000000000909104811690881611155b156143cf576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff878116600090815260786020526040902054680100000000000000009004811690861614614432576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006144418787878588610c73565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040516144769190615d99565b602060405180830381855afa158015614493573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906144b691906159c8565b6144c09190615dab565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a9161454291889190600401615dbf565b602060405180830381865afa15801561455f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145839190615dfa565b6145b9576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff89166000908152607860205260409020600201548590036141c9576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff680100000000000000009091048116908216111580614649575060795467ffffffffffffffff908116908216115b15614680576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff818116600081815260786020908152604080832080546074805468010000000000000000928390049098167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090981688179055600282015487865260759094529382902092909255607980547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169390940292909217909255600182015490517f33d6247d00000000000000000000000000000000000000000000000000000000815260048101919091529091907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156147b257600080fd5b505af11580156147c6573d6000803e3d6000fd5b505050508267ffffffffffffffff168167ffffffffffffffff167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e846002015460405161481591815260200190565b60405180910390a3505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526148fe9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614e9f565b50505050565b60795467ffffffffffffffff6801000000000000000082048116911611156123d55760795460009061494d9068010000000000000000900467ffffffffffffffff16600161587f565b905061495881611228565b156114b25760795460009060029061497b90849067ffffffffffffffff16615a19565b6149859190615e1c565b61498f908361587f565b905061499a81611228565b156149ac576149a88161460f565b5050565b6149a88261460f565b60006149bf612bed565b9050816000806149cf8484615a19565b606f5467ffffffffffffffff91821692506000916149f39161010090041642615a3a565b90505b8467ffffffffffffffff168467ffffffffffffffff1614614a7e5767ffffffffffffffff80851660009081526072602052604090206001810154909116821015614a5c57600181015468010000000000000000900467ffffffffffffffff169450614a78565b614a668686615a19565b67ffffffffffffffff16935050614a7e565b506149f6565b6000614a8a8484615a3a565b905083811015614ae157808403600c8111614aa55780614aa8565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281614ad757614ad7615a64565b0460705550614b51565b838103600c8111614af25780614af5565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281614b2c57614b2c615a64565b04905080607054670de0b6b3a76400000281614b4a57614b4a615a64565b0460705550505b683635c9adc5dea000006070541115614b7657683635c9adc5dea00000607055612814565b633b9aca00607054101561281457633b9aca0060705550505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1633146123d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612d91565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015614cf557600080fd5b505af1158015614d09573d6000803e3d6000fd5b505050506123d5614fab565b600054610100900460ff16614dac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612d91565b6123d533614c16565b606f5460ff16614df1576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052614e9a9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640161487c565b505050565b6000614f01826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661503e9092919063ffffffff16565b805190915015614e9a5780806020019051810190614f1f9190615dfa565b614e9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612d91565b606f5460ff1615614fe8576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b606061504d8484600085615055565b949350505050565b6060824710156150e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612d91565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516151109190615d99565b60006040518083038185875af1925050503d806000811461514d576040519150601f19603f3d011682016040523d82523d6000602084013e615152565b606091505b50915091506151638783838761516e565b979650505050505050565b606083156152045782516000036151fd5773ffffffffffffffffffffffffffffffffffffffff85163b6151fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612d91565b508161504d565b61504d83838151156152195781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d9191906152bb565b60005b83811015615268578181015183820152602001615250565b50506000910152565b6000815180845261528981602086016020860161524d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006152ce6020830184615271565b9392505050565b6000602082840312156152e757600080fd5b813561ffff811681146152ce57600080fd5b803567ffffffffffffffff81168114612be857600080fd5b600080600080600060a0868803121561532957600080fd5b615332866152f9565b9450615340602087016152f9565b94979496505050506040830135926060810135926080909101359150565b80610300810183101561537057600080fd5b92915050565b6000806000806000806103a0878903121561539057600080fd5b615399876152f9565b95506153a7602088016152f9565b94506153b5604088016152f9565b935060608701359250608087013591506153d28860a0890161535e565b90509295509295509295565b60008060008060008060006103c0888a0312156153fa57600080fd5b615403886152f9565b9650615411602089016152f9565b955061541f604089016152f9565b945061542d606089016152f9565b93506080880135925060a0880135915061544a8960c08a0161535e565b905092959891949750929550565b60006020828403121561546a57600080fd5b6152ce826152f9565b60008083601f84011261548557600080fd5b50813567ffffffffffffffff81111561549d57600080fd5b6020830191508360208260051b85010111156154b857600080fd5b9250929050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612be857600080fd5b6000806000604084860312156154f857600080fd5b833567ffffffffffffffff81111561550f57600080fd5b61551b86828701615473565b909450925061552e9050602085016154bf565b90509250925092565b60006020828403121561554957600080fd5b6152ce826154bf565b60006020828403121561556457600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126155ab57600080fd5b813567ffffffffffffffff808211156155c6576155c661556b565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561560c5761560c61556b565b8160405283815286602085880101111561562557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561565757600080fd5b813567ffffffffffffffff81111561566e57600080fd5b61504d8482850161559a565b60008083601f84011261568c57600080fd5b50813567ffffffffffffffff8111156156a457600080fd5b6020830191508360208285010111156154b857600080fd5b6000806000806000808688036101208112156156d757600080fd5b60a08112156156e557600080fd5b5086955060a0870135945060c087013567ffffffffffffffff8082111561570b57600080fd5b6157178a838b0161559a565b955060e089013591508082111561572d57600080fd5b6157398a838b0161559a565b945061010089013591508082111561575057600080fd5b5061575d89828a0161567a565b979a9699509497509295939492505050565b6000806020838503121561578257600080fd5b823567ffffffffffffffff81111561579957600080fd5b6157a585828601615473565b90969095509350505050565b6000806000604084860312156157c657600080fd5b833567ffffffffffffffff8111156157dd57600080fd5b6157e98682870161567a565b909790965060209590950135949350505050565b600181811c9082168061581157607f821691505b60208210810361584a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff8181168382160190808211156158a0576158a0615850565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261590a57600080fd5b9190910192915050565b60006080823603121561592657600080fd5b6040516080810167ffffffffffffffff828210818311171561594a5761594a61556b565b81604052843591508082111561595f57600080fd5b5061596c3682860161559a565b82525060208301356020820152615985604084016152f9565b6040820152615996606084016152f9565b606082015292915050565b600067ffffffffffffffff8083168181036159be576159be615850565b6001019392505050565b6000602082840312156159da57600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615a1257615a12615850565b5060010190565b67ffffffffffffffff8281168282160390808211156158a0576158a0615850565b8181038181111561537057615370615850565b808202811582820484141761537057615370615850565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615aa257615aa2615a64565b500490565b601f821115614e9a57600081815260208120601f850160051c81016020861015615ace5750805b601f850160051c820191505b81811015615aed57828155600101615ada565b505050505050565b815167ffffffffffffffff811115615b0f57615b0f61556b565b615b2381615b1d84546157fd565b84615aa7565b602080601f831160018114615b765760008415615b405750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615aed565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615bc357888601518255948401946001909101908401615ba4565b5085821015615bff57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600067ffffffffffffffff808716835280861660208401525060606040830152615c86606083018486615c0f565b9695505050505050565b8082018082111561537057615370615850565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301811261590a57600080fd5b600060608236031215615ce957600080fd5b6040516060810167ffffffffffffffff8282108183111715615d0d57615d0d61556b565b816040528435915080821115615d2257600080fd5b50615d2f3682860161559a565b82525060208301356020820152615d48604084016152f9565b604082015292915050565b8183823760009101908152919050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000615c86606083018486615c0f565b6000825161590a81846020870161524d565b600082615dba57615dba615a64565b500690565b61032081016103008085843782018360005b6001811015615df0578151835260209283019290910190600101615dd1565b5050509392505050565b600060208284031215615e0c57600080fd5b815180151581146152ce57600080fd5b600067ffffffffffffffff80841680615e3757615e37615a64565b9216919091049291505056fea264697066735822122041d179d10488eb8aeb9d08ff4b91f7ebb50ba9cfc8c8429a56fa36e75313648564736f6c63430008110033 \ No newline at end of file diff --git a/etherman/smartcontracts/cdkdatacommittee/cdkdatacommittee.go b/etherman/smartcontracts/cdkdatacommittee/cdkdatacommittee.go new file mode 100644 index 0000000000..b46b0f3058 --- /dev/null +++ b/etherman/smartcontracts/cdkdatacommittee/cdkdatacommittee.go @@ -0,0 +1,906 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package cdkdatacommittee + +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 +) + +// CdkdatacommitteeMetaData contains all meta data concerning the Cdkdatacommittee contract. +var CdkdatacommitteeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"CommitteeAddressDoesntExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyURLNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyRequiredSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedAddrsAndSignaturesSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedAddrsBytesLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedCommitteeHash\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongAddrOrder\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"committeeHash\",\"type\":\"bytes32\"}],\"name\":\"CommitteeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\"},{\"inputs\":[],\"name\":\"committeeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAmountOfMembers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"members\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requiredAmountOfSignatures\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requiredAmountOfSignatures\",\"type\":\"uint256\"},{\"internalType\":\"string[]\",\"name\":\"urls\",\"type\":\"string[]\"},{\"internalType\":\"bytes\",\"name\":\"addrsBytes\",\"type\":\"bytes\"}],\"name\":\"setupCommittee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"signedHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signaturesAndAddrs\",\"type\":\"bytes\"}],\"name\":\"verifySignatures\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506115e0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638129fc1c11610076578063c7a823e01161005b578063c7a823e01461015a578063dce1e2b61461016d578063f2fde38b1461017557600080fd5b80638129fc1c1461012a5780638da5cb5b1461013257600080fd5b8063609d4544116100a7578063609d4544146101025780636beedd3914610119578063715018a61461012257600080fd5b8063078fba2a146100c35780635daf08ca146100d8575b600080fd5b6100d66100d1366004610fa9565b610188565b005b6100eb6100e6366004611054565b61048c565b6040516100f992919061106d565b60405180910390f35b61010b60665481565b6040519081526020016100f9565b61010b60655481565b6100d661055e565b6100d6610572565b60335460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f9565b6100d66101683660046110f6565b610709565b60675461010b565b6100d6610183366004611142565b61095c565b610190610a10565b82858110156101cb576040517f2e7dcd6e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101d66014826111ae565b821461020e576040517f2ab6a12900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61021a60676000610eb5565b6000805b828110156104305760006102336014836111ae565b905060008682876102456014836111c5565b92610252939291906111d8565b61025b91611202565b60601c90508888848181106102725761027261124a565b90506020028101906102849190611279565b90506000036102bf576040517fb54b70e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610324576040517fd53cfbe000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809350606760405180604001604052808b8b878181106103465761034661124a565b90506020028101906103589190611279565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505073ffffffffffffffffffffffffffffffffffffffff851660209283015283546001810185559381522081519192600202019081906103cc90826113af565b5060209190910151600190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550819050610428816114c9565b91505061021e565b508383604051610441929190611501565b6040519081900381206066819055606589905581527f831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db6579060200160405180910390a150505050505050565b6067818154811061049c57600080fd5b90600052602060002090600202016000915090508060000180546104bf9061130d565b80601f01602080910402602001604051908101604052809291908181526020018280546104eb9061130d565b80156105385780601f1061050d57610100808354040283529160200191610538565b820191906000526020600020905b81548152906001019060200180831161051b57829003601f168201915b5050506001909301549192505073ffffffffffffffffffffffffffffffffffffffff1682565b610566610a10565b6105706000610a91565b565b600054610100900460ff16158080156105925750600054600160ff909116105b806105ac5750303b1580156105ac575060005460ff166001145b61063d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561069b57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6106a3610b08565b801561070657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000606554604161071a91906111ae565b90508082108061073e575060146107318284611511565b61073b9190611553565b15155b15610775576040517f6b8eec4600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606654610784838381876111d8565b604051610792929190611501565b6040518091039020146107d1576040517f6b156b2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060146107e08486611511565b6107ea9190611567565b905060005b60655481101561095357600061086a88888861080c6041876111ae565b90604161081981896111ae565b61082391906111c5565b92610830939291906111d8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ba892505050565b90506000845b848110156109065760006108856014836111ae565b61088f90896111c5565b905060008a828b6108a16014836111c5565b926108ae939291906111d8565b6108b791611202565b60601c905073ffffffffffffffffffffffffffffffffffffffff851681036108f1576108e48360016111c5565b9750600193505050610906565b505080806108fe906114c9565b915050610870565b508061093e576040517f8431721300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050808061094b906114c9565b9150506107ef565b50505050505050565b610964610a10565b73ffffffffffffffffffffffffffffffffffffffff8116610a07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610634565b61070681610a91565b60335473ffffffffffffffffffffffffffffffffffffffff163314610570576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610634565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610634565b61057033610a91565b6000806000610bb78585610bce565b91509150610bc481610c13565b5090505b92915050565b6000808251604103610c045760208301516040840151606085015160001a610bf887828585610dc6565b94509450505050610c0c565b506000905060025b9250929050565b6000816004811115610c2757610c2761157b565b03610c2f5750565b6001816004811115610c4357610c4361157b565b03610caa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610634565b6002816004811115610cbe57610cbe61157b565b03610d25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610634565b6003816004811115610d3957610d3961157b565b03610706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610634565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610dfd5750600090506003610eac565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610e51573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116610ea557600060019250925050610eac565b9150600090505b94509492505050565b508054600082556002029060005260206000209081019061070691905b80821115610f19576000610ee68282610f1d565b506001810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600201610ed2565b5090565b508054610f299061130d565b6000825580601f10610f39575050565b601f01602090049060005260206000209081019061070691905b80821115610f195760008155600101610f53565b60008083601f840112610f7957600080fd5b50813567ffffffffffffffff811115610f9157600080fd5b602083019150836020828501011115610c0c57600080fd5b600080600080600060608688031215610fc157600080fd5b85359450602086013567ffffffffffffffff80821115610fe057600080fd5b818801915088601f830112610ff457600080fd5b81358181111561100357600080fd5b8960208260051b850101111561101857600080fd5b60208301965080955050604088013591508082111561103657600080fd5b5061104388828901610f67565b969995985093965092949392505050565b60006020828403121561106657600080fd5b5035919050565b604081526000835180604084015260005b8181101561109b576020818701810151606086840101520161107e565b5060006060828501015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505073ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b60008060006040848603121561110b57600080fd5b83359250602084013567ffffffffffffffff81111561112957600080fd5b61113586828701610f67565b9497909650939450505050565b60006020828403121561115457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461117857600080fd5b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610bc857610bc861117f565b80820180821115610bc857610bc861117f565b600080858511156111e857600080fd5b838611156111f557600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156112425780818660140360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126112ae57600080fd5b83018035915067ffffffffffffffff8211156112c957600080fd5b602001915036819003821315610c0c57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600181811c9082168061132157607f821691505b60208210810361135a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156113aa57600081815260208120601f850160051c810160208610156113875750805b601f850160051c820191505b818110156113a657828155600101611393565b5050505b505050565b815167ffffffffffffffff8111156113c9576113c96112de565b6113dd816113d7845461130d565b84611360565b602080601f83116001811461143057600084156113fa5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556113a6565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561147d5788860151825594840194600190910190840161145e565b50858210156114b957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114fa576114fa61117f565b5060010190565b8183823760009101908152919050565b81810381811115610bc857610bc861117f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261156257611562611524565b500690565b60008261157657611576611524565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220a54a2ecac47f39fb27609b998291b1e8046737fbc346d3fc4d56c25e13d40d7e64736f6c63430008140033", +} + +// CdkdatacommitteeABI is the input ABI used to generate the binding from. +// Deprecated: Use CdkdatacommitteeMetaData.ABI instead. +var CdkdatacommitteeABI = CdkdatacommitteeMetaData.ABI + +// CdkdatacommitteeBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use CdkdatacommitteeMetaData.Bin instead. +var CdkdatacommitteeBin = CdkdatacommitteeMetaData.Bin + +// DeployCdkdatacommittee deploys a new Ethereum contract, binding an instance of Cdkdatacommittee to it. +func DeployCdkdatacommittee(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Cdkdatacommittee, error) { + parsed, err := CdkdatacommitteeMetaData.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(CdkdatacommitteeBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Cdkdatacommittee{CdkdatacommitteeCaller: CdkdatacommitteeCaller{contract: contract}, CdkdatacommitteeTransactor: CdkdatacommitteeTransactor{contract: contract}, CdkdatacommitteeFilterer: CdkdatacommitteeFilterer{contract: contract}}, nil +} + +// Cdkdatacommittee is an auto generated Go binding around an Ethereum contract. +type Cdkdatacommittee struct { + CdkdatacommitteeCaller // Read-only binding to the contract + CdkdatacommitteeTransactor // Write-only binding to the contract + CdkdatacommitteeFilterer // Log filterer for contract events +} + +// CdkdatacommitteeCaller is an auto generated read-only Go binding around an Ethereum contract. +type CdkdatacommitteeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CdkdatacommitteeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type CdkdatacommitteeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CdkdatacommitteeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type CdkdatacommitteeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CdkdatacommitteeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type CdkdatacommitteeSession struct { + Contract *Cdkdatacommittee // 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 +} + +// CdkdatacommitteeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type CdkdatacommitteeCallerSession struct { + Contract *CdkdatacommitteeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// CdkdatacommitteeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type CdkdatacommitteeTransactorSession struct { + Contract *CdkdatacommitteeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// CdkdatacommitteeRaw is an auto generated low-level Go binding around an Ethereum contract. +type CdkdatacommitteeRaw struct { + Contract *Cdkdatacommittee // Generic contract binding to access the raw methods on +} + +// CdkdatacommitteeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type CdkdatacommitteeCallerRaw struct { + Contract *CdkdatacommitteeCaller // Generic read-only contract binding to access the raw methods on +} + +// CdkdatacommitteeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type CdkdatacommitteeTransactorRaw struct { + Contract *CdkdatacommitteeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewCdkdatacommittee creates a new instance of Cdkdatacommittee, bound to a specific deployed contract. +func NewCdkdatacommittee(address common.Address, backend bind.ContractBackend) (*Cdkdatacommittee, error) { + contract, err := bindCdkdatacommittee(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Cdkdatacommittee{CdkdatacommitteeCaller: CdkdatacommitteeCaller{contract: contract}, CdkdatacommitteeTransactor: CdkdatacommitteeTransactor{contract: contract}, CdkdatacommitteeFilterer: CdkdatacommitteeFilterer{contract: contract}}, nil +} + +// NewCdkdatacommitteeCaller creates a new read-only instance of Cdkdatacommittee, bound to a specific deployed contract. +func NewCdkdatacommitteeCaller(address common.Address, caller bind.ContractCaller) (*CdkdatacommitteeCaller, error) { + contract, err := bindCdkdatacommittee(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CdkdatacommitteeCaller{contract: contract}, nil +} + +// NewCdkdatacommitteeTransactor creates a new write-only instance of Cdkdatacommittee, bound to a specific deployed contract. +func NewCdkdatacommitteeTransactor(address common.Address, transactor bind.ContractTransactor) (*CdkdatacommitteeTransactor, error) { + contract, err := bindCdkdatacommittee(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CdkdatacommitteeTransactor{contract: contract}, nil +} + +// NewCdkdatacommitteeFilterer creates a new log filterer instance of Cdkdatacommittee, bound to a specific deployed contract. +func NewCdkdatacommitteeFilterer(address common.Address, filterer bind.ContractFilterer) (*CdkdatacommitteeFilterer, error) { + contract, err := bindCdkdatacommittee(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CdkdatacommitteeFilterer{contract: contract}, nil +} + +// bindCdkdatacommittee binds a generic wrapper to an already deployed contract. +func bindCdkdatacommittee(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CdkdatacommitteeMetaData.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 (_Cdkdatacommittee *CdkdatacommitteeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Cdkdatacommittee.Contract.CdkdatacommitteeCaller.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 (_Cdkdatacommittee *CdkdatacommitteeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.CdkdatacommitteeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Cdkdatacommittee *CdkdatacommitteeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.CdkdatacommitteeTransactor.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 (_Cdkdatacommittee *CdkdatacommitteeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Cdkdatacommittee.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 (_Cdkdatacommittee *CdkdatacommitteeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Cdkdatacommittee *CdkdatacommitteeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.contract.Transact(opts, method, params...) +} + +// CommitteeHash is a free data retrieval call binding the contract method 0x609d4544. +// +// Solidity: function committeeHash() view returns(bytes32) +func (_Cdkdatacommittee *CdkdatacommitteeCaller) CommitteeHash(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Cdkdatacommittee.contract.Call(opts, &out, "committeeHash") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// CommitteeHash is a free data retrieval call binding the contract method 0x609d4544. +// +// Solidity: function committeeHash() view returns(bytes32) +func (_Cdkdatacommittee *CdkdatacommitteeSession) CommitteeHash() ([32]byte, error) { + return _Cdkdatacommittee.Contract.CommitteeHash(&_Cdkdatacommittee.CallOpts) +} + +// CommitteeHash is a free data retrieval call binding the contract method 0x609d4544. +// +// Solidity: function committeeHash() view returns(bytes32) +func (_Cdkdatacommittee *CdkdatacommitteeCallerSession) CommitteeHash() ([32]byte, error) { + return _Cdkdatacommittee.Contract.CommitteeHash(&_Cdkdatacommittee.CallOpts) +} + +// GetAmountOfMembers is a free data retrieval call binding the contract method 0xdce1e2b6. +// +// Solidity: function getAmountOfMembers() view returns(uint256) +func (_Cdkdatacommittee *CdkdatacommitteeCaller) GetAmountOfMembers(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Cdkdatacommittee.contract.Call(opts, &out, "getAmountOfMembers") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountOfMembers is a free data retrieval call binding the contract method 0xdce1e2b6. +// +// Solidity: function getAmountOfMembers() view returns(uint256) +func (_Cdkdatacommittee *CdkdatacommitteeSession) GetAmountOfMembers() (*big.Int, error) { + return _Cdkdatacommittee.Contract.GetAmountOfMembers(&_Cdkdatacommittee.CallOpts) +} + +// GetAmountOfMembers is a free data retrieval call binding the contract method 0xdce1e2b6. +// +// Solidity: function getAmountOfMembers() view returns(uint256) +func (_Cdkdatacommittee *CdkdatacommitteeCallerSession) GetAmountOfMembers() (*big.Int, error) { + return _Cdkdatacommittee.Contract.GetAmountOfMembers(&_Cdkdatacommittee.CallOpts) +} + +// Members is a free data retrieval call binding the contract method 0x5daf08ca. +// +// Solidity: function members(uint256 ) view returns(string url, address addr) +func (_Cdkdatacommittee *CdkdatacommitteeCaller) Members(opts *bind.CallOpts, arg0 *big.Int) (struct { + Url string + Addr common.Address +}, error) { + var out []interface{} + err := _Cdkdatacommittee.contract.Call(opts, &out, "members", arg0) + + outstruct := new(struct { + Url string + Addr common.Address + }) + if err != nil { + return *outstruct, err + } + + outstruct.Url = *abi.ConvertType(out[0], new(string)).(*string) + outstruct.Addr = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + + return *outstruct, err + +} + +// Members is a free data retrieval call binding the contract method 0x5daf08ca. +// +// Solidity: function members(uint256 ) view returns(string url, address addr) +func (_Cdkdatacommittee *CdkdatacommitteeSession) Members(arg0 *big.Int) (struct { + Url string + Addr common.Address +}, error) { + return _Cdkdatacommittee.Contract.Members(&_Cdkdatacommittee.CallOpts, arg0) +} + +// Members is a free data retrieval call binding the contract method 0x5daf08ca. +// +// Solidity: function members(uint256 ) view returns(string url, address addr) +func (_Cdkdatacommittee *CdkdatacommitteeCallerSession) Members(arg0 *big.Int) (struct { + Url string + Addr common.Address +}, error) { + return _Cdkdatacommittee.Contract.Members(&_Cdkdatacommittee.CallOpts, arg0) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Cdkdatacommittee *CdkdatacommitteeCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkdatacommittee.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Cdkdatacommittee *CdkdatacommitteeSession) Owner() (common.Address, error) { + return _Cdkdatacommittee.Contract.Owner(&_Cdkdatacommittee.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Cdkdatacommittee *CdkdatacommitteeCallerSession) Owner() (common.Address, error) { + return _Cdkdatacommittee.Contract.Owner(&_Cdkdatacommittee.CallOpts) +} + +// RequiredAmountOfSignatures is a free data retrieval call binding the contract method 0x6beedd39. +// +// Solidity: function requiredAmountOfSignatures() view returns(uint256) +func (_Cdkdatacommittee *CdkdatacommitteeCaller) RequiredAmountOfSignatures(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Cdkdatacommittee.contract.Call(opts, &out, "requiredAmountOfSignatures") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RequiredAmountOfSignatures is a free data retrieval call binding the contract method 0x6beedd39. +// +// Solidity: function requiredAmountOfSignatures() view returns(uint256) +func (_Cdkdatacommittee *CdkdatacommitteeSession) RequiredAmountOfSignatures() (*big.Int, error) { + return _Cdkdatacommittee.Contract.RequiredAmountOfSignatures(&_Cdkdatacommittee.CallOpts) +} + +// RequiredAmountOfSignatures is a free data retrieval call binding the contract method 0x6beedd39. +// +// Solidity: function requiredAmountOfSignatures() view returns(uint256) +func (_Cdkdatacommittee *CdkdatacommitteeCallerSession) RequiredAmountOfSignatures() (*big.Int, error) { + return _Cdkdatacommittee.Contract.RequiredAmountOfSignatures(&_Cdkdatacommittee.CallOpts) +} + +// VerifySignatures is a free data retrieval call binding the contract method 0xc7a823e0. +// +// Solidity: function verifySignatures(bytes32 signedHash, bytes signaturesAndAddrs) view returns() +func (_Cdkdatacommittee *CdkdatacommitteeCaller) VerifySignatures(opts *bind.CallOpts, signedHash [32]byte, signaturesAndAddrs []byte) error { + var out []interface{} + err := _Cdkdatacommittee.contract.Call(opts, &out, "verifySignatures", signedHash, signaturesAndAddrs) + + if err != nil { + return err + } + + return err + +} + +// VerifySignatures is a free data retrieval call binding the contract method 0xc7a823e0. +// +// Solidity: function verifySignatures(bytes32 signedHash, bytes signaturesAndAddrs) view returns() +func (_Cdkdatacommittee *CdkdatacommitteeSession) VerifySignatures(signedHash [32]byte, signaturesAndAddrs []byte) error { + return _Cdkdatacommittee.Contract.VerifySignatures(&_Cdkdatacommittee.CallOpts, signedHash, signaturesAndAddrs) +} + +// VerifySignatures is a free data retrieval call binding the contract method 0xc7a823e0. +// +// Solidity: function verifySignatures(bytes32 signedHash, bytes signaturesAndAddrs) view returns() +func (_Cdkdatacommittee *CdkdatacommitteeCallerSession) VerifySignatures(signedHash [32]byte, signaturesAndAddrs []byte) error { + return _Cdkdatacommittee.Contract.VerifySignatures(&_Cdkdatacommittee.CallOpts, signedHash, signaturesAndAddrs) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_Cdkdatacommittee *CdkdatacommitteeTransactor) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkdatacommittee.contract.Transact(opts, "initialize") +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_Cdkdatacommittee *CdkdatacommitteeSession) Initialize() (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.Initialize(&_Cdkdatacommittee.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_Cdkdatacommittee *CdkdatacommitteeTransactorSession) Initialize() (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.Initialize(&_Cdkdatacommittee.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Cdkdatacommittee *CdkdatacommitteeTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkdatacommittee.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Cdkdatacommittee *CdkdatacommitteeSession) RenounceOwnership() (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.RenounceOwnership(&_Cdkdatacommittee.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Cdkdatacommittee *CdkdatacommitteeTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.RenounceOwnership(&_Cdkdatacommittee.TransactOpts) +} + +// SetupCommittee is a paid mutator transaction binding the contract method 0x078fba2a. +// +// Solidity: function setupCommittee(uint256 _requiredAmountOfSignatures, string[] urls, bytes addrsBytes) returns() +func (_Cdkdatacommittee *CdkdatacommitteeTransactor) SetupCommittee(opts *bind.TransactOpts, _requiredAmountOfSignatures *big.Int, urls []string, addrsBytes []byte) (*types.Transaction, error) { + return _Cdkdatacommittee.contract.Transact(opts, "setupCommittee", _requiredAmountOfSignatures, urls, addrsBytes) +} + +// SetupCommittee is a paid mutator transaction binding the contract method 0x078fba2a. +// +// Solidity: function setupCommittee(uint256 _requiredAmountOfSignatures, string[] urls, bytes addrsBytes) returns() +func (_Cdkdatacommittee *CdkdatacommitteeSession) SetupCommittee(_requiredAmountOfSignatures *big.Int, urls []string, addrsBytes []byte) (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.SetupCommittee(&_Cdkdatacommittee.TransactOpts, _requiredAmountOfSignatures, urls, addrsBytes) +} + +// SetupCommittee is a paid mutator transaction binding the contract method 0x078fba2a. +// +// Solidity: function setupCommittee(uint256 _requiredAmountOfSignatures, string[] urls, bytes addrsBytes) returns() +func (_Cdkdatacommittee *CdkdatacommitteeTransactorSession) SetupCommittee(_requiredAmountOfSignatures *big.Int, urls []string, addrsBytes []byte) (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.SetupCommittee(&_Cdkdatacommittee.TransactOpts, _requiredAmountOfSignatures, urls, addrsBytes) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Cdkdatacommittee *CdkdatacommitteeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Cdkdatacommittee.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Cdkdatacommittee *CdkdatacommitteeSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.TransferOwnership(&_Cdkdatacommittee.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Cdkdatacommittee *CdkdatacommitteeTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Cdkdatacommittee.Contract.TransferOwnership(&_Cdkdatacommittee.TransactOpts, newOwner) +} + +// CdkdatacommitteeCommitteeUpdatedIterator is returned from FilterCommitteeUpdated and is used to iterate over the raw logs and unpacked data for CommitteeUpdated events raised by the Cdkdatacommittee contract. +type CdkdatacommitteeCommitteeUpdatedIterator struct { + Event *CdkdatacommitteeCommitteeUpdated // 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 *CdkdatacommitteeCommitteeUpdatedIterator) 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(CdkdatacommitteeCommitteeUpdated) + 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(CdkdatacommitteeCommitteeUpdated) + 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 *CdkdatacommitteeCommitteeUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkdatacommitteeCommitteeUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkdatacommitteeCommitteeUpdated represents a CommitteeUpdated event raised by the Cdkdatacommittee contract. +type CdkdatacommitteeCommitteeUpdated struct { + CommitteeHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCommitteeUpdated is a free log retrieval operation binding the contract event 0x831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db657. +// +// Solidity: event CommitteeUpdated(bytes32 committeeHash) +func (_Cdkdatacommittee *CdkdatacommitteeFilterer) FilterCommitteeUpdated(opts *bind.FilterOpts) (*CdkdatacommitteeCommitteeUpdatedIterator, error) { + + logs, sub, err := _Cdkdatacommittee.contract.FilterLogs(opts, "CommitteeUpdated") + if err != nil { + return nil, err + } + return &CdkdatacommitteeCommitteeUpdatedIterator{contract: _Cdkdatacommittee.contract, event: "CommitteeUpdated", logs: logs, sub: sub}, nil +} + +// WatchCommitteeUpdated is a free log subscription operation binding the contract event 0x831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db657. +// +// Solidity: event CommitteeUpdated(bytes32 committeeHash) +func (_Cdkdatacommittee *CdkdatacommitteeFilterer) WatchCommitteeUpdated(opts *bind.WatchOpts, sink chan<- *CdkdatacommitteeCommitteeUpdated) (event.Subscription, error) { + + logs, sub, err := _Cdkdatacommittee.contract.WatchLogs(opts, "CommitteeUpdated") + 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(CdkdatacommitteeCommitteeUpdated) + if err := _Cdkdatacommittee.contract.UnpackLog(event, "CommitteeUpdated", 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 +} + +// ParseCommitteeUpdated is a log parse operation binding the contract event 0x831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db657. +// +// Solidity: event CommitteeUpdated(bytes32 committeeHash) +func (_Cdkdatacommittee *CdkdatacommitteeFilterer) ParseCommitteeUpdated(log types.Log) (*CdkdatacommitteeCommitteeUpdated, error) { + event := new(CdkdatacommitteeCommitteeUpdated) + if err := _Cdkdatacommittee.contract.UnpackLog(event, "CommitteeUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkdatacommitteeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Cdkdatacommittee contract. +type CdkdatacommitteeInitializedIterator struct { + Event *CdkdatacommitteeInitialized // 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 *CdkdatacommitteeInitializedIterator) 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(CdkdatacommitteeInitialized) + 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(CdkdatacommitteeInitialized) + 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 *CdkdatacommitteeInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkdatacommitteeInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkdatacommitteeInitialized represents a Initialized event raised by the Cdkdatacommittee contract. +type CdkdatacommitteeInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Cdkdatacommittee *CdkdatacommitteeFilterer) FilterInitialized(opts *bind.FilterOpts) (*CdkdatacommitteeInitializedIterator, error) { + + logs, sub, err := _Cdkdatacommittee.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &CdkdatacommitteeInitializedIterator{contract: _Cdkdatacommittee.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Cdkdatacommittee *CdkdatacommitteeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *CdkdatacommitteeInitialized) (event.Subscription, error) { + + logs, sub, err := _Cdkdatacommittee.contract.WatchLogs(opts, "Initialized") + 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(CdkdatacommitteeInitialized) + if err := _Cdkdatacommittee.contract.UnpackLog(event, "Initialized", 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Cdkdatacommittee *CdkdatacommitteeFilterer) ParseInitialized(log types.Log) (*CdkdatacommitteeInitialized, error) { + event := new(CdkdatacommitteeInitialized) + if err := _Cdkdatacommittee.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkdatacommitteeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Cdkdatacommittee contract. +type CdkdatacommitteeOwnershipTransferredIterator struct { + Event *CdkdatacommitteeOwnershipTransferred // 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 *CdkdatacommitteeOwnershipTransferredIterator) 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(CdkdatacommitteeOwnershipTransferred) + 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(CdkdatacommitteeOwnershipTransferred) + 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 *CdkdatacommitteeOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkdatacommitteeOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkdatacommitteeOwnershipTransferred represents a OwnershipTransferred event raised by the Cdkdatacommittee contract. +type CdkdatacommitteeOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Cdkdatacommittee *CdkdatacommitteeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*CdkdatacommitteeOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Cdkdatacommittee.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &CdkdatacommitteeOwnershipTransferredIterator{contract: _Cdkdatacommittee.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Cdkdatacommittee *CdkdatacommitteeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CdkdatacommitteeOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Cdkdatacommittee.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + 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(CdkdatacommitteeOwnershipTransferred) + if err := _Cdkdatacommittee.contract.UnpackLog(event, "OwnershipTransferred", 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 +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Cdkdatacommittee *CdkdatacommitteeFilterer) ParseOwnershipTransferred(log types.Log) (*CdkdatacommitteeOwnershipTransferred, error) { + event := new(CdkdatacommitteeOwnershipTransferred) + if err := _Cdkdatacommittee.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/etherman/smartcontracts/cdkvalidium/cdkvalidium.go b/etherman/smartcontracts/cdkvalidium/cdkvalidium.go new file mode 100644 index 0000000000..155233ba96 --- /dev/null +++ b/etherman/smartcontracts/cdkvalidium/cdkvalidium.go @@ -0,0 +1,5339 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package cdkvalidium + +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 +) + +// CDKValidiumBatchData is an auto generated low-level Go binding around an user-defined struct. +type CDKValidiumBatchData struct { + TransactionsHash [32]byte + GlobalExitRoot [32]byte + Timestamp uint64 + MinForcedTimestamp uint64 +} + +// CDKValidiumForcedBatchData is an auto generated low-level Go binding around an user-defined struct. +type CDKValidiumForcedBatchData struct { + Transactions []byte + GlobalExitRoot [32]byte + MinForcedTimestamp uint64 +} + +// CDKValidiumInitializePackedParameters is an auto generated low-level Go binding around an user-defined struct. +type CDKValidiumInitializePackedParameters struct { + Admin common.Address + TrustedSequencer common.Address + PendingStateTimeout uint64 + TrustedAggregator common.Address + TrustedAggregatorTimeout uint64 +} + +// CdkvalidiumMetaData contains all meta data concerning the Cdkvalidium contract. +var CdkvalidiumMetaData = &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", +} + +// CdkvalidiumABI is the input ABI used to generate the binding from. +// Deprecated: Use CdkvalidiumMetaData.ABI instead. +var CdkvalidiumABI = CdkvalidiumMetaData.ABI + +// CdkvalidiumBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use CdkvalidiumMetaData.Bin instead. +var CdkvalidiumBin = CdkvalidiumMetaData.Bin + +// DeployCdkvalidium deploys a new Ethereum contract, binding an instance of Cdkvalidium to it. +func DeployCdkvalidium(auth *bind.TransactOpts, backend bind.ContractBackend, _globalExitRootManager common.Address, _matic common.Address, _rollupVerifier common.Address, _bridgeAddress common.Address, _dataCommitteeAddress common.Address, _chainID uint64, _forkID uint64) (common.Address, *types.Transaction, *Cdkvalidium, error) { + parsed, err := CdkvalidiumMetaData.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(CdkvalidiumBin), backend, _globalExitRootManager, _matic, _rollupVerifier, _bridgeAddress, _dataCommitteeAddress, _chainID, _forkID) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Cdkvalidium{CdkvalidiumCaller: CdkvalidiumCaller{contract: contract}, CdkvalidiumTransactor: CdkvalidiumTransactor{contract: contract}, CdkvalidiumFilterer: CdkvalidiumFilterer{contract: contract}}, nil +} + +// Cdkvalidium is an auto generated Go binding around an Ethereum contract. +type Cdkvalidium struct { + CdkvalidiumCaller // Read-only binding to the contract + CdkvalidiumTransactor // Write-only binding to the contract + CdkvalidiumFilterer // Log filterer for contract events +} + +// CdkvalidiumCaller is an auto generated read-only Go binding around an Ethereum contract. +type CdkvalidiumCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CdkvalidiumTransactor is an auto generated write-only Go binding around an Ethereum contract. +type CdkvalidiumTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CdkvalidiumFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type CdkvalidiumFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CdkvalidiumSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type CdkvalidiumSession struct { + Contract *Cdkvalidium // 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 +} + +// CdkvalidiumCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type CdkvalidiumCallerSession struct { + Contract *CdkvalidiumCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// CdkvalidiumTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type CdkvalidiumTransactorSession struct { + Contract *CdkvalidiumTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// CdkvalidiumRaw is an auto generated low-level Go binding around an Ethereum contract. +type CdkvalidiumRaw struct { + Contract *Cdkvalidium // Generic contract binding to access the raw methods on +} + +// CdkvalidiumCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type CdkvalidiumCallerRaw struct { + Contract *CdkvalidiumCaller // Generic read-only contract binding to access the raw methods on +} + +// CdkvalidiumTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type CdkvalidiumTransactorRaw struct { + Contract *CdkvalidiumTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewCdkvalidium creates a new instance of Cdkvalidium, bound to a specific deployed contract. +func NewCdkvalidium(address common.Address, backend bind.ContractBackend) (*Cdkvalidium, error) { + contract, err := bindCdkvalidium(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Cdkvalidium{CdkvalidiumCaller: CdkvalidiumCaller{contract: contract}, CdkvalidiumTransactor: CdkvalidiumTransactor{contract: contract}, CdkvalidiumFilterer: CdkvalidiumFilterer{contract: contract}}, nil +} + +// NewCdkvalidiumCaller creates a new read-only instance of Cdkvalidium, bound to a specific deployed contract. +func NewCdkvalidiumCaller(address common.Address, caller bind.ContractCaller) (*CdkvalidiumCaller, error) { + contract, err := bindCdkvalidium(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CdkvalidiumCaller{contract: contract}, nil +} + +// NewCdkvalidiumTransactor creates a new write-only instance of Cdkvalidium, bound to a specific deployed contract. +func NewCdkvalidiumTransactor(address common.Address, transactor bind.ContractTransactor) (*CdkvalidiumTransactor, error) { + contract, err := bindCdkvalidium(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CdkvalidiumTransactor{contract: contract}, nil +} + +// NewCdkvalidiumFilterer creates a new log filterer instance of Cdkvalidium, bound to a specific deployed contract. +func NewCdkvalidiumFilterer(address common.Address, filterer bind.ContractFilterer) (*CdkvalidiumFilterer, error) { + contract, err := bindCdkvalidium(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CdkvalidiumFilterer{contract: contract}, nil +} + +// bindCdkvalidium binds a generic wrapper to an already deployed contract. +func bindCdkvalidium(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CdkvalidiumMetaData.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 (_Cdkvalidium *CdkvalidiumRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Cdkvalidium.Contract.CdkvalidiumCaller.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 (_Cdkvalidium *CdkvalidiumRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkvalidium.Contract.CdkvalidiumTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Cdkvalidium *CdkvalidiumRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Cdkvalidium.Contract.CdkvalidiumTransactor.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 (_Cdkvalidium *CdkvalidiumCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Cdkvalidium.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 (_Cdkvalidium *CdkvalidiumTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkvalidium.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Cdkvalidium *CdkvalidiumTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Cdkvalidium.Contract.contract.Transact(opts, method, params...) +} + +// Admin is a free data retrieval call binding the contract method 0xf851a440. +// +// Solidity: function admin() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) Admin(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "admin") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Admin is a free data retrieval call binding the contract method 0xf851a440. +// +// Solidity: function admin() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) Admin() (common.Address, error) { + return _Cdkvalidium.Contract.Admin(&_Cdkvalidium.CallOpts) +} + +// Admin is a free data retrieval call binding the contract method 0xf851a440. +// +// Solidity: function admin() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) Admin() (common.Address, error) { + return _Cdkvalidium.Contract.Admin(&_Cdkvalidium.CallOpts) +} + +// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. +// +// Solidity: function batchFee() view returns(uint256) +func (_Cdkvalidium *CdkvalidiumCaller) BatchFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "batchFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. +// +// Solidity: function batchFee() view returns(uint256) +func (_Cdkvalidium *CdkvalidiumSession) BatchFee() (*big.Int, error) { + return _Cdkvalidium.Contract.BatchFee(&_Cdkvalidium.CallOpts) +} + +// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. +// +// Solidity: function batchFee() view returns(uint256) +func (_Cdkvalidium *CdkvalidiumCallerSession) BatchFee() (*big.Int, error) { + return _Cdkvalidium.Contract.BatchFee(&_Cdkvalidium.CallOpts) +} + +// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. +// +// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) +func (_Cdkvalidium *CdkvalidiumCaller) BatchNumToStateRoot(opts *bind.CallOpts, arg0 uint64) ([32]byte, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "batchNumToStateRoot", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. +// +// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) +func (_Cdkvalidium *CdkvalidiumSession) BatchNumToStateRoot(arg0 uint64) ([32]byte, error) { + return _Cdkvalidium.Contract.BatchNumToStateRoot(&_Cdkvalidium.CallOpts, arg0) +} + +// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. +// +// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) +func (_Cdkvalidium *CdkvalidiumCallerSession) BatchNumToStateRoot(arg0 uint64) ([32]byte, error) { + return _Cdkvalidium.Contract.BatchNumToStateRoot(&_Cdkvalidium.CallOpts, arg0) +} + +// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. +// +// Solidity: function bridgeAddress() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) BridgeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "bridgeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. +// +// Solidity: function bridgeAddress() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) BridgeAddress() (common.Address, error) { + return _Cdkvalidium.Contract.BridgeAddress(&_Cdkvalidium.CallOpts) +} + +// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. +// +// Solidity: function bridgeAddress() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) BridgeAddress() (common.Address, error) { + return _Cdkvalidium.Contract.BridgeAddress(&_Cdkvalidium.CallOpts) +} + +// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. +// +// Solidity: function calculateRewardPerBatch() view returns(uint256) +func (_Cdkvalidium *CdkvalidiumCaller) CalculateRewardPerBatch(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "calculateRewardPerBatch") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. +// +// Solidity: function calculateRewardPerBatch() view returns(uint256) +func (_Cdkvalidium *CdkvalidiumSession) CalculateRewardPerBatch() (*big.Int, error) { + return _Cdkvalidium.Contract.CalculateRewardPerBatch(&_Cdkvalidium.CallOpts) +} + +// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. +// +// Solidity: function calculateRewardPerBatch() view returns(uint256) +func (_Cdkvalidium *CdkvalidiumCallerSession) CalculateRewardPerBatch() (*big.Int, error) { + return _Cdkvalidium.Contract.CalculateRewardPerBatch(&_Cdkvalidium.CallOpts) +} + +// ChainID is a free data retrieval call binding the contract method 0xadc879e9. +// +// Solidity: function chainID() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) ChainID(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "chainID") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// ChainID is a free data retrieval call binding the contract method 0xadc879e9. +// +// Solidity: function chainID() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) ChainID() (uint64, error) { + return _Cdkvalidium.Contract.ChainID(&_Cdkvalidium.CallOpts) +} + +// ChainID is a free data retrieval call binding the contract method 0xadc879e9. +// +// Solidity: function chainID() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) ChainID() (uint64, error) { + return _Cdkvalidium.Contract.ChainID(&_Cdkvalidium.CallOpts) +} + +// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. +// +// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) +func (_Cdkvalidium *CdkvalidiumCaller) CheckStateRootInsidePrime(opts *bind.CallOpts, newStateRoot *big.Int) (bool, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "checkStateRootInsidePrime", newStateRoot) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. +// +// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) +func (_Cdkvalidium *CdkvalidiumSession) CheckStateRootInsidePrime(newStateRoot *big.Int) (bool, error) { + return _Cdkvalidium.Contract.CheckStateRootInsidePrime(&_Cdkvalidium.CallOpts, newStateRoot) +} + +// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. +// +// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) +func (_Cdkvalidium *CdkvalidiumCallerSession) CheckStateRootInsidePrime(newStateRoot *big.Int) (bool, error) { + return _Cdkvalidium.Contract.CheckStateRootInsidePrime(&_Cdkvalidium.CallOpts, newStateRoot) +} + +// DataCommitteeAddress is a free data retrieval call binding the contract method 0x4df61d24. +// +// Solidity: function dataCommitteeAddress() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) DataCommitteeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "dataCommitteeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DataCommitteeAddress is a free data retrieval call binding the contract method 0x4df61d24. +// +// Solidity: function dataCommitteeAddress() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) DataCommitteeAddress() (common.Address, error) { + return _Cdkvalidium.Contract.DataCommitteeAddress(&_Cdkvalidium.CallOpts) +} + +// DataCommitteeAddress is a free data retrieval call binding the contract method 0x4df61d24. +// +// Solidity: function dataCommitteeAddress() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) DataCommitteeAddress() (common.Address, error) { + return _Cdkvalidium.Contract.DataCommitteeAddress(&_Cdkvalidium.CallOpts) +} + +// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. +// +// Solidity: function forceBatchTimeout() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) ForceBatchTimeout(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "forceBatchTimeout") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. +// +// Solidity: function forceBatchTimeout() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) ForceBatchTimeout() (uint64, error) { + return _Cdkvalidium.Contract.ForceBatchTimeout(&_Cdkvalidium.CallOpts) +} + +// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. +// +// Solidity: function forceBatchTimeout() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) ForceBatchTimeout() (uint64, error) { + return _Cdkvalidium.Contract.ForceBatchTimeout(&_Cdkvalidium.CallOpts) +} + +// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. +// +// Solidity: function forcedBatches(uint64 ) view returns(bytes32) +func (_Cdkvalidium *CdkvalidiumCaller) ForcedBatches(opts *bind.CallOpts, arg0 uint64) ([32]byte, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "forcedBatches", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. +// +// Solidity: function forcedBatches(uint64 ) view returns(bytes32) +func (_Cdkvalidium *CdkvalidiumSession) ForcedBatches(arg0 uint64) ([32]byte, error) { + return _Cdkvalidium.Contract.ForcedBatches(&_Cdkvalidium.CallOpts, arg0) +} + +// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. +// +// Solidity: function forcedBatches(uint64 ) view returns(bytes32) +func (_Cdkvalidium *CdkvalidiumCallerSession) ForcedBatches(arg0 uint64) ([32]byte, error) { + return _Cdkvalidium.Contract.ForcedBatches(&_Cdkvalidium.CallOpts, arg0) +} + +// ForkID is a free data retrieval call binding the contract method 0x831c7ead. +// +// Solidity: function forkID() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) ForkID(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "forkID") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// ForkID is a free data retrieval call binding the contract method 0x831c7ead. +// +// Solidity: function forkID() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) ForkID() (uint64, error) { + return _Cdkvalidium.Contract.ForkID(&_Cdkvalidium.CallOpts) +} + +// ForkID is a free data retrieval call binding the contract method 0x831c7ead. +// +// Solidity: function forkID() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) ForkID() (uint64, error) { + return _Cdkvalidium.Contract.ForkID(&_Cdkvalidium.CallOpts) +} + +// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. +// +// Solidity: function getForcedBatchFee() view returns(uint256) +func (_Cdkvalidium *CdkvalidiumCaller) GetForcedBatchFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "getForcedBatchFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. +// +// Solidity: function getForcedBatchFee() view returns(uint256) +func (_Cdkvalidium *CdkvalidiumSession) GetForcedBatchFee() (*big.Int, error) { + return _Cdkvalidium.Contract.GetForcedBatchFee(&_Cdkvalidium.CallOpts) +} + +// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. +// +// Solidity: function getForcedBatchFee() view returns(uint256) +func (_Cdkvalidium *CdkvalidiumCallerSession) GetForcedBatchFee() (*big.Int, error) { + return _Cdkvalidium.Contract.GetForcedBatchFee(&_Cdkvalidium.CallOpts) +} + +// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. +// +// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) +func (_Cdkvalidium *CdkvalidiumCaller) GetInputSnarkBytes(opts *bind.CallOpts, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "getInputSnarkBytes", initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. +// +// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) +func (_Cdkvalidium *CdkvalidiumSession) GetInputSnarkBytes(initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { + return _Cdkvalidium.Contract.GetInputSnarkBytes(&_Cdkvalidium.CallOpts, initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) +} + +// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. +// +// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) +func (_Cdkvalidium *CdkvalidiumCallerSession) GetInputSnarkBytes(initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { + return _Cdkvalidium.Contract.GetInputSnarkBytes(&_Cdkvalidium.CallOpts, initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) +} + +// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. +// +// Solidity: function getLastVerifiedBatch() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) GetLastVerifiedBatch(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "getLastVerifiedBatch") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. +// +// Solidity: function getLastVerifiedBatch() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) GetLastVerifiedBatch() (uint64, error) { + return _Cdkvalidium.Contract.GetLastVerifiedBatch(&_Cdkvalidium.CallOpts) +} + +// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. +// +// Solidity: function getLastVerifiedBatch() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) GetLastVerifiedBatch() (uint64, error) { + return _Cdkvalidium.Contract.GetLastVerifiedBatch(&_Cdkvalidium.CallOpts) +} + +// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. +// +// Solidity: function globalExitRootManager() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) GlobalExitRootManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "globalExitRootManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. +// +// Solidity: function globalExitRootManager() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) GlobalExitRootManager() (common.Address, error) { + return _Cdkvalidium.Contract.GlobalExitRootManager(&_Cdkvalidium.CallOpts) +} + +// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. +// +// Solidity: function globalExitRootManager() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) GlobalExitRootManager() (common.Address, error) { + return _Cdkvalidium.Contract.GlobalExitRootManager(&_Cdkvalidium.CallOpts) +} + +// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. +// +// Solidity: function isEmergencyState() view returns(bool) +func (_Cdkvalidium *CdkvalidiumCaller) IsEmergencyState(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "isEmergencyState") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. +// +// Solidity: function isEmergencyState() view returns(bool) +func (_Cdkvalidium *CdkvalidiumSession) IsEmergencyState() (bool, error) { + return _Cdkvalidium.Contract.IsEmergencyState(&_Cdkvalidium.CallOpts) +} + +// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. +// +// Solidity: function isEmergencyState() view returns(bool) +func (_Cdkvalidium *CdkvalidiumCallerSession) IsEmergencyState() (bool, error) { + return _Cdkvalidium.Contract.IsEmergencyState(&_Cdkvalidium.CallOpts) +} + +// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. +// +// Solidity: function isForcedBatchDisallowed() view returns(bool) +func (_Cdkvalidium *CdkvalidiumCaller) IsForcedBatchDisallowed(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "isForcedBatchDisallowed") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. +// +// Solidity: function isForcedBatchDisallowed() view returns(bool) +func (_Cdkvalidium *CdkvalidiumSession) IsForcedBatchDisallowed() (bool, error) { + return _Cdkvalidium.Contract.IsForcedBatchDisallowed(&_Cdkvalidium.CallOpts) +} + +// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. +// +// Solidity: function isForcedBatchDisallowed() view returns(bool) +func (_Cdkvalidium *CdkvalidiumCallerSession) IsForcedBatchDisallowed() (bool, error) { + return _Cdkvalidium.Contract.IsForcedBatchDisallowed(&_Cdkvalidium.CallOpts) +} + +// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. +// +// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) +func (_Cdkvalidium *CdkvalidiumCaller) IsPendingStateConsolidable(opts *bind.CallOpts, pendingStateNum uint64) (bool, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "isPendingStateConsolidable", pendingStateNum) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. +// +// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) +func (_Cdkvalidium *CdkvalidiumSession) IsPendingStateConsolidable(pendingStateNum uint64) (bool, error) { + return _Cdkvalidium.Contract.IsPendingStateConsolidable(&_Cdkvalidium.CallOpts, pendingStateNum) +} + +// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. +// +// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) +func (_Cdkvalidium *CdkvalidiumCallerSession) IsPendingStateConsolidable(pendingStateNum uint64) (bool, error) { + return _Cdkvalidium.Contract.IsPendingStateConsolidable(&_Cdkvalidium.CallOpts, pendingStateNum) +} + +// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. +// +// Solidity: function lastBatchSequenced() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) LastBatchSequenced(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "lastBatchSequenced") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. +// +// Solidity: function lastBatchSequenced() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) LastBatchSequenced() (uint64, error) { + return _Cdkvalidium.Contract.LastBatchSequenced(&_Cdkvalidium.CallOpts) +} + +// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. +// +// Solidity: function lastBatchSequenced() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) LastBatchSequenced() (uint64, error) { + return _Cdkvalidium.Contract.LastBatchSequenced(&_Cdkvalidium.CallOpts) +} + +// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. +// +// Solidity: function lastForceBatch() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) LastForceBatch(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "lastForceBatch") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. +// +// Solidity: function lastForceBatch() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) LastForceBatch() (uint64, error) { + return _Cdkvalidium.Contract.LastForceBatch(&_Cdkvalidium.CallOpts) +} + +// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. +// +// Solidity: function lastForceBatch() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) LastForceBatch() (uint64, error) { + return _Cdkvalidium.Contract.LastForceBatch(&_Cdkvalidium.CallOpts) +} + +// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. +// +// Solidity: function lastForceBatchSequenced() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) LastForceBatchSequenced(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "lastForceBatchSequenced") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. +// +// Solidity: function lastForceBatchSequenced() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) LastForceBatchSequenced() (uint64, error) { + return _Cdkvalidium.Contract.LastForceBatchSequenced(&_Cdkvalidium.CallOpts) +} + +// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. +// +// Solidity: function lastForceBatchSequenced() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) LastForceBatchSequenced() (uint64, error) { + return _Cdkvalidium.Contract.LastForceBatchSequenced(&_Cdkvalidium.CallOpts) +} + +// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. +// +// Solidity: function lastPendingState() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) LastPendingState(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "lastPendingState") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. +// +// Solidity: function lastPendingState() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) LastPendingState() (uint64, error) { + return _Cdkvalidium.Contract.LastPendingState(&_Cdkvalidium.CallOpts) +} + +// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. +// +// Solidity: function lastPendingState() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) LastPendingState() (uint64, error) { + return _Cdkvalidium.Contract.LastPendingState(&_Cdkvalidium.CallOpts) +} + +// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. +// +// Solidity: function lastPendingStateConsolidated() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) LastPendingStateConsolidated(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "lastPendingStateConsolidated") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. +// +// Solidity: function lastPendingStateConsolidated() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) LastPendingStateConsolidated() (uint64, error) { + return _Cdkvalidium.Contract.LastPendingStateConsolidated(&_Cdkvalidium.CallOpts) +} + +// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. +// +// Solidity: function lastPendingStateConsolidated() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) LastPendingStateConsolidated() (uint64, error) { + return _Cdkvalidium.Contract.LastPendingStateConsolidated(&_Cdkvalidium.CallOpts) +} + +// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. +// +// Solidity: function lastTimestamp() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) LastTimestamp(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "lastTimestamp") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. +// +// Solidity: function lastTimestamp() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) LastTimestamp() (uint64, error) { + return _Cdkvalidium.Contract.LastTimestamp(&_Cdkvalidium.CallOpts) +} + +// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. +// +// Solidity: function lastTimestamp() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) LastTimestamp() (uint64, error) { + return _Cdkvalidium.Contract.LastTimestamp(&_Cdkvalidium.CallOpts) +} + +// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. +// +// Solidity: function lastVerifiedBatch() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) LastVerifiedBatch(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "lastVerifiedBatch") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. +// +// Solidity: function lastVerifiedBatch() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) LastVerifiedBatch() (uint64, error) { + return _Cdkvalidium.Contract.LastVerifiedBatch(&_Cdkvalidium.CallOpts) +} + +// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. +// +// Solidity: function lastVerifiedBatch() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) LastVerifiedBatch() (uint64, error) { + return _Cdkvalidium.Contract.LastVerifiedBatch(&_Cdkvalidium.CallOpts) +} + +// Matic is a free data retrieval call binding the contract method 0xb6b0b097. +// +// Solidity: function matic() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) Matic(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "matic") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Matic is a free data retrieval call binding the contract method 0xb6b0b097. +// +// Solidity: function matic() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) Matic() (common.Address, error) { + return _Cdkvalidium.Contract.Matic(&_Cdkvalidium.CallOpts) +} + +// Matic is a free data retrieval call binding the contract method 0xb6b0b097. +// +// Solidity: function matic() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) Matic() (common.Address, error) { + return _Cdkvalidium.Contract.Matic(&_Cdkvalidium.CallOpts) +} + +// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. +// +// Solidity: function multiplierBatchFee() view returns(uint16) +func (_Cdkvalidium *CdkvalidiumCaller) MultiplierBatchFee(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "multiplierBatchFee") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. +// +// Solidity: function multiplierBatchFee() view returns(uint16) +func (_Cdkvalidium *CdkvalidiumSession) MultiplierBatchFee() (uint16, error) { + return _Cdkvalidium.Contract.MultiplierBatchFee(&_Cdkvalidium.CallOpts) +} + +// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. +// +// Solidity: function multiplierBatchFee() view returns(uint16) +func (_Cdkvalidium *CdkvalidiumCallerSession) MultiplierBatchFee() (uint16, error) { + return _Cdkvalidium.Contract.MultiplierBatchFee(&_Cdkvalidium.CallOpts) +} + +// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. +// +// Solidity: function networkName() view returns(string) +func (_Cdkvalidium *CdkvalidiumCaller) NetworkName(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "networkName") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. +// +// Solidity: function networkName() view returns(string) +func (_Cdkvalidium *CdkvalidiumSession) NetworkName() (string, error) { + return _Cdkvalidium.Contract.NetworkName(&_Cdkvalidium.CallOpts) +} + +// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. +// +// Solidity: function networkName() view returns(string) +func (_Cdkvalidium *CdkvalidiumCallerSession) NetworkName() (string, error) { + return _Cdkvalidium.Contract.NetworkName(&_Cdkvalidium.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) Owner() (common.Address, error) { + return _Cdkvalidium.Contract.Owner(&_Cdkvalidium.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) Owner() (common.Address, error) { + return _Cdkvalidium.Contract.Owner(&_Cdkvalidium.CallOpts) +} + +// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. +// +// Solidity: function pendingAdmin() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) PendingAdmin(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "pendingAdmin") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. +// +// Solidity: function pendingAdmin() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) PendingAdmin() (common.Address, error) { + return _Cdkvalidium.Contract.PendingAdmin(&_Cdkvalidium.CallOpts) +} + +// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. +// +// Solidity: function pendingAdmin() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) PendingAdmin() (common.Address, error) { + return _Cdkvalidium.Contract.PendingAdmin(&_Cdkvalidium.CallOpts) +} + +// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. +// +// Solidity: function pendingStateTimeout() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) PendingStateTimeout(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "pendingStateTimeout") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. +// +// Solidity: function pendingStateTimeout() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) PendingStateTimeout() (uint64, error) { + return _Cdkvalidium.Contract.PendingStateTimeout(&_Cdkvalidium.CallOpts) +} + +// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. +// +// Solidity: function pendingStateTimeout() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) PendingStateTimeout() (uint64, error) { + return _Cdkvalidium.Contract.PendingStateTimeout(&_Cdkvalidium.CallOpts) +} + +// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. +// +// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) +func (_Cdkvalidium *CdkvalidiumCaller) PendingStateTransitions(opts *bind.CallOpts, arg0 *big.Int) (struct { + Timestamp uint64 + LastVerifiedBatch uint64 + ExitRoot [32]byte + StateRoot [32]byte +}, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "pendingStateTransitions", arg0) + + outstruct := new(struct { + Timestamp uint64 + LastVerifiedBatch uint64 + ExitRoot [32]byte + StateRoot [32]byte + }) + if err != nil { + return *outstruct, err + } + + outstruct.Timestamp = *abi.ConvertType(out[0], new(uint64)).(*uint64) + outstruct.LastVerifiedBatch = *abi.ConvertType(out[1], new(uint64)).(*uint64) + outstruct.ExitRoot = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte) + outstruct.StateRoot = *abi.ConvertType(out[3], new([32]byte)).(*[32]byte) + + return *outstruct, err + +} + +// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. +// +// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) +func (_Cdkvalidium *CdkvalidiumSession) PendingStateTransitions(arg0 *big.Int) (struct { + Timestamp uint64 + LastVerifiedBatch uint64 + ExitRoot [32]byte + StateRoot [32]byte +}, error) { + return _Cdkvalidium.Contract.PendingStateTransitions(&_Cdkvalidium.CallOpts, arg0) +} + +// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. +// +// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) +func (_Cdkvalidium *CdkvalidiumCallerSession) PendingStateTransitions(arg0 *big.Int) (struct { + Timestamp uint64 + LastVerifiedBatch uint64 + ExitRoot [32]byte + StateRoot [32]byte +}, error) { + return _Cdkvalidium.Contract.PendingStateTransitions(&_Cdkvalidium.CallOpts, arg0) +} + +// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. +// +// Solidity: function rollupVerifier() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) RollupVerifier(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "rollupVerifier") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. +// +// Solidity: function rollupVerifier() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) RollupVerifier() (common.Address, error) { + return _Cdkvalidium.Contract.RollupVerifier(&_Cdkvalidium.CallOpts) +} + +// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. +// +// Solidity: function rollupVerifier() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) RollupVerifier() (common.Address, error) { + return _Cdkvalidium.Contract.RollupVerifier(&_Cdkvalidium.CallOpts) +} + +// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. +// +// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) +func (_Cdkvalidium *CdkvalidiumCaller) SequencedBatches(opts *bind.CallOpts, arg0 uint64) (struct { + AccInputHash [32]byte + SequencedTimestamp uint64 + PreviousLastBatchSequenced uint64 +}, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "sequencedBatches", arg0) + + outstruct := new(struct { + AccInputHash [32]byte + SequencedTimestamp uint64 + PreviousLastBatchSequenced uint64 + }) + if err != nil { + return *outstruct, err + } + + outstruct.AccInputHash = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + outstruct.SequencedTimestamp = *abi.ConvertType(out[1], new(uint64)).(*uint64) + outstruct.PreviousLastBatchSequenced = *abi.ConvertType(out[2], new(uint64)).(*uint64) + + return *outstruct, err + +} + +// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. +// +// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) +func (_Cdkvalidium *CdkvalidiumSession) SequencedBatches(arg0 uint64) (struct { + AccInputHash [32]byte + SequencedTimestamp uint64 + PreviousLastBatchSequenced uint64 +}, error) { + return _Cdkvalidium.Contract.SequencedBatches(&_Cdkvalidium.CallOpts, arg0) +} + +// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. +// +// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) +func (_Cdkvalidium *CdkvalidiumCallerSession) SequencedBatches(arg0 uint64) (struct { + AccInputHash [32]byte + SequencedTimestamp uint64 + PreviousLastBatchSequenced uint64 +}, error) { + return _Cdkvalidium.Contract.SequencedBatches(&_Cdkvalidium.CallOpts, arg0) +} + +// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. +// +// Solidity: function trustedAggregator() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) TrustedAggregator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "trustedAggregator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. +// +// Solidity: function trustedAggregator() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) TrustedAggregator() (common.Address, error) { + return _Cdkvalidium.Contract.TrustedAggregator(&_Cdkvalidium.CallOpts) +} + +// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. +// +// Solidity: function trustedAggregator() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) TrustedAggregator() (common.Address, error) { + return _Cdkvalidium.Contract.TrustedAggregator(&_Cdkvalidium.CallOpts) +} + +// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. +// +// Solidity: function trustedAggregatorTimeout() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) TrustedAggregatorTimeout(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "trustedAggregatorTimeout") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. +// +// Solidity: function trustedAggregatorTimeout() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) TrustedAggregatorTimeout() (uint64, error) { + return _Cdkvalidium.Contract.TrustedAggregatorTimeout(&_Cdkvalidium.CallOpts) +} + +// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. +// +// Solidity: function trustedAggregatorTimeout() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) TrustedAggregatorTimeout() (uint64, error) { + return _Cdkvalidium.Contract.TrustedAggregatorTimeout(&_Cdkvalidium.CallOpts) +} + +// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. +// +// Solidity: function trustedSequencer() view returns(address) +func (_Cdkvalidium *CdkvalidiumCaller) TrustedSequencer(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "trustedSequencer") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. +// +// Solidity: function trustedSequencer() view returns(address) +func (_Cdkvalidium *CdkvalidiumSession) TrustedSequencer() (common.Address, error) { + return _Cdkvalidium.Contract.TrustedSequencer(&_Cdkvalidium.CallOpts) +} + +// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. +// +// Solidity: function trustedSequencer() view returns(address) +func (_Cdkvalidium *CdkvalidiumCallerSession) TrustedSequencer() (common.Address, error) { + return _Cdkvalidium.Contract.TrustedSequencer(&_Cdkvalidium.CallOpts) +} + +// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. +// +// Solidity: function trustedSequencerURL() view returns(string) +func (_Cdkvalidium *CdkvalidiumCaller) TrustedSequencerURL(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "trustedSequencerURL") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. +// +// Solidity: function trustedSequencerURL() view returns(string) +func (_Cdkvalidium *CdkvalidiumSession) TrustedSequencerURL() (string, error) { + return _Cdkvalidium.Contract.TrustedSequencerURL(&_Cdkvalidium.CallOpts) +} + +// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. +// +// Solidity: function trustedSequencerURL() view returns(string) +func (_Cdkvalidium *CdkvalidiumCallerSession) TrustedSequencerURL() (string, error) { + return _Cdkvalidium.Contract.TrustedSequencerURL(&_Cdkvalidium.CallOpts) +} + +// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. +// +// Solidity: function verifyBatchTimeTarget() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCaller) VerifyBatchTimeTarget(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Cdkvalidium.contract.Call(opts, &out, "verifyBatchTimeTarget") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. +// +// Solidity: function verifyBatchTimeTarget() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumSession) VerifyBatchTimeTarget() (uint64, error) { + return _Cdkvalidium.Contract.VerifyBatchTimeTarget(&_Cdkvalidium.CallOpts) +} + +// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. +// +// Solidity: function verifyBatchTimeTarget() view returns(uint64) +func (_Cdkvalidium *CdkvalidiumCallerSession) VerifyBatchTimeTarget() (uint64, error) { + return _Cdkvalidium.Contract.VerifyBatchTimeTarget(&_Cdkvalidium.CallOpts) +} + +// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. +// +// Solidity: function acceptAdminRole() returns() +func (_Cdkvalidium *CdkvalidiumTransactor) AcceptAdminRole(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "acceptAdminRole") +} + +// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. +// +// Solidity: function acceptAdminRole() returns() +func (_Cdkvalidium *CdkvalidiumSession) AcceptAdminRole() (*types.Transaction, error) { + return _Cdkvalidium.Contract.AcceptAdminRole(&_Cdkvalidium.TransactOpts) +} + +// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. +// +// Solidity: function acceptAdminRole() returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) AcceptAdminRole() (*types.Transaction, error) { + return _Cdkvalidium.Contract.AcceptAdminRole(&_Cdkvalidium.TransactOpts) +} + +// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. +// +// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) ActivateEmergencyState(opts *bind.TransactOpts, sequencedBatchNum uint64) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "activateEmergencyState", sequencedBatchNum) +} + +// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. +// +// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() +func (_Cdkvalidium *CdkvalidiumSession) ActivateEmergencyState(sequencedBatchNum uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.ActivateEmergencyState(&_Cdkvalidium.TransactOpts, sequencedBatchNum) +} + +// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. +// +// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) ActivateEmergencyState(sequencedBatchNum uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.ActivateEmergencyState(&_Cdkvalidium.TransactOpts, sequencedBatchNum) +} + +// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. +// +// Solidity: function activateForceBatches() returns() +func (_Cdkvalidium *CdkvalidiumTransactor) ActivateForceBatches(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "activateForceBatches") +} + +// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. +// +// Solidity: function activateForceBatches() returns() +func (_Cdkvalidium *CdkvalidiumSession) ActivateForceBatches() (*types.Transaction, error) { + return _Cdkvalidium.Contract.ActivateForceBatches(&_Cdkvalidium.TransactOpts) +} + +// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. +// +// Solidity: function activateForceBatches() returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) ActivateForceBatches() (*types.Transaction, error) { + return _Cdkvalidium.Contract.ActivateForceBatches(&_Cdkvalidium.TransactOpts) +} + +// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. +// +// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) ConsolidatePendingState(opts *bind.TransactOpts, pendingStateNum uint64) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "consolidatePendingState", pendingStateNum) +} + +// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. +// +// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() +func (_Cdkvalidium *CdkvalidiumSession) ConsolidatePendingState(pendingStateNum uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.ConsolidatePendingState(&_Cdkvalidium.TransactOpts, pendingStateNum) +} + +// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. +// +// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) ConsolidatePendingState(pendingStateNum uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.ConsolidatePendingState(&_Cdkvalidium.TransactOpts, pendingStateNum) +} + +// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. +// +// Solidity: function deactivateEmergencyState() returns() +func (_Cdkvalidium *CdkvalidiumTransactor) DeactivateEmergencyState(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "deactivateEmergencyState") +} + +// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. +// +// Solidity: function deactivateEmergencyState() returns() +func (_Cdkvalidium *CdkvalidiumSession) DeactivateEmergencyState() (*types.Transaction, error) { + return _Cdkvalidium.Contract.DeactivateEmergencyState(&_Cdkvalidium.TransactOpts) +} + +// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. +// +// Solidity: function deactivateEmergencyState() returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) DeactivateEmergencyState() (*types.Transaction, error) { + return _Cdkvalidium.Contract.DeactivateEmergencyState(&_Cdkvalidium.TransactOpts) +} + +// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. +// +// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) ForceBatch(opts *bind.TransactOpts, transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "forceBatch", transactions, maticAmount) +} + +// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. +// +// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() +func (_Cdkvalidium *CdkvalidiumSession) ForceBatch(transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { + return _Cdkvalidium.Contract.ForceBatch(&_Cdkvalidium.TransactOpts, transactions, maticAmount) +} + +// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. +// +// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) ForceBatch(transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { + return _Cdkvalidium.Contract.ForceBatch(&_Cdkvalidium.TransactOpts, transactions, maticAmount) +} + +// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. +// +// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) Initialize(opts *bind.TransactOpts, initializePackedParameters CDKValidiumInitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "initialize", initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) +} + +// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. +// +// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() +func (_Cdkvalidium *CdkvalidiumSession) Initialize(initializePackedParameters CDKValidiumInitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { + return _Cdkvalidium.Contract.Initialize(&_Cdkvalidium.TransactOpts, initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) +} + +// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. +// +// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) Initialize(initializePackedParameters CDKValidiumInitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { + return _Cdkvalidium.Contract.Initialize(&_Cdkvalidium.TransactOpts, initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) +} + +// OverridePendingState is a paid mutator transaction binding the contract method 0x2c1f816a. +// +// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) 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 _Cdkvalidium.contract.Transact(opts, "overridePendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// OverridePendingState is a paid mutator transaction binding the contract method 0x2c1f816a. +// +// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumSession) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.OverridePendingState(&_Cdkvalidium.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// OverridePendingState is a paid mutator transaction binding the contract method 0x2c1f816a. +// +// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.OverridePendingState(&_Cdkvalidium.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x9aa972a3. +// +// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) 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 _Cdkvalidium.contract.Transact(opts, "proveNonDeterministicPendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x9aa972a3. +// +// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumSession) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.ProveNonDeterministicPendingState(&_Cdkvalidium.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x9aa972a3. +// +// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.ProveNonDeterministicPendingState(&_Cdkvalidium.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Cdkvalidium *CdkvalidiumTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Cdkvalidium *CdkvalidiumSession) RenounceOwnership() (*types.Transaction, error) { + return _Cdkvalidium.Contract.RenounceOwnership(&_Cdkvalidium.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Cdkvalidium.Contract.RenounceOwnership(&_Cdkvalidium.TransactOpts) +} + +// SequenceBatches is a paid mutator transaction binding the contract method 0x438a5399. +// +// Solidity: function sequenceBatches((bytes32,bytes32,uint64,uint64)[] batches, address l2Coinbase, bytes signaturesAndAddrs) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SequenceBatches(opts *bind.TransactOpts, batches []CDKValidiumBatchData, l2Coinbase common.Address, signaturesAndAddrs []byte) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "sequenceBatches", batches, l2Coinbase, signaturesAndAddrs) +} + +// SequenceBatches is a paid mutator transaction binding the contract method 0x438a5399. +// +// Solidity: function sequenceBatches((bytes32,bytes32,uint64,uint64)[] batches, address l2Coinbase, bytes signaturesAndAddrs) returns() +func (_Cdkvalidium *CdkvalidiumSession) SequenceBatches(batches []CDKValidiumBatchData, l2Coinbase common.Address, signaturesAndAddrs []byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SequenceBatches(&_Cdkvalidium.TransactOpts, batches, l2Coinbase, signaturesAndAddrs) +} + +// SequenceBatches is a paid mutator transaction binding the contract method 0x438a5399. +// +// Solidity: function sequenceBatches((bytes32,bytes32,uint64,uint64)[] batches, address l2Coinbase, bytes signaturesAndAddrs) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SequenceBatches(batches []CDKValidiumBatchData, l2Coinbase common.Address, signaturesAndAddrs []byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SequenceBatches(&_Cdkvalidium.TransactOpts, batches, l2Coinbase, signaturesAndAddrs) +} + +// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. +// +// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SequenceForceBatches(opts *bind.TransactOpts, batches []CDKValidiumForcedBatchData) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "sequenceForceBatches", batches) +} + +// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. +// +// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() +func (_Cdkvalidium *CdkvalidiumSession) SequenceForceBatches(batches []CDKValidiumForcedBatchData) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SequenceForceBatches(&_Cdkvalidium.TransactOpts, batches) +} + +// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. +// +// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SequenceForceBatches(batches []CDKValidiumForcedBatchData) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SequenceForceBatches(&_Cdkvalidium.TransactOpts, batches) +} + +// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. +// +// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SetForceBatchTimeout(opts *bind.TransactOpts, newforceBatchTimeout uint64) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "setForceBatchTimeout", newforceBatchTimeout) +} + +// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. +// +// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() +func (_Cdkvalidium *CdkvalidiumSession) SetForceBatchTimeout(newforceBatchTimeout uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetForceBatchTimeout(&_Cdkvalidium.TransactOpts, newforceBatchTimeout) +} + +// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. +// +// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SetForceBatchTimeout(newforceBatchTimeout uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetForceBatchTimeout(&_Cdkvalidium.TransactOpts, newforceBatchTimeout) +} + +// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. +// +// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SetMultiplierBatchFee(opts *bind.TransactOpts, newMultiplierBatchFee uint16) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "setMultiplierBatchFee", newMultiplierBatchFee) +} + +// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. +// +// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() +func (_Cdkvalidium *CdkvalidiumSession) SetMultiplierBatchFee(newMultiplierBatchFee uint16) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetMultiplierBatchFee(&_Cdkvalidium.TransactOpts, newMultiplierBatchFee) +} + +// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. +// +// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SetMultiplierBatchFee(newMultiplierBatchFee uint16) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetMultiplierBatchFee(&_Cdkvalidium.TransactOpts, newMultiplierBatchFee) +} + +// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. +// +// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SetPendingStateTimeout(opts *bind.TransactOpts, newPendingStateTimeout uint64) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "setPendingStateTimeout", newPendingStateTimeout) +} + +// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. +// +// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() +func (_Cdkvalidium *CdkvalidiumSession) SetPendingStateTimeout(newPendingStateTimeout uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetPendingStateTimeout(&_Cdkvalidium.TransactOpts, newPendingStateTimeout) +} + +// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. +// +// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SetPendingStateTimeout(newPendingStateTimeout uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetPendingStateTimeout(&_Cdkvalidium.TransactOpts, newPendingStateTimeout) +} + +// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. +// +// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SetTrustedAggregator(opts *bind.TransactOpts, newTrustedAggregator common.Address) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "setTrustedAggregator", newTrustedAggregator) +} + +// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. +// +// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() +func (_Cdkvalidium *CdkvalidiumSession) SetTrustedAggregator(newTrustedAggregator common.Address) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetTrustedAggregator(&_Cdkvalidium.TransactOpts, newTrustedAggregator) +} + +// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. +// +// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SetTrustedAggregator(newTrustedAggregator common.Address) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetTrustedAggregator(&_Cdkvalidium.TransactOpts, newTrustedAggregator) +} + +// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. +// +// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SetTrustedAggregatorTimeout(opts *bind.TransactOpts, newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "setTrustedAggregatorTimeout", newTrustedAggregatorTimeout) +} + +// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. +// +// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() +func (_Cdkvalidium *CdkvalidiumSession) SetTrustedAggregatorTimeout(newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetTrustedAggregatorTimeout(&_Cdkvalidium.TransactOpts, newTrustedAggregatorTimeout) +} + +// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. +// +// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SetTrustedAggregatorTimeout(newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetTrustedAggregatorTimeout(&_Cdkvalidium.TransactOpts, newTrustedAggregatorTimeout) +} + +// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. +// +// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SetTrustedSequencer(opts *bind.TransactOpts, newTrustedSequencer common.Address) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "setTrustedSequencer", newTrustedSequencer) +} + +// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. +// +// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() +func (_Cdkvalidium *CdkvalidiumSession) SetTrustedSequencer(newTrustedSequencer common.Address) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetTrustedSequencer(&_Cdkvalidium.TransactOpts, newTrustedSequencer) +} + +// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. +// +// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SetTrustedSequencer(newTrustedSequencer common.Address) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetTrustedSequencer(&_Cdkvalidium.TransactOpts, newTrustedSequencer) +} + +// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. +// +// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SetTrustedSequencerURL(opts *bind.TransactOpts, newTrustedSequencerURL string) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "setTrustedSequencerURL", newTrustedSequencerURL) +} + +// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. +// +// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() +func (_Cdkvalidium *CdkvalidiumSession) SetTrustedSequencerURL(newTrustedSequencerURL string) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetTrustedSequencerURL(&_Cdkvalidium.TransactOpts, newTrustedSequencerURL) +} + +// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. +// +// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SetTrustedSequencerURL(newTrustedSequencerURL string) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetTrustedSequencerURL(&_Cdkvalidium.TransactOpts, newTrustedSequencerURL) +} + +// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. +// +// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) SetVerifyBatchTimeTarget(opts *bind.TransactOpts, newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "setVerifyBatchTimeTarget", newVerifyBatchTimeTarget) +} + +// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. +// +// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() +func (_Cdkvalidium *CdkvalidiumSession) SetVerifyBatchTimeTarget(newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetVerifyBatchTimeTarget(&_Cdkvalidium.TransactOpts, newVerifyBatchTimeTarget) +} + +// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. +// +// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) SetVerifyBatchTimeTarget(newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { + return _Cdkvalidium.Contract.SetVerifyBatchTimeTarget(&_Cdkvalidium.TransactOpts, newVerifyBatchTimeTarget) +} + +// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. +// +// Solidity: function transferAdminRole(address newPendingAdmin) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) TransferAdminRole(opts *bind.TransactOpts, newPendingAdmin common.Address) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "transferAdminRole", newPendingAdmin) +} + +// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. +// +// Solidity: function transferAdminRole(address newPendingAdmin) returns() +func (_Cdkvalidium *CdkvalidiumSession) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { + return _Cdkvalidium.Contract.TransferAdminRole(&_Cdkvalidium.TransactOpts, newPendingAdmin) +} + +// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. +// +// Solidity: function transferAdminRole(address newPendingAdmin) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { + return _Cdkvalidium.Contract.TransferAdminRole(&_Cdkvalidium.TransactOpts, newPendingAdmin) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Cdkvalidium *CdkvalidiumSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Cdkvalidium.Contract.TransferOwnership(&_Cdkvalidium.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Cdkvalidium.Contract.TransferOwnership(&_Cdkvalidium.TransactOpts, newOwner) +} + +// VerifyBatches is a paid mutator transaction binding the contract method 0x621dd411. +// +// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) VerifyBatches(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "verifyBatches", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatches is a paid mutator transaction binding the contract method 0x621dd411. +// +// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumSession) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.VerifyBatches(&_Cdkvalidium.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatches is a paid mutator transaction binding the contract method 0x621dd411. +// +// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.VerifyBatches(&_Cdkvalidium.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0x2b0006fa. +// +// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumTransactor) VerifyBatchesTrustedAggregator(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.contract.Transact(opts, "verifyBatchesTrustedAggregator", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0x2b0006fa. +// +// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumSession) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.VerifyBatchesTrustedAggregator(&_Cdkvalidium.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0x2b0006fa. +// +// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() +func (_Cdkvalidium *CdkvalidiumTransactorSession) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { + return _Cdkvalidium.Contract.VerifyBatchesTrustedAggregator(&_Cdkvalidium.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// CdkvalidiumAcceptAdminRoleIterator is returned from FilterAcceptAdminRole and is used to iterate over the raw logs and unpacked data for AcceptAdminRole events raised by the Cdkvalidium contract. +type CdkvalidiumAcceptAdminRoleIterator struct { + Event *CdkvalidiumAcceptAdminRole // 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 *CdkvalidiumAcceptAdminRoleIterator) 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(CdkvalidiumAcceptAdminRole) + 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(CdkvalidiumAcceptAdminRole) + 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 *CdkvalidiumAcceptAdminRoleIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumAcceptAdminRoleIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumAcceptAdminRole represents a AcceptAdminRole event raised by the Cdkvalidium contract. +type CdkvalidiumAcceptAdminRole struct { + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAcceptAdminRole is a free log retrieval operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. +// +// Solidity: event AcceptAdminRole(address newAdmin) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterAcceptAdminRole(opts *bind.FilterOpts) (*CdkvalidiumAcceptAdminRoleIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "AcceptAdminRole") + if err != nil { + return nil, err + } + return &CdkvalidiumAcceptAdminRoleIterator{contract: _Cdkvalidium.contract, event: "AcceptAdminRole", logs: logs, sub: sub}, nil +} + +// WatchAcceptAdminRole is a free log subscription operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. +// +// Solidity: event AcceptAdminRole(address newAdmin) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchAcceptAdminRole(opts *bind.WatchOpts, sink chan<- *CdkvalidiumAcceptAdminRole) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "AcceptAdminRole") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CdkvalidiumAcceptAdminRole) + if err := _Cdkvalidium.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAcceptAdminRole is a log parse operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. +// +// Solidity: event AcceptAdminRole(address newAdmin) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseAcceptAdminRole(log types.Log) (*CdkvalidiumAcceptAdminRole, error) { + event := new(CdkvalidiumAcceptAdminRole) + if err := _Cdkvalidium.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumActivateForceBatchesIterator is returned from FilterActivateForceBatches and is used to iterate over the raw logs and unpacked data for ActivateForceBatches events raised by the Cdkvalidium contract. +type CdkvalidiumActivateForceBatchesIterator struct { + Event *CdkvalidiumActivateForceBatches // 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 *CdkvalidiumActivateForceBatchesIterator) 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(CdkvalidiumActivateForceBatches) + 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(CdkvalidiumActivateForceBatches) + 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 *CdkvalidiumActivateForceBatchesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumActivateForceBatchesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumActivateForceBatches represents a ActivateForceBatches event raised by the Cdkvalidium contract. +type CdkvalidiumActivateForceBatches struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterActivateForceBatches is a free log retrieval operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. +// +// Solidity: event ActivateForceBatches() +func (_Cdkvalidium *CdkvalidiumFilterer) FilterActivateForceBatches(opts *bind.FilterOpts) (*CdkvalidiumActivateForceBatchesIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "ActivateForceBatches") + if err != nil { + return nil, err + } + return &CdkvalidiumActivateForceBatchesIterator{contract: _Cdkvalidium.contract, event: "ActivateForceBatches", logs: logs, sub: sub}, nil +} + +// WatchActivateForceBatches is a free log subscription operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. +// +// Solidity: event ActivateForceBatches() +func (_Cdkvalidium *CdkvalidiumFilterer) WatchActivateForceBatches(opts *bind.WatchOpts, sink chan<- *CdkvalidiumActivateForceBatches) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "ActivateForceBatches") + 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(CdkvalidiumActivateForceBatches) + if err := _Cdkvalidium.contract.UnpackLog(event, "ActivateForceBatches", 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 +} + +// ParseActivateForceBatches is a log parse operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. +// +// Solidity: event ActivateForceBatches() +func (_Cdkvalidium *CdkvalidiumFilterer) ParseActivateForceBatches(log types.Log) (*CdkvalidiumActivateForceBatches, error) { + event := new(CdkvalidiumActivateForceBatches) + if err := _Cdkvalidium.contract.UnpackLog(event, "ActivateForceBatches", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumConsolidatePendingStateIterator is returned from FilterConsolidatePendingState and is used to iterate over the raw logs and unpacked data for ConsolidatePendingState events raised by the Cdkvalidium contract. +type CdkvalidiumConsolidatePendingStateIterator struct { + Event *CdkvalidiumConsolidatePendingState // 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 *CdkvalidiumConsolidatePendingStateIterator) 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(CdkvalidiumConsolidatePendingState) + 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(CdkvalidiumConsolidatePendingState) + 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 *CdkvalidiumConsolidatePendingStateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumConsolidatePendingStateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumConsolidatePendingState represents a ConsolidatePendingState event raised by the Cdkvalidium contract. +type CdkvalidiumConsolidatePendingState struct { + NumBatch uint64 + StateRoot [32]byte + PendingStateNum uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterConsolidatePendingState is a free log retrieval operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. +// +// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterConsolidatePendingState(opts *bind.FilterOpts, numBatch []uint64, pendingStateNum []uint64) (*CdkvalidiumConsolidatePendingStateIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var pendingStateNumRule []interface{} + for _, pendingStateNumItem := range pendingStateNum { + pendingStateNumRule = append(pendingStateNumRule, pendingStateNumItem) + } + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "ConsolidatePendingState", numBatchRule, pendingStateNumRule) + if err != nil { + return nil, err + } + return &CdkvalidiumConsolidatePendingStateIterator{contract: _Cdkvalidium.contract, event: "ConsolidatePendingState", logs: logs, sub: sub}, nil +} + +// WatchConsolidatePendingState is a free log subscription operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. +// +// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchConsolidatePendingState(opts *bind.WatchOpts, sink chan<- *CdkvalidiumConsolidatePendingState, numBatch []uint64, pendingStateNum []uint64) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var pendingStateNumRule []interface{} + for _, pendingStateNumItem := range pendingStateNum { + pendingStateNumRule = append(pendingStateNumRule, pendingStateNumItem) + } + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "ConsolidatePendingState", numBatchRule, pendingStateNumRule) + 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(CdkvalidiumConsolidatePendingState) + if err := _Cdkvalidium.contract.UnpackLog(event, "ConsolidatePendingState", 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 +} + +// ParseConsolidatePendingState is a log parse operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. +// +// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseConsolidatePendingState(log types.Log) (*CdkvalidiumConsolidatePendingState, error) { + event := new(CdkvalidiumConsolidatePendingState) + if err := _Cdkvalidium.contract.UnpackLog(event, "ConsolidatePendingState", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumEmergencyStateActivatedIterator is returned from FilterEmergencyStateActivated and is used to iterate over the raw logs and unpacked data for EmergencyStateActivated events raised by the Cdkvalidium contract. +type CdkvalidiumEmergencyStateActivatedIterator struct { + Event *CdkvalidiumEmergencyStateActivated // 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 *CdkvalidiumEmergencyStateActivatedIterator) 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(CdkvalidiumEmergencyStateActivated) + 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(CdkvalidiumEmergencyStateActivated) + 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 *CdkvalidiumEmergencyStateActivatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumEmergencyStateActivatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumEmergencyStateActivated represents a EmergencyStateActivated event raised by the Cdkvalidium contract. +type CdkvalidiumEmergencyStateActivated struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyStateActivated is a free log retrieval operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. +// +// Solidity: event EmergencyStateActivated() +func (_Cdkvalidium *CdkvalidiumFilterer) FilterEmergencyStateActivated(opts *bind.FilterOpts) (*CdkvalidiumEmergencyStateActivatedIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "EmergencyStateActivated") + if err != nil { + return nil, err + } + return &CdkvalidiumEmergencyStateActivatedIterator{contract: _Cdkvalidium.contract, event: "EmergencyStateActivated", logs: logs, sub: sub}, nil +} + +// WatchEmergencyStateActivated is a free log subscription operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. +// +// Solidity: event EmergencyStateActivated() +func (_Cdkvalidium *CdkvalidiumFilterer) WatchEmergencyStateActivated(opts *bind.WatchOpts, sink chan<- *CdkvalidiumEmergencyStateActivated) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "EmergencyStateActivated") + 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(CdkvalidiumEmergencyStateActivated) + if err := _Cdkvalidium.contract.UnpackLog(event, "EmergencyStateActivated", 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 +} + +// ParseEmergencyStateActivated is a log parse operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. +// +// Solidity: event EmergencyStateActivated() +func (_Cdkvalidium *CdkvalidiumFilterer) ParseEmergencyStateActivated(log types.Log) (*CdkvalidiumEmergencyStateActivated, error) { + event := new(CdkvalidiumEmergencyStateActivated) + if err := _Cdkvalidium.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumEmergencyStateDeactivatedIterator is returned from FilterEmergencyStateDeactivated and is used to iterate over the raw logs and unpacked data for EmergencyStateDeactivated events raised by the Cdkvalidium contract. +type CdkvalidiumEmergencyStateDeactivatedIterator struct { + Event *CdkvalidiumEmergencyStateDeactivated // 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 *CdkvalidiumEmergencyStateDeactivatedIterator) 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(CdkvalidiumEmergencyStateDeactivated) + 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(CdkvalidiumEmergencyStateDeactivated) + 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 *CdkvalidiumEmergencyStateDeactivatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumEmergencyStateDeactivatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumEmergencyStateDeactivated represents a EmergencyStateDeactivated event raised by the Cdkvalidium contract. +type CdkvalidiumEmergencyStateDeactivated struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyStateDeactivated is a free log retrieval operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. +// +// Solidity: event EmergencyStateDeactivated() +func (_Cdkvalidium *CdkvalidiumFilterer) FilterEmergencyStateDeactivated(opts *bind.FilterOpts) (*CdkvalidiumEmergencyStateDeactivatedIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "EmergencyStateDeactivated") + if err != nil { + return nil, err + } + return &CdkvalidiumEmergencyStateDeactivatedIterator{contract: _Cdkvalidium.contract, event: "EmergencyStateDeactivated", logs: logs, sub: sub}, nil +} + +// WatchEmergencyStateDeactivated is a free log subscription operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. +// +// Solidity: event EmergencyStateDeactivated() +func (_Cdkvalidium *CdkvalidiumFilterer) WatchEmergencyStateDeactivated(opts *bind.WatchOpts, sink chan<- *CdkvalidiumEmergencyStateDeactivated) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "EmergencyStateDeactivated") + 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(CdkvalidiumEmergencyStateDeactivated) + if err := _Cdkvalidium.contract.UnpackLog(event, "EmergencyStateDeactivated", 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 +} + +// ParseEmergencyStateDeactivated is a log parse operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. +// +// Solidity: event EmergencyStateDeactivated() +func (_Cdkvalidium *CdkvalidiumFilterer) ParseEmergencyStateDeactivated(log types.Log) (*CdkvalidiumEmergencyStateDeactivated, error) { + event := new(CdkvalidiumEmergencyStateDeactivated) + if err := _Cdkvalidium.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumForceBatchIterator is returned from FilterForceBatch and is used to iterate over the raw logs and unpacked data for ForceBatch events raised by the Cdkvalidium contract. +type CdkvalidiumForceBatchIterator struct { + Event *CdkvalidiumForceBatch // 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 *CdkvalidiumForceBatchIterator) 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(CdkvalidiumForceBatch) + 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(CdkvalidiumForceBatch) + 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 *CdkvalidiumForceBatchIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumForceBatchIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumForceBatch represents a ForceBatch event raised by the Cdkvalidium contract. +type CdkvalidiumForceBatch struct { + ForceBatchNum uint64 + LastGlobalExitRoot [32]byte + Sequencer common.Address + Transactions []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterForceBatch is a free log retrieval operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. +// +// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterForceBatch(opts *bind.FilterOpts, forceBatchNum []uint64) (*CdkvalidiumForceBatchIterator, error) { + + var forceBatchNumRule []interface{} + for _, forceBatchNumItem := range forceBatchNum { + forceBatchNumRule = append(forceBatchNumRule, forceBatchNumItem) + } + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "ForceBatch", forceBatchNumRule) + if err != nil { + return nil, err + } + return &CdkvalidiumForceBatchIterator{contract: _Cdkvalidium.contract, event: "ForceBatch", logs: logs, sub: sub}, nil +} + +// WatchForceBatch is a free log subscription operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. +// +// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchForceBatch(opts *bind.WatchOpts, sink chan<- *CdkvalidiumForceBatch, forceBatchNum []uint64) (event.Subscription, error) { + + var forceBatchNumRule []interface{} + for _, forceBatchNumItem := range forceBatchNum { + forceBatchNumRule = append(forceBatchNumRule, forceBatchNumItem) + } + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "ForceBatch", forceBatchNumRule) + 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(CdkvalidiumForceBatch) + if err := _Cdkvalidium.contract.UnpackLog(event, "ForceBatch", 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 +} + +// ParseForceBatch is a log parse operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. +// +// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseForceBatch(log types.Log) (*CdkvalidiumForceBatch, error) { + event := new(CdkvalidiumForceBatch) + if err := _Cdkvalidium.contract.UnpackLog(event, "ForceBatch", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Cdkvalidium contract. +type CdkvalidiumInitializedIterator struct { + Event *CdkvalidiumInitialized // 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 *CdkvalidiumInitializedIterator) 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(CdkvalidiumInitialized) + 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(CdkvalidiumInitialized) + 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 *CdkvalidiumInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumInitialized represents a Initialized event raised by the Cdkvalidium contract. +type CdkvalidiumInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterInitialized(opts *bind.FilterOpts) (*CdkvalidiumInitializedIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &CdkvalidiumInitializedIterator{contract: _Cdkvalidium.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *CdkvalidiumInitialized) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "Initialized") + 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(CdkvalidiumInitialized) + if err := _Cdkvalidium.contract.UnpackLog(event, "Initialized", 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseInitialized(log types.Log) (*CdkvalidiumInitialized, error) { + event := new(CdkvalidiumInitialized) + if err := _Cdkvalidium.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumOverridePendingStateIterator is returned from FilterOverridePendingState and is used to iterate over the raw logs and unpacked data for OverridePendingState events raised by the Cdkvalidium contract. +type CdkvalidiumOverridePendingStateIterator struct { + Event *CdkvalidiumOverridePendingState // 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 *CdkvalidiumOverridePendingStateIterator) 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(CdkvalidiumOverridePendingState) + 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(CdkvalidiumOverridePendingState) + 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 *CdkvalidiumOverridePendingStateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumOverridePendingStateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumOverridePendingState represents a OverridePendingState event raised by the Cdkvalidium contract. +type CdkvalidiumOverridePendingState struct { + NumBatch uint64 + StateRoot [32]byte + Aggregator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOverridePendingState is a free log retrieval operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. +// +// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterOverridePendingState(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*CdkvalidiumOverridePendingStateIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "OverridePendingState", numBatchRule, aggregatorRule) + if err != nil { + return nil, err + } + return &CdkvalidiumOverridePendingStateIterator{contract: _Cdkvalidium.contract, event: "OverridePendingState", logs: logs, sub: sub}, nil +} + +// WatchOverridePendingState is a free log subscription operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. +// +// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchOverridePendingState(opts *bind.WatchOpts, sink chan<- *CdkvalidiumOverridePendingState, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "OverridePendingState", numBatchRule, aggregatorRule) + 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(CdkvalidiumOverridePendingState) + if err := _Cdkvalidium.contract.UnpackLog(event, "OverridePendingState", 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 +} + +// ParseOverridePendingState is a log parse operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. +// +// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseOverridePendingState(log types.Log) (*CdkvalidiumOverridePendingState, error) { + event := new(CdkvalidiumOverridePendingState) + if err := _Cdkvalidium.contract.UnpackLog(event, "OverridePendingState", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Cdkvalidium contract. +type CdkvalidiumOwnershipTransferredIterator struct { + Event *CdkvalidiumOwnershipTransferred // 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 *CdkvalidiumOwnershipTransferredIterator) 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(CdkvalidiumOwnershipTransferred) + 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(CdkvalidiumOwnershipTransferred) + 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 *CdkvalidiumOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumOwnershipTransferred represents a OwnershipTransferred event raised by the Cdkvalidium contract. +type CdkvalidiumOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*CdkvalidiumOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &CdkvalidiumOwnershipTransferredIterator{contract: _Cdkvalidium.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CdkvalidiumOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + 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(CdkvalidiumOwnershipTransferred) + if err := _Cdkvalidium.contract.UnpackLog(event, "OwnershipTransferred", 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 +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseOwnershipTransferred(log types.Log) (*CdkvalidiumOwnershipTransferred, error) { + event := new(CdkvalidiumOwnershipTransferred) + if err := _Cdkvalidium.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumProveNonDeterministicPendingStateIterator is returned from FilterProveNonDeterministicPendingState and is used to iterate over the raw logs and unpacked data for ProveNonDeterministicPendingState events raised by the Cdkvalidium contract. +type CdkvalidiumProveNonDeterministicPendingStateIterator struct { + Event *CdkvalidiumProveNonDeterministicPendingState // 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 *CdkvalidiumProveNonDeterministicPendingStateIterator) 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(CdkvalidiumProveNonDeterministicPendingState) + 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(CdkvalidiumProveNonDeterministicPendingState) + 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 *CdkvalidiumProveNonDeterministicPendingStateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumProveNonDeterministicPendingStateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumProveNonDeterministicPendingState represents a ProveNonDeterministicPendingState event raised by the Cdkvalidium contract. +type CdkvalidiumProveNonDeterministicPendingState struct { + StoredStateRoot [32]byte + ProvedStateRoot [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProveNonDeterministicPendingState is a free log retrieval operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. +// +// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterProveNonDeterministicPendingState(opts *bind.FilterOpts) (*CdkvalidiumProveNonDeterministicPendingStateIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "ProveNonDeterministicPendingState") + if err != nil { + return nil, err + } + return &CdkvalidiumProveNonDeterministicPendingStateIterator{contract: _Cdkvalidium.contract, event: "ProveNonDeterministicPendingState", logs: logs, sub: sub}, nil +} + +// WatchProveNonDeterministicPendingState is a free log subscription operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. +// +// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchProveNonDeterministicPendingState(opts *bind.WatchOpts, sink chan<- *CdkvalidiumProveNonDeterministicPendingState) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "ProveNonDeterministicPendingState") + 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(CdkvalidiumProveNonDeterministicPendingState) + if err := _Cdkvalidium.contract.UnpackLog(event, "ProveNonDeterministicPendingState", 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 +} + +// ParseProveNonDeterministicPendingState is a log parse operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. +// +// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseProveNonDeterministicPendingState(log types.Log) (*CdkvalidiumProveNonDeterministicPendingState, error) { + event := new(CdkvalidiumProveNonDeterministicPendingState) + if err := _Cdkvalidium.contract.UnpackLog(event, "ProveNonDeterministicPendingState", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSequenceBatchesIterator is returned from FilterSequenceBatches and is used to iterate over the raw logs and unpacked data for SequenceBatches events raised by the Cdkvalidium contract. +type CdkvalidiumSequenceBatchesIterator struct { + Event *CdkvalidiumSequenceBatches // 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 *CdkvalidiumSequenceBatchesIterator) 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(CdkvalidiumSequenceBatches) + 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(CdkvalidiumSequenceBatches) + 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 *CdkvalidiumSequenceBatchesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSequenceBatchesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSequenceBatches represents a SequenceBatches event raised by the Cdkvalidium contract. +type CdkvalidiumSequenceBatches struct { + NumBatch uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSequenceBatches is a free log retrieval operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. +// +// Solidity: event SequenceBatches(uint64 indexed numBatch) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSequenceBatches(opts *bind.FilterOpts, numBatch []uint64) (*CdkvalidiumSequenceBatchesIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SequenceBatches", numBatchRule) + if err != nil { + return nil, err + } + return &CdkvalidiumSequenceBatchesIterator{contract: _Cdkvalidium.contract, event: "SequenceBatches", logs: logs, sub: sub}, nil +} + +// WatchSequenceBatches is a free log subscription operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. +// +// Solidity: event SequenceBatches(uint64 indexed numBatch) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSequenceBatches(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSequenceBatches, numBatch []uint64) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SequenceBatches", numBatchRule) + 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(CdkvalidiumSequenceBatches) + if err := _Cdkvalidium.contract.UnpackLog(event, "SequenceBatches", 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 +} + +// ParseSequenceBatches is a log parse operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. +// +// Solidity: event SequenceBatches(uint64 indexed numBatch) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSequenceBatches(log types.Log) (*CdkvalidiumSequenceBatches, error) { + event := new(CdkvalidiumSequenceBatches) + if err := _Cdkvalidium.contract.UnpackLog(event, "SequenceBatches", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSequenceForceBatchesIterator is returned from FilterSequenceForceBatches and is used to iterate over the raw logs and unpacked data for SequenceForceBatches events raised by the Cdkvalidium contract. +type CdkvalidiumSequenceForceBatchesIterator struct { + Event *CdkvalidiumSequenceForceBatches // 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 *CdkvalidiumSequenceForceBatchesIterator) 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(CdkvalidiumSequenceForceBatches) + 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(CdkvalidiumSequenceForceBatches) + 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 *CdkvalidiumSequenceForceBatchesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSequenceForceBatchesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSequenceForceBatches represents a SequenceForceBatches event raised by the Cdkvalidium contract. +type CdkvalidiumSequenceForceBatches struct { + NumBatch uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSequenceForceBatches is a free log retrieval operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. +// +// Solidity: event SequenceForceBatches(uint64 indexed numBatch) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSequenceForceBatches(opts *bind.FilterOpts, numBatch []uint64) (*CdkvalidiumSequenceForceBatchesIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SequenceForceBatches", numBatchRule) + if err != nil { + return nil, err + } + return &CdkvalidiumSequenceForceBatchesIterator{contract: _Cdkvalidium.contract, event: "SequenceForceBatches", logs: logs, sub: sub}, nil +} + +// WatchSequenceForceBatches is a free log subscription operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. +// +// Solidity: event SequenceForceBatches(uint64 indexed numBatch) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSequenceForceBatches(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSequenceForceBatches, numBatch []uint64) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SequenceForceBatches", numBatchRule) + 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(CdkvalidiumSequenceForceBatches) + if err := _Cdkvalidium.contract.UnpackLog(event, "SequenceForceBatches", 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 +} + +// ParseSequenceForceBatches is a log parse operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. +// +// Solidity: event SequenceForceBatches(uint64 indexed numBatch) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSequenceForceBatches(log types.Log) (*CdkvalidiumSequenceForceBatches, error) { + event := new(CdkvalidiumSequenceForceBatches) + if err := _Cdkvalidium.contract.UnpackLog(event, "SequenceForceBatches", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSetForceBatchTimeoutIterator is returned from FilterSetForceBatchTimeout and is used to iterate over the raw logs and unpacked data for SetForceBatchTimeout events raised by the Cdkvalidium contract. +type CdkvalidiumSetForceBatchTimeoutIterator struct { + Event *CdkvalidiumSetForceBatchTimeout // 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 *CdkvalidiumSetForceBatchTimeoutIterator) 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(CdkvalidiumSetForceBatchTimeout) + 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(CdkvalidiumSetForceBatchTimeout) + 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 *CdkvalidiumSetForceBatchTimeoutIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSetForceBatchTimeoutIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSetForceBatchTimeout represents a SetForceBatchTimeout event raised by the Cdkvalidium contract. +type CdkvalidiumSetForceBatchTimeout struct { + NewforceBatchTimeout uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetForceBatchTimeout is a free log retrieval operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. +// +// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSetForceBatchTimeout(opts *bind.FilterOpts) (*CdkvalidiumSetForceBatchTimeoutIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SetForceBatchTimeout") + if err != nil { + return nil, err + } + return &CdkvalidiumSetForceBatchTimeoutIterator{contract: _Cdkvalidium.contract, event: "SetForceBatchTimeout", logs: logs, sub: sub}, nil +} + +// WatchSetForceBatchTimeout is a free log subscription operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. +// +// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSetForceBatchTimeout(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSetForceBatchTimeout) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SetForceBatchTimeout") + 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(CdkvalidiumSetForceBatchTimeout) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetForceBatchTimeout", 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 +} + +// ParseSetForceBatchTimeout is a log parse operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. +// +// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSetForceBatchTimeout(log types.Log) (*CdkvalidiumSetForceBatchTimeout, error) { + event := new(CdkvalidiumSetForceBatchTimeout) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetForceBatchTimeout", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSetMultiplierBatchFeeIterator is returned from FilterSetMultiplierBatchFee and is used to iterate over the raw logs and unpacked data for SetMultiplierBatchFee events raised by the Cdkvalidium contract. +type CdkvalidiumSetMultiplierBatchFeeIterator struct { + Event *CdkvalidiumSetMultiplierBatchFee // 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 *CdkvalidiumSetMultiplierBatchFeeIterator) 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(CdkvalidiumSetMultiplierBatchFee) + 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(CdkvalidiumSetMultiplierBatchFee) + 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 *CdkvalidiumSetMultiplierBatchFeeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSetMultiplierBatchFeeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSetMultiplierBatchFee represents a SetMultiplierBatchFee event raised by the Cdkvalidium contract. +type CdkvalidiumSetMultiplierBatchFee struct { + NewMultiplierBatchFee uint16 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetMultiplierBatchFee is a free log retrieval operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. +// +// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSetMultiplierBatchFee(opts *bind.FilterOpts) (*CdkvalidiumSetMultiplierBatchFeeIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SetMultiplierBatchFee") + if err != nil { + return nil, err + } + return &CdkvalidiumSetMultiplierBatchFeeIterator{contract: _Cdkvalidium.contract, event: "SetMultiplierBatchFee", logs: logs, sub: sub}, nil +} + +// WatchSetMultiplierBatchFee is a free log subscription operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. +// +// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSetMultiplierBatchFee(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSetMultiplierBatchFee) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SetMultiplierBatchFee") + 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(CdkvalidiumSetMultiplierBatchFee) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetMultiplierBatchFee", 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 +} + +// ParseSetMultiplierBatchFee is a log parse operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. +// +// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSetMultiplierBatchFee(log types.Log) (*CdkvalidiumSetMultiplierBatchFee, error) { + event := new(CdkvalidiumSetMultiplierBatchFee) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetMultiplierBatchFee", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSetPendingStateTimeoutIterator is returned from FilterSetPendingStateTimeout and is used to iterate over the raw logs and unpacked data for SetPendingStateTimeout events raised by the Cdkvalidium contract. +type CdkvalidiumSetPendingStateTimeoutIterator struct { + Event *CdkvalidiumSetPendingStateTimeout // 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 *CdkvalidiumSetPendingStateTimeoutIterator) 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(CdkvalidiumSetPendingStateTimeout) + 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(CdkvalidiumSetPendingStateTimeout) + 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 *CdkvalidiumSetPendingStateTimeoutIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSetPendingStateTimeoutIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSetPendingStateTimeout represents a SetPendingStateTimeout event raised by the Cdkvalidium contract. +type CdkvalidiumSetPendingStateTimeout struct { + NewPendingStateTimeout uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetPendingStateTimeout is a free log retrieval operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. +// +// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSetPendingStateTimeout(opts *bind.FilterOpts) (*CdkvalidiumSetPendingStateTimeoutIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SetPendingStateTimeout") + if err != nil { + return nil, err + } + return &CdkvalidiumSetPendingStateTimeoutIterator{contract: _Cdkvalidium.contract, event: "SetPendingStateTimeout", logs: logs, sub: sub}, nil +} + +// WatchSetPendingStateTimeout is a free log subscription operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. +// +// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSetPendingStateTimeout(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSetPendingStateTimeout) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SetPendingStateTimeout") + 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(CdkvalidiumSetPendingStateTimeout) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetPendingStateTimeout", 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 +} + +// ParseSetPendingStateTimeout is a log parse operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. +// +// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSetPendingStateTimeout(log types.Log) (*CdkvalidiumSetPendingStateTimeout, error) { + event := new(CdkvalidiumSetPendingStateTimeout) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetPendingStateTimeout", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSetTrustedAggregatorIterator is returned from FilterSetTrustedAggregator and is used to iterate over the raw logs and unpacked data for SetTrustedAggregator events raised by the Cdkvalidium contract. +type CdkvalidiumSetTrustedAggregatorIterator struct { + Event *CdkvalidiumSetTrustedAggregator // 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 *CdkvalidiumSetTrustedAggregatorIterator) 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(CdkvalidiumSetTrustedAggregator) + 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(CdkvalidiumSetTrustedAggregator) + 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 *CdkvalidiumSetTrustedAggregatorIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSetTrustedAggregatorIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSetTrustedAggregator represents a SetTrustedAggregator event raised by the Cdkvalidium contract. +type CdkvalidiumSetTrustedAggregator struct { + NewTrustedAggregator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetTrustedAggregator is a free log retrieval operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. +// +// Solidity: event SetTrustedAggregator(address newTrustedAggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSetTrustedAggregator(opts *bind.FilterOpts) (*CdkvalidiumSetTrustedAggregatorIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SetTrustedAggregator") + if err != nil { + return nil, err + } + return &CdkvalidiumSetTrustedAggregatorIterator{contract: _Cdkvalidium.contract, event: "SetTrustedAggregator", logs: logs, sub: sub}, nil +} + +// WatchSetTrustedAggregator is a free log subscription operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. +// +// Solidity: event SetTrustedAggregator(address newTrustedAggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSetTrustedAggregator(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSetTrustedAggregator) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SetTrustedAggregator") + 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(CdkvalidiumSetTrustedAggregator) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetTrustedAggregator", 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 +} + +// ParseSetTrustedAggregator is a log parse operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. +// +// Solidity: event SetTrustedAggregator(address newTrustedAggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSetTrustedAggregator(log types.Log) (*CdkvalidiumSetTrustedAggregator, error) { + event := new(CdkvalidiumSetTrustedAggregator) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetTrustedAggregator", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSetTrustedAggregatorTimeoutIterator is returned from FilterSetTrustedAggregatorTimeout and is used to iterate over the raw logs and unpacked data for SetTrustedAggregatorTimeout events raised by the Cdkvalidium contract. +type CdkvalidiumSetTrustedAggregatorTimeoutIterator struct { + Event *CdkvalidiumSetTrustedAggregatorTimeout // 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 *CdkvalidiumSetTrustedAggregatorTimeoutIterator) 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(CdkvalidiumSetTrustedAggregatorTimeout) + 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(CdkvalidiumSetTrustedAggregatorTimeout) + 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 *CdkvalidiumSetTrustedAggregatorTimeoutIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSetTrustedAggregatorTimeoutIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSetTrustedAggregatorTimeout represents a SetTrustedAggregatorTimeout event raised by the Cdkvalidium contract. +type CdkvalidiumSetTrustedAggregatorTimeout struct { + NewTrustedAggregatorTimeout uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetTrustedAggregatorTimeout is a free log retrieval operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. +// +// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSetTrustedAggregatorTimeout(opts *bind.FilterOpts) (*CdkvalidiumSetTrustedAggregatorTimeoutIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SetTrustedAggregatorTimeout") + if err != nil { + return nil, err + } + return &CdkvalidiumSetTrustedAggregatorTimeoutIterator{contract: _Cdkvalidium.contract, event: "SetTrustedAggregatorTimeout", logs: logs, sub: sub}, nil +} + +// WatchSetTrustedAggregatorTimeout is a free log subscription operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. +// +// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSetTrustedAggregatorTimeout(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSetTrustedAggregatorTimeout) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SetTrustedAggregatorTimeout") + 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(CdkvalidiumSetTrustedAggregatorTimeout) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetTrustedAggregatorTimeout", 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 +} + +// ParseSetTrustedAggregatorTimeout is a log parse operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. +// +// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSetTrustedAggregatorTimeout(log types.Log) (*CdkvalidiumSetTrustedAggregatorTimeout, error) { + event := new(CdkvalidiumSetTrustedAggregatorTimeout) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetTrustedAggregatorTimeout", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSetTrustedSequencerIterator is returned from FilterSetTrustedSequencer and is used to iterate over the raw logs and unpacked data for SetTrustedSequencer events raised by the Cdkvalidium contract. +type CdkvalidiumSetTrustedSequencerIterator struct { + Event *CdkvalidiumSetTrustedSequencer // 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 *CdkvalidiumSetTrustedSequencerIterator) 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(CdkvalidiumSetTrustedSequencer) + 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(CdkvalidiumSetTrustedSequencer) + 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 *CdkvalidiumSetTrustedSequencerIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSetTrustedSequencerIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSetTrustedSequencer represents a SetTrustedSequencer event raised by the Cdkvalidium contract. +type CdkvalidiumSetTrustedSequencer struct { + NewTrustedSequencer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetTrustedSequencer is a free log retrieval operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. +// +// Solidity: event SetTrustedSequencer(address newTrustedSequencer) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSetTrustedSequencer(opts *bind.FilterOpts) (*CdkvalidiumSetTrustedSequencerIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SetTrustedSequencer") + if err != nil { + return nil, err + } + return &CdkvalidiumSetTrustedSequencerIterator{contract: _Cdkvalidium.contract, event: "SetTrustedSequencer", logs: logs, sub: sub}, nil +} + +// WatchSetTrustedSequencer is a free log subscription operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. +// +// Solidity: event SetTrustedSequencer(address newTrustedSequencer) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSetTrustedSequencer(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSetTrustedSequencer) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SetTrustedSequencer") + 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(CdkvalidiumSetTrustedSequencer) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetTrustedSequencer", 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 +} + +// ParseSetTrustedSequencer is a log parse operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. +// +// Solidity: event SetTrustedSequencer(address newTrustedSequencer) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSetTrustedSequencer(log types.Log) (*CdkvalidiumSetTrustedSequencer, error) { + event := new(CdkvalidiumSetTrustedSequencer) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetTrustedSequencer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSetTrustedSequencerURLIterator is returned from FilterSetTrustedSequencerURL and is used to iterate over the raw logs and unpacked data for SetTrustedSequencerURL events raised by the Cdkvalidium contract. +type CdkvalidiumSetTrustedSequencerURLIterator struct { + Event *CdkvalidiumSetTrustedSequencerURL // 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 *CdkvalidiumSetTrustedSequencerURLIterator) 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(CdkvalidiumSetTrustedSequencerURL) + 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(CdkvalidiumSetTrustedSequencerURL) + 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 *CdkvalidiumSetTrustedSequencerURLIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSetTrustedSequencerURLIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSetTrustedSequencerURL represents a SetTrustedSequencerURL event raised by the Cdkvalidium contract. +type CdkvalidiumSetTrustedSequencerURL struct { + NewTrustedSequencerURL string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetTrustedSequencerURL is a free log retrieval operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. +// +// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSetTrustedSequencerURL(opts *bind.FilterOpts) (*CdkvalidiumSetTrustedSequencerURLIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SetTrustedSequencerURL") + if err != nil { + return nil, err + } + return &CdkvalidiumSetTrustedSequencerURLIterator{contract: _Cdkvalidium.contract, event: "SetTrustedSequencerURL", logs: logs, sub: sub}, nil +} + +// WatchSetTrustedSequencerURL is a free log subscription operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. +// +// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSetTrustedSequencerURL(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSetTrustedSequencerURL) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SetTrustedSequencerURL") + 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(CdkvalidiumSetTrustedSequencerURL) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetTrustedSequencerURL", 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 +} + +// ParseSetTrustedSequencerURL is a log parse operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. +// +// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSetTrustedSequencerURL(log types.Log) (*CdkvalidiumSetTrustedSequencerURL, error) { + event := new(CdkvalidiumSetTrustedSequencerURL) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetTrustedSequencerURL", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumSetVerifyBatchTimeTargetIterator is returned from FilterSetVerifyBatchTimeTarget and is used to iterate over the raw logs and unpacked data for SetVerifyBatchTimeTarget events raised by the Cdkvalidium contract. +type CdkvalidiumSetVerifyBatchTimeTargetIterator struct { + Event *CdkvalidiumSetVerifyBatchTimeTarget // 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 *CdkvalidiumSetVerifyBatchTimeTargetIterator) 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(CdkvalidiumSetVerifyBatchTimeTarget) + 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(CdkvalidiumSetVerifyBatchTimeTarget) + 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 *CdkvalidiumSetVerifyBatchTimeTargetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumSetVerifyBatchTimeTargetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumSetVerifyBatchTimeTarget represents a SetVerifyBatchTimeTarget event raised by the Cdkvalidium contract. +type CdkvalidiumSetVerifyBatchTimeTarget struct { + NewVerifyBatchTimeTarget uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetVerifyBatchTimeTarget is a free log retrieval operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. +// +// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterSetVerifyBatchTimeTarget(opts *bind.FilterOpts) (*CdkvalidiumSetVerifyBatchTimeTargetIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "SetVerifyBatchTimeTarget") + if err != nil { + return nil, err + } + return &CdkvalidiumSetVerifyBatchTimeTargetIterator{contract: _Cdkvalidium.contract, event: "SetVerifyBatchTimeTarget", logs: logs, sub: sub}, nil +} + +// WatchSetVerifyBatchTimeTarget is a free log subscription operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. +// +// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchSetVerifyBatchTimeTarget(opts *bind.WatchOpts, sink chan<- *CdkvalidiumSetVerifyBatchTimeTarget) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "SetVerifyBatchTimeTarget") + 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(CdkvalidiumSetVerifyBatchTimeTarget) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetVerifyBatchTimeTarget", 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 +} + +// ParseSetVerifyBatchTimeTarget is a log parse operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. +// +// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseSetVerifyBatchTimeTarget(log types.Log) (*CdkvalidiumSetVerifyBatchTimeTarget, error) { + event := new(CdkvalidiumSetVerifyBatchTimeTarget) + if err := _Cdkvalidium.contract.UnpackLog(event, "SetVerifyBatchTimeTarget", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumTransferAdminRoleIterator is returned from FilterTransferAdminRole and is used to iterate over the raw logs and unpacked data for TransferAdminRole events raised by the Cdkvalidium contract. +type CdkvalidiumTransferAdminRoleIterator struct { + Event *CdkvalidiumTransferAdminRole // 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 *CdkvalidiumTransferAdminRoleIterator) 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(CdkvalidiumTransferAdminRole) + 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(CdkvalidiumTransferAdminRole) + 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 *CdkvalidiumTransferAdminRoleIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumTransferAdminRoleIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumTransferAdminRole represents a TransferAdminRole event raised by the Cdkvalidium contract. +type CdkvalidiumTransferAdminRole struct { + NewPendingAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferAdminRole is a free log retrieval operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. +// +// Solidity: event TransferAdminRole(address newPendingAdmin) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterTransferAdminRole(opts *bind.FilterOpts) (*CdkvalidiumTransferAdminRoleIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "TransferAdminRole") + if err != nil { + return nil, err + } + return &CdkvalidiumTransferAdminRoleIterator{contract: _Cdkvalidium.contract, event: "TransferAdminRole", logs: logs, sub: sub}, nil +} + +// WatchTransferAdminRole is a free log subscription operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. +// +// Solidity: event TransferAdminRole(address newPendingAdmin) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchTransferAdminRole(opts *bind.WatchOpts, sink chan<- *CdkvalidiumTransferAdminRole) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "TransferAdminRole") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CdkvalidiumTransferAdminRole) + if err := _Cdkvalidium.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransferAdminRole is a log parse operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. +// +// Solidity: event TransferAdminRole(address newPendingAdmin) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseTransferAdminRole(log types.Log) (*CdkvalidiumTransferAdminRole, error) { + event := new(CdkvalidiumTransferAdminRole) + if err := _Cdkvalidium.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumUpdateZkEVMVersionIterator is returned from FilterUpdateZkEVMVersion and is used to iterate over the raw logs and unpacked data for UpdateZkEVMVersion events raised by the Cdkvalidium contract. +type CdkvalidiumUpdateZkEVMVersionIterator struct { + Event *CdkvalidiumUpdateZkEVMVersion // 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 *CdkvalidiumUpdateZkEVMVersionIterator) 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(CdkvalidiumUpdateZkEVMVersion) + 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(CdkvalidiumUpdateZkEVMVersion) + 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 *CdkvalidiumUpdateZkEVMVersionIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumUpdateZkEVMVersionIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumUpdateZkEVMVersion represents a UpdateZkEVMVersion event raised by the Cdkvalidium contract. +type CdkvalidiumUpdateZkEVMVersion struct { + NumBatch uint64 + ForkID uint64 + Version string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdateZkEVMVersion is a free log retrieval operation binding the contract event 0xed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd6. +// +// Solidity: event UpdateZkEVMVersion(uint64 numBatch, uint64 forkID, string version) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterUpdateZkEVMVersion(opts *bind.FilterOpts) (*CdkvalidiumUpdateZkEVMVersionIterator, error) { + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "UpdateZkEVMVersion") + if err != nil { + return nil, err + } + return &CdkvalidiumUpdateZkEVMVersionIterator{contract: _Cdkvalidium.contract, event: "UpdateZkEVMVersion", logs: logs, sub: sub}, nil +} + +// WatchUpdateZkEVMVersion is a free log subscription operation binding the contract event 0xed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd6. +// +// Solidity: event UpdateZkEVMVersion(uint64 numBatch, uint64 forkID, string version) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchUpdateZkEVMVersion(opts *bind.WatchOpts, sink chan<- *CdkvalidiumUpdateZkEVMVersion) (event.Subscription, error) { + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "UpdateZkEVMVersion") + 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(CdkvalidiumUpdateZkEVMVersion) + if err := _Cdkvalidium.contract.UnpackLog(event, "UpdateZkEVMVersion", 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 +} + +// ParseUpdateZkEVMVersion is a log parse operation binding the contract event 0xed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd6. +// +// Solidity: event UpdateZkEVMVersion(uint64 numBatch, uint64 forkID, string version) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseUpdateZkEVMVersion(log types.Log) (*CdkvalidiumUpdateZkEVMVersion, error) { + event := new(CdkvalidiumUpdateZkEVMVersion) + if err := _Cdkvalidium.contract.UnpackLog(event, "UpdateZkEVMVersion", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumVerifyBatchesIterator is returned from FilterVerifyBatches and is used to iterate over the raw logs and unpacked data for VerifyBatches events raised by the Cdkvalidium contract. +type CdkvalidiumVerifyBatchesIterator struct { + Event *CdkvalidiumVerifyBatches // 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 *CdkvalidiumVerifyBatchesIterator) 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(CdkvalidiumVerifyBatches) + 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(CdkvalidiumVerifyBatches) + 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 *CdkvalidiumVerifyBatchesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumVerifyBatchesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumVerifyBatches represents a VerifyBatches event raised by the Cdkvalidium contract. +type CdkvalidiumVerifyBatches struct { + NumBatch uint64 + StateRoot [32]byte + Aggregator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVerifyBatches is a free log retrieval operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. +// +// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterVerifyBatches(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*CdkvalidiumVerifyBatchesIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "VerifyBatches", numBatchRule, aggregatorRule) + if err != nil { + return nil, err + } + return &CdkvalidiumVerifyBatchesIterator{contract: _Cdkvalidium.contract, event: "VerifyBatches", logs: logs, sub: sub}, nil +} + +// WatchVerifyBatches is a free log subscription operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. +// +// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchVerifyBatches(opts *bind.WatchOpts, sink chan<- *CdkvalidiumVerifyBatches, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "VerifyBatches", numBatchRule, aggregatorRule) + 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(CdkvalidiumVerifyBatches) + if err := _Cdkvalidium.contract.UnpackLog(event, "VerifyBatches", 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 +} + +// ParseVerifyBatches is a log parse operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. +// +// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseVerifyBatches(log types.Log) (*CdkvalidiumVerifyBatches, error) { + event := new(CdkvalidiumVerifyBatches) + if err := _Cdkvalidium.contract.UnpackLog(event, "VerifyBatches", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CdkvalidiumVerifyBatchesTrustedAggregatorIterator is returned from FilterVerifyBatchesTrustedAggregator and is used to iterate over the raw logs and unpacked data for VerifyBatchesTrustedAggregator events raised by the Cdkvalidium contract. +type CdkvalidiumVerifyBatchesTrustedAggregatorIterator struct { + Event *CdkvalidiumVerifyBatchesTrustedAggregator // 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 *CdkvalidiumVerifyBatchesTrustedAggregatorIterator) 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(CdkvalidiumVerifyBatchesTrustedAggregator) + 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(CdkvalidiumVerifyBatchesTrustedAggregator) + 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 *CdkvalidiumVerifyBatchesTrustedAggregatorIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CdkvalidiumVerifyBatchesTrustedAggregatorIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CdkvalidiumVerifyBatchesTrustedAggregator represents a VerifyBatchesTrustedAggregator event raised by the Cdkvalidium contract. +type CdkvalidiumVerifyBatchesTrustedAggregator struct { + NumBatch uint64 + StateRoot [32]byte + Aggregator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVerifyBatchesTrustedAggregator is a free log retrieval operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. +// +// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) FilterVerifyBatchesTrustedAggregator(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*CdkvalidiumVerifyBatchesTrustedAggregatorIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Cdkvalidium.contract.FilterLogs(opts, "VerifyBatchesTrustedAggregator", numBatchRule, aggregatorRule) + if err != nil { + return nil, err + } + return &CdkvalidiumVerifyBatchesTrustedAggregatorIterator{contract: _Cdkvalidium.contract, event: "VerifyBatchesTrustedAggregator", logs: logs, sub: sub}, nil +} + +// WatchVerifyBatchesTrustedAggregator is a free log subscription operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. +// +// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) WatchVerifyBatchesTrustedAggregator(opts *bind.WatchOpts, sink chan<- *CdkvalidiumVerifyBatchesTrustedAggregator, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Cdkvalidium.contract.WatchLogs(opts, "VerifyBatchesTrustedAggregator", numBatchRule, aggregatorRule) + 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(CdkvalidiumVerifyBatchesTrustedAggregator) + if err := _Cdkvalidium.contract.UnpackLog(event, "VerifyBatchesTrustedAggregator", 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 +} + +// ParseVerifyBatchesTrustedAggregator is a log parse operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. +// +// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Cdkvalidium *CdkvalidiumFilterer) ParseVerifyBatchesTrustedAggregator(log types.Log) (*CdkvalidiumVerifyBatchesTrustedAggregator, error) { + event := new(CdkvalidiumVerifyBatchesTrustedAggregator) + if err := _Cdkvalidium.contract.UnpackLog(event, "VerifyBatchesTrustedAggregator", 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 deleted file mode 100644 index 2de97f1db2..0000000000 --- a/etherman/smartcontracts/polygonzkevm/polygonzkevm.go +++ /dev/null @@ -1,5308 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package polygonzkevm - -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 -) - -// PolygonZkEVMBatchData is an auto generated low-level Go binding around an user-defined struct. -type PolygonZkEVMBatchData struct { - Transactions []byte - GlobalExitRoot [32]byte - Timestamp uint64 - MinForcedTimestamp uint64 -} - -// PolygonZkEVMForcedBatchData is an auto generated low-level Go binding around an user-defined struct. -type PolygonZkEVMForcedBatchData struct { - Transactions []byte - GlobalExitRoot [32]byte - MinForcedTimestamp uint64 -} - -// PolygonZkEVMInitializePackedParameters is an auto generated low-level Go binding around an user-defined struct. -type PolygonZkEVMInitializePackedParameters struct { - Admin common.Address - TrustedSequencer common.Address - PendingStateTimeout uint64 - TrustedAggregator common.Address - TrustedAggregatorTimeout uint64 -} - -// 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\":\"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\":\"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\":\"structPolygonZkEVM.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\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"globalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minForcedTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structPolygonZkEVM.BatchData[]\",\"name\":\"batches\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"l2Coinbase\",\"type\":\"address\"}],\"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\":\"structPolygonZkEVM.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: "0x6101406040523480156200001257600080fd5b5060405162006078380380620060788339810160408190526200003591620000a5565b6001600160a01b0395861660c05293851660805291841660a05290921660e0526001600160401b0391821661010052166101205262000131565b6001600160a01b03811681146200008557600080fd5b50565b80516001600160401b0381168114620000a057600080fd5b919050565b60008060008060008060c08789031215620000bf57600080fd5b8651620000cc816200006f565b6020880151909650620000df816200006f565b6040880151909550620000f2816200006f565b606088015190945062000105816200006f565b9250620001156080880162000088565b91506200012560a0880162000088565b90509295509295509295565b60805160a05160c05160e0516101005161012051615e79620001ff6000396000818161069601528181610dec01526131760152600081816108030152610dc20152600081816107c901528181611d910152818161380f0152614c8f01526000818161096f01528181610f5f01528181611130015281816119990152818161216a015281816139f70152614759015260008181610a1c015281816140b4015261450c0152600081816108bf01528181611d5f0152818161265b015281816139cb01526141a20152615e796000f3fe608060405234801561001057600080fd5b50600436106103ba5760003560e01c8063841b24d7116101f4578063c754c7ed1161011a578063e7a7ed02116100ad578063f14916d61161007c578063f14916d614610a7e578063f2fde38b14610a91578063f851a44014610aa4578063f8b823e414610ac457600080fd5b8063e7a7ed02146109e7578063e8bf92ed14610a17578063eaeb077b14610a3e578063ed6b010414610a5157600080fd5b8063d2e129f9116100e9578063d2e129f914610991578063d8d1091b146109a4578063d939b315146109b7578063dbc16976146109df57600080fd5b8063c754c7ed146108fc578063c89e42df14610928578063cfa8ed471461093b578063d02103ca1461096a57600080fd5b8063a3c573eb11610192578063b4d63f5811610161578063b4d63f5814610853578063b6b0b097146108ba578063ba58ae39146108e1578063c0ed84e0146108f457600080fd5b8063a3c573eb146107c4578063ada8f919146107eb578063adc879e9146107fe578063afd23cbe1461082557600080fd5b806399f5634e116101ce57806399f5634e146107835780639aa972a31461078b5780639c9f3dfe1461079e578063a066215c146107b157600080fd5b8063841b24d71461072d5780638c3d73011461075d5780638da5cb5b1461076557600080fd5b80634a1a89a7116102e4578063621dd411116102775780637215541a116102465780637215541a1461066a5780637fcb36531461067d578063831c7ead14610691578063837a4738146106b857600080fd5b8063621dd4111461061c5780636b8616ce1461062f5780636ff512cc1461064f578063715018a61461066257600080fd5b8063542028d5116102b3578063542028d5146105f15780635e9145c9146105f95780635ec919581461060c578063604691691461061457600080fd5b80634a1a89a71461057d5780634a910e6a1461059d5780634e487706146105b05780635392c5e0146105c357600080fd5b8063298789831161035c578063394218e91161032b578063394218e91461050e578063423fa856146105215780634560526714610541578063458c04771461056957600080fd5b806329878983146104a95780632b0006fa146104d55780632c1f816a146104e8578063383b3be8146104fb57600080fd5b80631816b7e5116103985780631816b7e51461042857806319d8ac611461043d578063220d789914610451578063267822471461046457600080fd5b80630a0d9fbe146103bf578063107bf28c146103f657806315064c961461040b575b600080fd5b606f546103d890610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6103fe610acd565b6040516103ed91906152bb565b606f546104189060ff1681565b60405190151581526020016103ed565b61043b6104363660046152d5565b610b5b565b005b6073546103d89067ffffffffffffffff1681565b6103fe61045f366004615311565b610c73565b607b546104849073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103ed565b6074546104849068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b61043b6104e3366004615376565b610e4a565b61043b6104f63660046153de565b61101a565b610418610509366004615458565b611228565b61043b61051c366004615458565b61127e565b6073546103d89068010000000000000000900467ffffffffffffffff1681565b6073546103d890700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546103d89067ffffffffffffffff1681565b6079546103d89068010000000000000000900467ffffffffffffffff1681565b61043b6105ab366004615458565b611402565b61043b6105be366004615458565b6114b5565b6105e36105d1366004615458565b60756020526000908152604090205481565b6040519081526020016103ed565b6103fe611639565b61043b6106073660046154e3565b611646565b61043b611e50565b6105e3611f50565b61043b61062a366004615376565b611f66565b6105e361063d366004615458565b60716020526000908152604090205481565b61043b61065d366004615537565b6122ee565b61043b6123c3565b61043b610678366004615458565b6123d7565b6074546103d89067ffffffffffffffff1681565b6103d87f000000000000000000000000000000000000000000000000000000000000000081565b6107016106c6366004615552565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff95861681529490931660208501529183015260608201526080016103ed565b6079546103d8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b61043b612547565b60335473ffffffffffffffffffffffffffffffffffffffff16610484565b6105e3612613565b61043b6107993660046153de565b61276c565b61043b6107ac366004615458565b61281d565b61043b6107bf366004615458565b612999565b6104847f000000000000000000000000000000000000000000000000000000000000000081565b61043b6107f9366004615537565b612a9f565b6103d87f000000000000000000000000000000000000000000000000000000000000000081565b606f54610840906901000000000000000000900461ffff1681565b60405161ffff90911681526020016103ed565b610894610861366004615458565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff92831660208501529116908201526060016103ed565b6104847f000000000000000000000000000000000000000000000000000000000000000081565b6104186108ef366004615552565b612b63565b6103d8612bed565b607b546103d89074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b61043b610936366004615645565b612c42565b606f54610484906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104847f000000000000000000000000000000000000000000000000000000000000000081565b61043b61099f3660046156bc565b612ccf565b61043b6109b236600461576f565b61321a565b6079546103d890700100000000000000000000000000000000900467ffffffffffffffff1681565b61043b6137bc565b6073546103d8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6104847f000000000000000000000000000000000000000000000000000000000000000081565b61043b610a4c3660046157b1565b613895565b607b54610418907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b61043b610a8c366004615537565b613c8b565b61043b610a9f366004615537565b613d5d565b607a546104849073ffffffffffffffffffffffffffffffffffffffff1681565b6105e360705481565b60778054610ada906157fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610b06906157fd565b8015610b535780601f10610b2857610100808354040283529160200191610b53565b820191906000526020600020905b815481529060010190602001808311610b3657829003601f168201915b505050505081565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610bac576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88161ffff161080610bc557506103ff8161ffff16115b15610bfc576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffff16690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b67ffffffffffffffff8086166000818152607260205260408082205493881682529020546060929115801590610ca7575081155b15610cde576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610d15576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1e84612b63565b610d54576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481019690965260548601929092527fffffffffffffffff00000000000000000000000000000000000000000000000060c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610ea7576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610eb5868686868686613e11565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff86811691821790925560009081526075602052604090208390556079541615610f3057607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b158015610fb857600080fd5b505af1158015610fcc573d6000803e3d6000fd5b505060405184815233925067ffffffffffffffff871691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe906020015b60405180910390a3505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611077576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611086878787878787876141d5565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561110157607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b15801561118957600080fd5b505af115801561119d573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a800000000000000000000000000000000000000000000000001790555050604051828152339067ffffffffffffffff8616907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a350505050505050565b60795467ffffffffffffffff8281166000908152607860205260408120549092429261126c927001000000000000000000000000000000009092048116911661587f565b67ffffffffffffffff16111592915050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146112cf576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611316576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166113855760795467ffffffffffffffff7801000000000000000000000000000000000000000000000000909104811690821610611385576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610c68565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146114a957606f5460ff161561146a576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61147381611228565b6114a9576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114b28161460f565b50565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611506576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff8216111561154d576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166115b857607b5467ffffffffffffffff740100000000000000000000000000000000000000009091048116908216106115b8576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610c68565b60768054610ada906157fd565b606f5460ff1615611683576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f546b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146116e3576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600081900361171f576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e881111561175b576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000082048116600081815260726020526040812054838516949293700100000000000000000000000000000000909304909216919082905b86811015611bab5760008a8a838181106117c3576117c36158a7565b90506020028101906117d591906158d6565b6117de90615914565b8051805160209091012060608201519192509067ffffffffffffffff1615611956578561180a816159a1565b9650506000818360200151846060015160405160200161186293929190928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff8a166000908152607190935291205490915081146118eb576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8088166000908152607160205260408082209190915560608501519085015190821691161015611950576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611a93565b602082015115801590611a1d575060208201516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063257b3632906024016020604051808303816000875af11580156119f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1b91906159c8565b155b15611a54576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151516201d4c01015611a93576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8767ffffffffffffffff16826040015167ffffffffffffffff161080611ac6575042826040015167ffffffffffffffff16115b15611afd576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602082810151604080850151815193840189905290830184905260608084019290925260c01b7fffffffffffffffff0000000000000000000000000000000000000000000000001660808301528b901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c016040516020818303038152906040528051906020012094508160400151975050508080611ba3906159e1565b9150506117a7565b50611bb6868561587f565b60735490945067ffffffffffffffff780100000000000000000000000000000000000000000000000090910481169084161115611c1f576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c2b8285615a19565b611c3f9067ffffffffffffffff1688615a3a565b604080516060810182528581524267ffffffffffffffff908116602080840191825260738054680100000000000000009081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585167fffffffffffffffffffffffffffffffff000000000000000000000000000000009384161795851684029590951790945583548c8416911617930292909217905590915082811690851614611d3557607380547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8716021790555b611d87333083607054611d489190615a4d565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016929190614822565b611d8f614904565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611df757600080fd5b505af1158015611e0b573d6000803e3d6000fd5b505060405167ffffffffffffffff881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a250505050505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611ea1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b547c0100000000000000000000000000000000000000000000000000000000900460ff16611efd576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b60006070546064611f619190615a4d565b905090565b606f5460ff1615611fa3576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff8581166000908152607260205260409020600101544292611ff09278010000000000000000000000000000000000000000000000009091048116911661587f565b67ffffffffffffffff161115612032576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e861203f8686615a19565b67ffffffffffffffff161115612081576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61208f868686868686613e11565b612098846149b5565b607954700100000000000000000000000000000000900467ffffffffffffffff166000036121e057607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561213b57607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156121c357600080fd5b505af11580156121d7573d6000803e3d6000fd5b505050506122b0565b6121e8614904565b6079805467ffffffffffffffff16906000612202836159a1565b825467ffffffffffffffff9182166101009390930a92830292820219169190911790915560408051608081018252428316815287831660208083019182528284018981526060840189815260795487166000908152607890935294909120925183549251861668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009093169516949094171781559151600183015551600290910155505b604051828152339067ffffffffffffffff8616907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f59669060200161100a565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461233f576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610c68565b6123cb614b95565b6123d56000614c16565b565b60335473ffffffffffffffffffffffffffffffffffffffff16331461253f576000612400612bed565b90508067ffffffffffffffff168267ffffffffffffffff161161244f576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000090910481169083161180612495575067ffffffffffffffff80831660009081526072602052604090206001015416155b156124cc576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80831660009081526072602052604090206001015442916124fb9162093a80911661587f565b67ffffffffffffffff16111561253d576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b6114b2614c8d565b607b5473ffffffffffffffffffffffffffffffffffffffff163314612598576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156126a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c691906159c8565b905060006126d2612bed565b60735467ffffffffffffffff68010000000000000000820481169161272a9170010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000900416615a19565b612734919061587f565b61273e9190615a19565b67ffffffffffffffff1690508060000361275b5760009250505090565b6127658183615a93565b9250505090565b606f5460ff16156127a9576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127b8878787878787876141d5565b67ffffffffffffffff84166000908152607560209081526040918290205482519081529081018490527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a1612814614c8d565b50505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461286e576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff821611156128b5576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1661291c5760795467ffffffffffffffff70010000000000000000000000000000000090910481169082161061291c576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607980547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610c68565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146129ea576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808167ffffffffffffffff161115612a31576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010067ffffffffffffffff8416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610c68565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612af0576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610c68565b600067ffffffff0000000167ffffffffffffffff8316108015612b9b575067ffffffff00000001604083901c67ffffffffffffffff16105b8015612bbc575067ffffffff00000001608083901c67ffffffffffffffff16105b8015612bd3575067ffffffff0000000160c083901c105b15612be057506001919050565b506000919050565b919050565b60795460009067ffffffffffffffff1615612c31575060795467ffffffffffffffff9081166000908152607860205260409020546801000000000000000090041690565b5060745467ffffffffffffffff1690565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612c93576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6076612c9f8282615af5565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610c6891906152bb565b600054610100900460ff1615808015612cef5750600054600160ff909116105b80612d095750303b158015612d09575060005460ff166001145b612d9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015612df857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b612e056020880188615537565b607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612e5a6040880160208901615537565b606f805473ffffffffffffffffffffffffffffffffffffffff929092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055612ebf6080880160608901615537565b6074805473ffffffffffffffffffffffffffffffffffffffff9290921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad8690556076612f4a8682615af5565b506077612f578582615af5565b5062093a80612f6c6060890160408a01615458565b67ffffffffffffffff161115612fae576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612fbe6060880160408901615458565b6079805467ffffffffffffffff92909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff90921691909117905562093a8061302060a0890160808a01615458565b67ffffffffffffffff161115613062576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61307260a0880160808901615458565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff939093169290920291909117905567016345785d8a0000607055606f80547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000ff166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c0100000000000697800000000000000000000000000000000000000000179055613151614d15565b7fed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd660007f000000000000000000000000000000000000000000000000000000000000000085856040516131a79493929190615c58565b60405180910390a1801561281457600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613277576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16156132b4576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190036132f0576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e881111561332c576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff78010000000000000000000000000000000000000000000000008204811691613377918491700100000000000000000000000000000000900416615c90565b11156133af576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000008204811660008181526072602052604081205491937001000000000000000000000000000000009004909216915b8481101561365957600087878381811061340f5761340f6158a7565b90506020028101906134219190615ca3565b61342a90615cd7565b905083613436816159a1565b825180516020918201208185015160408087015190519499509194506000936134989386939101928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff8916600090815260719093529120549091508114613521576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8616600090815260716020526040812055613546600189615a3a565b84036135b55742607b60149054906101000a900467ffffffffffffffff168460400151613573919061587f565b67ffffffffffffffff1611156135b5576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016608083015233901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c016040516020818303038152906040528051906020012094505050508080613651906159e1565b9150506133f3565b50613664848461587f565b6073805467ffffffffffffffff4281167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092168217808455604080516060810182528781526020808201958652680100000000000000009384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921693871693909317179091558554938916700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461380d576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561387557600080fd5b505af1158015613889573d6000803e3d6000fd5b505050506123d5614db5565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff16156138f2576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff161561392f576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613939611f50565b905081811115613975576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113888311156139b1576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6139f373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084614822565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a8491906159c8565b60738054919250780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16906018613abe836159a1565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508484604051613af5929190615d53565b60408051918290038220602083015281018290527fffffffffffffffff0000000000000000000000000000000000000000000000004260c01b166060820152606801604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206073547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1660009081526071909352912055323303613c2557607354604080518381523360208201526060918101829052600091810191909152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a2613c84565b607360189054906101000a900467ffffffffffffffff1667ffffffffffffffff167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc93182338888604051613c7b9493929190615d63565b60405180910390a25b5050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314613cdc576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610c68565b613d65614b95565b73ffffffffffffffffffffffffffffffffffffffff8116613e08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612d91565b6114b281614c16565b600080613e1c612bed565b905067ffffffffffffffff881615613eec5760795467ffffffffffffffff9081169089161115613e78576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8089166000908152607860205260409020600281015481549094509091898116680100000000000000009092041614613ee6576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50613f8d565b67ffffffffffffffff8716600090815260756020526040902054915081613f3f576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168767ffffffffffffffff161115613f8d576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168667ffffffffffffffff1611613fda576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613fe98888888689610c73565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161401e9190615d99565b602060405180830381855afa15801561403b573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061405e91906159c8565b6140689190615dab565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a916140ea91899190600401615dbf565b602060405180830381865afa158015614107573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061412b9190615dfa565b614161576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6141c93361416f858b615a19565b67ffffffffffffffff16614181612613565b61418b9190615a4d565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169190614e44565b50505050505050505050565b600067ffffffffffffffff8816156142a35760795467ffffffffffffffff9081169089161115614231576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5067ffffffffffffffff808816600090815260786020526040902060028101548154909288811668010000000000000000909204161461429d576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061433f565b5067ffffffffffffffff8516600090815260756020526040902054806142f5576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60745467ffffffffffffffff908116908716111561433f576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff908116908816118061437157508767ffffffffffffffff168767ffffffffffffffff1611155b80614398575060795467ffffffffffffffff68010000000000000000909104811690881611155b156143cf576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff878116600090815260786020526040902054680100000000000000009004811690861614614432576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006144418787878588610c73565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040516144769190615d99565b602060405180830381855afa158015614493573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906144b691906159c8565b6144c09190615dab565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a9161454291889190600401615dbf565b602060405180830381865afa15801561455f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145839190615dfa565b6145b9576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff89166000908152607860205260409020600201548590036141c9576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff680100000000000000009091048116908216111580614649575060795467ffffffffffffffff908116908216115b15614680576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff818116600081815260786020908152604080832080546074805468010000000000000000928390049098167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090981688179055600282015487865260759094529382902092909255607980547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169390940292909217909255600182015490517f33d6247d00000000000000000000000000000000000000000000000000000000815260048101919091529091907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156147b257600080fd5b505af11580156147c6573d6000803e3d6000fd5b505050508267ffffffffffffffff168167ffffffffffffffff167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e846002015460405161481591815260200190565b60405180910390a3505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526148fe9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614e9f565b50505050565b60795467ffffffffffffffff6801000000000000000082048116911611156123d55760795460009061494d9068010000000000000000900467ffffffffffffffff16600161587f565b905061495881611228565b156114b25760795460009060029061497b90849067ffffffffffffffff16615a19565b6149859190615e1c565b61498f908361587f565b905061499a81611228565b156149ac576149a88161460f565b5050565b6149a88261460f565b60006149bf612bed565b9050816000806149cf8484615a19565b606f5467ffffffffffffffff91821692506000916149f39161010090041642615a3a565b90505b8467ffffffffffffffff168467ffffffffffffffff1614614a7e5767ffffffffffffffff80851660009081526072602052604090206001810154909116821015614a5c57600181015468010000000000000000900467ffffffffffffffff169450614a78565b614a668686615a19565b67ffffffffffffffff16935050614a7e565b506149f6565b6000614a8a8484615a3a565b905083811015614ae157808403600c8111614aa55780614aa8565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281614ad757614ad7615a64565b0460705550614b51565b838103600c8111614af25780614af5565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281614b2c57614b2c615a64565b04905080607054670de0b6b3a76400000281614b4a57614b4a615a64565b0460705550505b683635c9adc5dea000006070541115614b7657683635c9adc5dea00000607055612814565b633b9aca00607054101561281457633b9aca0060705550505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1633146123d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612d91565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015614cf557600080fd5b505af1158015614d09573d6000803e3d6000fd5b505050506123d5614fab565b600054610100900460ff16614dac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612d91565b6123d533614c16565b606f5460ff16614df1576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052614e9a9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640161487c565b505050565b6000614f01826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661503e9092919063ffffffff16565b805190915015614e9a5780806020019051810190614f1f9190615dfa565b614e9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612d91565b606f5460ff1615614fe8576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b606061504d8484600085615055565b949350505050565b6060824710156150e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612d91565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516151109190615d99565b60006040518083038185875af1925050503d806000811461514d576040519150601f19603f3d011682016040523d82523d6000602084013e615152565b606091505b50915091506151638783838761516e565b979650505050505050565b606083156152045782516000036151fd5773ffffffffffffffffffffffffffffffffffffffff85163b6151fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612d91565b508161504d565b61504d83838151156152195781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d9191906152bb565b60005b83811015615268578181015183820152602001615250565b50506000910152565b6000815180845261528981602086016020860161524d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006152ce6020830184615271565b9392505050565b6000602082840312156152e757600080fd5b813561ffff811681146152ce57600080fd5b803567ffffffffffffffff81168114612be857600080fd5b600080600080600060a0868803121561532957600080fd5b615332866152f9565b9450615340602087016152f9565b94979496505050506040830135926060810135926080909101359150565b80610300810183101561537057600080fd5b92915050565b6000806000806000806103a0878903121561539057600080fd5b615399876152f9565b95506153a7602088016152f9565b94506153b5604088016152f9565b935060608701359250608087013591506153d28860a0890161535e565b90509295509295509295565b60008060008060008060006103c0888a0312156153fa57600080fd5b615403886152f9565b9650615411602089016152f9565b955061541f604089016152f9565b945061542d606089016152f9565b93506080880135925060a0880135915061544a8960c08a0161535e565b905092959891949750929550565b60006020828403121561546a57600080fd5b6152ce826152f9565b60008083601f84011261548557600080fd5b50813567ffffffffffffffff81111561549d57600080fd5b6020830191508360208260051b85010111156154b857600080fd5b9250929050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612be857600080fd5b6000806000604084860312156154f857600080fd5b833567ffffffffffffffff81111561550f57600080fd5b61551b86828701615473565b909450925061552e9050602085016154bf565b90509250925092565b60006020828403121561554957600080fd5b6152ce826154bf565b60006020828403121561556457600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126155ab57600080fd5b813567ffffffffffffffff808211156155c6576155c661556b565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561560c5761560c61556b565b8160405283815286602085880101111561562557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561565757600080fd5b813567ffffffffffffffff81111561566e57600080fd5b61504d8482850161559a565b60008083601f84011261568c57600080fd5b50813567ffffffffffffffff8111156156a457600080fd5b6020830191508360208285010111156154b857600080fd5b6000806000806000808688036101208112156156d757600080fd5b60a08112156156e557600080fd5b5086955060a0870135945060c087013567ffffffffffffffff8082111561570b57600080fd5b6157178a838b0161559a565b955060e089013591508082111561572d57600080fd5b6157398a838b0161559a565b945061010089013591508082111561575057600080fd5b5061575d89828a0161567a565b979a9699509497509295939492505050565b6000806020838503121561578257600080fd5b823567ffffffffffffffff81111561579957600080fd5b6157a585828601615473565b90969095509350505050565b6000806000604084860312156157c657600080fd5b833567ffffffffffffffff8111156157dd57600080fd5b6157e98682870161567a565b909790965060209590950135949350505050565b600181811c9082168061581157607f821691505b60208210810361584a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff8181168382160190808211156158a0576158a0615850565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261590a57600080fd5b9190910192915050565b60006080823603121561592657600080fd5b6040516080810167ffffffffffffffff828210818311171561594a5761594a61556b565b81604052843591508082111561595f57600080fd5b5061596c3682860161559a565b82525060208301356020820152615985604084016152f9565b6040820152615996606084016152f9565b606082015292915050565b600067ffffffffffffffff8083168181036159be576159be615850565b6001019392505050565b6000602082840312156159da57600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615a1257615a12615850565b5060010190565b67ffffffffffffffff8281168282160390808211156158a0576158a0615850565b8181038181111561537057615370615850565b808202811582820484141761537057615370615850565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615aa257615aa2615a64565b500490565b601f821115614e9a57600081815260208120601f850160051c81016020861015615ace5750805b601f850160051c820191505b81811015615aed57828155600101615ada565b505050505050565b815167ffffffffffffffff811115615b0f57615b0f61556b565b615b2381615b1d84546157fd565b84615aa7565b602080601f831160018114615b765760008415615b405750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615aed565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615bc357888601518255948401946001909101908401615ba4565b5085821015615bff57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600067ffffffffffffffff808716835280861660208401525060606040830152615c86606083018486615c0f565b9695505050505050565b8082018082111561537057615370615850565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301811261590a57600080fd5b600060608236031215615ce957600080fd5b6040516060810167ffffffffffffffff8282108183111715615d0d57615d0d61556b565b816040528435915080821115615d2257600080fd5b50615d2f3682860161559a565b82525060208301356020820152615d48604084016152f9565b604082015292915050565b8183823760009101908152919050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000615c86606083018486615c0f565b6000825161590a81846020870161524d565b600082615dba57615dba615a64565b500690565b61032081016103008085843782018360005b6001811015615df0578151835260209283019290910190600101615dd1565b5050509392505050565b600060208284031215615e0c57600080fd5b815180151581146152ce57600080fd5b600067ffffffffffffffff80841680615e3757615e37615a64565b9216919091049291505056fea264697066735822122041d179d10488eb8aeb9d08ff4b91f7ebb50ba9cfc8c8429a56fa36e75313648564736f6c63430008110033", -} - -// PolygonzkevmABI is the input ABI used to generate the binding from. -// Deprecated: Use PolygonzkevmMetaData.ABI instead. -var PolygonzkevmABI = PolygonzkevmMetaData.ABI - -// PolygonzkevmBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use PolygonzkevmMetaData.Bin instead. -var PolygonzkevmBin = PolygonzkevmMetaData.Bin - -// DeployPolygonzkevm deploys a new Ethereum contract, binding an instance of Polygonzkevm to it. -func DeployPolygonzkevm(auth *bind.TransactOpts, backend bind.ContractBackend, _globalExitRootManager common.Address, _matic common.Address, _rollupVerifier common.Address, _bridgeAddress common.Address, _chainID uint64, _forkID uint64) (common.Address, *types.Transaction, *Polygonzkevm, error) { - parsed, err := PolygonzkevmMetaData.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(PolygonzkevmBin), backend, _globalExitRootManager, _matic, _rollupVerifier, _bridgeAddress, _chainID, _forkID) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Polygonzkevm{PolygonzkevmCaller: PolygonzkevmCaller{contract: contract}, PolygonzkevmTransactor: PolygonzkevmTransactor{contract: contract}, PolygonzkevmFilterer: PolygonzkevmFilterer{contract: contract}}, nil -} - -// Polygonzkevm is an auto generated Go binding around an Ethereum contract. -type Polygonzkevm struct { - PolygonzkevmCaller // Read-only binding to the contract - PolygonzkevmTransactor // Write-only binding to the contract - PolygonzkevmFilterer // Log filterer for contract events -} - -// PolygonzkevmCaller is an auto generated read-only Go binding around an Ethereum contract. -type PolygonzkevmCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmTransactor is an auto generated write-only Go binding around an Ethereum contract. -type PolygonzkevmTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type PolygonzkevmFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type PolygonzkevmSession struct { - Contract *Polygonzkevm // 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 -} - -// PolygonzkevmCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type PolygonzkevmCallerSession struct { - Contract *PolygonzkevmCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// PolygonzkevmTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type PolygonzkevmTransactorSession struct { - Contract *PolygonzkevmTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PolygonzkevmRaw is an auto generated low-level Go binding around an Ethereum contract. -type PolygonzkevmRaw struct { - Contract *Polygonzkevm // Generic contract binding to access the raw methods on -} - -// PolygonzkevmCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type PolygonzkevmCallerRaw struct { - Contract *PolygonzkevmCaller // Generic read-only contract binding to access the raw methods on -} - -// PolygonzkevmTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type PolygonzkevmTransactorRaw struct { - Contract *PolygonzkevmTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewPolygonzkevm creates a new instance of Polygonzkevm, bound to a specific deployed contract. -func NewPolygonzkevm(address common.Address, backend bind.ContractBackend) (*Polygonzkevm, error) { - contract, err := bindPolygonzkevm(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Polygonzkevm{PolygonzkevmCaller: PolygonzkevmCaller{contract: contract}, PolygonzkevmTransactor: PolygonzkevmTransactor{contract: contract}, PolygonzkevmFilterer: PolygonzkevmFilterer{contract: contract}}, nil -} - -// NewPolygonzkevmCaller creates a new read-only instance of Polygonzkevm, bound to a specific deployed contract. -func NewPolygonzkevmCaller(address common.Address, caller bind.ContractCaller) (*PolygonzkevmCaller, error) { - contract, err := bindPolygonzkevm(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &PolygonzkevmCaller{contract: contract}, nil -} - -// NewPolygonzkevmTransactor creates a new write-only instance of Polygonzkevm, bound to a specific deployed contract. -func NewPolygonzkevmTransactor(address common.Address, transactor bind.ContractTransactor) (*PolygonzkevmTransactor, error) { - contract, err := bindPolygonzkevm(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &PolygonzkevmTransactor{contract: contract}, nil -} - -// NewPolygonzkevmFilterer creates a new log filterer instance of Polygonzkevm, bound to a specific deployed contract. -func NewPolygonzkevmFilterer(address common.Address, filterer bind.ContractFilterer) (*PolygonzkevmFilterer, error) { - contract, err := bindPolygonzkevm(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &PolygonzkevmFilterer{contract: contract}, nil -} - -// bindPolygonzkevm binds a generic wrapper to an already deployed contract. -func bindPolygonzkevm(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := PolygonzkevmMetaData.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 (_Polygonzkevm *PolygonzkevmRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Polygonzkevm.Contract.PolygonzkevmCaller.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 (_Polygonzkevm *PolygonzkevmRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.Contract.PolygonzkevmTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Polygonzkevm *PolygonzkevmRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Polygonzkevm.Contract.PolygonzkevmTransactor.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 (_Polygonzkevm *PolygonzkevmCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Polygonzkevm.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 (_Polygonzkevm *PolygonzkevmTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Polygonzkevm *PolygonzkevmTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Polygonzkevm.Contract.contract.Transact(opts, method, params...) -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) Admin(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "admin") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) Admin() (common.Address, error) { - return _Polygonzkevm.Contract.Admin(&_Polygonzkevm.CallOpts) -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) Admin() (common.Address, error) { - return _Polygonzkevm.Contract.Admin(&_Polygonzkevm.CallOpts) -} - -// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. -// -// Solidity: function batchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCaller) BatchFee(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "batchFee") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. -// -// Solidity: function batchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmSession) BatchFee() (*big.Int, error) { - return _Polygonzkevm.Contract.BatchFee(&_Polygonzkevm.CallOpts) -} - -// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. -// -// Solidity: function batchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCallerSession) BatchFee() (*big.Int, error) { - return _Polygonzkevm.Contract.BatchFee(&_Polygonzkevm.CallOpts) -} - -// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. -// -// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmCaller) BatchNumToStateRoot(opts *bind.CallOpts, arg0 uint64) ([32]byte, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "batchNumToStateRoot", arg0) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. -// -// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmSession) BatchNumToStateRoot(arg0 uint64) ([32]byte, error) { - return _Polygonzkevm.Contract.BatchNumToStateRoot(&_Polygonzkevm.CallOpts, arg0) -} - -// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. -// -// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmCallerSession) BatchNumToStateRoot(arg0 uint64) ([32]byte, error) { - return _Polygonzkevm.Contract.BatchNumToStateRoot(&_Polygonzkevm.CallOpts, arg0) -} - -// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. -// -// Solidity: function bridgeAddress() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) BridgeAddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "bridgeAddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. -// -// Solidity: function bridgeAddress() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) BridgeAddress() (common.Address, error) { - return _Polygonzkevm.Contract.BridgeAddress(&_Polygonzkevm.CallOpts) -} - -// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. -// -// Solidity: function bridgeAddress() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) BridgeAddress() (common.Address, error) { - return _Polygonzkevm.Contract.BridgeAddress(&_Polygonzkevm.CallOpts) -} - -// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. -// -// Solidity: function calculateRewardPerBatch() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCaller) CalculateRewardPerBatch(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "calculateRewardPerBatch") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. -// -// Solidity: function calculateRewardPerBatch() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmSession) CalculateRewardPerBatch() (*big.Int, error) { - return _Polygonzkevm.Contract.CalculateRewardPerBatch(&_Polygonzkevm.CallOpts) -} - -// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. -// -// Solidity: function calculateRewardPerBatch() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCallerSession) CalculateRewardPerBatch() (*big.Int, error) { - return _Polygonzkevm.Contract.CalculateRewardPerBatch(&_Polygonzkevm.CallOpts) -} - -// ChainID is a free data retrieval call binding the contract method 0xadc879e9. -// -// Solidity: function chainID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) ChainID(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "chainID") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// ChainID is a free data retrieval call binding the contract method 0xadc879e9. -// -// Solidity: function chainID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) ChainID() (uint64, error) { - return _Polygonzkevm.Contract.ChainID(&_Polygonzkevm.CallOpts) -} - -// ChainID is a free data retrieval call binding the contract method 0xadc879e9. -// -// Solidity: function chainID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) ChainID() (uint64, error) { - return _Polygonzkevm.Contract.ChainID(&_Polygonzkevm.CallOpts) -} - -// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. -// -// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) -func (_Polygonzkevm *PolygonzkevmCaller) CheckStateRootInsidePrime(opts *bind.CallOpts, newStateRoot *big.Int) (bool, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "checkStateRootInsidePrime", newStateRoot) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. -// -// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) -func (_Polygonzkevm *PolygonzkevmSession) CheckStateRootInsidePrime(newStateRoot *big.Int) (bool, error) { - return _Polygonzkevm.Contract.CheckStateRootInsidePrime(&_Polygonzkevm.CallOpts, newStateRoot) -} - -// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. -// -// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) -func (_Polygonzkevm *PolygonzkevmCallerSession) CheckStateRootInsidePrime(newStateRoot *big.Int) (bool, error) { - return _Polygonzkevm.Contract.CheckStateRootInsidePrime(&_Polygonzkevm.CallOpts, newStateRoot) -} - -// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. -// -// Solidity: function forceBatchTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) ForceBatchTimeout(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "forceBatchTimeout") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. -// -// Solidity: function forceBatchTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) ForceBatchTimeout() (uint64, error) { - return _Polygonzkevm.Contract.ForceBatchTimeout(&_Polygonzkevm.CallOpts) -} - -// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. -// -// Solidity: function forceBatchTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) ForceBatchTimeout() (uint64, error) { - return _Polygonzkevm.Contract.ForceBatchTimeout(&_Polygonzkevm.CallOpts) -} - -// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. -// -// Solidity: function forcedBatches(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmCaller) ForcedBatches(opts *bind.CallOpts, arg0 uint64) ([32]byte, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "forcedBatches", arg0) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. -// -// Solidity: function forcedBatches(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmSession) ForcedBatches(arg0 uint64) ([32]byte, error) { - return _Polygonzkevm.Contract.ForcedBatches(&_Polygonzkevm.CallOpts, arg0) -} - -// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. -// -// Solidity: function forcedBatches(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmCallerSession) ForcedBatches(arg0 uint64) ([32]byte, error) { - return _Polygonzkevm.Contract.ForcedBatches(&_Polygonzkevm.CallOpts, arg0) -} - -// ForkID is a free data retrieval call binding the contract method 0x831c7ead. -// -// Solidity: function forkID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) ForkID(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "forkID") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// ForkID is a free data retrieval call binding the contract method 0x831c7ead. -// -// Solidity: function forkID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) ForkID() (uint64, error) { - return _Polygonzkevm.Contract.ForkID(&_Polygonzkevm.CallOpts) -} - -// ForkID is a free data retrieval call binding the contract method 0x831c7ead. -// -// Solidity: function forkID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) ForkID() (uint64, error) { - return _Polygonzkevm.Contract.ForkID(&_Polygonzkevm.CallOpts) -} - -// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. -// -// Solidity: function getForcedBatchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCaller) GetForcedBatchFee(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "getForcedBatchFee") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. -// -// Solidity: function getForcedBatchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmSession) GetForcedBatchFee() (*big.Int, error) { - return _Polygonzkevm.Contract.GetForcedBatchFee(&_Polygonzkevm.CallOpts) -} - -// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. -// -// Solidity: function getForcedBatchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCallerSession) GetForcedBatchFee() (*big.Int, error) { - return _Polygonzkevm.Contract.GetForcedBatchFee(&_Polygonzkevm.CallOpts) -} - -// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. -// -// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) -func (_Polygonzkevm *PolygonzkevmCaller) GetInputSnarkBytes(opts *bind.CallOpts, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "getInputSnarkBytes", initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. -// -// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) -func (_Polygonzkevm *PolygonzkevmSession) GetInputSnarkBytes(initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { - return _Polygonzkevm.Contract.GetInputSnarkBytes(&_Polygonzkevm.CallOpts, initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) -} - -// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. -// -// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) -func (_Polygonzkevm *PolygonzkevmCallerSession) GetInputSnarkBytes(initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { - return _Polygonzkevm.Contract.GetInputSnarkBytes(&_Polygonzkevm.CallOpts, initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) -} - -// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. -// -// Solidity: function getLastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) GetLastVerifiedBatch(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "getLastVerifiedBatch") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. -// -// Solidity: function getLastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) GetLastVerifiedBatch() (uint64, error) { - return _Polygonzkevm.Contract.GetLastVerifiedBatch(&_Polygonzkevm.CallOpts) -} - -// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. -// -// Solidity: function getLastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) GetLastVerifiedBatch() (uint64, error) { - return _Polygonzkevm.Contract.GetLastVerifiedBatch(&_Polygonzkevm.CallOpts) -} - -// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. -// -// Solidity: function globalExitRootManager() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) GlobalExitRootManager(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "globalExitRootManager") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. -// -// Solidity: function globalExitRootManager() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) GlobalExitRootManager() (common.Address, error) { - return _Polygonzkevm.Contract.GlobalExitRootManager(&_Polygonzkevm.CallOpts) -} - -// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. -// -// Solidity: function globalExitRootManager() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) GlobalExitRootManager() (common.Address, error) { - return _Polygonzkevm.Contract.GlobalExitRootManager(&_Polygonzkevm.CallOpts) -} - -// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. -// -// Solidity: function isEmergencyState() view returns(bool) -func (_Polygonzkevm *PolygonzkevmCaller) IsEmergencyState(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "isEmergencyState") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. -// -// Solidity: function isEmergencyState() view returns(bool) -func (_Polygonzkevm *PolygonzkevmSession) IsEmergencyState() (bool, error) { - return _Polygonzkevm.Contract.IsEmergencyState(&_Polygonzkevm.CallOpts) -} - -// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. -// -// Solidity: function isEmergencyState() view returns(bool) -func (_Polygonzkevm *PolygonzkevmCallerSession) IsEmergencyState() (bool, error) { - return _Polygonzkevm.Contract.IsEmergencyState(&_Polygonzkevm.CallOpts) -} - -// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. -// -// Solidity: function isForcedBatchDisallowed() view returns(bool) -func (_Polygonzkevm *PolygonzkevmCaller) IsForcedBatchDisallowed(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "isForcedBatchDisallowed") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. -// -// Solidity: function isForcedBatchDisallowed() view returns(bool) -func (_Polygonzkevm *PolygonzkevmSession) IsForcedBatchDisallowed() (bool, error) { - return _Polygonzkevm.Contract.IsForcedBatchDisallowed(&_Polygonzkevm.CallOpts) -} - -// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. -// -// Solidity: function isForcedBatchDisallowed() view returns(bool) -func (_Polygonzkevm *PolygonzkevmCallerSession) IsForcedBatchDisallowed() (bool, error) { - return _Polygonzkevm.Contract.IsForcedBatchDisallowed(&_Polygonzkevm.CallOpts) -} - -// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. -// -// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) -func (_Polygonzkevm *PolygonzkevmCaller) IsPendingStateConsolidable(opts *bind.CallOpts, pendingStateNum uint64) (bool, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "isPendingStateConsolidable", pendingStateNum) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. -// -// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) -func (_Polygonzkevm *PolygonzkevmSession) IsPendingStateConsolidable(pendingStateNum uint64) (bool, error) { - return _Polygonzkevm.Contract.IsPendingStateConsolidable(&_Polygonzkevm.CallOpts, pendingStateNum) -} - -// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. -// -// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) -func (_Polygonzkevm *PolygonzkevmCallerSession) IsPendingStateConsolidable(pendingStateNum uint64) (bool, error) { - return _Polygonzkevm.Contract.IsPendingStateConsolidable(&_Polygonzkevm.CallOpts, pendingStateNum) -} - -// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. -// -// Solidity: function lastBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastBatchSequenced(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastBatchSequenced") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. -// -// Solidity: function lastBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastBatchSequenced() (uint64, error) { - return _Polygonzkevm.Contract.LastBatchSequenced(&_Polygonzkevm.CallOpts) -} - -// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. -// -// Solidity: function lastBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastBatchSequenced() (uint64, error) { - return _Polygonzkevm.Contract.LastBatchSequenced(&_Polygonzkevm.CallOpts) -} - -// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. -// -// Solidity: function lastForceBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastForceBatch(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastForceBatch") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. -// -// Solidity: function lastForceBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastForceBatch() (uint64, error) { - return _Polygonzkevm.Contract.LastForceBatch(&_Polygonzkevm.CallOpts) -} - -// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. -// -// Solidity: function lastForceBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastForceBatch() (uint64, error) { - return _Polygonzkevm.Contract.LastForceBatch(&_Polygonzkevm.CallOpts) -} - -// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. -// -// Solidity: function lastForceBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastForceBatchSequenced(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastForceBatchSequenced") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. -// -// Solidity: function lastForceBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastForceBatchSequenced() (uint64, error) { - return _Polygonzkevm.Contract.LastForceBatchSequenced(&_Polygonzkevm.CallOpts) -} - -// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. -// -// Solidity: function lastForceBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastForceBatchSequenced() (uint64, error) { - return _Polygonzkevm.Contract.LastForceBatchSequenced(&_Polygonzkevm.CallOpts) -} - -// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. -// -// Solidity: function lastPendingState() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastPendingState(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastPendingState") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. -// -// Solidity: function lastPendingState() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastPendingState() (uint64, error) { - return _Polygonzkevm.Contract.LastPendingState(&_Polygonzkevm.CallOpts) -} - -// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. -// -// Solidity: function lastPendingState() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastPendingState() (uint64, error) { - return _Polygonzkevm.Contract.LastPendingState(&_Polygonzkevm.CallOpts) -} - -// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. -// -// Solidity: function lastPendingStateConsolidated() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastPendingStateConsolidated(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastPendingStateConsolidated") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. -// -// Solidity: function lastPendingStateConsolidated() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastPendingStateConsolidated() (uint64, error) { - return _Polygonzkevm.Contract.LastPendingStateConsolidated(&_Polygonzkevm.CallOpts) -} - -// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. -// -// Solidity: function lastPendingStateConsolidated() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastPendingStateConsolidated() (uint64, error) { - return _Polygonzkevm.Contract.LastPendingStateConsolidated(&_Polygonzkevm.CallOpts) -} - -// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. -// -// Solidity: function lastTimestamp() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastTimestamp(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastTimestamp") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. -// -// Solidity: function lastTimestamp() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastTimestamp() (uint64, error) { - return _Polygonzkevm.Contract.LastTimestamp(&_Polygonzkevm.CallOpts) -} - -// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. -// -// Solidity: function lastTimestamp() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastTimestamp() (uint64, error) { - return _Polygonzkevm.Contract.LastTimestamp(&_Polygonzkevm.CallOpts) -} - -// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. -// -// Solidity: function lastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastVerifiedBatch(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastVerifiedBatch") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. -// -// Solidity: function lastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastVerifiedBatch() (uint64, error) { - return _Polygonzkevm.Contract.LastVerifiedBatch(&_Polygonzkevm.CallOpts) -} - -// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. -// -// Solidity: function lastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastVerifiedBatch() (uint64, error) { - return _Polygonzkevm.Contract.LastVerifiedBatch(&_Polygonzkevm.CallOpts) -} - -// Matic is a free data retrieval call binding the contract method 0xb6b0b097. -// -// Solidity: function matic() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) Matic(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "matic") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Matic is a free data retrieval call binding the contract method 0xb6b0b097. -// -// Solidity: function matic() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) Matic() (common.Address, error) { - return _Polygonzkevm.Contract.Matic(&_Polygonzkevm.CallOpts) -} - -// Matic is a free data retrieval call binding the contract method 0xb6b0b097. -// -// Solidity: function matic() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) Matic() (common.Address, error) { - return _Polygonzkevm.Contract.Matic(&_Polygonzkevm.CallOpts) -} - -// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. -// -// Solidity: function multiplierBatchFee() view returns(uint16) -func (_Polygonzkevm *PolygonzkevmCaller) MultiplierBatchFee(opts *bind.CallOpts) (uint16, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "multiplierBatchFee") - - if err != nil { - return *new(uint16), err - } - - out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) - - return out0, err - -} - -// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. -// -// Solidity: function multiplierBatchFee() view returns(uint16) -func (_Polygonzkevm *PolygonzkevmSession) MultiplierBatchFee() (uint16, error) { - return _Polygonzkevm.Contract.MultiplierBatchFee(&_Polygonzkevm.CallOpts) -} - -// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. -// -// Solidity: function multiplierBatchFee() view returns(uint16) -func (_Polygonzkevm *PolygonzkevmCallerSession) MultiplierBatchFee() (uint16, error) { - return _Polygonzkevm.Contract.MultiplierBatchFee(&_Polygonzkevm.CallOpts) -} - -// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. -// -// Solidity: function networkName() view returns(string) -func (_Polygonzkevm *PolygonzkevmCaller) NetworkName(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "networkName") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. -// -// Solidity: function networkName() view returns(string) -func (_Polygonzkevm *PolygonzkevmSession) NetworkName() (string, error) { - return _Polygonzkevm.Contract.NetworkName(&_Polygonzkevm.CallOpts) -} - -// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. -// -// Solidity: function networkName() view returns(string) -func (_Polygonzkevm *PolygonzkevmCallerSession) NetworkName() (string, error) { - return _Polygonzkevm.Contract.NetworkName(&_Polygonzkevm.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) Owner() (common.Address, error) { - return _Polygonzkevm.Contract.Owner(&_Polygonzkevm.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) Owner() (common.Address, error) { - return _Polygonzkevm.Contract.Owner(&_Polygonzkevm.CallOpts) -} - -// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. -// -// Solidity: function pendingAdmin() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) PendingAdmin(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "pendingAdmin") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. -// -// Solidity: function pendingAdmin() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) PendingAdmin() (common.Address, error) { - return _Polygonzkevm.Contract.PendingAdmin(&_Polygonzkevm.CallOpts) -} - -// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. -// -// Solidity: function pendingAdmin() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) PendingAdmin() (common.Address, error) { - return _Polygonzkevm.Contract.PendingAdmin(&_Polygonzkevm.CallOpts) -} - -// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. -// -// Solidity: function pendingStateTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) PendingStateTimeout(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "pendingStateTimeout") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. -// -// Solidity: function pendingStateTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) PendingStateTimeout() (uint64, error) { - return _Polygonzkevm.Contract.PendingStateTimeout(&_Polygonzkevm.CallOpts) -} - -// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. -// -// Solidity: function pendingStateTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) PendingStateTimeout() (uint64, error) { - return _Polygonzkevm.Contract.PendingStateTimeout(&_Polygonzkevm.CallOpts) -} - -// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. -// -// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) -func (_Polygonzkevm *PolygonzkevmCaller) PendingStateTransitions(opts *bind.CallOpts, arg0 *big.Int) (struct { - Timestamp uint64 - LastVerifiedBatch uint64 - ExitRoot [32]byte - StateRoot [32]byte -}, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "pendingStateTransitions", arg0) - - outstruct := new(struct { - Timestamp uint64 - LastVerifiedBatch uint64 - ExitRoot [32]byte - StateRoot [32]byte - }) - if err != nil { - return *outstruct, err - } - - outstruct.Timestamp = *abi.ConvertType(out[0], new(uint64)).(*uint64) - outstruct.LastVerifiedBatch = *abi.ConvertType(out[1], new(uint64)).(*uint64) - outstruct.ExitRoot = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte) - outstruct.StateRoot = *abi.ConvertType(out[3], new([32]byte)).(*[32]byte) - - return *outstruct, err - -} - -// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. -// -// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) -func (_Polygonzkevm *PolygonzkevmSession) PendingStateTransitions(arg0 *big.Int) (struct { - Timestamp uint64 - LastVerifiedBatch uint64 - ExitRoot [32]byte - StateRoot [32]byte -}, error) { - return _Polygonzkevm.Contract.PendingStateTransitions(&_Polygonzkevm.CallOpts, arg0) -} - -// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. -// -// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) -func (_Polygonzkevm *PolygonzkevmCallerSession) PendingStateTransitions(arg0 *big.Int) (struct { - Timestamp uint64 - LastVerifiedBatch uint64 - ExitRoot [32]byte - StateRoot [32]byte -}, error) { - return _Polygonzkevm.Contract.PendingStateTransitions(&_Polygonzkevm.CallOpts, arg0) -} - -// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. -// -// Solidity: function rollupVerifier() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) RollupVerifier(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "rollupVerifier") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. -// -// Solidity: function rollupVerifier() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) RollupVerifier() (common.Address, error) { - return _Polygonzkevm.Contract.RollupVerifier(&_Polygonzkevm.CallOpts) -} - -// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. -// -// Solidity: function rollupVerifier() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) RollupVerifier() (common.Address, error) { - return _Polygonzkevm.Contract.RollupVerifier(&_Polygonzkevm.CallOpts) -} - -// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. -// -// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) -func (_Polygonzkevm *PolygonzkevmCaller) SequencedBatches(opts *bind.CallOpts, arg0 uint64) (struct { - AccInputHash [32]byte - SequencedTimestamp uint64 - PreviousLastBatchSequenced uint64 -}, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "sequencedBatches", arg0) - - outstruct := new(struct { - AccInputHash [32]byte - SequencedTimestamp uint64 - PreviousLastBatchSequenced uint64 - }) - if err != nil { - return *outstruct, err - } - - outstruct.AccInputHash = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - outstruct.SequencedTimestamp = *abi.ConvertType(out[1], new(uint64)).(*uint64) - outstruct.PreviousLastBatchSequenced = *abi.ConvertType(out[2], new(uint64)).(*uint64) - - return *outstruct, err - -} - -// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. -// -// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) -func (_Polygonzkevm *PolygonzkevmSession) SequencedBatches(arg0 uint64) (struct { - AccInputHash [32]byte - SequencedTimestamp uint64 - PreviousLastBatchSequenced uint64 -}, error) { - return _Polygonzkevm.Contract.SequencedBatches(&_Polygonzkevm.CallOpts, arg0) -} - -// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. -// -// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) -func (_Polygonzkevm *PolygonzkevmCallerSession) SequencedBatches(arg0 uint64) (struct { - AccInputHash [32]byte - SequencedTimestamp uint64 - PreviousLastBatchSequenced uint64 -}, error) { - return _Polygonzkevm.Contract.SequencedBatches(&_Polygonzkevm.CallOpts, arg0) -} - -// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. -// -// Solidity: function trustedAggregator() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) TrustedAggregator(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "trustedAggregator") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. -// -// Solidity: function trustedAggregator() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) TrustedAggregator() (common.Address, error) { - return _Polygonzkevm.Contract.TrustedAggregator(&_Polygonzkevm.CallOpts) -} - -// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. -// -// Solidity: function trustedAggregator() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) TrustedAggregator() (common.Address, error) { - return _Polygonzkevm.Contract.TrustedAggregator(&_Polygonzkevm.CallOpts) -} - -// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. -// -// Solidity: function trustedAggregatorTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) TrustedAggregatorTimeout(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "trustedAggregatorTimeout") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. -// -// Solidity: function trustedAggregatorTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) TrustedAggregatorTimeout() (uint64, error) { - return _Polygonzkevm.Contract.TrustedAggregatorTimeout(&_Polygonzkevm.CallOpts) -} - -// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. -// -// Solidity: function trustedAggregatorTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) TrustedAggregatorTimeout() (uint64, error) { - return _Polygonzkevm.Contract.TrustedAggregatorTimeout(&_Polygonzkevm.CallOpts) -} - -// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. -// -// Solidity: function trustedSequencer() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) TrustedSequencer(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "trustedSequencer") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. -// -// Solidity: function trustedSequencer() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) TrustedSequencer() (common.Address, error) { - return _Polygonzkevm.Contract.TrustedSequencer(&_Polygonzkevm.CallOpts) -} - -// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. -// -// Solidity: function trustedSequencer() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) TrustedSequencer() (common.Address, error) { - return _Polygonzkevm.Contract.TrustedSequencer(&_Polygonzkevm.CallOpts) -} - -// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. -// -// Solidity: function trustedSequencerURL() view returns(string) -func (_Polygonzkevm *PolygonzkevmCaller) TrustedSequencerURL(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "trustedSequencerURL") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. -// -// Solidity: function trustedSequencerURL() view returns(string) -func (_Polygonzkevm *PolygonzkevmSession) TrustedSequencerURL() (string, error) { - return _Polygonzkevm.Contract.TrustedSequencerURL(&_Polygonzkevm.CallOpts) -} - -// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. -// -// Solidity: function trustedSequencerURL() view returns(string) -func (_Polygonzkevm *PolygonzkevmCallerSession) TrustedSequencerURL() (string, error) { - return _Polygonzkevm.Contract.TrustedSequencerURL(&_Polygonzkevm.CallOpts) -} - -// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. -// -// Solidity: function verifyBatchTimeTarget() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) VerifyBatchTimeTarget(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "verifyBatchTimeTarget") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. -// -// Solidity: function verifyBatchTimeTarget() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) VerifyBatchTimeTarget() (uint64, error) { - return _Polygonzkevm.Contract.VerifyBatchTimeTarget(&_Polygonzkevm.CallOpts) -} - -// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. -// -// Solidity: function verifyBatchTimeTarget() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) VerifyBatchTimeTarget() (uint64, error) { - return _Polygonzkevm.Contract.VerifyBatchTimeTarget(&_Polygonzkevm.CallOpts) -} - -// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. -// -// Solidity: function acceptAdminRole() returns() -func (_Polygonzkevm *PolygonzkevmTransactor) AcceptAdminRole(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "acceptAdminRole") -} - -// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. -// -// Solidity: function acceptAdminRole() returns() -func (_Polygonzkevm *PolygonzkevmSession) AcceptAdminRole() (*types.Transaction, error) { - return _Polygonzkevm.Contract.AcceptAdminRole(&_Polygonzkevm.TransactOpts) -} - -// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. -// -// Solidity: function acceptAdminRole() returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) AcceptAdminRole() (*types.Transaction, error) { - return _Polygonzkevm.Contract.AcceptAdminRole(&_Polygonzkevm.TransactOpts) -} - -// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. -// -// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ActivateEmergencyState(opts *bind.TransactOpts, sequencedBatchNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "activateEmergencyState", sequencedBatchNum) -} - -// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. -// -// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() -func (_Polygonzkevm *PolygonzkevmSession) ActivateEmergencyState(sequencedBatchNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ActivateEmergencyState(&_Polygonzkevm.TransactOpts, sequencedBatchNum) -} - -// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. -// -// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ActivateEmergencyState(sequencedBatchNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ActivateEmergencyState(&_Polygonzkevm.TransactOpts, sequencedBatchNum) -} - -// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. -// -// Solidity: function activateForceBatches() returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ActivateForceBatches(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "activateForceBatches") -} - -// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. -// -// Solidity: function activateForceBatches() returns() -func (_Polygonzkevm *PolygonzkevmSession) ActivateForceBatches() (*types.Transaction, error) { - return _Polygonzkevm.Contract.ActivateForceBatches(&_Polygonzkevm.TransactOpts) -} - -// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. -// -// Solidity: function activateForceBatches() returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ActivateForceBatches() (*types.Transaction, error) { - return _Polygonzkevm.Contract.ActivateForceBatches(&_Polygonzkevm.TransactOpts) -} - -// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. -// -// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ConsolidatePendingState(opts *bind.TransactOpts, pendingStateNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "consolidatePendingState", pendingStateNum) -} - -// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. -// -// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() -func (_Polygonzkevm *PolygonzkevmSession) ConsolidatePendingState(pendingStateNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ConsolidatePendingState(&_Polygonzkevm.TransactOpts, pendingStateNum) -} - -// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. -// -// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ConsolidatePendingState(pendingStateNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ConsolidatePendingState(&_Polygonzkevm.TransactOpts, pendingStateNum) -} - -// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. -// -// Solidity: function deactivateEmergencyState() returns() -func (_Polygonzkevm *PolygonzkevmTransactor) DeactivateEmergencyState(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "deactivateEmergencyState") -} - -// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. -// -// Solidity: function deactivateEmergencyState() returns() -func (_Polygonzkevm *PolygonzkevmSession) DeactivateEmergencyState() (*types.Transaction, error) { - return _Polygonzkevm.Contract.DeactivateEmergencyState(&_Polygonzkevm.TransactOpts) -} - -// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. -// -// Solidity: function deactivateEmergencyState() returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) DeactivateEmergencyState() (*types.Transaction, error) { - return _Polygonzkevm.Contract.DeactivateEmergencyState(&_Polygonzkevm.TransactOpts) -} - -// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. -// -// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ForceBatch(opts *bind.TransactOpts, transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "forceBatch", transactions, maticAmount) -} - -// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. -// -// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() -func (_Polygonzkevm *PolygonzkevmSession) ForceBatch(transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ForceBatch(&_Polygonzkevm.TransactOpts, transactions, maticAmount) -} - -// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. -// -// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ForceBatch(transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ForceBatch(&_Polygonzkevm.TransactOpts, transactions, maticAmount) -} - -// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. -// -// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) Initialize(opts *bind.TransactOpts, initializePackedParameters PolygonZkEVMInitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "initialize", initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) -} - -// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. -// -// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() -func (_Polygonzkevm *PolygonzkevmSession) Initialize(initializePackedParameters PolygonZkEVMInitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { - return _Polygonzkevm.Contract.Initialize(&_Polygonzkevm.TransactOpts, initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) -} - -// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. -// -// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) Initialize(initializePackedParameters PolygonZkEVMInitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { - return _Polygonzkevm.Contract.Initialize(&_Polygonzkevm.TransactOpts, initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) -} - -// OverridePendingState is a paid mutator transaction binding the contract method 0x2c1f816a. -// -// 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) -} - -// OverridePendingState is a paid mutator transaction binding the contract method 0x2c1f816a. -// -// 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) -} - -// OverridePendingState is a paid mutator transaction binding the contract method 0x2c1f816a. -// -// 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) -} - -// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x9aa972a3. -// -// 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) -} - -// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x9aa972a3. -// -// 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) -} - -// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x9aa972a3. -// -// 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) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Polygonzkevm *PolygonzkevmTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Polygonzkevm *PolygonzkevmSession) RenounceOwnership() (*types.Transaction, error) { - return _Polygonzkevm.Contract.RenounceOwnership(&_Polygonzkevm.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _Polygonzkevm.Contract.RenounceOwnership(&_Polygonzkevm.TransactOpts) -} - -// SequenceBatches is a paid mutator transaction binding the contract method 0x5e9145c9. -// -// Solidity: function sequenceBatches((bytes,bytes32,uint64,uint64)[] batches, address l2Coinbase) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SequenceBatches(opts *bind.TransactOpts, batches []PolygonZkEVMBatchData, l2Coinbase common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "sequenceBatches", batches, l2Coinbase) -} - -// SequenceBatches is a paid mutator transaction binding the contract method 0x5e9145c9. -// -// Solidity: function sequenceBatches((bytes,bytes32,uint64,uint64)[] batches, address l2Coinbase) returns() -func (_Polygonzkevm *PolygonzkevmSession) SequenceBatches(batches []PolygonZkEVMBatchData, l2Coinbase common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SequenceBatches(&_Polygonzkevm.TransactOpts, batches, l2Coinbase) -} - -// SequenceBatches is a paid mutator transaction binding the contract method 0x5e9145c9. -// -// Solidity: function sequenceBatches((bytes,bytes32,uint64,uint64)[] batches, address l2Coinbase) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SequenceBatches(batches []PolygonZkEVMBatchData, l2Coinbase common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SequenceBatches(&_Polygonzkevm.TransactOpts, batches, l2Coinbase) -} - -// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. -// -// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SequenceForceBatches(opts *bind.TransactOpts, batches []PolygonZkEVMForcedBatchData) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "sequenceForceBatches", batches) -} - -// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. -// -// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() -func (_Polygonzkevm *PolygonzkevmSession) SequenceForceBatches(batches []PolygonZkEVMForcedBatchData) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SequenceForceBatches(&_Polygonzkevm.TransactOpts, batches) -} - -// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. -// -// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SequenceForceBatches(batches []PolygonZkEVMForcedBatchData) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SequenceForceBatches(&_Polygonzkevm.TransactOpts, batches) -} - -// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. -// -// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetForceBatchTimeout(opts *bind.TransactOpts, newforceBatchTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setForceBatchTimeout", newforceBatchTimeout) -} - -// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. -// -// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetForceBatchTimeout(newforceBatchTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetForceBatchTimeout(&_Polygonzkevm.TransactOpts, newforceBatchTimeout) -} - -// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. -// -// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetForceBatchTimeout(newforceBatchTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetForceBatchTimeout(&_Polygonzkevm.TransactOpts, newforceBatchTimeout) -} - -// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. -// -// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetMultiplierBatchFee(opts *bind.TransactOpts, newMultiplierBatchFee uint16) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setMultiplierBatchFee", newMultiplierBatchFee) -} - -// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. -// -// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetMultiplierBatchFee(newMultiplierBatchFee uint16) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetMultiplierBatchFee(&_Polygonzkevm.TransactOpts, newMultiplierBatchFee) -} - -// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. -// -// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetMultiplierBatchFee(newMultiplierBatchFee uint16) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetMultiplierBatchFee(&_Polygonzkevm.TransactOpts, newMultiplierBatchFee) -} - -// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. -// -// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetPendingStateTimeout(opts *bind.TransactOpts, newPendingStateTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setPendingStateTimeout", newPendingStateTimeout) -} - -// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. -// -// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetPendingStateTimeout(newPendingStateTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetPendingStateTimeout(&_Polygonzkevm.TransactOpts, newPendingStateTimeout) -} - -// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. -// -// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetPendingStateTimeout(newPendingStateTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetPendingStateTimeout(&_Polygonzkevm.TransactOpts, newPendingStateTimeout) -} - -// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. -// -// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetTrustedAggregator(opts *bind.TransactOpts, newTrustedAggregator common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setTrustedAggregator", newTrustedAggregator) -} - -// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. -// -// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetTrustedAggregator(newTrustedAggregator common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedAggregator(&_Polygonzkevm.TransactOpts, newTrustedAggregator) -} - -// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. -// -// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetTrustedAggregator(newTrustedAggregator common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedAggregator(&_Polygonzkevm.TransactOpts, newTrustedAggregator) -} - -// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. -// -// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetTrustedAggregatorTimeout(opts *bind.TransactOpts, newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setTrustedAggregatorTimeout", newTrustedAggregatorTimeout) -} - -// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. -// -// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetTrustedAggregatorTimeout(newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedAggregatorTimeout(&_Polygonzkevm.TransactOpts, newTrustedAggregatorTimeout) -} - -// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. -// -// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetTrustedAggregatorTimeout(newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedAggregatorTimeout(&_Polygonzkevm.TransactOpts, newTrustedAggregatorTimeout) -} - -// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. -// -// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetTrustedSequencer(opts *bind.TransactOpts, newTrustedSequencer common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setTrustedSequencer", newTrustedSequencer) -} - -// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. -// -// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetTrustedSequencer(newTrustedSequencer common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedSequencer(&_Polygonzkevm.TransactOpts, newTrustedSequencer) -} - -// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. -// -// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetTrustedSequencer(newTrustedSequencer common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedSequencer(&_Polygonzkevm.TransactOpts, newTrustedSequencer) -} - -// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. -// -// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetTrustedSequencerURL(opts *bind.TransactOpts, newTrustedSequencerURL string) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setTrustedSequencerURL", newTrustedSequencerURL) -} - -// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. -// -// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetTrustedSequencerURL(newTrustedSequencerURL string) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedSequencerURL(&_Polygonzkevm.TransactOpts, newTrustedSequencerURL) -} - -// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. -// -// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetTrustedSequencerURL(newTrustedSequencerURL string) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedSequencerURL(&_Polygonzkevm.TransactOpts, newTrustedSequencerURL) -} - -// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. -// -// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetVerifyBatchTimeTarget(opts *bind.TransactOpts, newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setVerifyBatchTimeTarget", newVerifyBatchTimeTarget) -} - -// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. -// -// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetVerifyBatchTimeTarget(newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetVerifyBatchTimeTarget(&_Polygonzkevm.TransactOpts, newVerifyBatchTimeTarget) -} - -// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. -// -// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetVerifyBatchTimeTarget(newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetVerifyBatchTimeTarget(&_Polygonzkevm.TransactOpts, newVerifyBatchTimeTarget) -} - -// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. -// -// Solidity: function transferAdminRole(address newPendingAdmin) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) TransferAdminRole(opts *bind.TransactOpts, newPendingAdmin common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "transferAdminRole", newPendingAdmin) -} - -// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. -// -// Solidity: function transferAdminRole(address newPendingAdmin) returns() -func (_Polygonzkevm *PolygonzkevmSession) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.TransferAdminRole(&_Polygonzkevm.TransactOpts, newPendingAdmin) -} - -// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. -// -// Solidity: function transferAdminRole(address newPendingAdmin) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.TransferAdminRole(&_Polygonzkevm.TransactOpts, newPendingAdmin) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Polygonzkevm *PolygonzkevmSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.TransferOwnership(&_Polygonzkevm.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.TransferOwnership(&_Polygonzkevm.TransactOpts, newOwner) -} - -// VerifyBatches is a paid mutator transaction binding the contract method 0x621dd411. -// -// 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) -} - -// VerifyBatches is a paid mutator transaction binding the contract method 0x621dd411. -// -// 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) -} - -// VerifyBatches is a paid mutator transaction binding the contract method 0x621dd411. -// -// 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) -} - -// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0x2b0006fa. -// -// 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) -} - -// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0x2b0006fa. -// -// 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) -} - -// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0x2b0006fa. -// -// 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) -} - -// 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. -type PolygonzkevmAcceptAdminRoleIterator struct { - Event *PolygonzkevmAcceptAdminRole // 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 *PolygonzkevmAcceptAdminRoleIterator) 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(PolygonzkevmAcceptAdminRole) - 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(PolygonzkevmAcceptAdminRole) - 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 *PolygonzkevmAcceptAdminRoleIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmAcceptAdminRoleIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmAcceptAdminRole represents a AcceptAdminRole event raised by the Polygonzkevm contract. -type PolygonzkevmAcceptAdminRole struct { - NewAdmin common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAcceptAdminRole is a free log retrieval operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. -// -// Solidity: event AcceptAdminRole(address newAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterAcceptAdminRole(opts *bind.FilterOpts) (*PolygonzkevmAcceptAdminRoleIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "AcceptAdminRole") - if err != nil { - return nil, err - } - return &PolygonzkevmAcceptAdminRoleIterator{contract: _Polygonzkevm.contract, event: "AcceptAdminRole", logs: logs, sub: sub}, nil -} - -// WatchAcceptAdminRole is a free log subscription operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. -// -// Solidity: event AcceptAdminRole(address newAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchAcceptAdminRole(opts *bind.WatchOpts, sink chan<- *PolygonzkevmAcceptAdminRole) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "AcceptAdminRole") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmAcceptAdminRole) - if err := _Polygonzkevm.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseAcceptAdminRole is a log parse operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. -// -// Solidity: event AcceptAdminRole(address newAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseAcceptAdminRole(log types.Log) (*PolygonzkevmAcceptAdminRole, error) { - event := new(PolygonzkevmAcceptAdminRole) - if err := _Polygonzkevm.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmActivateForceBatchesIterator is returned from FilterActivateForceBatches and is used to iterate over the raw logs and unpacked data for ActivateForceBatches events raised by the Polygonzkevm contract. -type PolygonzkevmActivateForceBatchesIterator struct { - Event *PolygonzkevmActivateForceBatches // 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 *PolygonzkevmActivateForceBatchesIterator) 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(PolygonzkevmActivateForceBatches) - 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(PolygonzkevmActivateForceBatches) - 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 *PolygonzkevmActivateForceBatchesIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmActivateForceBatchesIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmActivateForceBatches represents a ActivateForceBatches event raised by the Polygonzkevm contract. -type PolygonzkevmActivateForceBatches struct { - Raw types.Log // Blockchain specific contextual infos -} - -// FilterActivateForceBatches is a free log retrieval operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. -// -// Solidity: event ActivateForceBatches() -func (_Polygonzkevm *PolygonzkevmFilterer) FilterActivateForceBatches(opts *bind.FilterOpts) (*PolygonzkevmActivateForceBatchesIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "ActivateForceBatches") - if err != nil { - return nil, err - } - return &PolygonzkevmActivateForceBatchesIterator{contract: _Polygonzkevm.contract, event: "ActivateForceBatches", logs: logs, sub: sub}, nil -} - -// WatchActivateForceBatches is a free log subscription operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. -// -// Solidity: event ActivateForceBatches() -func (_Polygonzkevm *PolygonzkevmFilterer) WatchActivateForceBatches(opts *bind.WatchOpts, sink chan<- *PolygonzkevmActivateForceBatches) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "ActivateForceBatches") - 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(PolygonzkevmActivateForceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "ActivateForceBatches", 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 -} - -// ParseActivateForceBatches is a log parse operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. -// -// Solidity: event ActivateForceBatches() -func (_Polygonzkevm *PolygonzkevmFilterer) ParseActivateForceBatches(log types.Log) (*PolygonzkevmActivateForceBatches, error) { - event := new(PolygonzkevmActivateForceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "ActivateForceBatches", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmConsolidatePendingStateIterator is returned from FilterConsolidatePendingState and is used to iterate over the raw logs and unpacked data for ConsolidatePendingState events raised by the Polygonzkevm contract. -type PolygonzkevmConsolidatePendingStateIterator struct { - Event *PolygonzkevmConsolidatePendingState // 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 *PolygonzkevmConsolidatePendingStateIterator) 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(PolygonzkevmConsolidatePendingState) - 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(PolygonzkevmConsolidatePendingState) - 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 *PolygonzkevmConsolidatePendingStateIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmConsolidatePendingStateIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmConsolidatePendingState represents a ConsolidatePendingState event raised by the Polygonzkevm contract. -type PolygonzkevmConsolidatePendingState struct { - NumBatch uint64 - StateRoot [32]byte - PendingStateNum uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterConsolidatePendingState is a free log retrieval operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. -// -// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterConsolidatePendingState(opts *bind.FilterOpts, numBatch []uint64, pendingStateNum []uint64) (*PolygonzkevmConsolidatePendingStateIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var pendingStateNumRule []interface{} - for _, pendingStateNumItem := range pendingStateNum { - pendingStateNumRule = append(pendingStateNumRule, pendingStateNumItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "ConsolidatePendingState", numBatchRule, pendingStateNumRule) - if err != nil { - return nil, err - } - return &PolygonzkevmConsolidatePendingStateIterator{contract: _Polygonzkevm.contract, event: "ConsolidatePendingState", logs: logs, sub: sub}, nil -} - -// WatchConsolidatePendingState is a free log subscription operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. -// -// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchConsolidatePendingState(opts *bind.WatchOpts, sink chan<- *PolygonzkevmConsolidatePendingState, numBatch []uint64, pendingStateNum []uint64) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var pendingStateNumRule []interface{} - for _, pendingStateNumItem := range pendingStateNum { - pendingStateNumRule = append(pendingStateNumRule, pendingStateNumItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "ConsolidatePendingState", numBatchRule, pendingStateNumRule) - 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(PolygonzkevmConsolidatePendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "ConsolidatePendingState", 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 -} - -// ParseConsolidatePendingState is a log parse operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. -// -// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseConsolidatePendingState(log types.Log) (*PolygonzkevmConsolidatePendingState, error) { - event := new(PolygonzkevmConsolidatePendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "ConsolidatePendingState", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmEmergencyStateActivatedIterator is returned from FilterEmergencyStateActivated and is used to iterate over the raw logs and unpacked data for EmergencyStateActivated events raised by the Polygonzkevm contract. -type PolygonzkevmEmergencyStateActivatedIterator struct { - Event *PolygonzkevmEmergencyStateActivated // 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 *PolygonzkevmEmergencyStateActivatedIterator) 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(PolygonzkevmEmergencyStateActivated) - 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(PolygonzkevmEmergencyStateActivated) - 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 *PolygonzkevmEmergencyStateActivatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmEmergencyStateActivatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmEmergencyStateActivated represents a EmergencyStateActivated event raised by the Polygonzkevm contract. -type PolygonzkevmEmergencyStateActivated struct { - Raw types.Log // Blockchain specific contextual infos -} - -// FilterEmergencyStateActivated is a free log retrieval operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. -// -// Solidity: event EmergencyStateActivated() -func (_Polygonzkevm *PolygonzkevmFilterer) FilterEmergencyStateActivated(opts *bind.FilterOpts) (*PolygonzkevmEmergencyStateActivatedIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "EmergencyStateActivated") - if err != nil { - return nil, err - } - return &PolygonzkevmEmergencyStateActivatedIterator{contract: _Polygonzkevm.contract, event: "EmergencyStateActivated", logs: logs, sub: sub}, nil -} - -// WatchEmergencyStateActivated is a free log subscription operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. -// -// Solidity: event EmergencyStateActivated() -func (_Polygonzkevm *PolygonzkevmFilterer) WatchEmergencyStateActivated(opts *bind.WatchOpts, sink chan<- *PolygonzkevmEmergencyStateActivated) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "EmergencyStateActivated") - 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(PolygonzkevmEmergencyStateActivated) - if err := _Polygonzkevm.contract.UnpackLog(event, "EmergencyStateActivated", 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 -} - -// ParseEmergencyStateActivated is a log parse operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. -// -// Solidity: event EmergencyStateActivated() -func (_Polygonzkevm *PolygonzkevmFilterer) ParseEmergencyStateActivated(log types.Log) (*PolygonzkevmEmergencyStateActivated, error) { - event := new(PolygonzkevmEmergencyStateActivated) - if err := _Polygonzkevm.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmEmergencyStateDeactivatedIterator is returned from FilterEmergencyStateDeactivated and is used to iterate over the raw logs and unpacked data for EmergencyStateDeactivated events raised by the Polygonzkevm contract. -type PolygonzkevmEmergencyStateDeactivatedIterator struct { - Event *PolygonzkevmEmergencyStateDeactivated // 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 *PolygonzkevmEmergencyStateDeactivatedIterator) 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(PolygonzkevmEmergencyStateDeactivated) - 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(PolygonzkevmEmergencyStateDeactivated) - 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 *PolygonzkevmEmergencyStateDeactivatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmEmergencyStateDeactivatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmEmergencyStateDeactivated represents a EmergencyStateDeactivated event raised by the Polygonzkevm contract. -type PolygonzkevmEmergencyStateDeactivated struct { - Raw types.Log // Blockchain specific contextual infos -} - -// FilterEmergencyStateDeactivated is a free log retrieval operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. -// -// Solidity: event EmergencyStateDeactivated() -func (_Polygonzkevm *PolygonzkevmFilterer) FilterEmergencyStateDeactivated(opts *bind.FilterOpts) (*PolygonzkevmEmergencyStateDeactivatedIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "EmergencyStateDeactivated") - if err != nil { - return nil, err - } - return &PolygonzkevmEmergencyStateDeactivatedIterator{contract: _Polygonzkevm.contract, event: "EmergencyStateDeactivated", logs: logs, sub: sub}, nil -} - -// WatchEmergencyStateDeactivated is a free log subscription operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. -// -// Solidity: event EmergencyStateDeactivated() -func (_Polygonzkevm *PolygonzkevmFilterer) WatchEmergencyStateDeactivated(opts *bind.WatchOpts, sink chan<- *PolygonzkevmEmergencyStateDeactivated) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "EmergencyStateDeactivated") - 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(PolygonzkevmEmergencyStateDeactivated) - if err := _Polygonzkevm.contract.UnpackLog(event, "EmergencyStateDeactivated", 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 -} - -// ParseEmergencyStateDeactivated is a log parse operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. -// -// Solidity: event EmergencyStateDeactivated() -func (_Polygonzkevm *PolygonzkevmFilterer) ParseEmergencyStateDeactivated(log types.Log) (*PolygonzkevmEmergencyStateDeactivated, error) { - event := new(PolygonzkevmEmergencyStateDeactivated) - if err := _Polygonzkevm.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmForceBatchIterator is returned from FilterForceBatch and is used to iterate over the raw logs and unpacked data for ForceBatch events raised by the Polygonzkevm contract. -type PolygonzkevmForceBatchIterator struct { - Event *PolygonzkevmForceBatch // 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 *PolygonzkevmForceBatchIterator) 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(PolygonzkevmForceBatch) - 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(PolygonzkevmForceBatch) - 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 *PolygonzkevmForceBatchIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmForceBatchIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmForceBatch represents a ForceBatch event raised by the Polygonzkevm contract. -type PolygonzkevmForceBatch struct { - ForceBatchNum uint64 - LastGlobalExitRoot [32]byte - Sequencer common.Address - Transactions []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterForceBatch is a free log retrieval operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. -// -// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterForceBatch(opts *bind.FilterOpts, forceBatchNum []uint64) (*PolygonzkevmForceBatchIterator, error) { - - var forceBatchNumRule []interface{} - for _, forceBatchNumItem := range forceBatchNum { - forceBatchNumRule = append(forceBatchNumRule, forceBatchNumItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "ForceBatch", forceBatchNumRule) - if err != nil { - return nil, err - } - return &PolygonzkevmForceBatchIterator{contract: _Polygonzkevm.contract, event: "ForceBatch", logs: logs, sub: sub}, nil -} - -// WatchForceBatch is a free log subscription operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. -// -// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchForceBatch(opts *bind.WatchOpts, sink chan<- *PolygonzkevmForceBatch, forceBatchNum []uint64) (event.Subscription, error) { - - var forceBatchNumRule []interface{} - for _, forceBatchNumItem := range forceBatchNum { - forceBatchNumRule = append(forceBatchNumRule, forceBatchNumItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "ForceBatch", forceBatchNumRule) - 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(PolygonzkevmForceBatch) - if err := _Polygonzkevm.contract.UnpackLog(event, "ForceBatch", 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 -} - -// ParseForceBatch is a log parse operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. -// -// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseForceBatch(log types.Log) (*PolygonzkevmForceBatch, error) { - event := new(PolygonzkevmForceBatch) - if err := _Polygonzkevm.contract.UnpackLog(event, "ForceBatch", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Polygonzkevm contract. -type PolygonzkevmInitializedIterator struct { - Event *PolygonzkevmInitialized // 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 *PolygonzkevmInitializedIterator) 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(PolygonzkevmInitialized) - 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(PolygonzkevmInitialized) - 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 *PolygonzkevmInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmInitialized represents a Initialized event raised by the Polygonzkevm contract. -type PolygonzkevmInitialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterInitialized(opts *bind.FilterOpts) (*PolygonzkevmInitializedIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &PolygonzkevmInitializedIterator{contract: _Polygonzkevm.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *PolygonzkevmInitialized) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "Initialized") - 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(PolygonzkevmInitialized) - if err := _Polygonzkevm.contract.UnpackLog(event, "Initialized", 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 -} - -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseInitialized(log types.Log) (*PolygonzkevmInitialized, error) { - event := new(PolygonzkevmInitialized) - if err := _Polygonzkevm.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmOverridePendingStateIterator is returned from FilterOverridePendingState and is used to iterate over the raw logs and unpacked data for OverridePendingState events raised by the Polygonzkevm contract. -type PolygonzkevmOverridePendingStateIterator struct { - Event *PolygonzkevmOverridePendingState // 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 *PolygonzkevmOverridePendingStateIterator) 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(PolygonzkevmOverridePendingState) - 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(PolygonzkevmOverridePendingState) - 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 *PolygonzkevmOverridePendingStateIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmOverridePendingStateIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmOverridePendingState represents a OverridePendingState event raised by the Polygonzkevm contract. -type PolygonzkevmOverridePendingState struct { - NumBatch uint64 - StateRoot [32]byte - Aggregator common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOverridePendingState is a free log retrieval operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. -// -// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterOverridePendingState(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*PolygonzkevmOverridePendingStateIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "OverridePendingState", numBatchRule, aggregatorRule) - if err != nil { - return nil, err - } - return &PolygonzkevmOverridePendingStateIterator{contract: _Polygonzkevm.contract, event: "OverridePendingState", logs: logs, sub: sub}, nil -} - -// WatchOverridePendingState is a free log subscription operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. -// -// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchOverridePendingState(opts *bind.WatchOpts, sink chan<- *PolygonzkevmOverridePendingState, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "OverridePendingState", numBatchRule, aggregatorRule) - 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(PolygonzkevmOverridePendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "OverridePendingState", 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 -} - -// ParseOverridePendingState is a log parse operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. -// -// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseOverridePendingState(log types.Log) (*PolygonzkevmOverridePendingState, error) { - event := new(PolygonzkevmOverridePendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "OverridePendingState", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Polygonzkevm contract. -type PolygonzkevmOwnershipTransferredIterator struct { - Event *PolygonzkevmOwnershipTransferred // 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 *PolygonzkevmOwnershipTransferredIterator) 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(PolygonzkevmOwnershipTransferred) - 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(PolygonzkevmOwnershipTransferred) - 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 *PolygonzkevmOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmOwnershipTransferred represents a OwnershipTransferred event raised by the Polygonzkevm contract. -type PolygonzkevmOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*PolygonzkevmOwnershipTransferredIterator, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &PolygonzkevmOwnershipTransferredIterator{contract: _Polygonzkevm.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PolygonzkevmOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - 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(PolygonzkevmOwnershipTransferred) - if err := _Polygonzkevm.contract.UnpackLog(event, "OwnershipTransferred", 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 -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseOwnershipTransferred(log types.Log) (*PolygonzkevmOwnershipTransferred, error) { - event := new(PolygonzkevmOwnershipTransferred) - if err := _Polygonzkevm.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmProveNonDeterministicPendingStateIterator is returned from FilterProveNonDeterministicPendingState and is used to iterate over the raw logs and unpacked data for ProveNonDeterministicPendingState events raised by the Polygonzkevm contract. -type PolygonzkevmProveNonDeterministicPendingStateIterator struct { - Event *PolygonzkevmProveNonDeterministicPendingState // 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 *PolygonzkevmProveNonDeterministicPendingStateIterator) 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(PolygonzkevmProveNonDeterministicPendingState) - 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(PolygonzkevmProveNonDeterministicPendingState) - 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 *PolygonzkevmProveNonDeterministicPendingStateIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmProveNonDeterministicPendingStateIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmProveNonDeterministicPendingState represents a ProveNonDeterministicPendingState event raised by the Polygonzkevm contract. -type PolygonzkevmProveNonDeterministicPendingState struct { - StoredStateRoot [32]byte - ProvedStateRoot [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterProveNonDeterministicPendingState is a free log retrieval operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. -// -// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterProveNonDeterministicPendingState(opts *bind.FilterOpts) (*PolygonzkevmProveNonDeterministicPendingStateIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "ProveNonDeterministicPendingState") - if err != nil { - return nil, err - } - return &PolygonzkevmProveNonDeterministicPendingStateIterator{contract: _Polygonzkevm.contract, event: "ProveNonDeterministicPendingState", logs: logs, sub: sub}, nil -} - -// WatchProveNonDeterministicPendingState is a free log subscription operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. -// -// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchProveNonDeterministicPendingState(opts *bind.WatchOpts, sink chan<- *PolygonzkevmProveNonDeterministicPendingState) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "ProveNonDeterministicPendingState") - 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(PolygonzkevmProveNonDeterministicPendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "ProveNonDeterministicPendingState", 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 -} - -// ParseProveNonDeterministicPendingState is a log parse operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. -// -// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseProveNonDeterministicPendingState(log types.Log) (*PolygonzkevmProveNonDeterministicPendingState, error) { - event := new(PolygonzkevmProveNonDeterministicPendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "ProveNonDeterministicPendingState", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSequenceBatchesIterator is returned from FilterSequenceBatches and is used to iterate over the raw logs and unpacked data for SequenceBatches events raised by the Polygonzkevm contract. -type PolygonzkevmSequenceBatchesIterator struct { - Event *PolygonzkevmSequenceBatches // 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 *PolygonzkevmSequenceBatchesIterator) 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(PolygonzkevmSequenceBatches) - 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(PolygonzkevmSequenceBatches) - 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 *PolygonzkevmSequenceBatchesIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSequenceBatchesIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSequenceBatches represents a SequenceBatches event raised by the Polygonzkevm contract. -type PolygonzkevmSequenceBatches struct { - NumBatch uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSequenceBatches is a free log retrieval operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. -// -// Solidity: event SequenceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSequenceBatches(opts *bind.FilterOpts, numBatch []uint64) (*PolygonzkevmSequenceBatchesIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SequenceBatches", numBatchRule) - if err != nil { - return nil, err - } - return &PolygonzkevmSequenceBatchesIterator{contract: _Polygonzkevm.contract, event: "SequenceBatches", logs: logs, sub: sub}, nil -} - -// WatchSequenceBatches is a free log subscription operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. -// -// Solidity: event SequenceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSequenceBatches(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSequenceBatches, numBatch []uint64) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SequenceBatches", numBatchRule) - 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(PolygonzkevmSequenceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "SequenceBatches", 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 -} - -// ParseSequenceBatches is a log parse operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. -// -// Solidity: event SequenceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSequenceBatches(log types.Log) (*PolygonzkevmSequenceBatches, error) { - event := new(PolygonzkevmSequenceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "SequenceBatches", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSequenceForceBatchesIterator is returned from FilterSequenceForceBatches and is used to iterate over the raw logs and unpacked data for SequenceForceBatches events raised by the Polygonzkevm contract. -type PolygonzkevmSequenceForceBatchesIterator struct { - Event *PolygonzkevmSequenceForceBatches // 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 *PolygonzkevmSequenceForceBatchesIterator) 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(PolygonzkevmSequenceForceBatches) - 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(PolygonzkevmSequenceForceBatches) - 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 *PolygonzkevmSequenceForceBatchesIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSequenceForceBatchesIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSequenceForceBatches represents a SequenceForceBatches event raised by the Polygonzkevm contract. -type PolygonzkevmSequenceForceBatches struct { - NumBatch uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSequenceForceBatches is a free log retrieval operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. -// -// Solidity: event SequenceForceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSequenceForceBatches(opts *bind.FilterOpts, numBatch []uint64) (*PolygonzkevmSequenceForceBatchesIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SequenceForceBatches", numBatchRule) - if err != nil { - return nil, err - } - return &PolygonzkevmSequenceForceBatchesIterator{contract: _Polygonzkevm.contract, event: "SequenceForceBatches", logs: logs, sub: sub}, nil -} - -// WatchSequenceForceBatches is a free log subscription operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. -// -// Solidity: event SequenceForceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSequenceForceBatches(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSequenceForceBatches, numBatch []uint64) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SequenceForceBatches", numBatchRule) - 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(PolygonzkevmSequenceForceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "SequenceForceBatches", 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 -} - -// ParseSequenceForceBatches is a log parse operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. -// -// Solidity: event SequenceForceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSequenceForceBatches(log types.Log) (*PolygonzkevmSequenceForceBatches, error) { - event := new(PolygonzkevmSequenceForceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "SequenceForceBatches", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetForceBatchTimeoutIterator is returned from FilterSetForceBatchTimeout and is used to iterate over the raw logs and unpacked data for SetForceBatchTimeout events raised by the Polygonzkevm contract. -type PolygonzkevmSetForceBatchTimeoutIterator struct { - Event *PolygonzkevmSetForceBatchTimeout // 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 *PolygonzkevmSetForceBatchTimeoutIterator) 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(PolygonzkevmSetForceBatchTimeout) - 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(PolygonzkevmSetForceBatchTimeout) - 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 *PolygonzkevmSetForceBatchTimeoutIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetForceBatchTimeoutIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetForceBatchTimeout represents a SetForceBatchTimeout event raised by the Polygonzkevm contract. -type PolygonzkevmSetForceBatchTimeout struct { - NewforceBatchTimeout uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetForceBatchTimeout is a free log retrieval operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. -// -// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetForceBatchTimeout(opts *bind.FilterOpts) (*PolygonzkevmSetForceBatchTimeoutIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetForceBatchTimeout") - if err != nil { - return nil, err - } - return &PolygonzkevmSetForceBatchTimeoutIterator{contract: _Polygonzkevm.contract, event: "SetForceBatchTimeout", logs: logs, sub: sub}, nil -} - -// WatchSetForceBatchTimeout is a free log subscription operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. -// -// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetForceBatchTimeout(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetForceBatchTimeout) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetForceBatchTimeout") - 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(PolygonzkevmSetForceBatchTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetForceBatchTimeout", 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 -} - -// ParseSetForceBatchTimeout is a log parse operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. -// -// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetForceBatchTimeout(log types.Log) (*PolygonzkevmSetForceBatchTimeout, error) { - event := new(PolygonzkevmSetForceBatchTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetForceBatchTimeout", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetMultiplierBatchFeeIterator is returned from FilterSetMultiplierBatchFee and is used to iterate over the raw logs and unpacked data for SetMultiplierBatchFee events raised by the Polygonzkevm contract. -type PolygonzkevmSetMultiplierBatchFeeIterator struct { - Event *PolygonzkevmSetMultiplierBatchFee // 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 *PolygonzkevmSetMultiplierBatchFeeIterator) 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(PolygonzkevmSetMultiplierBatchFee) - 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(PolygonzkevmSetMultiplierBatchFee) - 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 *PolygonzkevmSetMultiplierBatchFeeIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetMultiplierBatchFeeIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetMultiplierBatchFee represents a SetMultiplierBatchFee event raised by the Polygonzkevm contract. -type PolygonzkevmSetMultiplierBatchFee struct { - NewMultiplierBatchFee uint16 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetMultiplierBatchFee is a free log retrieval operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. -// -// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetMultiplierBatchFee(opts *bind.FilterOpts) (*PolygonzkevmSetMultiplierBatchFeeIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetMultiplierBatchFee") - if err != nil { - return nil, err - } - return &PolygonzkevmSetMultiplierBatchFeeIterator{contract: _Polygonzkevm.contract, event: "SetMultiplierBatchFee", logs: logs, sub: sub}, nil -} - -// WatchSetMultiplierBatchFee is a free log subscription operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. -// -// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetMultiplierBatchFee(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetMultiplierBatchFee) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetMultiplierBatchFee") - 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(PolygonzkevmSetMultiplierBatchFee) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetMultiplierBatchFee", 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 -} - -// ParseSetMultiplierBatchFee is a log parse operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. -// -// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetMultiplierBatchFee(log types.Log) (*PolygonzkevmSetMultiplierBatchFee, error) { - event := new(PolygonzkevmSetMultiplierBatchFee) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetMultiplierBatchFee", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetPendingStateTimeoutIterator is returned from FilterSetPendingStateTimeout and is used to iterate over the raw logs and unpacked data for SetPendingStateTimeout events raised by the Polygonzkevm contract. -type PolygonzkevmSetPendingStateTimeoutIterator struct { - Event *PolygonzkevmSetPendingStateTimeout // 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 *PolygonzkevmSetPendingStateTimeoutIterator) 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(PolygonzkevmSetPendingStateTimeout) - 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(PolygonzkevmSetPendingStateTimeout) - 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 *PolygonzkevmSetPendingStateTimeoutIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetPendingStateTimeoutIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetPendingStateTimeout represents a SetPendingStateTimeout event raised by the Polygonzkevm contract. -type PolygonzkevmSetPendingStateTimeout struct { - NewPendingStateTimeout uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetPendingStateTimeout is a free log retrieval operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. -// -// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetPendingStateTimeout(opts *bind.FilterOpts) (*PolygonzkevmSetPendingStateTimeoutIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetPendingStateTimeout") - if err != nil { - return nil, err - } - return &PolygonzkevmSetPendingStateTimeoutIterator{contract: _Polygonzkevm.contract, event: "SetPendingStateTimeout", logs: logs, sub: sub}, nil -} - -// WatchSetPendingStateTimeout is a free log subscription operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. -// -// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetPendingStateTimeout(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetPendingStateTimeout) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetPendingStateTimeout") - 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(PolygonzkevmSetPendingStateTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetPendingStateTimeout", 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 -} - -// ParseSetPendingStateTimeout is a log parse operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. -// -// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetPendingStateTimeout(log types.Log) (*PolygonzkevmSetPendingStateTimeout, error) { - event := new(PolygonzkevmSetPendingStateTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetPendingStateTimeout", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetTrustedAggregatorIterator is returned from FilterSetTrustedAggregator and is used to iterate over the raw logs and unpacked data for SetTrustedAggregator events raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedAggregatorIterator struct { - Event *PolygonzkevmSetTrustedAggregator // 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 *PolygonzkevmSetTrustedAggregatorIterator) 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(PolygonzkevmSetTrustedAggregator) - 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(PolygonzkevmSetTrustedAggregator) - 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 *PolygonzkevmSetTrustedAggregatorIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetTrustedAggregatorIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetTrustedAggregator represents a SetTrustedAggregator event raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedAggregator struct { - NewTrustedAggregator common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetTrustedAggregator is a free log retrieval operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. -// -// Solidity: event SetTrustedAggregator(address newTrustedAggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetTrustedAggregator(opts *bind.FilterOpts) (*PolygonzkevmSetTrustedAggregatorIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetTrustedAggregator") - if err != nil { - return nil, err - } - return &PolygonzkevmSetTrustedAggregatorIterator{contract: _Polygonzkevm.contract, event: "SetTrustedAggregator", logs: logs, sub: sub}, nil -} - -// WatchSetTrustedAggregator is a free log subscription operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. -// -// Solidity: event SetTrustedAggregator(address newTrustedAggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetTrustedAggregator(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetTrustedAggregator) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetTrustedAggregator") - 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(PolygonzkevmSetTrustedAggregator) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedAggregator", 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 -} - -// ParseSetTrustedAggregator is a log parse operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. -// -// Solidity: event SetTrustedAggregator(address newTrustedAggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetTrustedAggregator(log types.Log) (*PolygonzkevmSetTrustedAggregator, error) { - event := new(PolygonzkevmSetTrustedAggregator) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedAggregator", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetTrustedAggregatorTimeoutIterator is returned from FilterSetTrustedAggregatorTimeout and is used to iterate over the raw logs and unpacked data for SetTrustedAggregatorTimeout events raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedAggregatorTimeoutIterator struct { - Event *PolygonzkevmSetTrustedAggregatorTimeout // 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 *PolygonzkevmSetTrustedAggregatorTimeoutIterator) 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(PolygonzkevmSetTrustedAggregatorTimeout) - 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(PolygonzkevmSetTrustedAggregatorTimeout) - 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 *PolygonzkevmSetTrustedAggregatorTimeoutIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetTrustedAggregatorTimeoutIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetTrustedAggregatorTimeout represents a SetTrustedAggregatorTimeout event raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedAggregatorTimeout struct { - NewTrustedAggregatorTimeout uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetTrustedAggregatorTimeout is a free log retrieval operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. -// -// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetTrustedAggregatorTimeout(opts *bind.FilterOpts) (*PolygonzkevmSetTrustedAggregatorTimeoutIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetTrustedAggregatorTimeout") - if err != nil { - return nil, err - } - return &PolygonzkevmSetTrustedAggregatorTimeoutIterator{contract: _Polygonzkevm.contract, event: "SetTrustedAggregatorTimeout", logs: logs, sub: sub}, nil -} - -// WatchSetTrustedAggregatorTimeout is a free log subscription operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. -// -// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetTrustedAggregatorTimeout(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetTrustedAggregatorTimeout) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetTrustedAggregatorTimeout") - 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(PolygonzkevmSetTrustedAggregatorTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedAggregatorTimeout", 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 -} - -// ParseSetTrustedAggregatorTimeout is a log parse operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. -// -// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetTrustedAggregatorTimeout(log types.Log) (*PolygonzkevmSetTrustedAggregatorTimeout, error) { - event := new(PolygonzkevmSetTrustedAggregatorTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedAggregatorTimeout", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetTrustedSequencerIterator is returned from FilterSetTrustedSequencer and is used to iterate over the raw logs and unpacked data for SetTrustedSequencer events raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedSequencerIterator struct { - Event *PolygonzkevmSetTrustedSequencer // 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 *PolygonzkevmSetTrustedSequencerIterator) 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(PolygonzkevmSetTrustedSequencer) - 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(PolygonzkevmSetTrustedSequencer) - 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 *PolygonzkevmSetTrustedSequencerIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetTrustedSequencerIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetTrustedSequencer represents a SetTrustedSequencer event raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedSequencer struct { - NewTrustedSequencer common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetTrustedSequencer is a free log retrieval operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. -// -// Solidity: event SetTrustedSequencer(address newTrustedSequencer) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetTrustedSequencer(opts *bind.FilterOpts) (*PolygonzkevmSetTrustedSequencerIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetTrustedSequencer") - if err != nil { - return nil, err - } - return &PolygonzkevmSetTrustedSequencerIterator{contract: _Polygonzkevm.contract, event: "SetTrustedSequencer", logs: logs, sub: sub}, nil -} - -// WatchSetTrustedSequencer is a free log subscription operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. -// -// Solidity: event SetTrustedSequencer(address newTrustedSequencer) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetTrustedSequencer(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetTrustedSequencer) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetTrustedSequencer") - 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(PolygonzkevmSetTrustedSequencer) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedSequencer", 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 -} - -// ParseSetTrustedSequencer is a log parse operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. -// -// Solidity: event SetTrustedSequencer(address newTrustedSequencer) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetTrustedSequencer(log types.Log) (*PolygonzkevmSetTrustedSequencer, error) { - event := new(PolygonzkevmSetTrustedSequencer) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedSequencer", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetTrustedSequencerURLIterator is returned from FilterSetTrustedSequencerURL and is used to iterate over the raw logs and unpacked data for SetTrustedSequencerURL events raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedSequencerURLIterator struct { - Event *PolygonzkevmSetTrustedSequencerURL // 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 *PolygonzkevmSetTrustedSequencerURLIterator) 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(PolygonzkevmSetTrustedSequencerURL) - 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(PolygonzkevmSetTrustedSequencerURL) - 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 *PolygonzkevmSetTrustedSequencerURLIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetTrustedSequencerURLIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetTrustedSequencerURL represents a SetTrustedSequencerURL event raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedSequencerURL struct { - NewTrustedSequencerURL string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetTrustedSequencerURL is a free log retrieval operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. -// -// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetTrustedSequencerURL(opts *bind.FilterOpts) (*PolygonzkevmSetTrustedSequencerURLIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetTrustedSequencerURL") - if err != nil { - return nil, err - } - return &PolygonzkevmSetTrustedSequencerURLIterator{contract: _Polygonzkevm.contract, event: "SetTrustedSequencerURL", logs: logs, sub: sub}, nil -} - -// WatchSetTrustedSequencerURL is a free log subscription operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. -// -// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetTrustedSequencerURL(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetTrustedSequencerURL) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetTrustedSequencerURL") - 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(PolygonzkevmSetTrustedSequencerURL) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedSequencerURL", 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 -} - -// ParseSetTrustedSequencerURL is a log parse operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. -// -// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetTrustedSequencerURL(log types.Log) (*PolygonzkevmSetTrustedSequencerURL, error) { - event := new(PolygonzkevmSetTrustedSequencerURL) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedSequencerURL", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetVerifyBatchTimeTargetIterator is returned from FilterSetVerifyBatchTimeTarget and is used to iterate over the raw logs and unpacked data for SetVerifyBatchTimeTarget events raised by the Polygonzkevm contract. -type PolygonzkevmSetVerifyBatchTimeTargetIterator struct { - Event *PolygonzkevmSetVerifyBatchTimeTarget // 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 *PolygonzkevmSetVerifyBatchTimeTargetIterator) 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(PolygonzkevmSetVerifyBatchTimeTarget) - 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(PolygonzkevmSetVerifyBatchTimeTarget) - 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 *PolygonzkevmSetVerifyBatchTimeTargetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetVerifyBatchTimeTargetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetVerifyBatchTimeTarget represents a SetVerifyBatchTimeTarget event raised by the Polygonzkevm contract. -type PolygonzkevmSetVerifyBatchTimeTarget struct { - NewVerifyBatchTimeTarget uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetVerifyBatchTimeTarget is a free log retrieval operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. -// -// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetVerifyBatchTimeTarget(opts *bind.FilterOpts) (*PolygonzkevmSetVerifyBatchTimeTargetIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetVerifyBatchTimeTarget") - if err != nil { - return nil, err - } - return &PolygonzkevmSetVerifyBatchTimeTargetIterator{contract: _Polygonzkevm.contract, event: "SetVerifyBatchTimeTarget", logs: logs, sub: sub}, nil -} - -// WatchSetVerifyBatchTimeTarget is a free log subscription operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. -// -// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetVerifyBatchTimeTarget(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetVerifyBatchTimeTarget) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetVerifyBatchTimeTarget") - 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(PolygonzkevmSetVerifyBatchTimeTarget) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetVerifyBatchTimeTarget", 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 -} - -// ParseSetVerifyBatchTimeTarget is a log parse operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. -// -// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetVerifyBatchTimeTarget(log types.Log) (*PolygonzkevmSetVerifyBatchTimeTarget, error) { - event := new(PolygonzkevmSetVerifyBatchTimeTarget) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetVerifyBatchTimeTarget", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmTransferAdminRoleIterator is returned from FilterTransferAdminRole and is used to iterate over the raw logs and unpacked data for TransferAdminRole events raised by the Polygonzkevm contract. -type PolygonzkevmTransferAdminRoleIterator struct { - Event *PolygonzkevmTransferAdminRole // 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 *PolygonzkevmTransferAdminRoleIterator) 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(PolygonzkevmTransferAdminRole) - 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(PolygonzkevmTransferAdminRole) - 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 *PolygonzkevmTransferAdminRoleIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmTransferAdminRoleIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmTransferAdminRole represents a TransferAdminRole event raised by the Polygonzkevm contract. -type PolygonzkevmTransferAdminRole struct { - NewPendingAdmin common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransferAdminRole is a free log retrieval operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. -// -// Solidity: event TransferAdminRole(address newPendingAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterTransferAdminRole(opts *bind.FilterOpts) (*PolygonzkevmTransferAdminRoleIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "TransferAdminRole") - if err != nil { - return nil, err - } - return &PolygonzkevmTransferAdminRoleIterator{contract: _Polygonzkevm.contract, event: "TransferAdminRole", logs: logs, sub: sub}, nil -} - -// WatchTransferAdminRole is a free log subscription operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. -// -// Solidity: event TransferAdminRole(address newPendingAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchTransferAdminRole(opts *bind.WatchOpts, sink chan<- *PolygonzkevmTransferAdminRole) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "TransferAdminRole") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmTransferAdminRole) - if err := _Polygonzkevm.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseTransferAdminRole is a log parse operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. -// -// Solidity: event TransferAdminRole(address newPendingAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseTransferAdminRole(log types.Log) (*PolygonzkevmTransferAdminRole, error) { - event := new(PolygonzkevmTransferAdminRole) - if err := _Polygonzkevm.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmUpdateZkEVMVersionIterator is returned from FilterUpdateZkEVMVersion and is used to iterate over the raw logs and unpacked data for UpdateZkEVMVersion events raised by the Polygonzkevm contract. -type PolygonzkevmUpdateZkEVMVersionIterator struct { - Event *PolygonzkevmUpdateZkEVMVersion // 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 *PolygonzkevmUpdateZkEVMVersionIterator) 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(PolygonzkevmUpdateZkEVMVersion) - 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(PolygonzkevmUpdateZkEVMVersion) - 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 *PolygonzkevmUpdateZkEVMVersionIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmUpdateZkEVMVersionIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmUpdateZkEVMVersion represents a UpdateZkEVMVersion event raised by the Polygonzkevm contract. -type PolygonzkevmUpdateZkEVMVersion struct { - NumBatch uint64 - ForkID uint64 - Version string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUpdateZkEVMVersion is a free log retrieval operation binding the contract event 0xed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd6. -// -// Solidity: event UpdateZkEVMVersion(uint64 numBatch, uint64 forkID, string version) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterUpdateZkEVMVersion(opts *bind.FilterOpts) (*PolygonzkevmUpdateZkEVMVersionIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "UpdateZkEVMVersion") - if err != nil { - return nil, err - } - return &PolygonzkevmUpdateZkEVMVersionIterator{contract: _Polygonzkevm.contract, event: "UpdateZkEVMVersion", logs: logs, sub: sub}, nil -} - -// WatchUpdateZkEVMVersion is a free log subscription operation binding the contract event 0xed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd6. -// -// Solidity: event UpdateZkEVMVersion(uint64 numBatch, uint64 forkID, string version) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchUpdateZkEVMVersion(opts *bind.WatchOpts, sink chan<- *PolygonzkevmUpdateZkEVMVersion) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "UpdateZkEVMVersion") - 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(PolygonzkevmUpdateZkEVMVersion) - if err := _Polygonzkevm.contract.UnpackLog(event, "UpdateZkEVMVersion", 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 -} - -// ParseUpdateZkEVMVersion is a log parse operation binding the contract event 0xed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd6. -// -// Solidity: event UpdateZkEVMVersion(uint64 numBatch, uint64 forkID, string version) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseUpdateZkEVMVersion(log types.Log) (*PolygonzkevmUpdateZkEVMVersion, error) { - event := new(PolygonzkevmUpdateZkEVMVersion) - if err := _Polygonzkevm.contract.UnpackLog(event, "UpdateZkEVMVersion", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmVerifyBatchesIterator is returned from FilterVerifyBatches and is used to iterate over the raw logs and unpacked data for VerifyBatches events raised by the Polygonzkevm contract. -type PolygonzkevmVerifyBatchesIterator struct { - Event *PolygonzkevmVerifyBatches // 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 *PolygonzkevmVerifyBatchesIterator) 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(PolygonzkevmVerifyBatches) - 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(PolygonzkevmVerifyBatches) - 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 *PolygonzkevmVerifyBatchesIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmVerifyBatchesIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmVerifyBatches represents a VerifyBatches event raised by the Polygonzkevm contract. -type PolygonzkevmVerifyBatches struct { - NumBatch uint64 - StateRoot [32]byte - Aggregator common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVerifyBatches is a free log retrieval operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. -// -// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterVerifyBatches(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*PolygonzkevmVerifyBatchesIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "VerifyBatches", numBatchRule, aggregatorRule) - if err != nil { - return nil, err - } - return &PolygonzkevmVerifyBatchesIterator{contract: _Polygonzkevm.contract, event: "VerifyBatches", logs: logs, sub: sub}, nil -} - -// WatchVerifyBatches is a free log subscription operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. -// -// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchVerifyBatches(opts *bind.WatchOpts, sink chan<- *PolygonzkevmVerifyBatches, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "VerifyBatches", numBatchRule, aggregatorRule) - 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(PolygonzkevmVerifyBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "VerifyBatches", 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 -} - -// ParseVerifyBatches is a log parse operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. -// -// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseVerifyBatches(log types.Log) (*PolygonzkevmVerifyBatches, error) { - event := new(PolygonzkevmVerifyBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "VerifyBatches", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmVerifyBatchesTrustedAggregatorIterator is returned from FilterVerifyBatchesTrustedAggregator and is used to iterate over the raw logs and unpacked data for VerifyBatchesTrustedAggregator events raised by the Polygonzkevm contract. -type PolygonzkevmVerifyBatchesTrustedAggregatorIterator struct { - Event *PolygonzkevmVerifyBatchesTrustedAggregator // 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 *PolygonzkevmVerifyBatchesTrustedAggregatorIterator) 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(PolygonzkevmVerifyBatchesTrustedAggregator) - 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(PolygonzkevmVerifyBatchesTrustedAggregator) - 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 *PolygonzkevmVerifyBatchesTrustedAggregatorIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmVerifyBatchesTrustedAggregatorIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmVerifyBatchesTrustedAggregator represents a VerifyBatchesTrustedAggregator event raised by the Polygonzkevm contract. -type PolygonzkevmVerifyBatchesTrustedAggregator struct { - NumBatch uint64 - StateRoot [32]byte - Aggregator common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVerifyBatchesTrustedAggregator is a free log retrieval operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. -// -// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterVerifyBatchesTrustedAggregator(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*PolygonzkevmVerifyBatchesTrustedAggregatorIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "VerifyBatchesTrustedAggregator", numBatchRule, aggregatorRule) - if err != nil { - return nil, err - } - return &PolygonzkevmVerifyBatchesTrustedAggregatorIterator{contract: _Polygonzkevm.contract, event: "VerifyBatchesTrustedAggregator", logs: logs, sub: sub}, nil -} - -// WatchVerifyBatchesTrustedAggregator is a free log subscription operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. -// -// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchVerifyBatchesTrustedAggregator(opts *bind.WatchOpts, sink chan<- *PolygonzkevmVerifyBatchesTrustedAggregator, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "VerifyBatchesTrustedAggregator", numBatchRule, aggregatorRule) - 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(PolygonzkevmVerifyBatchesTrustedAggregator) - if err := _Polygonzkevm.contract.UnpackLog(event, "VerifyBatchesTrustedAggregator", 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 -} - -// ParseVerifyBatchesTrustedAggregator is a log parse operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. -// -// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseVerifyBatchesTrustedAggregator(log types.Log) (*PolygonzkevmVerifyBatchesTrustedAggregator, error) { - event := new(PolygonzkevmVerifyBatchesTrustedAggregator) - if err := _Polygonzkevm.contract.UnpackLog(event, "VerifyBatchesTrustedAggregator", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/etherman/smartcontracts/script.sh b/etherman/smartcontracts/script.sh index 4e4b117fe2..139d20976a 100755 --- a/etherman/smartcontracts/script.sh +++ b/etherman/smartcontracts/script.sh @@ -8,8 +8,9 @@ gen() { abigen --bin bin/${package}.bin --abi abi/${package}.abi --pkg=${package} --out=${package}/${package}.go } -gen polygonzkevm +gen cdkvalidium gen polygonzkevmbridge gen matic +gen mockverifier gen polygonzkevmglobalexitroot -gen mockverifier \ No newline at end of file +gen cdkdatacommittee \ No newline at end of file diff --git a/etherman/types.go b/etherman/types.go index 9e07a2fbc8..5795de0144 100644 --- a/etherman/types.go +++ b/etherman/types.go @@ -3,7 +3,7 @@ package etherman import ( "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" "github.com/ethereum/go-ethereum/common" ) @@ -36,7 +36,7 @@ type SequencedBatch struct { TxHash common.Hash Nonce uint64 Coinbase common.Address - polygonzkevm.PolygonZkEVMBatchData + cdkvalidium.CDKValidiumBatchData } // ForcedBatch represents a ForcedBatch @@ -65,7 +65,7 @@ type SequencedForceBatch struct { TxHash common.Hash Timestamp time.Time Nonce uint64 - polygonzkevm.PolygonZkEVMForcedBatchData + cdkvalidium.CDKValidiumForcedBatchData } // ForkID is a sturct to track the ForkID event. diff --git a/etherman/types/finalproofinputs.go b/etherman/types/finalproofinputs.go index f5686691b4..e7ccbe27ce 100644 --- a/etherman/types/finalproofinputs.go +++ b/etherman/types/finalproofinputs.go @@ -1,10 +1,10 @@ package types -import "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" +import "github.com/0xPolygon/cdk-validium-node/aggregator/prover" // FinalProofInputs struct type FinalProofInputs struct { - FinalProof *pb.FinalProof + FinalProof *prover.FinalProof NewLocalExitRoot []byte NewStateRoot []byte } diff --git a/ethtxmanager/config.go b/ethtxmanager/config.go index 3bf486bc04..a4ba6513d5 100644 --- a/ethtxmanager/config.go +++ b/ethtxmanager/config.go @@ -1,6 +1,6 @@ package ethtxmanager -import "github.com/0xPolygonHermez/zkevm-node/config/types" +import "github.com/0xPolygon/cdk-validium-node/config/types" // Config is configuration for ethereum transaction manager type Config struct { @@ -15,4 +15,37 @@ type Config struct { // ForcedGas is the amount of gas to be forced in case of gas estimation error ForcedGas uint64 `mapstructure:"ForcedGas"` + + // GasPriceMarginFactor is used to multiply the suggested gas price provided by the network + // in order to allow a different gas price to be set for all the transactions and making it + // easier to have the txs prioritized in the pool, default value is 1. + // + // ex: + // suggested gas price: 100 + // GasPriceMarginFactor: 1 + // gas price = 100 + // + // suggested gas price: 100 + // GasPriceMarginFactor: 1.1 + // gas price = 110 + GasPriceMarginFactor float64 `mapstructure:"GasPriceMarginFactor"` + + // MaxGasPriceLimit helps avoiding transactions to be sent over an specified + // gas price amount, default value is 0, which means no limit. + // If the gas price provided by the network and adjusted by the GasPriceMarginFactor + // is greater than this configuration, transaction will have its gas price set to + // the value configured in this config as the limit. + // + // ex: + // + // suggested gas price: 100 + // gas price margin factor: 20% + // max gas price limit: 150 + // tx gas price = 120 + // + // suggested gas price: 100 + // gas price margin factor: 20% + // max gas price limit: 110 + // tx gas price = 110 + MaxGasPriceLimit uint64 `mapstructure:"MaxGasPriceLimit"` } diff --git a/ethtxmanager/ethtxmanager.go b/ethtxmanager/ethtxmanager.go index e7099afddc..a27a6fb450 100644 --- a/ethtxmanager/ethtxmanager.go +++ b/ethtxmanager/ethtxmanager.go @@ -11,8 +11,8 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -90,7 +90,7 @@ func (c *Client) Add(ctx context.Context, owner, id string, from common.Address, } // get gas price - gasPrice, err := c.etherman.SuggestedGasPrice(ctx) + gasPrice, err := c.suggestedGasPrice(ctx) if err != nil { err := fmt.Errorf("failed to get suggested gas price: %w", err) log.Errorf(err.Error()) @@ -113,6 +113,9 @@ func (c *Client) Add(ctx context.Context, owner, id string, from common.Address, return err } + mTxLog := log.WithFields("monitoredTx", mTx.id, "createdAt", mTx.createdAt) + mTxLog.Infof("created") + return nil } @@ -261,7 +264,7 @@ func (c *Client) monitorTxs(ctx context.Context) error { for _, mTx := range mTxs { mTx := mTx // force variable shadowing to avoid pointer conflicts - mTxLog := log.WithFields("monitoredTx", mTx.id) + mTxLog := log.WithFields("monitoredTx", mTx.id, "createdAt", mTx.createdAt) mTxLog.Info("processing") // check if any of the txs in the history was mined @@ -355,7 +358,7 @@ func (c *Client) monitorTxs(ctx context.Context) error { // rebuild transaction tx := mTx.Tx() - mTxLog.Debugf("unsigned tx %v created", tx.Hash().String(), mTx.id) + mTxLog.Debugf("unsigned tx %v created", tx.Hash().String()) // sign tx signedTx, err = c.etherman.SignTx(ctx, mTx.from, tx) @@ -519,7 +522,7 @@ func (c *Client) ReviewMonitoredTx(ctx context.Context, mTx *monitoredTx) error } // get gas price - gasPrice, err := c.etherman.SuggestedGasPrice(ctx) + gasPrice, err := c.suggestedGasPrice(ctx) if err != nil { err := fmt.Errorf("failed to get suggested gas price: %w", err) mTxLog.Errorf(err.Error()) @@ -558,6 +561,30 @@ func (c *Client) ReviewMonitoredTxNonce(ctx context.Context, mTx *monitoredTx) e return nil } +func (c *Client) suggestedGasPrice(ctx context.Context) (*big.Int, error) { + // get gas price + gasPrice, err := c.etherman.SuggestedGasPrice(ctx) + if err != nil { + return nil, err + } + + // adjust the gas price by the margin factor + marginFactor := big.NewFloat(0).SetFloat64(c.cfg.GasPriceMarginFactor) + fGasPrice := big.NewFloat(0).SetInt(gasPrice) + adjustedGasPrice, _ := big.NewFloat(0).Mul(fGasPrice, marginFactor).Int(big.NewInt(0)) + + // if there is a max gas price limit configured and the current + // adjusted gas price is over this limit, set the gas price as the limit + if c.cfg.MaxGasPriceLimit > 0 { + maxGasPrice := big.NewInt(0).SetUint64(c.cfg.MaxGasPriceLimit) + if adjustedGasPrice.Cmp(maxGasPrice) == 1 { + adjustedGasPrice.Set(maxGasPrice) + } + } + + return adjustedGasPrice, nil +} + // logErrorAndWait used when an error is detected before trying again func (c *Client) logErrorAndWait(msg string, err error) { log.Errorf(msg, err) diff --git a/ethtxmanager/ethtxmanager_test.go b/ethtxmanager/ethtxmanager_test.go index 9d5b4e2b4b..54114a96af 100644 --- a/ethtxmanager/ethtxmanager_test.go +++ b/ethtxmanager/ethtxmanager_test.go @@ -3,13 +3,14 @@ package ethtxmanager import ( "context" "errors" + "fmt" "math/big" "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" @@ -20,6 +21,8 @@ import ( var defaultEthTxmanagerConfigForTests = Config{ FrequencyToMonitorTxs: types.NewDuration(time.Millisecond), WaitTxToBeMined: types.NewDuration(time.Second), + GasPriceMarginFactor: 1, + MaxGasPriceLimit: 0, } func TestTxGetMined(t *testing.T) { @@ -676,3 +679,94 @@ func TestExecutionReverted(t *testing.T) { require.NoError(t, err) require.Equal(t, MonitoredTxStatusConfirmed, result.Status) } + +func TestGasPriceMarginAndLimit(t *testing.T) { + type testCase struct { + name string + gasPriceMarginFactor float64 + maxGasPriceLimit uint64 + suggestedGasPrice int64 + expectedGasPrice int64 + } + + testCases := []testCase{ + { + name: "no margin and no limit", + gasPriceMarginFactor: 1, + maxGasPriceLimit: 0, + suggestedGasPrice: 100, + expectedGasPrice: 100, + }, + { + name: "20% margin", + gasPriceMarginFactor: 1.2, + maxGasPriceLimit: 0, + suggestedGasPrice: 100, + expectedGasPrice: 120, + }, + { + name: "20% margin but limited", + gasPriceMarginFactor: 1.2, + maxGasPriceLimit: 110, + suggestedGasPrice: 100, + expectedGasPrice: 110, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + dbCfg := dbutils.NewStateConfigFromEnv() + require.NoError(t, dbutils.InitOrResetState(dbCfg)) + + etherman := newEthermanMock(t) + st := newStateMock(t) + storage, err := NewPostgresStorage(dbCfg) + require.NoError(t, err) + + var cfg = Config{ + FrequencyToMonitorTxs: defaultEthTxmanagerConfigForTests.FrequencyToMonitorTxs, + WaitTxToBeMined: defaultEthTxmanagerConfigForTests.WaitTxToBeMined, + GasPriceMarginFactor: tc.gasPriceMarginFactor, + MaxGasPriceLimit: tc.maxGasPriceLimit, + } + + ethTxManagerClient := New(cfg, etherman, storage, st) + + owner := "owner" + id := "unique_id" + from := common.HexToAddress("") + var to *common.Address + var value *big.Int + var data []byte = nil + + ctx := context.Background() + + currentNonce := uint64(1) + etherman. + On("CurrentNonce", ctx, from). + Return(currentNonce, nil). + Once() + + estimatedGas := uint64(1) + etherman. + On("EstimateGas", ctx, from, to, value, data). + Return(estimatedGas, nil). + Once() + + suggestedGasPrice := big.NewInt(int64(tc.suggestedGasPrice)) + etherman. + On("SuggestedGasPrice", ctx). + Return(suggestedGasPrice, nil). + Once() + + expectedSuggestedGasPrice := big.NewInt(tc.expectedGasPrice) + + err = ethTxManagerClient.Add(ctx, owner, id, from, to, value, data, nil) + require.NoError(t, err) + + monitoredTx, err := storage.Get(ctx, owner, id, nil) + require.NoError(t, err) + require.Equal(t, monitoredTx.gasPrice.Cmp(expectedSuggestedGasPrice), 0, fmt.Sprintf("expected gas price %v, found %v", expectedSuggestedGasPrice.String(), monitoredTx.gasPrice.String())) + }) + } +} diff --git a/ethtxmanager/interfaces.go b/ethtxmanager/interfaces.go index 304e6fd100..5f298a8720 100644 --- a/ethtxmanager/interfaces.go +++ b/ethtxmanager/interfaces.go @@ -5,7 +5,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/ethtxmanager/mock_state_test.go b/ethtxmanager/mock_state_test.go index befb59638c..eae763cab6 100644 --- a/ethtxmanager/mock_state_test.go +++ b/ethtxmanager/mock_state_test.go @@ -9,7 +9,7 @@ import ( pgx "github.com/jackc/pgx/v4" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/cdk-validium-node/state" ) // stateMock is an autogenerated mock type for the stateInterface type diff --git a/ethtxmanager/pgstorage.go b/ethtxmanager/pgstorage.go index b9d611cc41..5e4b39a6f5 100644 --- a/ethtxmanager/pgstorage.go +++ b/ethtxmanager/pgstorage.go @@ -7,7 +7,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/db" + "github.com/0xPolygon/cdk-validium-node/db" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgconn" "github.com/jackc/pgx/v4" diff --git a/ethtxmanager/pgstorage_test.go b/ethtxmanager/pgstorage_test.go index be20b2d498..ee734aec63 100644 --- a/ethtxmanager/pgstorage_test.go +++ b/ethtxmanager/pgstorage_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/event/config.go b/event/config.go index cae1dbc8f3..f86952de76 100644 --- a/event/config.go +++ b/event/config.go @@ -1,6 +1,6 @@ package event -import "github.com/0xPolygonHermez/zkevm-node/db" +import "github.com/0xPolygon/cdk-validium-node/db" // Config for event type Config struct { diff --git a/event/eventlog.go b/event/eventlog.go index a7a0ca91b4..0619898f5f 100644 --- a/event/eventlog.go +++ b/event/eventlog.go @@ -5,8 +5,8 @@ import ( "encoding/json" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" ) // EventLog is the main struct for the event log diff --git a/event/eventlog_test.go b/event/eventlog_test.go index c77dc209a6..e29c6827c0 100644 --- a/event/eventlog_test.go +++ b/event/eventlog_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/pgeventstorage" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/pgeventstorage" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" "github.com/stretchr/testify/require" "golang.org/x/net/context" ) diff --git a/event/nileventstorage/nileventstorage.go b/event/nileventstorage/nileventstorage.go index 0fa6558132..f4b53c17cc 100644 --- a/event/nileventstorage/nileventstorage.go +++ b/event/nileventstorage/nileventstorage.go @@ -3,8 +3,8 @@ package nileventstorage import ( "context" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/log" ) // NilEventStorage is an implementation of the event storage interface diff --git a/event/pgeventstorage/pgeventstorage.go b/event/pgeventstorage/pgeventstorage.go index 93839524fb..67a7a9f7d6 100644 --- a/event/pgeventstorage/pgeventstorage.go +++ b/event/pgeventstorage/pgeventstorage.go @@ -3,9 +3,9 @@ package pgeventstorage import ( "context" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/nileventstorage" "github.com/jackc/pgx/v4/pgxpool" ) diff --git a/gasprice/config.go b/gasprice/config.go index 6e0426ae40..fe3c794b6b 100644 --- a/gasprice/config.go +++ b/gasprice/config.go @@ -3,7 +3,7 @@ package gasprice import ( "math/big" - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/cdk-validium-node/config/types" ) // EstimatorType different gas estimator types. diff --git a/gasprice/default_test.go b/gasprice/default_test.go index d260702143..208d53678f 100644 --- a/gasprice/default_test.go +++ b/gasprice/default_test.go @@ -5,7 +5,7 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" ) func init() { diff --git a/gasprice/follower.go b/gasprice/follower.go index fa5594336a..47212cbe31 100644 --- a/gasprice/follower.go +++ b/gasprice/follower.go @@ -6,8 +6,8 @@ import ( "math/big" "strconv" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/log" ) // FollowerGasPrice struct. diff --git a/gasprice/follower_test.go b/gasprice/follower_test.go index 9bd1e7d129..91b5be83be 100644 --- a/gasprice/follower_test.go +++ b/gasprice/follower_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/log" ) func init() { diff --git a/gasprice/gaspricesuggester.go b/gasprice/gaspricesuggester.go index 6178bfec78..f5a0afe527 100644 --- a/gasprice/gaspricesuggester.go +++ b/gasprice/gaspricesuggester.go @@ -4,9 +4,9 @@ import ( "context" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" ) // L2GasPricer interface for gas price suggester. diff --git a/gasprice/interfaces.go b/gasprice/interfaces.go index bca642ed25..8ab2c27e63 100644 --- a/gasprice/interfaces.go +++ b/gasprice/interfaces.go @@ -5,7 +5,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/pool" + "github.com/0xPolygon/cdk-validium-node/pool" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" ) diff --git a/gasprice/lastnbatches.go b/gasprice/lastnbatches.go index f62a369fc2..a928bc093d 100644 --- a/gasprice/lastnbatches.go +++ b/gasprice/lastnbatches.go @@ -6,7 +6,7 @@ import ( "sort" "sync" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" ) const sampleNumber = 3 // Number of transactions sampled in a batch. diff --git a/gasprice/mock_pool.go b/gasprice/mock_pool.go index 901d0b89a1..3b081ea8af 100644 --- a/gasprice/mock_pool.go +++ b/gasprice/mock_pool.go @@ -7,7 +7,7 @@ import ( mock "github.com/stretchr/testify/mock" - pool "github.com/0xPolygonHermez/zkevm-node/pool" + pool "github.com/0xPolygon/cdk-validium-node/pool" time "time" ) diff --git a/go.mod b/go.mod index 7030449b8e..f3dd2324c7 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/0xPolygonHermez/zkevm-node +module github.com/0xPolygon/cdk-validium-node go 1.19 @@ -23,7 +23,7 @@ require ( github.com/spf13/afero v1.9.5 github.com/spf13/viper v1.16.0 github.com/stretchr/testify v1.8.4 - github.com/umbracle/ethgo v0.1.3 + github.com/umbracle/ethgo v0.1.4-0.20230712173909-df37dddf16f0 github.com/urfave/cli/v2 v2.25.7 go.uber.org/zap v1.24.0 golang.org/x/crypto v0.11.0 @@ -71,7 +71,6 @@ require ( github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -99,6 +98,7 @@ require ( github.com/markbates/safe v1.0.1 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/miguelmota/go-solidity-sha3 v0.1.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect @@ -145,4 +145,9 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect ) -require github.com/prometheus/client_golang v1.16.0 +require ( + github.com/0xPolygon/cdk-data-availability v0.0.0-20230824143045-5ff4265f5f6f + github.com/0xPolygonHermez/zkevm-node v0.1.0-RC8.0.20230601153103-86d9fb808691 + github.com/golang/protobuf v1.5.3 + github.com/prometheus/client_golang v1.16.0 +) diff --git a/go.sum b/go.sum index 37a9bf79f9..487ea537fa 100644 --- a/go.sum +++ b/go.sum @@ -42,6 +42,10 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/0xPolygon/cdk-data-availability v0.0.0-20230824143045-5ff4265f5f6f h1:zrucIs2SIYIP76n6Fp3lXCRBQLga0UfoN43YRCFqVOc= +github.com/0xPolygon/cdk-data-availability v0.0.0-20230824143045-5ff4265f5f6f/go.mod h1:mXqFjKYvUVMDJaLkeKYnffimqvOByDCTw02kjdXc0w0= +github.com/0xPolygonHermez/zkevm-node v0.1.0-RC8.0.20230601153103-86d9fb808691 h1:PTbLJ6HEQ9J0CzKrv62n/l4GsGYygyAVX4kRAWY530Q= +github.com/0xPolygonHermez/zkevm-node v0.1.0-RC8.0.20230601153103-86d9fb808691/go.mod h1:6/9FEzpZVSQJaRY5iAJpwIanokNQWkbl1yUP5mUbShA= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -116,7 +120,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lg github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/containerd/continuity v0.0.0-20191214063359-1097c8bae83b h1:pik3LX++5O3UiNWv45wfP/WT81l7ukBJzd3uUiifbSU= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -519,6 +523,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfr github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +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/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= @@ -558,9 +564,9 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= -github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= -github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -692,8 +698,8 @@ github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGr github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/umbracle/ethgo v0.1.3 h1:s8D7Rmphnt71zuqrgsGTMS5gTNbueGO1zKLh7qsFzTM= -github.com/umbracle/ethgo v0.1.3/go.mod h1:g9zclCLixH8liBI27Py82klDkW7Oo33AxUOr+M9lzrU= +github.com/umbracle/ethgo v0.1.4-0.20230712173909-df37dddf16f0 h1:wE2g4ydxJk8kdRIRq69zZvnhJ49ShS2BJSzFBFdMv6I= +github.com/umbracle/ethgo v0.1.4-0.20230712173909-df37dddf16f0/go.mod h1:J+OZNfRCtbaYW3AEc0m47GhwAzlNJjcr9vO86nzOr6E= github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722 h1:10Nbw6cACsnQm7r34zlpJky+IzxVLRk6MKTS2d3Vp0E= github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722/go.mod h1:c8J0h9aULj2i3umrfyestM6jCq0LK0U6ly6bWy96nd4= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= diff --git a/jsonrpc/client/client.go b/jsonrpc/client/client.go index 7ae0057713..d9e3648cea 100644 --- a/jsonrpc/client/client.go +++ b/jsonrpc/client/client.go @@ -7,7 +7,7 @@ import ( "io" "net/http" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" ) // Client defines typed wrappers for the zkEVM RPC API. diff --git a/jsonrpc/client/zkevm.go b/jsonrpc/client/zkevm.go index f2e78aa4af..2fda3f9e40 100644 --- a/jsonrpc/client/zkevm.go +++ b/jsonrpc/client/zkevm.go @@ -6,8 +6,8 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" ) // BatchNumber returns the latest batch number diff --git a/jsonrpc/config.go b/jsonrpc/config.go index d347ba41d2..473133d57b 100644 --- a/jsonrpc/config.go +++ b/jsonrpc/config.go @@ -1,6 +1,6 @@ package jsonrpc -import "github.com/0xPolygonHermez/zkevm-node/config/types" +import "github.com/0xPolygon/cdk-validium-node/config/types" // Config represents the configuration of the json rpc type Config struct { diff --git a/jsonrpc/dbtxmanager.go b/jsonrpc/dbtxmanager.go index 0b294469dc..f6cc539e27 100644 --- a/jsonrpc/dbtxmanager.go +++ b/jsonrpc/dbtxmanager.go @@ -3,7 +3,7 @@ package jsonrpc import ( "context" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" "github.com/jackc/pgx/v4" ) diff --git a/jsonrpc/dbtxmanager_test.go b/jsonrpc/dbtxmanager_test.go index b3dba72625..783eea7299 100644 --- a/jsonrpc/dbtxmanager_test.go +++ b/jsonrpc/dbtxmanager_test.go @@ -5,8 +5,8 @@ import ( "errors" "testing" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/mocks" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/mocks" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" "github.com/jackc/pgx/v4" "github.com/stretchr/testify/assert" ) diff --git a/jsonrpc/endpoints_debug.go b/jsonrpc/endpoints_debug.go index 8286438771..f96eb4ef6e 100644 --- a/jsonrpc/endpoints_debug.go +++ b/jsonrpc/endpoints_debug.go @@ -13,12 +13,12 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/jsonrpc/endpoints_eth.go b/jsonrpc/endpoints_eth.go index 523202f364..a6c03f6d4b 100644 --- a/jsonrpc/endpoints_eth.go +++ b/jsonrpc/endpoints_eth.go @@ -9,13 +9,13 @@ import ( "net/http" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/gorilla/websocket" @@ -800,6 +800,10 @@ func (e *EthEndpoints) SendRawTransaction(httpRequest *http.Request, input strin if e.cfg.SequencerNodeURI != "" { return e.relayTxToSequencerNode(input) } else { + if err := checkPolicy(context.Background(), e.pool, input); err != nil { + return RPCErrorResponse(types.AccessDeniedCode, err.Error(), nil) + } + ip := "" ips := httpRequest.Header.Get("X-Forwarded-For") diff --git a/jsonrpc/endpoints_eth_test.go b/jsonrpc/endpoints_eth_test.go index 9cddb79737..e563624a61 100644 --- a/jsonrpc/endpoints_eth_test.go +++ b/jsonrpc/endpoints_eth_test.go @@ -9,12 +9,12 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -3211,6 +3211,7 @@ func TestSendRawTransactionViaGeth(t *testing.T) { } testCases := []testCase{ + { Name: "Send TX successfully", Tx: ethTypes.NewTransaction(1, common.HexToAddress("0x1"), big.NewInt(1), uint64(1), big.NewInt(1), []byte{}), @@ -3362,6 +3363,238 @@ func TestSendRawTransactionJSONRPCCall(t *testing.T) { } } +func TestSendRawTransactionJSONRPCCallWithPolicyApplied(t *testing.T) { + // Set up the sender + allowedPrivateKey, err := crypto.HexToECDSA(strings.TrimPrefix("0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e", "0x")) + require.NoError(t, err) + allowed, err := bind.NewKeyedTransactorWithChainID(allowedPrivateKey, big.NewInt(1)) + require.NoError(t, err) + + disallowedPrivateKey, err := crypto.HexToECDSA(strings.TrimPrefix("0xdeadbeef8721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e", "0x")) + require.NoError(t, err) + disallowed, err := bind.NewKeyedTransactorWithChainID(disallowedPrivateKey, big.NewInt(1)) + require.NoError(t, err) + require.NotNil(t, disallowed) + + allowedContract := common.HexToAddress("0x1") + disallowedContract := common.HexToAddress("0x2") + + senderDenied := types.NewRPCError(types.AccessDeniedCode, "sender disallowed send_tx by policy") + contractDenied := types.NewRPCError(types.AccessDeniedCode, "contract disallowed send_tx by policy") + deployDenied := types.NewRPCError(types.AccessDeniedCode, "sender disallowed deploy by policy") + + cfg := getDefaultConfig() + s, m, _ := newMockedServer(t, cfg) + defer s.Stop() + + type testCase struct { + Name string + Input string + ExpectedResult *common.Hash + ExpectedError types.Error + Prepare func(t *testing.T, tc *testCase) + SetupMocks func(t *testing.T, m *mocksWrapper, tc testCase) + } + + testCases := []testCase{ + { + Name: "Sender & contract on allow list, accepted", + Prepare: func(t *testing.T, tc *testCase) { + tx := ethTypes.NewTransaction(1, allowedContract, big.NewInt(1), uint64(1), big.NewInt(1), []byte{}) + + signedTx, err := allowed.Signer(allowed.From, tx) + require.NoError(t, err) + + txBinary, err := signedTx.MarshalBinary() + require.NoError(t, err) + + rawTx := hex.EncodeToHex(txBinary) + require.NoError(t, err) + + tc.Input = rawTx + tc.ExpectedResult = state.HashPtr(signedTx.Hash()) + tc.ExpectedError = nil + }, + SetupMocks: func(t *testing.T, m *mocksWrapper, tc testCase) { + m.Pool. + On("AddTx", context.Background(), mock.IsType(ethTypes.Transaction{}), ""). + Return(nil). + Once() + m.Pool. + On("CheckPolicy", context.Background(), pool.SendTx, allowedContract). + Return(true, nil). + Once() + m.Pool. + On("CheckPolicy", context.Background(), pool.SendTx, allowed.From). + Return(true, nil). + Once() + }, + }, + { + Name: "Contract not on allow list, rejected", + Prepare: func(t *testing.T, tc *testCase) { + tx := ethTypes.NewTransaction(1, disallowedContract, big.NewInt(1), uint64(1), big.NewInt(1), []byte{}) + + signedTx, err := allowed.Signer(allowed.From, tx) + require.NoError(t, err) + + txBinary, err := signedTx.MarshalBinary() + require.NoError(t, err) + + rawTx := hex.EncodeToHex(txBinary) + require.NoError(t, err) + + tc.Input = rawTx + tc.ExpectedResult = nil + tc.ExpectedError = contractDenied + }, + SetupMocks: func(t *testing.T, m *mocksWrapper, tc testCase) { + m.Pool. + On("CheckPolicy", context.Background(), pool.SendTx, disallowedContract). + Return(false, contractDenied). + Once() + }, + }, + { + Name: "Sender not on allow list, rejected", + Prepare: func(t *testing.T, tc *testCase) { + tx := ethTypes.NewTransaction(1, allowedContract, big.NewInt(1), uint64(1), big.NewInt(1), []byte{}) + + signedTx, err := disallowed.Signer(disallowed.From, tx) + require.NoError(t, err) + + txBinary, err := signedTx.MarshalBinary() + require.NoError(t, err) + + rawTx := hex.EncodeToHex(txBinary) + require.NoError(t, err) + + tc.Input = rawTx + tc.ExpectedResult = nil + tc.ExpectedError = senderDenied + }, + SetupMocks: func(t *testing.T, m *mocksWrapper, tc testCase) { + m.Pool. + On("CheckPolicy", context.Background(), pool.SendTx, allowedContract). + Return(true, nil). + Once() + m.Pool. + On("CheckPolicy", context.Background(), pool.SendTx, disallowed.From). + Return(false, senderDenied). + Once() + }, + }, + { + Name: "Unsigned tx with allowed contract, accepted", // for backward compatibility + Prepare: func(t *testing.T, tc *testCase) { + tx := ethTypes.NewTransaction(1, allowedContract, big.NewInt(1), uint64(1), big.NewInt(1), []byte{}) + + txBinary, err := tx.MarshalBinary() + require.NoError(t, err) + + rawTx := hex.EncodeToHex(txBinary) + require.NoError(t, err) + + tc.Input = rawTx + tc.ExpectedResult = state.HashPtr(tx.Hash()) + tc.ExpectedError = nil + }, + SetupMocks: func(t *testing.T, m *mocksWrapper, tc testCase) { + m.Pool. + On("AddTx", context.Background(), mock.IsType(ethTypes.Transaction{}), ""). + Return(nil). + Once() + // policy does not reject this case for backward compat + }, + }, + { + Name: "Unsigned tx with disallowed contract, rejected", + Prepare: func(t *testing.T, tc *testCase) { + tx := ethTypes.NewTransaction(1, disallowedContract, big.NewInt(1), uint64(1), big.NewInt(1), []byte{}) + + signedTx, err := disallowed.Signer(disallowed.From, tx) + require.NoError(t, err) + + txBinary, err := signedTx.MarshalBinary() + require.NoError(t, err) + + rawTx := hex.EncodeToHex(txBinary) + require.NoError(t, err) + + tc.Input = rawTx + tc.ExpectedResult = nil + tc.ExpectedError = contractDenied + }, + SetupMocks: func(t *testing.T, m *mocksWrapper, tc testCase) { + m.Pool. + On("CheckPolicy", context.Background(), pool.SendTx, disallowedContract). + Return(false, contractDenied). + Once() + }, + }, + { + Name: "Send invalid tx input", // for backward compatibility + Prepare: func(t *testing.T, tc *testCase) { + tc.Input = "0x1234" + tc.ExpectedResult = nil + tc.ExpectedError = types.NewRPCError(types.InvalidParamsErrorCode, "invalid tx input") + }, + SetupMocks: func(t *testing.T, m *mocksWrapper, tc testCase) {}, + }, + { + Name: "Sender not on deploy allow list, rejected", + Prepare: func(t *testing.T, tc *testCase) { + deployAddr := common.HexToAddress("0x0") + tx := ethTypes.NewTransaction(1, deployAddr, big.NewInt(1), uint64(1), big.NewInt(1), []byte{}) + + signedTx, err := disallowed.Signer(disallowed.From, tx) + require.NoError(t, err) + + txBinary, err := signedTx.MarshalBinary() + require.NoError(t, err) + + rawTx := hex.EncodeToHex(txBinary) + require.NoError(t, err) + + tc.Input = rawTx + tc.ExpectedResult = nil + tc.ExpectedError = deployDenied + }, + SetupMocks: func(t *testing.T, m *mocksWrapper, tc testCase) { + m.Pool. + On("CheckPolicy", context.Background(), pool.Deploy, disallowed.From). + Return(false, nil). + Once() + }, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.Name, func(t *testing.T) { + tc := testCase + tc.Prepare(t, &tc) + tc.SetupMocks(t, m, tc) + + res, err := s.JSONRPCCall("eth_sendRawTransaction", tc.Input) + require.NoError(t, err) + + assert.Equal(t, float64(1), res.ID) + assert.Equal(t, "2.0", res.JSONRPC) + + if res.Result != nil || tc.ExpectedResult != nil { + var result common.Hash + err = json.Unmarshal(res.Result, &result) + require.NoError(t, err) + assert.Equal(t, *tc.ExpectedResult, result) + } + if res.Error != nil || tc.ExpectedError != nil { + assert.Equal(t, tc.ExpectedError.ErrorCode(), res.Error.Code) + assert.Equal(t, tc.ExpectedError.Error(), res.Error.Message) + } + }) + } +} + func TestSendRawTransactionViaGethForNonSequencerNode(t *testing.T) { sequencerServer, sequencerMocks, _ := newSequencerMockedServer(t) defer sequencerServer.Stop() diff --git a/jsonrpc/endpoints_net.go b/jsonrpc/endpoints_net.go index eca4881e44..8b6da85bfc 100644 --- a/jsonrpc/endpoints_net.go +++ b/jsonrpc/endpoints_net.go @@ -3,8 +3,8 @@ package jsonrpc import ( "strconv" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" ) // NetEndpoints contains implementations for the "net" RPC endpoints diff --git a/jsonrpc/endpoints_txpool.go b/jsonrpc/endpoints_txpool.go index edb68812d0..0b8659ae8d 100644 --- a/jsonrpc/endpoints_txpool.go +++ b/jsonrpc/endpoints_txpool.go @@ -1,7 +1,7 @@ package jsonrpc import ( - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" "github.com/ethereum/go-ethereum/common" ) diff --git a/jsonrpc/endpoints_web3.go b/jsonrpc/endpoints_web3.go index da076bf1a7..e24ddb6512 100644 --- a/jsonrpc/endpoints_web3.go +++ b/jsonrpc/endpoints_web3.go @@ -3,8 +3,8 @@ package jsonrpc import ( "math/big" - "github.com/0xPolygonHermez/zkevm-node" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + zkevm "github.com/0xPolygon/cdk-validium-node" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" "golang.org/x/crypto/sha3" ) diff --git a/jsonrpc/endpoints_zkevm.go b/jsonrpc/endpoints_zkevm.go index 608a629e3c..42f1be2425 100644 --- a/jsonrpc/endpoints_zkevm.go +++ b/jsonrpc/endpoints_zkevm.go @@ -5,10 +5,10 @@ import ( "errors" "fmt" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" ) diff --git a/jsonrpc/endpoints_zkevm_test.go b/jsonrpc/endpoints_zkevm_test.go index b973d806b4..c0346b5b63 100644 --- a/jsonrpc/endpoints_zkevm_test.go +++ b/jsonrpc/endpoints_zkevm_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" diff --git a/jsonrpc/handler.go b/jsonrpc/handler.go index cd78075f37..08530e6e94 100644 --- a/jsonrpc/handler.go +++ b/jsonrpc/handler.go @@ -9,8 +9,8 @@ import ( "sync" "unicode" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/gorilla/websocket" ) diff --git a/jsonrpc/metrics/metrics.go b/jsonrpc/metrics/metrics.go index 4ffefca2a1..b483f30cc6 100644 --- a/jsonrpc/metrics/metrics.go +++ b/jsonrpc/metrics/metrics.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/cdk-validium-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/jsonrpc/mocks/mock_pool.go b/jsonrpc/mocks/mock_pool.go index 99269d0574..789512ae47 100644 --- a/jsonrpc/mocks/mock_pool.go +++ b/jsonrpc/mocks/mock_pool.go @@ -9,7 +9,7 @@ import ( mock "github.com/stretchr/testify/mock" - pool "github.com/0xPolygonHermez/zkevm-node/pool" + pool "github.com/0xPolygon/cdk-validium-node/pool" time "time" @@ -35,6 +35,30 @@ func (_m *PoolMock) AddTx(ctx context.Context, tx types.Transaction, ip string) return r0 } +// CheckPolicy provides a mock function with given fields: ctx, policy, address +func (_m *PoolMock) CheckPolicy(ctx context.Context, policy pool.PolicyName, address common.Address) (bool, error) { + ret := _m.Called(ctx, policy, address) + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, pool.PolicyName, common.Address) (bool, error)); ok { + return rf(ctx, policy, address) + } + if rf, ok := ret.Get(0).(func(context.Context, pool.PolicyName, common.Address) bool); ok { + r0 = rf(ctx, policy, address) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(context.Context, pool.PolicyName, common.Address) error); ok { + r1 = rf(ctx, policy, address) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // CountPendingTransactions provides a mock function with given fields: ctx func (_m *PoolMock) CountPendingTransactions(ctx context.Context) (uint64, error) { ret := _m.Called(ctx) diff --git a/jsonrpc/mocks/mock_state.go b/jsonrpc/mocks/mock_state.go index 010eabd049..b1835f61e4 100644 --- a/jsonrpc/mocks/mock_state.go +++ b/jsonrpc/mocks/mock_state.go @@ -14,9 +14,9 @@ import ( pgx "github.com/jackc/pgx/v4" - runtime "github.com/0xPolygonHermez/zkevm-node/state/runtime" + runtime "github.com/0xPolygon/cdk-validium-node/state/runtime" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/cdk-validium-node/state" time "time" ) diff --git a/jsonrpc/policy.go b/jsonrpc/policy.go new file mode 100644 index 0000000000..88c8f7d531 --- /dev/null +++ b/jsonrpc/policy.go @@ -0,0 +1,61 @@ +package jsonrpc + +import ( + "context" + + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/ethereum/go-ethereum/common" + ethTypes "github.com/ethereum/go-ethereum/core/types" +) + +func checkPolicy(ctx context.Context, p types.PoolInterface, input string) error { + tx, err := hexToTx(input) + if err != nil { + // ignore it, let the later processing reject + return nil + } + + // if the tx is signed, check the from address. If there is no from address, the tx is not rejected as it + // will get rejected later. This maintains backward compatibility with RPC expectations. TODO: verify this is ok behavior + var from common.Address + if from, err = state.GetSender(*tx); err != nil { + // if not signed, then skip check, it fails later on its own + return nil + } + + switch resolvePolicy(tx) { + case pool.SendTx: + var allow bool + if allow, err = p.CheckPolicy(ctx, pool.SendTx, *tx.To()); err != nil { + return err + } + if !allow { + return pool.ErrContractDisallowedSendTx + } + if allow, err = p.CheckPolicy(ctx, pool.SendTx, from); err != nil { + return err + } + if !allow { + return pool.ErrSenderDisallowedSendTx + } + case pool.Deploy: + var allow bool + // check that sender may deploy contracts + if allow, err = p.CheckPolicy(ctx, pool.Deploy, from); err != nil { + return err + } + if !allow { + return pool.ErrSenderDisallowedDeploy + } + } + return nil +} + +func resolvePolicy(tx *ethTypes.Transaction) pool.PolicyName { + if tx.To() == nil || tx.To().Hex() == common.HexToAddress("0x0").Hex() { + return pool.Deploy + } + return pool.SendTx +} diff --git a/jsonrpc/query.go b/jsonrpc/query.go index 2cc375dd36..94144a1de8 100644 --- a/jsonrpc/query.go +++ b/jsonrpc/query.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" "github.com/ethereum/go-ethereum/common" "github.com/gorilla/websocket" ) diff --git a/jsonrpc/server.go b/jsonrpc/server.go index 8d28ded549..8b27720896 100644 --- a/jsonrpc/server.go +++ b/jsonrpc/server.go @@ -12,9 +12,9 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/metrics" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/metrics" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/didip/tollbooth/v6" "github.com/gorilla/websocket" ) diff --git a/jsonrpc/server_test.go b/jsonrpc/server_test.go index 0604d21a47..ae66f838a2 100644 --- a/jsonrpc/server_test.go +++ b/jsonrpc/server_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/mocks" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/mocks" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/jsonrpc/storage.go b/jsonrpc/storage.go index 32de18fc27..09b9b616bd 100644 --- a/jsonrpc/storage.go +++ b/jsonrpc/storage.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/cdk-validium-node/hex" "github.com/google/uuid" "github.com/gorilla/websocket" ) diff --git a/jsonrpc/types/codec.go b/jsonrpc/types/codec.go index 495d639641..721dd661f9 100644 --- a/jsonrpc/types/codec.go +++ b/jsonrpc/types/codec.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/hex" "github.com/jackc/pgx/v4" ) diff --git a/jsonrpc/types/codec_test.go b/jsonrpc/types/codec_test.go index 5b355c41f5..07f7d6ac7a 100644 --- a/jsonrpc/types/codec_test.go +++ b/jsonrpc/types/codec_test.go @@ -7,7 +7,7 @@ import ( "strconv" "testing" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/mocks" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/mocks" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/jsonrpc/types/errors.go b/jsonrpc/types/errors.go index 17e095094c..fad6ed7c3b 100644 --- a/jsonrpc/types/errors.go +++ b/jsonrpc/types/errors.go @@ -15,6 +15,8 @@ const ( InvalidParamsErrorCode = -32602 // ParserErrorCode error code for parsing errors ParserErrorCode = -32700 + // AccessDeniedCode error code when requests are denied + AccessDeniedCode = -32800 ) // Error interface diff --git a/jsonrpc/types/interfaces.go b/jsonrpc/types/interfaces.go index af2b24cb36..2fc689db7d 100644 --- a/jsonrpc/types/interfaces.go +++ b/jsonrpc/types/interfaces.go @@ -5,9 +5,9 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -22,6 +22,7 @@ type PoolInterface interface { GetPendingTxs(ctx context.Context, limit uint64) ([]pool.Transaction, error) CountPendingTransactions(ctx context.Context) (uint64, error) GetTxByHash(ctx context.Context, hash common.Hash) (*pool.Transaction, error) + CheckPolicy(ctx context.Context, policy pool.PolicyName, address common.Address) (bool, error) } // StateInterface gathers the methods required to interact with the state. diff --git a/jsonrpc/types/types.go b/jsonrpc/types/types.go index 515a9a151d..e00eb6c43e 100644 --- a/jsonrpc/types/types.go +++ b/jsonrpc/types/types.go @@ -8,8 +8,8 @@ import ( "strconv" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/jsonrpc/types/types_test.go b/jsonrpc/types/types_test.go index af79020282..3a87ab39e5 100644 --- a/jsonrpc/types/types_test.go +++ b/jsonrpc/types/types_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/log/log.go b/log/log.go index f8d26d08a4..5210f52cf5 100644 --- a/log/log.go +++ b/log/log.go @@ -5,7 +5,7 @@ import ( "os" "strings" - "github.com/0xPolygonHermez/zkevm-node" + zkevm "github.com/0xPolygon/cdk-validium-node" "github.com/hermeznetwork/tracerr" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/merkletree/client.go b/merkletree/client.go index 94af21c07a..49a893910b 100644 --- a/merkletree/client.go +++ b/merkletree/client.go @@ -4,14 +4,14 @@ import ( "context" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree/hashdb" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) // NewMTDBServiceClient creates a new MTDB client. -func NewMTDBServiceClient(ctx context.Context, c Config) (pb.HashDBServiceClient, *grpc.ClientConn, context.CancelFunc) { +func NewMTDBServiceClient(ctx context.Context, c Config) (hashdb.HashDBServiceClient, *grpc.ClientConn, context.CancelFunc) { opts := []grpc.DialOption{ grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(), @@ -26,6 +26,6 @@ func NewMTDBServiceClient(ctx context.Context, c Config) (pb.HashDBServiceClient } log.Infof("connected to merkletree") - mtDBClient := pb.NewHashDBServiceClient(mtDBConn) + mtDBClient := hashdb.NewHashDBServiceClient(mtDBConn) return mtDBClient, mtDBConn, cancel } diff --git a/merkletree/hashdb/hashdb.pb.go b/merkletree/hashdb/hashdb.pb.go new file mode 100644 index 0000000000..1e5955daf4 --- /dev/null +++ b/merkletree/hashdb/hashdb.pb.go @@ -0,0 +1,1607 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: hashdb.proto + +package hashdb + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/protobuf/types/known/emptypb" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type Persistence int32 + +const ( + Persistence_PERSISTENCE_CACHE_UNSPECIFIED Persistence = 0 + Persistence_PERSISTENCE_DATABASE Persistence = 1 + Persistence_PERSISTENCE_TEMPORARY Persistence = 2 +) + +var Persistence_name = map[int32]string{ + 0: "PERSISTENCE_CACHE_UNSPECIFIED", + 1: "PERSISTENCE_DATABASE", + 2: "PERSISTENCE_TEMPORARY", +} + +var Persistence_value = map[string]int32{ + "PERSISTENCE_CACHE_UNSPECIFIED": 0, + "PERSISTENCE_DATABASE": 1, + "PERSISTENCE_TEMPORARY": 2, +} + +func (x Persistence) String() string { + return proto.EnumName(Persistence_name, int32(x)) +} + +func (Persistence) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{0} +} + +type ResultCode_Code int32 + +const ( + ResultCode_CODE_UNSPECIFIED ResultCode_Code = 0 + ResultCode_CODE_SUCCESS ResultCode_Code = 1 + ResultCode_CODE_DB_KEY_NOT_FOUND ResultCode_Code = 2 + ResultCode_CODE_DB_ERROR ResultCode_Code = 3 + ResultCode_CODE_INTERNAL_ERROR ResultCode_Code = 4 + ResultCode_CODE_SMT_INVALID_DATA_SIZE ResultCode_Code = 14 +) + +var ResultCode_Code_name = map[int32]string{ + 0: "CODE_UNSPECIFIED", + 1: "CODE_SUCCESS", + 2: "CODE_DB_KEY_NOT_FOUND", + 3: "CODE_DB_ERROR", + 4: "CODE_INTERNAL_ERROR", + 14: "CODE_SMT_INVALID_DATA_SIZE", +} + +var ResultCode_Code_value = map[string]int32{ + "CODE_UNSPECIFIED": 0, + "CODE_SUCCESS": 1, + "CODE_DB_KEY_NOT_FOUND": 2, + "CODE_DB_ERROR": 3, + "CODE_INTERNAL_ERROR": 4, + "CODE_SMT_INVALID_DATA_SIZE": 14, +} + +func (x ResultCode_Code) String() string { + return proto.EnumName(ResultCode_Code_name, int32(x)) +} + +func (ResultCode_Code) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{20, 0} +} + +type Version struct { + V0_0_1 string `protobuf:"bytes,1,opt,name=v0_0_1,json=v001,proto3" json:"v0_0_1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{0} +} + +func (m *Version) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Version.Unmarshal(m, b) +} +func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Version.Marshal(b, m, deterministic) +} +func (m *Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_Version.Merge(m, src) +} +func (m *Version) XXX_Size() int { + return xxx_messageInfo_Version.Size(m) +} +func (m *Version) XXX_DiscardUnknown() { + xxx_messageInfo_Version.DiscardUnknown(m) +} + +var xxx_messageInfo_Version proto.InternalMessageInfo + +func (m *Version) GetV0_0_1() string { + if m != nil { + return m.V0_0_1 + } + return "" +} + +//* +// @dev SetRequest +// @param {old_root} - merkle-tree root +// @param {key} - key to set +// @param {value} - scalar value to set (HEX string format) +// @param {persistence} - indicates if it should be stored only in CACHE, in the SQL DATABASE, or it is just TEMPORARY and should be deleted at the flush of this batch UUID +// @param {details} - indicates if it should return all response parameters (true) or just the new root (false) +// @param {get_db_read_log} - indicates if it should return the DB reads generated during the execution of the request +// @param {batch_uuid} - indicates a unique identifier of the current batch or session; data for this batch can be stored in memory until flushed to database +// @param {tx} - current transaction ordinal number: 0, 1, 2... +type SetRequest struct { + OldRoot *Fea `protobuf:"bytes,1,opt,name=old_root,json=oldRoot,proto3" json:"old_root,omitempty"` + Key *Fea `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + Persistence Persistence `protobuf:"varint,4,opt,name=persistence,proto3,enum=hashdb.v1.Persistence" json:"persistence,omitempty"` + Details bool `protobuf:"varint,5,opt,name=details,proto3" json:"details,omitempty"` + GetDbReadLog bool `protobuf:"varint,6,opt,name=get_db_read_log,json=getDbReadLog,proto3" json:"get_db_read_log,omitempty"` + BatchUuid string `protobuf:"bytes,7,opt,name=batch_uuid,json=batchUuid,proto3" json:"batch_uuid,omitempty"` + Tx uint64 `protobuf:"varint,8,opt,name=tx,proto3" json:"tx,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetRequest) Reset() { *m = SetRequest{} } +func (m *SetRequest) String() string { return proto.CompactTextString(m) } +func (*SetRequest) ProtoMessage() {} +func (*SetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{1} +} + +func (m *SetRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetRequest.Unmarshal(m, b) +} +func (m *SetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetRequest.Marshal(b, m, deterministic) +} +func (m *SetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetRequest.Merge(m, src) +} +func (m *SetRequest) XXX_Size() int { + return xxx_messageInfo_SetRequest.Size(m) +} +func (m *SetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetRequest proto.InternalMessageInfo + +func (m *SetRequest) GetOldRoot() *Fea { + if m != nil { + return m.OldRoot + } + return nil +} + +func (m *SetRequest) GetKey() *Fea { + if m != nil { + return m.Key + } + return nil +} + +func (m *SetRequest) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (m *SetRequest) GetPersistence() Persistence { + if m != nil { + return m.Persistence + } + return Persistence_PERSISTENCE_CACHE_UNSPECIFIED +} + +func (m *SetRequest) GetDetails() bool { + if m != nil { + return m.Details + } + return false +} + +func (m *SetRequest) GetGetDbReadLog() bool { + if m != nil { + return m.GetDbReadLog + } + return false +} + +func (m *SetRequest) GetBatchUuid() string { + if m != nil { + return m.BatchUuid + } + return "" +} + +func (m *SetRequest) GetTx() uint64 { + if m != nil { + return m.Tx + } + return 0 +} + +//* +// @dev GetRequest +// @param {root} - merkle-tree root +// @param {key} - key to look for +// @param {details} - indicates if it should return all response parameters (true) or just the new root (false) +// @param {get_db_read_log} - indicates if it should return the DB reads generated during the execution of the request +// @param {batch_uuid} - indicates a unique identifier of the current batch or session; data for this batch can be stored in memory until flushed to database +type GetRequest struct { + Root *Fea `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` + Key *Fea `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Details bool `protobuf:"varint,3,opt,name=details,proto3" json:"details,omitempty"` + GetDbReadLog bool `protobuf:"varint,4,opt,name=get_db_read_log,json=getDbReadLog,proto3" json:"get_db_read_log,omitempty"` + BatchUuid string `protobuf:"bytes,5,opt,name=batch_uuid,json=batchUuid,proto3" json:"batch_uuid,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRequest) Reset() { *m = GetRequest{} } +func (m *GetRequest) String() string { return proto.CompactTextString(m) } +func (*GetRequest) ProtoMessage() {} +func (*GetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{2} +} + +func (m *GetRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetRequest.Unmarshal(m, b) +} +func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) +} +func (m *GetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequest.Merge(m, src) +} +func (m *GetRequest) XXX_Size() int { + return xxx_messageInfo_GetRequest.Size(m) +} +func (m *GetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequest proto.InternalMessageInfo + +func (m *GetRequest) GetRoot() *Fea { + if m != nil { + return m.Root + } + return nil +} + +func (m *GetRequest) GetKey() *Fea { + if m != nil { + return m.Key + } + return nil +} + +func (m *GetRequest) GetDetails() bool { + if m != nil { + return m.Details + } + return false +} + +func (m *GetRequest) GetGetDbReadLog() bool { + if m != nil { + return m.GetDbReadLog + } + return false +} + +func (m *GetRequest) GetBatchUuid() string { + if m != nil { + return m.BatchUuid + } + return "" +} + +//* +// @dev SetProgramRequest +// @param {key} - key to set +// @param {data} - Program data to store +// @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false) +type SetProgramRequest struct { + Key *Fea `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Persistent bool `protobuf:"varint,3,opt,name=persistent,proto3" json:"persistent,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetProgramRequest) Reset() { *m = SetProgramRequest{} } +func (m *SetProgramRequest) String() string { return proto.CompactTextString(m) } +func (*SetProgramRequest) ProtoMessage() {} +func (*SetProgramRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{3} +} + +func (m *SetProgramRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetProgramRequest.Unmarshal(m, b) +} +func (m *SetProgramRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetProgramRequest.Marshal(b, m, deterministic) +} +func (m *SetProgramRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetProgramRequest.Merge(m, src) +} +func (m *SetProgramRequest) XXX_Size() int { + return xxx_messageInfo_SetProgramRequest.Size(m) +} +func (m *SetProgramRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetProgramRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetProgramRequest proto.InternalMessageInfo + +func (m *SetProgramRequest) GetKey() *Fea { + if m != nil { + return m.Key + } + return nil +} + +func (m *SetProgramRequest) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *SetProgramRequest) GetPersistent() bool { + if m != nil { + return m.Persistent + } + return false +} + +//* +// @dev GetProgramRequest +// @param {key} - key to get program data +type GetProgramRequest struct { + Key *Fea `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetProgramRequest) Reset() { *m = GetProgramRequest{} } +func (m *GetProgramRequest) String() string { return proto.CompactTextString(m) } +func (*GetProgramRequest) ProtoMessage() {} +func (*GetProgramRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{4} +} + +func (m *GetProgramRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetProgramRequest.Unmarshal(m, b) +} +func (m *GetProgramRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetProgramRequest.Marshal(b, m, deterministic) +} +func (m *GetProgramRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetProgramRequest.Merge(m, src) +} +func (m *GetProgramRequest) XXX_Size() int { + return xxx_messageInfo_GetProgramRequest.Size(m) +} +func (m *GetProgramRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetProgramRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetProgramRequest proto.InternalMessageInfo + +func (m *GetProgramRequest) GetKey() *Fea { + if m != nil { + return m.Key + } + return nil +} + +//* +// @dev LoadDBRequest +// @param {input_db} - list of db records (MT) to load in the database +// @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false) +type LoadDBRequest struct { + InputDb map[string]*FeList `protobuf:"bytes,1,rep,name=input_db,json=inputDb,proto3" json:"input_db,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Persistent bool `protobuf:"varint,2,opt,name=persistent,proto3" json:"persistent,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoadDBRequest) Reset() { *m = LoadDBRequest{} } +func (m *LoadDBRequest) String() string { return proto.CompactTextString(m) } +func (*LoadDBRequest) ProtoMessage() {} +func (*LoadDBRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{5} +} + +func (m *LoadDBRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LoadDBRequest.Unmarshal(m, b) +} +func (m *LoadDBRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LoadDBRequest.Marshal(b, m, deterministic) +} +func (m *LoadDBRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoadDBRequest.Merge(m, src) +} +func (m *LoadDBRequest) XXX_Size() int { + return xxx_messageInfo_LoadDBRequest.Size(m) +} +func (m *LoadDBRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LoadDBRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LoadDBRequest proto.InternalMessageInfo + +func (m *LoadDBRequest) GetInputDb() map[string]*FeList { + if m != nil { + return m.InputDb + } + return nil +} + +func (m *LoadDBRequest) GetPersistent() bool { + if m != nil { + return m.Persistent + } + return false +} + +//* +// @dev LoadProgramDBRequest +// @param {input_program_db} - list of db records (program) to load in the database +// @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false) +type LoadProgramDBRequest struct { + InputProgramDb map[string][]byte `protobuf:"bytes,1,rep,name=input_program_db,json=inputProgramDb,proto3" json:"input_program_db,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Persistent bool `protobuf:"varint,2,opt,name=persistent,proto3" json:"persistent,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoadProgramDBRequest) Reset() { *m = LoadProgramDBRequest{} } +func (m *LoadProgramDBRequest) String() string { return proto.CompactTextString(m) } +func (*LoadProgramDBRequest) ProtoMessage() {} +func (*LoadProgramDBRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{6} +} + +func (m *LoadProgramDBRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LoadProgramDBRequest.Unmarshal(m, b) +} +func (m *LoadProgramDBRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LoadProgramDBRequest.Marshal(b, m, deterministic) +} +func (m *LoadProgramDBRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoadProgramDBRequest.Merge(m, src) +} +func (m *LoadProgramDBRequest) XXX_Size() int { + return xxx_messageInfo_LoadProgramDBRequest.Size(m) +} +func (m *LoadProgramDBRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LoadProgramDBRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LoadProgramDBRequest proto.InternalMessageInfo + +func (m *LoadProgramDBRequest) GetInputProgramDb() map[string][]byte { + if m != nil { + return m.InputProgramDb + } + return nil +} + +func (m *LoadProgramDBRequest) GetPersistent() bool { + if m != nil { + return m.Persistent + } + return false +} + +//* +// @dev FlushRequest +// @param {batch_uuid} - indicates a unique identifier of the current batch or session which data will be flushed to cache (and database if required) +type FlushRequest struct { + BatchUuid string `protobuf:"bytes,1,opt,name=batch_uuid,json=batchUuid,proto3" json:"batch_uuid,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FlushRequest) Reset() { *m = FlushRequest{} } +func (m *FlushRequest) String() string { return proto.CompactTextString(m) } +func (*FlushRequest) ProtoMessage() {} +func (*FlushRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{7} +} + +func (m *FlushRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FlushRequest.Unmarshal(m, b) +} +func (m *FlushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FlushRequest.Marshal(b, m, deterministic) +} +func (m *FlushRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FlushRequest.Merge(m, src) +} +func (m *FlushRequest) XXX_Size() int { + return xxx_messageInfo_FlushRequest.Size(m) +} +func (m *FlushRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FlushRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FlushRequest proto.InternalMessageInfo + +func (m *FlushRequest) GetBatchUuid() string { + if m != nil { + return m.BatchUuid + } + return "" +} + +//* +// @dev SemiFlushRequest +// @param {batch_uuid} - indicates a unique identifier of the current batch or session which data will be semi-flushed +// @param {new_state_root} - state root at this point of the execution +// @param {persistence} - indicates if it should be stored only in CACHE, in the SQL DATABASE, or it is just TEMPORARY and should be deleted at the flush of this batch UUID +type SemiFlushRequest struct { + BatchUuid string `protobuf:"bytes,1,opt,name=batch_uuid,json=batchUuid,proto3" json:"batch_uuid,omitempty"` + NewStateRoot string `protobuf:"bytes,2,opt,name=new_state_root,json=newStateRoot,proto3" json:"new_state_root,omitempty"` + Persistence Persistence `protobuf:"varint,3,opt,name=persistence,proto3,enum=hashdb.v1.Persistence" json:"persistence,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SemiFlushRequest) Reset() { *m = SemiFlushRequest{} } +func (m *SemiFlushRequest) String() string { return proto.CompactTextString(m) } +func (*SemiFlushRequest) ProtoMessage() {} +func (*SemiFlushRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{8} +} + +func (m *SemiFlushRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SemiFlushRequest.Unmarshal(m, b) +} +func (m *SemiFlushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SemiFlushRequest.Marshal(b, m, deterministic) +} +func (m *SemiFlushRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SemiFlushRequest.Merge(m, src) +} +func (m *SemiFlushRequest) XXX_Size() int { + return xxx_messageInfo_SemiFlushRequest.Size(m) +} +func (m *SemiFlushRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SemiFlushRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SemiFlushRequest proto.InternalMessageInfo + +func (m *SemiFlushRequest) GetBatchUuid() string { + if m != nil { + return m.BatchUuid + } + return "" +} + +func (m *SemiFlushRequest) GetNewStateRoot() string { + if m != nil { + return m.NewStateRoot + } + return "" +} + +func (m *SemiFlushRequest) GetPersistence() Persistence { + if m != nil { + return m.Persistence + } + return Persistence_PERSISTENCE_CACHE_UNSPECIFIED +} + +//* +// @dev GetFlushDataRequest +// @param {flush_id} - last stored flush ID got using this method, or 0 if it never was called before +type GetFlushDataRequest struct { + FlushId uint64 `protobuf:"varint,1,opt,name=flush_id,json=flushId,proto3" json:"flush_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetFlushDataRequest) Reset() { *m = GetFlushDataRequest{} } +func (m *GetFlushDataRequest) String() string { return proto.CompactTextString(m) } +func (*GetFlushDataRequest) ProtoMessage() {} +func (*GetFlushDataRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{9} +} + +func (m *GetFlushDataRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFlushDataRequest.Unmarshal(m, b) +} +func (m *GetFlushDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFlushDataRequest.Marshal(b, m, deterministic) +} +func (m *GetFlushDataRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFlushDataRequest.Merge(m, src) +} +func (m *GetFlushDataRequest) XXX_Size() int { + return xxx_messageInfo_GetFlushDataRequest.Size(m) +} +func (m *GetFlushDataRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetFlushDataRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetFlushDataRequest proto.InternalMessageInfo + +func (m *GetFlushDataRequest) GetFlushId() uint64 { + if m != nil { + return m.FlushId + } + return 0 +} + +//* +// @dev SetResponse +// @param {old_root} - merkle-tree root +// @param {new_root} - merkle-tree new root +// @param {key} - key to look for +// @param {siblings} - array of siblings +// @param {ins_key} - key found +// @param {ins_value} - value found (HEX string format) +// @param {is_old0} - is new insert or delete +// @param {old_value} - old value (HEX string format) +// @param {new_value} - new value (HEX string format) +// @param {mode} +// @param {proof_hash_counter} +// @param {db_read_log} - list of db records read during the execution of the request +// @param {result} - result code +type SetResponse struct { + OldRoot *Fea `protobuf:"bytes,1,opt,name=old_root,json=oldRoot,proto3" json:"old_root,omitempty"` + NewRoot *Fea `protobuf:"bytes,2,opt,name=new_root,json=newRoot,proto3" json:"new_root,omitempty"` + Key *Fea `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Siblings map[uint64]*SiblingList `protobuf:"bytes,4,rep,name=siblings,proto3" json:"siblings,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + InsKey *Fea `protobuf:"bytes,5,opt,name=ins_key,json=insKey,proto3" json:"ins_key,omitempty"` + InsValue string `protobuf:"bytes,6,opt,name=ins_value,json=insValue,proto3" json:"ins_value,omitempty"` + IsOld0 bool `protobuf:"varint,7,opt,name=is_old0,json=isOld0,proto3" json:"is_old0,omitempty"` + OldValue string `protobuf:"bytes,8,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"` + NewValue string `protobuf:"bytes,9,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"` + Mode string `protobuf:"bytes,10,opt,name=mode,proto3" json:"mode,omitempty"` + ProofHashCounter uint64 `protobuf:"varint,11,opt,name=proof_hash_counter,json=proofHashCounter,proto3" json:"proof_hash_counter,omitempty"` + DbReadLog map[string]*FeList `protobuf:"bytes,12,rep,name=db_read_log,json=dbReadLog,proto3" json:"db_read_log,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Result *ResultCode `protobuf:"bytes,13,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetResponse) Reset() { *m = SetResponse{} } +func (m *SetResponse) String() string { return proto.CompactTextString(m) } +func (*SetResponse) ProtoMessage() {} +func (*SetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{10} +} + +func (m *SetResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetResponse.Unmarshal(m, b) +} +func (m *SetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetResponse.Marshal(b, m, deterministic) +} +func (m *SetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetResponse.Merge(m, src) +} +func (m *SetResponse) XXX_Size() int { + return xxx_messageInfo_SetResponse.Size(m) +} +func (m *SetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SetResponse proto.InternalMessageInfo + +func (m *SetResponse) GetOldRoot() *Fea { + if m != nil { + return m.OldRoot + } + return nil +} + +func (m *SetResponse) GetNewRoot() *Fea { + if m != nil { + return m.NewRoot + } + return nil +} + +func (m *SetResponse) GetKey() *Fea { + if m != nil { + return m.Key + } + return nil +} + +func (m *SetResponse) GetSiblings() map[uint64]*SiblingList { + if m != nil { + return m.Siblings + } + return nil +} + +func (m *SetResponse) GetInsKey() *Fea { + if m != nil { + return m.InsKey + } + return nil +} + +func (m *SetResponse) GetInsValue() string { + if m != nil { + return m.InsValue + } + return "" +} + +func (m *SetResponse) GetIsOld0() bool { + if m != nil { + return m.IsOld0 + } + return false +} + +func (m *SetResponse) GetOldValue() string { + if m != nil { + return m.OldValue + } + return "" +} + +func (m *SetResponse) GetNewValue() string { + if m != nil { + return m.NewValue + } + return "" +} + +func (m *SetResponse) GetMode() string { + if m != nil { + return m.Mode + } + return "" +} + +func (m *SetResponse) GetProofHashCounter() uint64 { + if m != nil { + return m.ProofHashCounter + } + return 0 +} + +func (m *SetResponse) GetDbReadLog() map[string]*FeList { + if m != nil { + return m.DbReadLog + } + return nil +} + +func (m *SetResponse) GetResult() *ResultCode { + if m != nil { + return m.Result + } + return nil +} + +//* +// @dev GetResponse +// @param {root} - merkle-tree root +// @param {key} - key to look for +// @param {siblings} - array of siblings +// @param {ins_key} - key found +// @param {ins_value} - value found (HEX string format) +// @param {is_old0} - is new insert or delete +// @param {value} - value retrieved (HEX string format) +// @param {proof_hash_counter} +// @param {db_read_log} - list of db records read during the execution of the request +// @param {result} - result code +type GetResponse struct { + Root *Fea `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` + Key *Fea `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Siblings map[uint64]*SiblingList `protobuf:"bytes,3,rep,name=siblings,proto3" json:"siblings,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + InsKey *Fea `protobuf:"bytes,4,opt,name=ins_key,json=insKey,proto3" json:"ins_key,omitempty"` + InsValue string `protobuf:"bytes,5,opt,name=ins_value,json=insValue,proto3" json:"ins_value,omitempty"` + IsOld0 bool `protobuf:"varint,6,opt,name=is_old0,json=isOld0,proto3" json:"is_old0,omitempty"` + Value string `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` + ProofHashCounter uint64 `protobuf:"varint,8,opt,name=proof_hash_counter,json=proofHashCounter,proto3" json:"proof_hash_counter,omitempty"` + DbReadLog map[string]*FeList `protobuf:"bytes,9,rep,name=db_read_log,json=dbReadLog,proto3" json:"db_read_log,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Result *ResultCode `protobuf:"bytes,10,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetResponse) Reset() { *m = GetResponse{} } +func (m *GetResponse) String() string { return proto.CompactTextString(m) } +func (*GetResponse) ProtoMessage() {} +func (*GetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{11} +} + +func (m *GetResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetResponse.Unmarshal(m, b) +} +func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) +} +func (m *GetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse.Merge(m, src) +} +func (m *GetResponse) XXX_Size() int { + return xxx_messageInfo_GetResponse.Size(m) +} +func (m *GetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse proto.InternalMessageInfo + +func (m *GetResponse) GetRoot() *Fea { + if m != nil { + return m.Root + } + return nil +} + +func (m *GetResponse) GetKey() *Fea { + if m != nil { + return m.Key + } + return nil +} + +func (m *GetResponse) GetSiblings() map[uint64]*SiblingList { + if m != nil { + return m.Siblings + } + return nil +} + +func (m *GetResponse) GetInsKey() *Fea { + if m != nil { + return m.InsKey + } + return nil +} + +func (m *GetResponse) GetInsValue() string { + if m != nil { + return m.InsValue + } + return "" +} + +func (m *GetResponse) GetIsOld0() bool { + if m != nil { + return m.IsOld0 + } + return false +} + +func (m *GetResponse) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (m *GetResponse) GetProofHashCounter() uint64 { + if m != nil { + return m.ProofHashCounter + } + return 0 +} + +func (m *GetResponse) GetDbReadLog() map[string]*FeList { + if m != nil { + return m.DbReadLog + } + return nil +} + +func (m *GetResponse) GetResult() *ResultCode { + if m != nil { + return m.Result + } + return nil +} + +//* +// @dev SetProgramResponse +// @param {result} - result code +type SetProgramResponse struct { + Result *ResultCode `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetProgramResponse) Reset() { *m = SetProgramResponse{} } +func (m *SetProgramResponse) String() string { return proto.CompactTextString(m) } +func (*SetProgramResponse) ProtoMessage() {} +func (*SetProgramResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{12} +} + +func (m *SetProgramResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetProgramResponse.Unmarshal(m, b) +} +func (m *SetProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetProgramResponse.Marshal(b, m, deterministic) +} +func (m *SetProgramResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetProgramResponse.Merge(m, src) +} +func (m *SetProgramResponse) XXX_Size() int { + return xxx_messageInfo_SetProgramResponse.Size(m) +} +func (m *SetProgramResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SetProgramResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SetProgramResponse proto.InternalMessageInfo + +func (m *SetProgramResponse) GetResult() *ResultCode { + if m != nil { + return m.Result + } + return nil +} + +//* +// @dev GetProgramResponse +// @param {data} - program data retrieved +// @param {result} - result code +type GetProgramResponse struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Result *ResultCode `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetProgramResponse) Reset() { *m = GetProgramResponse{} } +func (m *GetProgramResponse) String() string { return proto.CompactTextString(m) } +func (*GetProgramResponse) ProtoMessage() {} +func (*GetProgramResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{13} +} + +func (m *GetProgramResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetProgramResponse.Unmarshal(m, b) +} +func (m *GetProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetProgramResponse.Marshal(b, m, deterministic) +} +func (m *GetProgramResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetProgramResponse.Merge(m, src) +} +func (m *GetProgramResponse) XXX_Size() int { + return xxx_messageInfo_GetProgramResponse.Size(m) +} +func (m *GetProgramResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetProgramResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetProgramResponse proto.InternalMessageInfo + +func (m *GetProgramResponse) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *GetProgramResponse) GetResult() *ResultCode { + if m != nil { + return m.Result + } + return nil +} + +//* +// @dev FlushResponse +// @param {flush_id} - id assigned to this flush data +// @param {stored_flush_id} - id of the last flush data sent to database +// @param {result} - result code +type FlushResponse struct { + FlushId uint64 `protobuf:"varint,1,opt,name=flush_id,json=flushId,proto3" json:"flush_id,omitempty"` + StoredFlushId uint64 `protobuf:"varint,2,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` + Result *ResultCode `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FlushResponse) Reset() { *m = FlushResponse{} } +func (m *FlushResponse) String() string { return proto.CompactTextString(m) } +func (*FlushResponse) ProtoMessage() {} +func (*FlushResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{14} +} + +func (m *FlushResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FlushResponse.Unmarshal(m, b) +} +func (m *FlushResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FlushResponse.Marshal(b, m, deterministic) +} +func (m *FlushResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_FlushResponse.Merge(m, src) +} +func (m *FlushResponse) XXX_Size() int { + return xxx_messageInfo_FlushResponse.Size(m) +} +func (m *FlushResponse) XXX_DiscardUnknown() { + xxx_messageInfo_FlushResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_FlushResponse proto.InternalMessageInfo + +func (m *FlushResponse) GetFlushId() uint64 { + if m != nil { + return m.FlushId + } + return 0 +} + +func (m *FlushResponse) GetStoredFlushId() uint64 { + if m != nil { + return m.StoredFlushId + } + return 0 +} + +func (m *FlushResponse) GetResult() *ResultCode { + if m != nil { + return m.Result + } + return nil +} + +//* +// @dev GetFlushStatusResponse +// @param {stored_flush_id} - id of the last flush data sent to database +// @param {sending_flush_id} - id of the flush data being sent now to database +// @param {last_flush_id} - id assigned to the last call to flush +// @param {pending_to_flush_nodes} - number of SMT nodes pending to flush +// @param {pending_to_flush_program} - number of SC programs pending to flush +// @param {storing_nodes} - number of SMT nodes being stored in the hash database +// @param {storing_program} - number of SC programs being stored in the hash database +// @param {prover_id} - id assigned to this instance of the prover process +type GetFlushStatusResponse struct { + StoredFlushId uint64 `protobuf:"varint,1,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` + StoringFlushId uint64 `protobuf:"varint,2,opt,name=storing_flush_id,json=storingFlushId,proto3" json:"storing_flush_id,omitempty"` + LastFlushId uint64 `protobuf:"varint,3,opt,name=last_flush_id,json=lastFlushId,proto3" json:"last_flush_id,omitempty"` + PendingToFlushNodes uint64 `protobuf:"varint,4,opt,name=pending_to_flush_nodes,json=pendingToFlushNodes,proto3" json:"pending_to_flush_nodes,omitempty"` + PendingToFlushProgram uint64 `protobuf:"varint,5,opt,name=pending_to_flush_program,json=pendingToFlushProgram,proto3" json:"pending_to_flush_program,omitempty"` + StoringNodes uint64 `protobuf:"varint,6,opt,name=storing_nodes,json=storingNodes,proto3" json:"storing_nodes,omitempty"` + StoringProgram uint64 `protobuf:"varint,7,opt,name=storing_program,json=storingProgram,proto3" json:"storing_program,omitempty"` + ProverId string `protobuf:"bytes,8,opt,name=prover_id,json=proverId,proto3" json:"prover_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetFlushStatusResponse) Reset() { *m = GetFlushStatusResponse{} } +func (m *GetFlushStatusResponse) String() string { return proto.CompactTextString(m) } +func (*GetFlushStatusResponse) ProtoMessage() {} +func (*GetFlushStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{15} +} + +func (m *GetFlushStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFlushStatusResponse.Unmarshal(m, b) +} +func (m *GetFlushStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFlushStatusResponse.Marshal(b, m, deterministic) +} +func (m *GetFlushStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFlushStatusResponse.Merge(m, src) +} +func (m *GetFlushStatusResponse) XXX_Size() int { + return xxx_messageInfo_GetFlushStatusResponse.Size(m) +} +func (m *GetFlushStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetFlushStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetFlushStatusResponse proto.InternalMessageInfo + +func (m *GetFlushStatusResponse) GetStoredFlushId() uint64 { + if m != nil { + return m.StoredFlushId + } + return 0 +} + +func (m *GetFlushStatusResponse) GetStoringFlushId() uint64 { + if m != nil { + return m.StoringFlushId + } + return 0 +} + +func (m *GetFlushStatusResponse) GetLastFlushId() uint64 { + if m != nil { + return m.LastFlushId + } + return 0 +} + +func (m *GetFlushStatusResponse) GetPendingToFlushNodes() uint64 { + if m != nil { + return m.PendingToFlushNodes + } + return 0 +} + +func (m *GetFlushStatusResponse) GetPendingToFlushProgram() uint64 { + if m != nil { + return m.PendingToFlushProgram + } + return 0 +} + +func (m *GetFlushStatusResponse) GetStoringNodes() uint64 { + if m != nil { + return m.StoringNodes + } + return 0 +} + +func (m *GetFlushStatusResponse) GetStoringProgram() uint64 { + if m != nil { + return m.StoringProgram + } + return 0 +} + +func (m *GetFlushStatusResponse) GetProverId() string { + if m != nil { + return m.ProverId + } + return "" +} + +//* +// @dev GetFlushDataResponse +// @param {stored_flush_id} - id of the last flush data sent to database +// @param {nodes} - data to insert in the nodes table +// @param {program} - data to insert in the program table +// @param {nodes_state_root} - nodes state root to update in the nodes table +// @param {result} - result code +type GetFlushDataResponse struct { + StoredFlushId uint64 `protobuf:"varint,1,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` + Nodes map[string]string `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Program map[string]string `protobuf:"bytes,3,rep,name=program,proto3" json:"program,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NodesStateRoot string `protobuf:"bytes,4,opt,name=nodes_state_root,json=nodesStateRoot,proto3" json:"nodes_state_root,omitempty"` + Result *ResultCode `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetFlushDataResponse) Reset() { *m = GetFlushDataResponse{} } +func (m *GetFlushDataResponse) String() string { return proto.CompactTextString(m) } +func (*GetFlushDataResponse) ProtoMessage() {} +func (*GetFlushDataResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{16} +} + +func (m *GetFlushDataResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFlushDataResponse.Unmarshal(m, b) +} +func (m *GetFlushDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFlushDataResponse.Marshal(b, m, deterministic) +} +func (m *GetFlushDataResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFlushDataResponse.Merge(m, src) +} +func (m *GetFlushDataResponse) XXX_Size() int { + return xxx_messageInfo_GetFlushDataResponse.Size(m) +} +func (m *GetFlushDataResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetFlushDataResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetFlushDataResponse proto.InternalMessageInfo + +func (m *GetFlushDataResponse) GetStoredFlushId() uint64 { + if m != nil { + return m.StoredFlushId + } + return 0 +} + +func (m *GetFlushDataResponse) GetNodes() map[string]string { + if m != nil { + return m.Nodes + } + return nil +} + +func (m *GetFlushDataResponse) GetProgram() map[string]string { + if m != nil { + return m.Program + } + return nil +} + +func (m *GetFlushDataResponse) GetNodesStateRoot() string { + if m != nil { + return m.NodesStateRoot + } + return "" +} + +func (m *GetFlushDataResponse) GetResult() *ResultCode { + if m != nil { + return m.Result + } + return nil +} + +//* +// @dev Array of 4 FE +// @param {fe0} - Field Element value for pos 0 +// @param {fe1} - Field Element value for pos 1 +// @param {fe2} - Field Element value for pos 2 +// @param {fe3} - Field Element value for pos 3 +type Fea struct { + Fe0 uint64 `protobuf:"varint,1,opt,name=fe0,proto3" json:"fe0,omitempty"` + Fe1 uint64 `protobuf:"varint,2,opt,name=fe1,proto3" json:"fe1,omitempty"` + Fe2 uint64 `protobuf:"varint,3,opt,name=fe2,proto3" json:"fe2,omitempty"` + Fe3 uint64 `protobuf:"varint,4,opt,name=fe3,proto3" json:"fe3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Fea) Reset() { *m = Fea{} } +func (m *Fea) String() string { return proto.CompactTextString(m) } +func (*Fea) ProtoMessage() {} +func (*Fea) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{17} +} + +func (m *Fea) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Fea.Unmarshal(m, b) +} +func (m *Fea) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Fea.Marshal(b, m, deterministic) +} +func (m *Fea) XXX_Merge(src proto.Message) { + xxx_messageInfo_Fea.Merge(m, src) +} +func (m *Fea) XXX_Size() int { + return xxx_messageInfo_Fea.Size(m) +} +func (m *Fea) XXX_DiscardUnknown() { + xxx_messageInfo_Fea.DiscardUnknown(m) +} + +var xxx_messageInfo_Fea proto.InternalMessageInfo + +func (m *Fea) GetFe0() uint64 { + if m != nil { + return m.Fe0 + } + return 0 +} + +func (m *Fea) GetFe1() uint64 { + if m != nil { + return m.Fe1 + } + return 0 +} + +func (m *Fea) GetFe2() uint64 { + if m != nil { + return m.Fe2 + } + return 0 +} + +func (m *Fea) GetFe3() uint64 { + if m != nil { + return m.Fe3 + } + return 0 +} + +//* +// @dev FE (Field Element) List +// @param {fe} - list of Fe +type FeList struct { + Fe []uint64 `protobuf:"varint,1,rep,packed,name=fe,proto3" json:"fe,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FeList) Reset() { *m = FeList{} } +func (m *FeList) String() string { return proto.CompactTextString(m) } +func (*FeList) ProtoMessage() {} +func (*FeList) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{18} +} + +func (m *FeList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FeList.Unmarshal(m, b) +} +func (m *FeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FeList.Marshal(b, m, deterministic) +} +func (m *FeList) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeList.Merge(m, src) +} +func (m *FeList) XXX_Size() int { + return xxx_messageInfo_FeList.Size(m) +} +func (m *FeList) XXX_DiscardUnknown() { + xxx_messageInfo_FeList.DiscardUnknown(m) +} + +var xxx_messageInfo_FeList proto.InternalMessageInfo + +func (m *FeList) GetFe() []uint64 { + if m != nil { + return m.Fe + } + return nil +} + +//* +// @dev Siblings List +// @param {sibling} - list of siblings +type SiblingList struct { + Sibling []uint64 `protobuf:"varint,1,rep,packed,name=sibling,proto3" json:"sibling,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SiblingList) Reset() { *m = SiblingList{} } +func (m *SiblingList) String() string { return proto.CompactTextString(m) } +func (*SiblingList) ProtoMessage() {} +func (*SiblingList) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{19} +} + +func (m *SiblingList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SiblingList.Unmarshal(m, b) +} +func (m *SiblingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SiblingList.Marshal(b, m, deterministic) +} +func (m *SiblingList) XXX_Merge(src proto.Message) { + xxx_messageInfo_SiblingList.Merge(m, src) +} +func (m *SiblingList) XXX_Size() int { + return xxx_messageInfo_SiblingList.Size(m) +} +func (m *SiblingList) XXX_DiscardUnknown() { + xxx_messageInfo_SiblingList.DiscardUnknown(m) +} + +var xxx_messageInfo_SiblingList proto.InternalMessageInfo + +func (m *SiblingList) GetSibling() []uint64 { + if m != nil { + return m.Sibling + } + return nil +} + +//* +// @dev Result code +// @param {code} - result code +type ResultCode struct { + Code ResultCode_Code `protobuf:"varint,1,opt,name=code,proto3,enum=hashdb.v1.ResultCode_Code" json:"code,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResultCode) Reset() { *m = ResultCode{} } +func (m *ResultCode) String() string { return proto.CompactTextString(m) } +func (*ResultCode) ProtoMessage() {} +func (*ResultCode) Descriptor() ([]byte, []int) { + return fileDescriptor_9539c961f4d5f9a5, []int{20} +} + +func (m *ResultCode) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResultCode.Unmarshal(m, b) +} +func (m *ResultCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResultCode.Marshal(b, m, deterministic) +} +func (m *ResultCode) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResultCode.Merge(m, src) +} +func (m *ResultCode) XXX_Size() int { + return xxx_messageInfo_ResultCode.Size(m) +} +func (m *ResultCode) XXX_DiscardUnknown() { + xxx_messageInfo_ResultCode.DiscardUnknown(m) +} + +var xxx_messageInfo_ResultCode proto.InternalMessageInfo + +func (m *ResultCode) GetCode() ResultCode_Code { + if m != nil { + return m.Code + } + return ResultCode_CODE_UNSPECIFIED +} + +func init() { + proto.RegisterEnum("hashdb.v1.Persistence", Persistence_name, Persistence_value) + proto.RegisterEnum("hashdb.v1.ResultCode_Code", ResultCode_Code_name, ResultCode_Code_value) + proto.RegisterType((*Version)(nil), "hashdb.v1.Version") + proto.RegisterType((*SetRequest)(nil), "hashdb.v1.SetRequest") + proto.RegisterType((*GetRequest)(nil), "hashdb.v1.GetRequest") + proto.RegisterType((*SetProgramRequest)(nil), "hashdb.v1.SetProgramRequest") + proto.RegisterType((*GetProgramRequest)(nil), "hashdb.v1.GetProgramRequest") + proto.RegisterType((*LoadDBRequest)(nil), "hashdb.v1.LoadDBRequest") + proto.RegisterMapType((map[string]*FeList)(nil), "hashdb.v1.LoadDBRequest.InputDbEntry") + proto.RegisterType((*LoadProgramDBRequest)(nil), "hashdb.v1.LoadProgramDBRequest") + proto.RegisterMapType((map[string][]byte)(nil), "hashdb.v1.LoadProgramDBRequest.InputProgramDbEntry") + proto.RegisterType((*FlushRequest)(nil), "hashdb.v1.FlushRequest") + proto.RegisterType((*SemiFlushRequest)(nil), "hashdb.v1.SemiFlushRequest") + proto.RegisterType((*GetFlushDataRequest)(nil), "hashdb.v1.GetFlushDataRequest") + proto.RegisterType((*SetResponse)(nil), "hashdb.v1.SetResponse") + proto.RegisterMapType((map[string]*FeList)(nil), "hashdb.v1.SetResponse.DbReadLogEntry") + proto.RegisterMapType((map[uint64]*SiblingList)(nil), "hashdb.v1.SetResponse.SiblingsEntry") + proto.RegisterType((*GetResponse)(nil), "hashdb.v1.GetResponse") + proto.RegisterMapType((map[string]*FeList)(nil), "hashdb.v1.GetResponse.DbReadLogEntry") + proto.RegisterMapType((map[uint64]*SiblingList)(nil), "hashdb.v1.GetResponse.SiblingsEntry") + proto.RegisterType((*SetProgramResponse)(nil), "hashdb.v1.SetProgramResponse") + proto.RegisterType((*GetProgramResponse)(nil), "hashdb.v1.GetProgramResponse") + proto.RegisterType((*FlushResponse)(nil), "hashdb.v1.FlushResponse") + proto.RegisterType((*GetFlushStatusResponse)(nil), "hashdb.v1.GetFlushStatusResponse") + proto.RegisterType((*GetFlushDataResponse)(nil), "hashdb.v1.GetFlushDataResponse") + proto.RegisterMapType((map[string]string)(nil), "hashdb.v1.GetFlushDataResponse.NodesEntry") + proto.RegisterMapType((map[string]string)(nil), "hashdb.v1.GetFlushDataResponse.ProgramEntry") + proto.RegisterType((*Fea)(nil), "hashdb.v1.Fea") + proto.RegisterType((*FeList)(nil), "hashdb.v1.FeList") + proto.RegisterType((*SiblingList)(nil), "hashdb.v1.SiblingList") + proto.RegisterType((*ResultCode)(nil), "hashdb.v1.ResultCode") +} + +func init() { + proto.RegisterFile("hashdb.proto", fileDescriptor_9539c961f4d5f9a5) +} + +var fileDescriptor_9539c961f4d5f9a5 = []byte{ + // 1650 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xdd, 0x6e, 0xdb, 0xc8, + 0x15, 0x36, 0x25, 0xea, 0xef, 0xe8, 0x27, 0xf2, 0xf8, 0x27, 0x8c, 0xdc, 0x24, 0x0e, 0x9b, 0xd4, + 0x4e, 0x90, 0xc8, 0xb2, 0x8d, 0x36, 0x69, 0x90, 0x8b, 0xc8, 0x12, 0xad, 0xa8, 0xb1, 0x65, 0x97, + 0xb4, 0x53, 0x24, 0x40, 0x41, 0x50, 0xe6, 0x58, 0x26, 0x22, 0x91, 0x2a, 0x49, 0xd9, 0x71, 0xee, + 0xfa, 0x08, 0xbd, 0x28, 0x8a, 0xbe, 0xc6, 0x3e, 0xc0, 0x62, 0xef, 0xf6, 0x05, 0x72, 0xb1, 0x6f, + 0xb0, 0xaf, 0xb1, 0x98, 0x19, 0x52, 0x1a, 0xca, 0x92, 0x2d, 0x63, 0xf7, 0x6a, 0xef, 0xc8, 0xf3, + 0x37, 0xdf, 0x39, 0x3c, 0xf3, 0xcd, 0x19, 0x42, 0xee, 0xcc, 0xf0, 0xce, 0xcc, 0x76, 0xb9, 0xef, + 0x3a, 0xbe, 0x83, 0x32, 0xc1, 0xdb, 0xf9, 0x66, 0x69, 0xa5, 0xe3, 0x38, 0x9d, 0x2e, 0xde, 0xa0, + 0x8a, 0xf6, 0xe0, 0x74, 0x03, 0xf7, 0xfa, 0xfe, 0x25, 0xb3, 0x93, 0x1f, 0x42, 0xea, 0x03, 0x76, + 0x3d, 0xcb, 0xb1, 0xd1, 0x22, 0x24, 0xcf, 0x2b, 0x7a, 0x45, 0xdf, 0x94, 0x84, 0x55, 0x61, 0x3d, + 0xa3, 0x8a, 0xe7, 0x95, 0xca, 0xa6, 0xfc, 0xff, 0x18, 0x80, 0x86, 0x7d, 0x15, 0xff, 0x6b, 0x80, + 0x3d, 0x1f, 0x3d, 0x85, 0xb4, 0xd3, 0x35, 0x75, 0xd7, 0x71, 0x7c, 0x6a, 0x96, 0xdd, 0x2a, 0x94, + 0x87, 0x4b, 0x95, 0x77, 0xb1, 0xa1, 0xa6, 0x9c, 0xae, 0xa9, 0x3a, 0x8e, 0x8f, 0x56, 0x21, 0xfe, + 0x19, 0x5f, 0x4a, 0xb1, 0x89, 0x56, 0x44, 0x85, 0x16, 0x21, 0x71, 0x6e, 0x74, 0x07, 0x58, 0x8a, + 0xd3, 0x05, 0xd9, 0x0b, 0x7a, 0x05, 0xd9, 0x3e, 0x81, 0xe4, 0xf9, 0xd8, 0x3e, 0xc1, 0x92, 0xb8, + 0x2a, 0xac, 0x17, 0xb6, 0x96, 0x39, 0xff, 0xc3, 0x91, 0x56, 0xe5, 0x4d, 0x91, 0x04, 0x29, 0x13, + 0xfb, 0x86, 0xd5, 0xf5, 0xa4, 0xc4, 0xaa, 0xb0, 0x9e, 0x56, 0xc3, 0x57, 0xf4, 0x04, 0xee, 0x74, + 0xb0, 0xaf, 0x9b, 0x6d, 0xdd, 0xc5, 0x86, 0xa9, 0x77, 0x9d, 0x8e, 0x94, 0xa4, 0x16, 0xb9, 0x0e, + 0xf6, 0xeb, 0x6d, 0x15, 0x1b, 0xe6, 0x9e, 0xd3, 0x41, 0xf7, 0x01, 0xda, 0x86, 0x7f, 0x72, 0xa6, + 0x0f, 0x06, 0x96, 0x29, 0xa5, 0x28, 0xaa, 0x0c, 0x95, 0x1c, 0x0f, 0x2c, 0x13, 0x15, 0x20, 0xe6, + 0x7f, 0x91, 0xd2, 0xab, 0xc2, 0xba, 0xa8, 0xc6, 0xfc, 0x2f, 0xf2, 0x77, 0x02, 0x40, 0x63, 0x54, + 0x1b, 0x19, 0xc4, 0x6b, 0xea, 0x42, 0x75, 0x33, 0x14, 0x85, 0x4b, 0x22, 0x7e, 0x63, 0x12, 0xe2, + 0x8d, 0x49, 0x24, 0xc6, 0x92, 0x90, 0x2d, 0x98, 0xd7, 0xb0, 0x7f, 0xe8, 0x3a, 0x1d, 0xd7, 0xe8, + 0x85, 0xd0, 0x03, 0x58, 0xc2, 0x74, 0x58, 0x08, 0x44, 0xd3, 0xf0, 0x0d, 0x8a, 0x3c, 0xa7, 0xd2, + 0x67, 0xf4, 0x00, 0x60, 0x58, 0x7e, 0x3f, 0x40, 0xcb, 0x49, 0xe4, 0x3f, 0xc3, 0x7c, 0xe3, 0xf6, + 0x4b, 0xc9, 0x3f, 0x08, 0x90, 0xdf, 0x73, 0x0c, 0xb3, 0xbe, 0x13, 0xfa, 0xbc, 0x85, 0xb4, 0x65, + 0xf7, 0x07, 0x24, 0x77, 0x49, 0x58, 0x8d, 0xaf, 0x67, 0xb7, 0x9e, 0x70, 0x8e, 0x11, 0xdb, 0x72, + 0x93, 0x18, 0xd6, 0xdb, 0x8a, 0xed, 0xbb, 0x97, 0x6a, 0xca, 0x62, 0x6f, 0x63, 0x50, 0x63, 0xe3, + 0x50, 0x4b, 0xfb, 0x90, 0xe3, 0x1d, 0x51, 0x71, 0x84, 0x32, 0xc3, 0x0a, 0xb0, 0x16, 0x36, 0x2b, + 0xfb, 0x76, 0xf3, 0x11, 0xe4, 0x7b, 0x96, 0xe7, 0x07, 0xfd, 0xfb, 0x3a, 0xf6, 0x4a, 0x90, 0x7f, + 0x12, 0x60, 0x91, 0xc0, 0x0a, 0x72, 0x1f, 0x65, 0xf2, 0x4f, 0x28, 0xb2, 0x4c, 0xfa, 0x4c, 0x33, + 0xca, 0x68, 0x7b, 0x2c, 0xa3, 0x71, 0x57, 0x96, 0x58, 0x28, 0x0d, 0xf2, 0x2b, 0x58, 0x11, 0xe1, + 0x8d, 0x69, 0x56, 0x61, 0x61, 0x42, 0x98, 0x09, 0xd9, 0x2e, 0xf2, 0xd9, 0xe6, 0xf8, 0xd4, 0x5e, + 0x40, 0x6e, 0xb7, 0x3b, 0xf0, 0xce, 0xc2, 0x8c, 0xa2, 0xed, 0x26, 0x8c, 0xb7, 0xdb, 0x7f, 0x04, + 0x28, 0x6a, 0xb8, 0x67, 0xdd, 0xc2, 0x07, 0x3d, 0x86, 0x82, 0x8d, 0x2f, 0x74, 0xcf, 0x37, 0x7c, + 0xcc, 0xa8, 0x26, 0x46, 0x4d, 0x72, 0x36, 0xbe, 0xd0, 0x88, 0x90, 0xf2, 0xcb, 0x18, 0x4f, 0xc4, + 0x67, 0xe6, 0x09, 0xb9, 0x02, 0x0b, 0x0d, 0xec, 0x53, 0x44, 0x75, 0xc3, 0x37, 0x42, 0x54, 0xf7, + 0x20, 0x7d, 0x4a, 0x64, 0x7a, 0x80, 0x49, 0x54, 0x53, 0xf4, 0xbd, 0x69, 0xca, 0xdf, 0x27, 0x20, + 0x4b, 0x59, 0xd0, 0xeb, 0x3b, 0xb6, 0x87, 0x6f, 0x43, 0x83, 0x4f, 0x21, 0x4d, 0x92, 0x19, 0xa6, + 0x31, 0xc1, 0xd4, 0xc6, 0x17, 0x3c, 0x63, 0xc6, 0xa7, 0xef, 0xc2, 0xb7, 0x90, 0xf6, 0xac, 0x76, + 0xd7, 0xb2, 0x3b, 0x9e, 0x24, 0xd2, 0xb6, 0x79, 0xcc, 0x99, 0x71, 0x08, 0xcb, 0x5a, 0x60, 0xc6, + 0xfa, 0x64, 0xe8, 0x85, 0xd6, 0x20, 0x65, 0xd9, 0x9e, 0x4e, 0xd6, 0x49, 0x4c, 0x5c, 0x27, 0x69, + 0xd9, 0xde, 0x7b, 0x7c, 0x89, 0x56, 0x20, 0x43, 0x0c, 0x59, 0x17, 0x24, 0x69, 0xfd, 0xd3, 0x96, + 0xed, 0x7d, 0xa0, 0x1c, 0x7d, 0x17, 0x52, 0x96, 0xa7, 0x3b, 0x5d, 0xb3, 0x42, 0x59, 0x32, 0xad, + 0x26, 0x2d, 0xef, 0xa0, 0x6b, 0x56, 0x88, 0x17, 0x29, 0x0c, 0xf3, 0x4a, 0x33, 0x2f, 0xa7, 0x6b, + 0x32, 0xaf, 0x15, 0xc8, 0x90, 0x52, 0x30, 0x65, 0x86, 0x29, 0x6d, 0x7c, 0xc1, 0x94, 0x08, 0xc4, + 0x9e, 0x63, 0x62, 0x09, 0xd8, 0xe1, 0x43, 0x9e, 0xd1, 0x73, 0x40, 0x7d, 0xd7, 0x71, 0x4e, 0x75, + 0x02, 0x51, 0x3f, 0x71, 0x06, 0xb6, 0x8f, 0x5d, 0x29, 0x4b, 0xbf, 0x4d, 0x91, 0x6a, 0xde, 0x19, + 0xde, 0x59, 0x8d, 0xc9, 0x91, 0x02, 0x59, 0x9e, 0x1b, 0x73, 0x57, 0x88, 0x82, 0xaf, 0xcf, 0x90, + 0x2f, 0x59, 0x81, 0x32, 0xe6, 0x90, 0x3f, 0x5f, 0x40, 0xd2, 0xc5, 0xde, 0xa0, 0xeb, 0x4b, 0x79, + 0x5a, 0xa0, 0x25, 0x2e, 0x82, 0x4a, 0x15, 0x35, 0xc7, 0xc4, 0x6a, 0x60, 0x54, 0xd2, 0x20, 0x1f, + 0xa9, 0x35, 0xbf, 0x99, 0x44, 0xf6, 0xd5, 0x9e, 0x47, 0xa9, 0x83, 0xef, 0xd1, 0xc0, 0x75, 0x8c, + 0x3f, 0x4a, 0x07, 0x50, 0x88, 0x02, 0xfc, 0xb5, 0x84, 0xf4, 0x4d, 0x84, 0x6c, 0x83, 0x6b, 0xe0, + 0xdf, 0xe6, 0xac, 0xe2, 0xdb, 0x31, 0x7e, 0xa5, 0x1d, 0x1b, 0xb7, 0x6b, 0x47, 0x71, 0xf6, 0x76, + 0x4c, 0x4c, 0x6f, 0xc7, 0x64, 0xa4, 0x1d, 0x87, 0x34, 0x96, 0xe2, 0x27, 0x8c, 0xc9, 0x6d, 0x95, + 0x9e, 0xad, 0xad, 0x32, 0x57, 0xda, 0xaa, 0x71, 0xcb, 0xb6, 0x82, 0xdf, 0x4f, 0x5b, 0xd5, 0x00, + 0xf1, 0xc3, 0x44, 0xd0, 0x5c, 0xa3, 0x54, 0x85, 0x19, 0x52, 0x95, 0xff, 0x01, 0xa8, 0x71, 0x35, + 0x48, 0x38, 0x70, 0x08, 0xdc, 0xc0, 0x31, 0x0a, 0x1c, 0x9b, 0x25, 0xf0, 0xbf, 0x05, 0xc8, 0x07, + 0xe7, 0x4e, 0x10, 0x74, 0x3a, 0xc5, 0xa3, 0x3f, 0xc1, 0x1d, 0xcf, 0x77, 0x5c, 0x6c, 0xea, 0x43, + 0x8b, 0x18, 0xb5, 0xc8, 0x33, 0xf1, 0x6e, 0x60, 0x37, 0xc2, 0x10, 0x9f, 0x05, 0xc3, 0xcf, 0x31, + 0x58, 0x0e, 0x0f, 0x1b, 0x72, 0x76, 0x0d, 0xbc, 0x21, 0x98, 0x09, 0x2b, 0x0a, 0x93, 0x56, 0x5c, + 0x87, 0x22, 0x11, 0x58, 0x76, 0x67, 0x1c, 0x5a, 0x21, 0x90, 0x87, 0x96, 0x32, 0xe4, 0xbb, 0x86, + 0xe7, 0x8f, 0xcc, 0xe2, 0xd4, 0x2c, 0x4b, 0x84, 0xa1, 0xcd, 0x36, 0x2c, 0xf7, 0xb1, 0x6d, 0x92, + 0x68, 0xbe, 0x13, 0x58, 0xda, 0x8e, 0x89, 0x3d, 0xba, 0x01, 0x45, 0x75, 0x21, 0xd0, 0x1e, 0x39, + 0xd4, 0xa3, 0x45, 0x54, 0xe8, 0x25, 0x48, 0x57, 0x9c, 0x82, 0x09, 0x86, 0x6e, 0x46, 0x51, 0x5d, + 0x8a, 0xba, 0x05, 0x5f, 0x13, 0xfd, 0x11, 0xf2, 0x21, 0x76, 0xb6, 0x48, 0x92, 0x5a, 0xe7, 0x02, + 0x21, 0x8b, 0xbe, 0xc6, 0x0a, 0x41, 0x8c, 0xc2, 0xa0, 0xa9, 0x48, 0x7e, 0x61, 0xb4, 0x15, 0xc8, + 0xf4, 0x5d, 0xe7, 0x1c, 0xbb, 0x24, 0xb7, 0xe0, 0x74, 0x61, 0x82, 0xa6, 0x29, 0xff, 0x2f, 0x0e, + 0x8b, 0xd1, 0x63, 0xfd, 0x96, 0x75, 0x7e, 0x0b, 0x09, 0x86, 0x31, 0x46, 0xb7, 0xf8, 0xb3, 0xe8, + 0x16, 0xbf, 0x12, 0xb7, 0x4c, 0xc1, 0xb3, 0x7d, 0xce, 0x1c, 0xd1, 0x2e, 0xa4, 0xc2, 0x04, 0x18, + 0x1d, 0x3e, 0xbf, 0x29, 0x46, 0x90, 0x59, 0x30, 0xad, 0x06, 0xce, 0xe4, 0x8b, 0xd3, 0x80, 0xfc, + 0x08, 0x24, 0xd2, 0x74, 0x0b, 0x54, 0x3e, 0x1a, 0x82, 0x46, 0xdd, 0x98, 0x98, 0x85, 0x55, 0x5e, + 0x01, 0x8c, 0x50, 0xdf, 0x34, 0xf6, 0x65, 0x78, 0xea, 0x78, 0x0d, 0x39, 0x1e, 0xeb, 0x6d, 0x7c, + 0xe5, 0x7d, 0x88, 0xef, 0x62, 0x83, 0xb8, 0x9c, 0xe2, 0x4a, 0xc8, 0x60, 0xa7, 0xb8, 0xc2, 0x24, + 0x9b, 0x41, 0x33, 0x93, 0x47, 0x26, 0xd9, 0x0a, 0xfa, 0x96, 0x3c, 0x32, 0xc9, 0x76, 0xd0, 0x9c, + 0xe4, 0x51, 0x96, 0x20, 0xc9, 0x98, 0x88, 0x5c, 0xc8, 0x4e, 0x31, 0x9d, 0x9f, 0x45, 0x35, 0x76, + 0x8a, 0xe5, 0x35, 0xc8, 0x72, 0xcc, 0x47, 0xae, 0x52, 0xc1, 0x41, 0x13, 0xd8, 0x84, 0xaf, 0xf2, + 0x37, 0x01, 0x60, 0x54, 0x1e, 0x54, 0x06, 0xf1, 0x84, 0xcc, 0x1e, 0x02, 0x9d, 0x21, 0x4b, 0x13, + 0x6b, 0x58, 0xa6, 0x85, 0xa4, 0x76, 0xf2, 0x7f, 0x05, 0x10, 0xa9, 0xe3, 0x22, 0x14, 0x6b, 0x07, + 0x75, 0x45, 0x3f, 0x6e, 0x69, 0x87, 0x4a, 0xad, 0xb9, 0xdb, 0x54, 0xea, 0xc5, 0x39, 0x54, 0x84, + 0x1c, 0x95, 0x6a, 0xc7, 0xb5, 0x9a, 0xa2, 0x69, 0x45, 0x01, 0xdd, 0x83, 0x25, 0x2a, 0xa9, 0xef, + 0xe8, 0xef, 0x95, 0x8f, 0x7a, 0xeb, 0xe0, 0x48, 0xdf, 0x3d, 0x38, 0x6e, 0xd5, 0x8b, 0x31, 0x34, + 0x0f, 0xf9, 0x50, 0xa5, 0xa8, 0xea, 0x81, 0x5a, 0x8c, 0xa3, 0xbb, 0xb0, 0x40, 0x45, 0xcd, 0xd6, + 0x91, 0xa2, 0xb6, 0xaa, 0x7b, 0x81, 0x42, 0x44, 0x0f, 0xa0, 0xc4, 0x02, 0xef, 0x1f, 0xe9, 0xcd, + 0xd6, 0x87, 0xea, 0x5e, 0xb3, 0xae, 0xd7, 0xab, 0x47, 0x55, 0x5d, 0x6b, 0x7e, 0x52, 0x8a, 0x85, + 0x67, 0x18, 0xb2, 0xdc, 0xd0, 0x8b, 0x1e, 0xc1, 0xfd, 0x43, 0x45, 0xd5, 0x9a, 0xda, 0x91, 0xd2, + 0xaa, 0x29, 0x7a, 0xad, 0x5a, 0x7b, 0x37, 0x0e, 0x55, 0x82, 0x45, 0xde, 0x84, 0x04, 0xdb, 0xa9, + 0x6a, 0x0a, 0x83, 0xcc, 0x6b, 0x8e, 0x94, 0xfd, 0xc3, 0x03, 0xb5, 0xaa, 0x7e, 0x2c, 0xc6, 0xb6, + 0x7e, 0x4c, 0x40, 0x9e, 0x9c, 0x90, 0xf5, 0x1d, 0x0d, 0xbb, 0xe7, 0xd6, 0x09, 0x46, 0x7f, 0x81, + 0xb8, 0x86, 0x7d, 0xb4, 0x34, 0x3e, 0x6c, 0xd1, 0xc1, 0xba, 0xb4, 0x3c, 0x79, 0x06, 0x93, 0xe7, + 0x88, 0x5f, 0x63, 0xcc, 0xaf, 0x31, 0xd9, 0xaf, 0x11, 0xf1, 0x7b, 0x4f, 0x7f, 0x4a, 0x84, 0xb4, + 0xf0, 0x87, 0x68, 0xfc, 0xe8, 0x85, 0xb3, 0x74, 0x7f, 0x8a, 0x96, 0x0f, 0xd6, 0x98, 0x1c, 0xac, + 0x71, 0x6d, 0xb0, 0xc6, 0xa4, 0x60, 0x6f, 0x20, 0xc9, 0xee, 0xa3, 0x48, 0x9a, 0x76, 0x45, 0x2d, + 0x2d, 0x97, 0xd9, 0x2f, 0x99, 0x72, 0xf8, 0x4b, 0xa6, 0xac, 0xf4, 0xfa, 0xfe, 0xa5, 0x3c, 0x87, + 0xfe, 0xc6, 0x6e, 0xbe, 0xc3, 0xbb, 0x1f, 0x7a, 0x78, 0xc3, 0xad, 0xf0, 0x9a, 0x58, 0x6f, 0x20, + 0x41, 0xf9, 0x06, 0xdd, 0xe5, 0x8f, 0x70, 0xee, 0x1a, 0x56, 0x92, 0xae, 0x2a, 0x86, 0x79, 0xec, + 0x40, 0x66, 0x78, 0x6d, 0x43, 0x2b, 0x91, 0x12, 0x46, 0x2f, 0x73, 0xd7, 0x20, 0xd8, 0x87, 0x42, + 0xf4, 0xe8, 0x43, 0x53, 0x6c, 0x4b, 0x8f, 0x26, 0xf0, 0x64, 0xf4, 0xb4, 0x94, 0xe7, 0xd0, 0xdf, + 0x21, 0xc7, 0x73, 0x28, 0x7a, 0x30, 0x95, 0x5c, 0x19, 0xb0, 0x87, 0x37, 0x90, 0xaf, 0x3c, 0xb7, + 0xf3, 0xd7, 0x4f, 0x2f, 0x3b, 0x96, 0x7f, 0x36, 0x68, 0x97, 0x4f, 0x9c, 0xde, 0x46, 0xe5, 0xcb, + 0xa1, 0xd3, 0xbd, 0xec, 0x38, 0xf6, 0x3b, 0xec, 0xf6, 0xf0, 0xd7, 0x8d, 0xaf, 0x9f, 0xf1, 0x79, + 0xef, 0x05, 0x61, 0xdc, 0x8d, 0x1e, 0x76, 0x3f, 0x77, 0xb1, 0xef, 0x62, 0xbc, 0xc1, 0x82, 0xb6, + 0x93, 0x34, 0x85, 0xed, 0x5f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x6e, 0xba, 0x2d, 0x78, 0x13, + 0x00, 0x00, +} diff --git a/merkletree/pb/hashdb_grpc.pb.go b/merkletree/hashdb/hashdb_grpc.pb.go similarity index 88% rename from merkletree/pb/hashdb_grpc.pb.go rename to merkletree/hashdb/hashdb_grpc.pb.go index 10ec44f17a..19a6d8e33b 100644 --- a/merkletree/pb/hashdb_grpc.pb.go +++ b/merkletree/hashdb/hashdb_grpc.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 +// - protoc v3.12.4 // source: hashdb.proto -package pb +package hashdb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -28,6 +27,7 @@ const ( 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" ) @@ -42,7 +42,8 @@ type HashDBServiceClient interface { GetProgram(ctx context.Context, in *GetProgramRequest, opts ...grpc.CallOption) (*GetProgramResponse, error) LoadDB(ctx context.Context, in *LoadDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) LoadProgramDB(ctx context.Context, in *LoadProgramDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - Flush(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FlushResponse, error) + Flush(ctx context.Context, in *FlushRequest, opts ...grpc.CallOption) (*FlushResponse, error) + SemiFlush(ctx context.Context, in *SemiFlushRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetFlushStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error) GetFlushData(ctx context.Context, in *GetFlushDataRequest, opts ...grpc.CallOption) (*GetFlushDataResponse, error) } @@ -109,7 +110,7 @@ func (c *hashDBServiceClient) LoadProgramDB(ctx context.Context, in *LoadProgram return out, nil } -func (c *hashDBServiceClient) Flush(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FlushResponse, error) { +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...) if err != nil { @@ -118,6 +119,15 @@ func (c *hashDBServiceClient) Flush(ctx context.Context, in *emptypb.Empty, opts return out, nil } +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...) + if err != nil { + return nil, err + } + return out, nil +} + 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...) @@ -146,7 +156,8 @@ type HashDBServiceServer interface { GetProgram(context.Context, *GetProgramRequest) (*GetProgramResponse, error) LoadDB(context.Context, *LoadDBRequest) (*emptypb.Empty, error) LoadProgramDB(context.Context, *LoadProgramDBRequest) (*emptypb.Empty, error) - Flush(context.Context, *emptypb.Empty) (*FlushResponse, error) + Flush(context.Context, *FlushRequest) (*FlushResponse, error) + SemiFlush(context.Context, *SemiFlushRequest) (*emptypb.Empty, error) GetFlushStatus(context.Context, *emptypb.Empty) (*GetFlushStatusResponse, error) GetFlushData(context.Context, *GetFlushDataRequest) (*GetFlushDataResponse, error) mustEmbedUnimplementedHashDBServiceServer() @@ -174,9 +185,12 @@ func (UnimplementedHashDBServiceServer) LoadDB(context.Context, *LoadDBRequest) func (UnimplementedHashDBServiceServer) LoadProgramDB(context.Context, *LoadProgramDBRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method LoadProgramDB not implemented") } -func (UnimplementedHashDBServiceServer) Flush(context.Context, *emptypb.Empty) (*FlushResponse, error) { +func (UnimplementedHashDBServiceServer) Flush(context.Context, *FlushRequest) (*FlushResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented") } +func (UnimplementedHashDBServiceServer) SemiFlush(context.Context, *SemiFlushRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SemiFlush not implemented") +} func (UnimplementedHashDBServiceServer) GetFlushStatus(context.Context, *emptypb.Empty) (*GetFlushStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFlushStatus not implemented") } @@ -305,7 +319,7 @@ func _HashDBService_LoadProgramDB_Handler(srv interface{}, ctx context.Context, } func _HashDBService_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) + in := new(FlushRequest) if err := dec(in); err != nil { return nil, err } @@ -317,7 +331,25 @@ func _HashDBService_Flush_Handler(srv interface{}, ctx context.Context, dec func FullMethod: HashDBService_Flush_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HashDBServiceServer).Flush(ctx, req.(*emptypb.Empty)) + return srv.(HashDBServiceServer).Flush(ctx, req.(*FlushRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HashDBService_SemiFlush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SemiFlushRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HashDBServiceServer).SemiFlush(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HashDBService_SemiFlush_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HashDBServiceServer).SemiFlush(ctx, req.(*SemiFlushRequest)) } return interceptor(ctx, in, info, handler) } @@ -393,6 +425,10 @@ var HashDBService_ServiceDesc = grpc.ServiceDesc{ MethodName: "Flush", Handler: _HashDBService_Flush_Handler, }, + { + MethodName: "SemiFlush", + Handler: _HashDBService_SemiFlush_Handler, + }, { MethodName: "GetFlushStatus", Handler: _HashDBService_GetFlushStatus_Handler, diff --git a/merkletree/pb/hashdb.pb.go b/merkletree/pb/hashdb.pb.go deleted file mode 100644 index b1c0bfd768..0000000000 --- a/merkletree/pb/hashdb.pb.go +++ /dev/null @@ -1,2216 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc v3.21.12 -// source: hashdb.proto - -package pb - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ResultCode_Code int32 - -const ( - ResultCode_CODE_UNSPECIFIED ResultCode_Code = 0 - ResultCode_CODE_SUCCESS ResultCode_Code = 1 - ResultCode_CODE_DB_KEY_NOT_FOUND ResultCode_Code = 2 // Requested key was not found in database - ResultCode_CODE_DB_ERROR ResultCode_Code = 3 // Error connecting to database, or processing request - ResultCode_CODE_INTERNAL_ERROR ResultCode_Code = 4 - ResultCode_CODE_SMT_INVALID_DATA_SIZE ResultCode_Code = 14 // Invalid size for the data of MT node -) - -// Enum value maps for ResultCode_Code. -var ( - ResultCode_Code_name = map[int32]string{ - 0: "CODE_UNSPECIFIED", - 1: "CODE_SUCCESS", - 2: "CODE_DB_KEY_NOT_FOUND", - 3: "CODE_DB_ERROR", - 4: "CODE_INTERNAL_ERROR", - 14: "CODE_SMT_INVALID_DATA_SIZE", - } - ResultCode_Code_value = map[string]int32{ - "CODE_UNSPECIFIED": 0, - "CODE_SUCCESS": 1, - "CODE_DB_KEY_NOT_FOUND": 2, - "CODE_DB_ERROR": 3, - "CODE_INTERNAL_ERROR": 4, - "CODE_SMT_INVALID_DATA_SIZE": 14, - } -) - -func (x ResultCode_Code) Enum() *ResultCode_Code { - p := new(ResultCode_Code) - *p = x - return p -} - -func (x ResultCode_Code) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ResultCode_Code) Descriptor() protoreflect.EnumDescriptor { - return file_hashdb_proto_enumTypes[0].Descriptor() -} - -func (ResultCode_Code) Type() protoreflect.EnumType { - return &file_hashdb_proto_enumTypes[0] -} - -func (x ResultCode_Code) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ResultCode_Code.Descriptor instead. -func (ResultCode_Code) EnumDescriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{19, 0} -} - -type Version struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - V0_0_1 string `protobuf:"bytes,1,opt,name=v0_0_1,json=v001,proto3" json:"v0_0_1,omitempty"` -} - -func (x *Version) Reset() { - *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Version) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Version) ProtoMessage() {} - -func (x *Version) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Version.ProtoReflect.Descriptor instead. -func (*Version) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{0} -} - -func (x *Version) GetV0_0_1() string { - if x != nil { - return x.V0_0_1 - } - return "" -} - -// * -// @dev SetRequest -// @param {old_root} - merkle-tree root -// @param {key} - key to set -// @param {value} - scalar value to set (HEX string format) -// @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false) -// @param {details} - indicates if it should return all response parameters (true) or just the new root (false) -// @param {get_db_read_log} - indicates if it should return the DB reads generated during the execution of the request -type SetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OldRoot *Fea `protobuf:"bytes,1,opt,name=old_root,json=oldRoot,proto3" json:"old_root,omitempty"` - Key *Fea `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - Persistent bool `protobuf:"varint,4,opt,name=persistent,proto3" json:"persistent,omitempty"` - Details bool `protobuf:"varint,5,opt,name=details,proto3" json:"details,omitempty"` - GetDbReadLog bool `protobuf:"varint,6,opt,name=get_db_read_log,json=getDbReadLog,proto3" json:"get_db_read_log,omitempty"` -} - -func (x *SetRequest) Reset() { - *x = SetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetRequest) ProtoMessage() {} - -func (x *SetRequest) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetRequest.ProtoReflect.Descriptor instead. -func (*SetRequest) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{1} -} - -func (x *SetRequest) GetOldRoot() *Fea { - if x != nil { - return x.OldRoot - } - return nil -} - -func (x *SetRequest) GetKey() *Fea { - if x != nil { - return x.Key - } - return nil -} - -func (x *SetRequest) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *SetRequest) GetPersistent() bool { - if x != nil { - return x.Persistent - } - return false -} - -func (x *SetRequest) GetDetails() bool { - if x != nil { - return x.Details - } - return false -} - -func (x *SetRequest) GetGetDbReadLog() bool { - if x != nil { - return x.GetDbReadLog - } - return false -} - -// * -// @dev GetRequest -// @param {root} - merkle-tree root -// @param {key} - key to look for -// @param {details} - indicates if it should return all response parameters (true) or just the new root (false) -// @param {get_db_read_log} - indicates if it should return the DB reads generated during the execution of the request -type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Root *Fea `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` - Key *Fea `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Details bool `protobuf:"varint,3,opt,name=details,proto3" json:"details,omitempty"` - GetDbReadLog bool `protobuf:"varint,4,opt,name=get_db_read_log,json=getDbReadLog,proto3" json:"get_db_read_log,omitempty"` -} - -func (x *GetRequest) Reset() { - *x = GetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRequest) ProtoMessage() {} - -func (x *GetRequest) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. -func (*GetRequest) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{2} -} - -func (x *GetRequest) GetRoot() *Fea { - if x != nil { - return x.Root - } - return nil -} - -func (x *GetRequest) GetKey() *Fea { - if x != nil { - return x.Key - } - return nil -} - -func (x *GetRequest) GetDetails() bool { - if x != nil { - return x.Details - } - return false -} - -func (x *GetRequest) GetGetDbReadLog() bool { - if x != nil { - return x.GetDbReadLog - } - return false -} - -// * -// @dev SetProgramRequest -// @param {key} - key to set -// @param {data} - Program data to store -// @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false) -type SetProgramRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key *Fea `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Persistent bool `protobuf:"varint,3,opt,name=persistent,proto3" json:"persistent,omitempty"` -} - -func (x *SetProgramRequest) Reset() { - *x = SetProgramRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetProgramRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetProgramRequest) ProtoMessage() {} - -func (x *SetProgramRequest) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetProgramRequest.ProtoReflect.Descriptor instead. -func (*SetProgramRequest) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{3} -} - -func (x *SetProgramRequest) GetKey() *Fea { - if x != nil { - return x.Key - } - return nil -} - -func (x *SetProgramRequest) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *SetProgramRequest) GetPersistent() bool { - if x != nil { - return x.Persistent - } - return false -} - -// * -// @dev GetProgramRequest -// @param {key} - key to get program data -type GetProgramRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key *Fea `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *GetProgramRequest) Reset() { - *x = GetProgramRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetProgramRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProgramRequest) ProtoMessage() {} - -func (x *GetProgramRequest) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProgramRequest.ProtoReflect.Descriptor instead. -func (*GetProgramRequest) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{4} -} - -func (x *GetProgramRequest) GetKey() *Fea { - if x != nil { - return x.Key - } - return nil -} - -// * -// @dev LoadDBRequest -// @param {input_db} - list of db records (MT) to load in the database -// @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false) -type LoadDBRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InputDb map[string]*FeList `protobuf:"bytes,1,rep,name=input_db,json=inputDb,proto3" json:"input_db,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Persistent bool `protobuf:"varint,2,opt,name=persistent,proto3" json:"persistent,omitempty"` -} - -func (x *LoadDBRequest) Reset() { - *x = LoadDBRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadDBRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadDBRequest) ProtoMessage() {} - -func (x *LoadDBRequest) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadDBRequest.ProtoReflect.Descriptor instead. -func (*LoadDBRequest) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{5} -} - -func (x *LoadDBRequest) GetInputDb() map[string]*FeList { - if x != nil { - return x.InputDb - } - return nil -} - -func (x *LoadDBRequest) GetPersistent() bool { - if x != nil { - return x.Persistent - } - return false -} - -// * -// @dev LoadProgramDBRequest -// @param {input_program_db} - list of db records (program) to load in the database -// @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false) -type LoadProgramDBRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InputProgramDb map[string][]byte `protobuf:"bytes,1,rep,name=input_program_db,json=inputProgramDb,proto3" json:"input_program_db,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Persistent bool `protobuf:"varint,2,opt,name=persistent,proto3" json:"persistent,omitempty"` -} - -func (x *LoadProgramDBRequest) Reset() { - *x = LoadProgramDBRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadProgramDBRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadProgramDBRequest) ProtoMessage() {} - -func (x *LoadProgramDBRequest) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadProgramDBRequest.ProtoReflect.Descriptor instead. -func (*LoadProgramDBRequest) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{6} -} - -func (x *LoadProgramDBRequest) GetInputProgramDb() map[string][]byte { - if x != nil { - return x.InputProgramDb - } - return nil -} - -func (x *LoadProgramDBRequest) GetPersistent() bool { - if x != nil { - return x.Persistent - } - return false -} - -// * -// @dev GetFlushDataRequest -// @param {flush_id} - last stored flush ID got using this method, or 0 if it never was called before -type GetFlushDataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FlushId uint64 `protobuf:"varint,1,opt,name=flush_id,json=flushId,proto3" json:"flush_id,omitempty"` -} - -func (x *GetFlushDataRequest) Reset() { - *x = GetFlushDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetFlushDataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetFlushDataRequest) ProtoMessage() {} - -func (x *GetFlushDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetFlushDataRequest.ProtoReflect.Descriptor instead. -func (*GetFlushDataRequest) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{7} -} - -func (x *GetFlushDataRequest) GetFlushId() uint64 { - if x != nil { - return x.FlushId - } - return 0 -} - -// * -// @dev SetResponse -// @param {old_root} - merkle-tree root -// @param {new_root} - merkle-tree new root -// @param {key} - key to look for -// @param {siblings} - array of siblings -// @param {ins_key} - key found -// @param {ins_value} - value found (HEX string format) -// @param {is_old0} - is new insert or delete -// @param {old_value} - old value (HEX string format) -// @param {new_value} - new value (HEX string format) -// @param {mode} -// @param {proof_hash_counter} -// @param {db_read_log} - list of db records read during the execution of the request -// @param {result} - result code -type SetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OldRoot *Fea `protobuf:"bytes,1,opt,name=old_root,json=oldRoot,proto3" json:"old_root,omitempty"` - NewRoot *Fea `protobuf:"bytes,2,opt,name=new_root,json=newRoot,proto3" json:"new_root,omitempty"` - Key *Fea `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Siblings map[uint64]*SiblingList `protobuf:"bytes,4,rep,name=siblings,proto3" json:"siblings,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - InsKey *Fea `protobuf:"bytes,5,opt,name=ins_key,json=insKey,proto3" json:"ins_key,omitempty"` - InsValue string `protobuf:"bytes,6,opt,name=ins_value,json=insValue,proto3" json:"ins_value,omitempty"` - IsOld0 bool `protobuf:"varint,7,opt,name=is_old0,json=isOld0,proto3" json:"is_old0,omitempty"` - OldValue string `protobuf:"bytes,8,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"` - NewValue string `protobuf:"bytes,9,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"` - Mode string `protobuf:"bytes,10,opt,name=mode,proto3" json:"mode,omitempty"` - ProofHashCounter uint64 `protobuf:"varint,11,opt,name=proof_hash_counter,json=proofHashCounter,proto3" json:"proof_hash_counter,omitempty"` - DbReadLog map[string]*FeList `protobuf:"bytes,12,rep,name=db_read_log,json=dbReadLog,proto3" json:"db_read_log,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Result *ResultCode `protobuf:"bytes,13,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *SetResponse) Reset() { - *x = SetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetResponse) ProtoMessage() {} - -func (x *SetResponse) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetResponse.ProtoReflect.Descriptor instead. -func (*SetResponse) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{8} -} - -func (x *SetResponse) GetOldRoot() *Fea { - if x != nil { - return x.OldRoot - } - return nil -} - -func (x *SetResponse) GetNewRoot() *Fea { - if x != nil { - return x.NewRoot - } - return nil -} - -func (x *SetResponse) GetKey() *Fea { - if x != nil { - return x.Key - } - return nil -} - -func (x *SetResponse) GetSiblings() map[uint64]*SiblingList { - if x != nil { - return x.Siblings - } - return nil -} - -func (x *SetResponse) GetInsKey() *Fea { - if x != nil { - return x.InsKey - } - return nil -} - -func (x *SetResponse) GetInsValue() string { - if x != nil { - return x.InsValue - } - return "" -} - -func (x *SetResponse) GetIsOld0() bool { - if x != nil { - return x.IsOld0 - } - return false -} - -func (x *SetResponse) GetOldValue() string { - if x != nil { - return x.OldValue - } - return "" -} - -func (x *SetResponse) GetNewValue() string { - if x != nil { - return x.NewValue - } - return "" -} - -func (x *SetResponse) GetMode() string { - if x != nil { - return x.Mode - } - return "" -} - -func (x *SetResponse) GetProofHashCounter() uint64 { - if x != nil { - return x.ProofHashCounter - } - return 0 -} - -func (x *SetResponse) GetDbReadLog() map[string]*FeList { - if x != nil { - return x.DbReadLog - } - return nil -} - -func (x *SetResponse) GetResult() *ResultCode { - if x != nil { - return x.Result - } - return nil -} - -// * -// @dev GetResponse -// @param {root} - merkle-tree root -// @param {key} - key to look for -// @param {siblings} - array of siblings -// @param {ins_key} - key found -// @param {ins_value} - value found (HEX string format) -// @param {is_old0} - is new insert or delete -// @param {value} - value retrieved (HEX string format) -// @param {proof_hash_counter} -// @param {db_read_log} - list of db records read during the execution of the request -// @param {result} - result code -type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Root *Fea `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` - Key *Fea `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Siblings map[uint64]*SiblingList `protobuf:"bytes,3,rep,name=siblings,proto3" json:"siblings,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - InsKey *Fea `protobuf:"bytes,4,opt,name=ins_key,json=insKey,proto3" json:"ins_key,omitempty"` - InsValue string `protobuf:"bytes,5,opt,name=ins_value,json=insValue,proto3" json:"ins_value,omitempty"` - IsOld0 bool `protobuf:"varint,6,opt,name=is_old0,json=isOld0,proto3" json:"is_old0,omitempty"` - Value string `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` - ProofHashCounter uint64 `protobuf:"varint,8,opt,name=proof_hash_counter,json=proofHashCounter,proto3" json:"proof_hash_counter,omitempty"` - DbReadLog map[string]*FeList `protobuf:"bytes,9,rep,name=db_read_log,json=dbReadLog,proto3" json:"db_read_log,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Result *ResultCode `protobuf:"bytes,10,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *GetResponse) Reset() { - *x = GetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetResponse) ProtoMessage() {} - -func (x *GetResponse) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. -func (*GetResponse) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{9} -} - -func (x *GetResponse) GetRoot() *Fea { - if x != nil { - return x.Root - } - return nil -} - -func (x *GetResponse) GetKey() *Fea { - if x != nil { - return x.Key - } - return nil -} - -func (x *GetResponse) GetSiblings() map[uint64]*SiblingList { - if x != nil { - return x.Siblings - } - return nil -} - -func (x *GetResponse) GetInsKey() *Fea { - if x != nil { - return x.InsKey - } - return nil -} - -func (x *GetResponse) GetInsValue() string { - if x != nil { - return x.InsValue - } - return "" -} - -func (x *GetResponse) GetIsOld0() bool { - if x != nil { - return x.IsOld0 - } - return false -} - -func (x *GetResponse) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *GetResponse) GetProofHashCounter() uint64 { - if x != nil { - return x.ProofHashCounter - } - return 0 -} - -func (x *GetResponse) GetDbReadLog() map[string]*FeList { - if x != nil { - return x.DbReadLog - } - return nil -} - -func (x *GetResponse) GetResult() *ResultCode { - if x != nil { - return x.Result - } - return nil -} - -// * -// @dev SetProgramResponse -// @param {result} - result code -type SetProgramResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result *ResultCode `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *SetProgramResponse) Reset() { - *x = SetProgramResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetProgramResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetProgramResponse) ProtoMessage() {} - -func (x *SetProgramResponse) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetProgramResponse.ProtoReflect.Descriptor instead. -func (*SetProgramResponse) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{10} -} - -func (x *SetProgramResponse) GetResult() *ResultCode { - if x != nil { - return x.Result - } - return nil -} - -// * -// @dev GetProgramResponse -// @param {data} - program data retrieved -// @param {result} - result code -type GetProgramResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Result *ResultCode `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *GetProgramResponse) Reset() { - *x = GetProgramResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetProgramResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProgramResponse) ProtoMessage() {} - -func (x *GetProgramResponse) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProgramResponse.ProtoReflect.Descriptor instead. -func (*GetProgramResponse) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{11} -} - -func (x *GetProgramResponse) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *GetProgramResponse) GetResult() *ResultCode { - if x != nil { - return x.Result - } - return nil -} - -// * -// @dev FlushResponse -// @param {flush_id} - id assigned to this flush data -// @param {stored_flush_id} - id of the last flush data sent to database -// @param {result} - result code -type FlushResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FlushId uint64 `protobuf:"varint,1,opt,name=flush_id,json=flushId,proto3" json:"flush_id,omitempty"` - StoredFlushId uint64 `protobuf:"varint,2,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` - Result *ResultCode `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *FlushResponse) Reset() { - *x = FlushResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FlushResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlushResponse) ProtoMessage() {} - -func (x *FlushResponse) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FlushResponse.ProtoReflect.Descriptor instead. -func (*FlushResponse) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{12} -} - -func (x *FlushResponse) GetFlushId() uint64 { - if x != nil { - return x.FlushId - } - return 0 -} - -func (x *FlushResponse) GetStoredFlushId() uint64 { - if x != nil { - return x.StoredFlushId - } - return 0 -} - -func (x *FlushResponse) GetResult() *ResultCode { - if x != nil { - return x.Result - } - return nil -} - -// * -// @dev GetFlushStatusResponse -// @param {stored_flush_id} - id of the last flush data sent to database -// @param {sending_flush_id} - id of the flush data being sent now to database -// @param {last_flush_id} - id assigned to the last call to flush -// @param {pending_to_flush_nodes} - number of SMT nodes pending to flush -// @param {pending_to_flush_program} - number of SC programs pending to flush -// @param {storing_nodes} - number of SMT nodes being stored in the hash database -// @param {storing_program} - number of SC programs being stored in the hash database -// @param {prover_id} - id assigned to this instance of the prover process -type GetFlushStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StoredFlushId uint64 `protobuf:"varint,1,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` - StoringFlushId uint64 `protobuf:"varint,2,opt,name=storing_flush_id,json=storingFlushId,proto3" json:"storing_flush_id,omitempty"` - LastFlushId uint64 `protobuf:"varint,3,opt,name=last_flush_id,json=lastFlushId,proto3" json:"last_flush_id,omitempty"` - PendingToFlushNodes uint64 `protobuf:"varint,4,opt,name=pending_to_flush_nodes,json=pendingToFlushNodes,proto3" json:"pending_to_flush_nodes,omitempty"` - PendingToFlushProgram uint64 `protobuf:"varint,5,opt,name=pending_to_flush_program,json=pendingToFlushProgram,proto3" json:"pending_to_flush_program,omitempty"` - StoringNodes uint64 `protobuf:"varint,6,opt,name=storing_nodes,json=storingNodes,proto3" json:"storing_nodes,omitempty"` - StoringProgram uint64 `protobuf:"varint,7,opt,name=storing_program,json=storingProgram,proto3" json:"storing_program,omitempty"` - ProverId string `protobuf:"bytes,8,opt,name=prover_id,json=proverId,proto3" json:"prover_id,omitempty"` -} - -func (x *GetFlushStatusResponse) Reset() { - *x = GetFlushStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetFlushStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetFlushStatusResponse) ProtoMessage() {} - -func (x *GetFlushStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetFlushStatusResponse.ProtoReflect.Descriptor instead. -func (*GetFlushStatusResponse) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{13} -} - -func (x *GetFlushStatusResponse) GetStoredFlushId() uint64 { - if x != nil { - return x.StoredFlushId - } - return 0 -} - -func (x *GetFlushStatusResponse) GetStoringFlushId() uint64 { - if x != nil { - return x.StoringFlushId - } - return 0 -} - -func (x *GetFlushStatusResponse) GetLastFlushId() uint64 { - if x != nil { - return x.LastFlushId - } - return 0 -} - -func (x *GetFlushStatusResponse) GetPendingToFlushNodes() uint64 { - if x != nil { - return x.PendingToFlushNodes - } - return 0 -} - -func (x *GetFlushStatusResponse) GetPendingToFlushProgram() uint64 { - if x != nil { - return x.PendingToFlushProgram - } - return 0 -} - -func (x *GetFlushStatusResponse) GetStoringNodes() uint64 { - if x != nil { - return x.StoringNodes - } - return 0 -} - -func (x *GetFlushStatusResponse) GetStoringProgram() uint64 { - if x != nil { - return x.StoringProgram - } - return 0 -} - -func (x *GetFlushStatusResponse) GetProverId() string { - if x != nil { - return x.ProverId - } - return "" -} - -// * -// @dev GetFlushDataResponse -// @param {stored_flush_id} - id of the last flush data sent to database -// @param {nodes} - data to insert in the nodes table -// @param {nodes_update} - data to update in the nodes table -// @param {program} - data to insert in the program table -// @param {program_update} - data to update in the program table -// @param {nodes_state_root} - nodes state root to update in the nodes table -// @param {result} - result code -type GetFlushDataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StoredFlushId uint64 `protobuf:"varint,1,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` - Nodes []*FlushData `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"` - NodesUpdate []*FlushData `protobuf:"bytes,3,rep,name=nodes_update,json=nodesUpdate,proto3" json:"nodes_update,omitempty"` - Program []*FlushData `protobuf:"bytes,4,rep,name=program,proto3" json:"program,omitempty"` - ProgramUpdate []*FlushData `protobuf:"bytes,5,rep,name=program_update,json=programUpdate,proto3" json:"program_update,omitempty"` - NodesStateRoot string `protobuf:"bytes,6,opt,name=nodes_state_root,json=nodesStateRoot,proto3" json:"nodes_state_root,omitempty"` - Result *ResultCode `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *GetFlushDataResponse) Reset() { - *x = GetFlushDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetFlushDataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetFlushDataResponse) ProtoMessage() {} - -func (x *GetFlushDataResponse) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetFlushDataResponse.ProtoReflect.Descriptor instead. -func (*GetFlushDataResponse) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{14} -} - -func (x *GetFlushDataResponse) GetStoredFlushId() uint64 { - if x != nil { - return x.StoredFlushId - } - return 0 -} - -func (x *GetFlushDataResponse) GetNodes() []*FlushData { - if x != nil { - return x.Nodes - } - return nil -} - -func (x *GetFlushDataResponse) GetNodesUpdate() []*FlushData { - if x != nil { - return x.NodesUpdate - } - return nil -} - -func (x *GetFlushDataResponse) GetProgram() []*FlushData { - if x != nil { - return x.Program - } - return nil -} - -func (x *GetFlushDataResponse) GetProgramUpdate() []*FlushData { - if x != nil { - return x.ProgramUpdate - } - return nil -} - -func (x *GetFlushDataResponse) GetNodesStateRoot() string { - if x != nil { - return x.NodesStateRoot - } - return "" -} - -func (x *GetFlushDataResponse) GetResult() *ResultCode { - if x != nil { - return x.Result - } - return nil -} - -// * -// @dev Array of 4 FE -// @param {fe0} - Field Element value for pos 0 -// @param {fe1} - Field Element value for pos 1 -// @param {fe2} - Field Element value for pos 2 -// @param {fe3} - Field Element value for pos 3 -type Fea struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Fe0 uint64 `protobuf:"varint,1,opt,name=fe0,proto3" json:"fe0,omitempty"` - Fe1 uint64 `protobuf:"varint,2,opt,name=fe1,proto3" json:"fe1,omitempty"` - Fe2 uint64 `protobuf:"varint,3,opt,name=fe2,proto3" json:"fe2,omitempty"` - Fe3 uint64 `protobuf:"varint,4,opt,name=fe3,proto3" json:"fe3,omitempty"` -} - -func (x *Fea) Reset() { - *x = Fea{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Fea) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Fea) ProtoMessage() {} - -func (x *Fea) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Fea.ProtoReflect.Descriptor instead. -func (*Fea) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{15} -} - -func (x *Fea) GetFe0() uint64 { - if x != nil { - return x.Fe0 - } - return 0 -} - -func (x *Fea) GetFe1() uint64 { - if x != nil { - return x.Fe1 - } - return 0 -} - -func (x *Fea) GetFe2() uint64 { - if x != nil { - return x.Fe2 - } - return 0 -} - -func (x *Fea) GetFe3() uint64 { - if x != nil { - return x.Fe3 - } - return 0 -} - -// * -// @dev FE (Field Element) List -// @param {fe} - list of Fe -type FeList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Fe []uint64 `protobuf:"varint,1,rep,packed,name=fe,proto3" json:"fe,omitempty"` -} - -func (x *FeList) Reset() { - *x = FeList{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FeList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FeList) ProtoMessage() {} - -func (x *FeList) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FeList.ProtoReflect.Descriptor instead. -func (*FeList) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{16} -} - -func (x *FeList) GetFe() []uint64 { - if x != nil { - return x.Fe - } - return nil -} - -// * -// @dev Siblings List -// @param {sibling} - list of siblings -type SiblingList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sibling []uint64 `protobuf:"varint,1,rep,packed,name=sibling,proto3" json:"sibling,omitempty"` -} - -func (x *SiblingList) Reset() { - *x = SiblingList{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SiblingList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SiblingList) ProtoMessage() {} - -func (x *SiblingList) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SiblingList.ProtoReflect.Descriptor instead. -func (*SiblingList) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{17} -} - -func (x *SiblingList) GetSibling() []uint64 { - if x != nil { - return x.Sibling - } - return nil -} - -// * -// @dev Flush Data -// @param {key} - hash key -// @param {value} - string value -type FlushData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *FlushData) Reset() { - *x = FlushData{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FlushData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlushData) ProtoMessage() {} - -func (x *FlushData) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FlushData.ProtoReflect.Descriptor instead. -func (*FlushData) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{18} -} - -func (x *FlushData) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *FlushData) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// * -// @dev Result code -// @param {code} - result code -type ResultCode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code ResultCode_Code `protobuf:"varint,1,opt,name=code,proto3,enum=hashdb.v1.ResultCode_Code" json:"code,omitempty"` -} - -func (x *ResultCode) Reset() { - *x = ResultCode{} - if protoimpl.UnsafeEnabled { - mi := &file_hashdb_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResultCode) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResultCode) ProtoMessage() {} - -func (x *ResultCode) ProtoReflect() protoreflect.Message { - mi := &file_hashdb_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResultCode.ProtoReflect.Descriptor instead. -func (*ResultCode) Descriptor() ([]byte, []int) { - return file_hashdb_proto_rawDescGZIP(), []int{19} -} - -func (x *ResultCode) GetCode() ResultCode_Code { - if x != nil { - return x.Code - } - return ResultCode_CODE_UNSPECIFIED -} - -var File_hashdb_proto protoreflect.FileDescriptor - -var file_hashdb_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, - 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x14, 0x0a, 0x06, 0x76, 0x30, 0x5f, 0x30, 0x5f, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x76, 0x30, 0x30, 0x31, 0x22, 0xd0, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, - 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x20, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x70, - 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x62, 0x5f, 0x72, 0x65, - 0x61, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x67, 0x65, - 0x74, 0x44, 0x62, 0x52, 0x65, 0x61, 0x64, 0x4c, 0x6f, 0x67, 0x22, 0x93, 0x01, 0x0a, 0x0a, 0x47, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x04, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x20, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0f, 0x67, 0x65, 0x74, - 0x5f, 0x64, 0x62, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x67, 0x65, 0x74, 0x44, 0x62, 0x52, 0x65, 0x61, 0x64, 0x4c, 0x6f, 0x67, - 0x22, 0x69, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x65, 0x61, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x70, - 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x35, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x20, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x22, 0xc0, 0x01, 0x0a, 0x0d, 0x4c, 0x6f, 0x61, 0x64, 0x44, 0x42, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x62, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x44, 0x62, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x73, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x4d, 0x0a, 0x0c, 0x49, 0x6e, 0x70, 0x75, 0x74, 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, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5d, - 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, - 0x64, 0x62, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, - 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x44, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x44, 0x62, 0x12, 0x1e, 0x0a, - 0x0a, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x41, 0x0a, - 0x13, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 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, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x30, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x6c, 0x75, 0x73, 0x68, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x66, 0x6c, 0x75, 0x73, 0x68, - 0x49, 0x64, 0x22, 0xbe, 0x05, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x65, 0x61, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x29, 0x0a, - 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x52, - 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x65, 0x61, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x08, 0x73, 0x69, - 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x08, 0x73, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x27, 0x0a, 0x07, - 0x69, 0x6e, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x52, 0x06, 0x69, - 0x6e, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6f, 0x6c, 0x64, 0x30, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x4f, 0x6c, 0x64, 0x30, 0x12, 0x1b, 0x0a, 0x09, 0x6f, - 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6f, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x61, 0x73, 0x68, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0b, 0x64, 0x62, 0x5f, 0x72, 0x65, - 0x61, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x62, 0x52, 0x65, 0x61, 0x64, 0x4c, 0x6f, 0x67, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x62, 0x52, 0x65, 0x61, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x2d, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x53, 0x0a, - 0x0d, 0x53, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x62, 0x6c, - 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x4f, 0x0a, 0x0e, 0x44, 0x62, 0x52, 0x65, 0x61, 0x64, 0x4c, 0x6f, 0x67, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0xd4, 0x04, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, - 0x61, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x65, 0x61, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x08, 0x73, 0x69, 0x62, - 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x08, 0x73, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x69, - 0x6e, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x52, 0x06, 0x69, 0x6e, - 0x73, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6f, 0x6c, 0x64, 0x30, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x4f, 0x6c, 0x64, 0x30, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x72, - 0x6f, 0x6f, 0x66, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x45, - 0x0a, 0x0b, 0x64, 0x62, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x09, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x62, 0x52, 0x65, - 0x61, 0x64, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x62, 0x52, 0x65, - 0x61, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x53, 0x0a, 0x0d, 0x53, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4f, 0x0a, 0x0e, 0x44, 0x62, 0x52, - 0x65, 0x61, 0x64, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x43, 0x0a, 0x12, 0x53, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x57, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x0d, 0x46, 0x6c, 0x75, - 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x6c, - 0x75, 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x66, 0x6c, - 0x75, 0x73, 0x68, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, - 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x64, 0x12, 0x2d, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xe7, 0x02, 0x0a, - 0x16, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x64, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x64, 0x12, - 0x28, 0x0a, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x64, 0x12, 0x33, 0x0a, - 0x16, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x5f, 0x66, 0x6c, 0x75, 0x73, - 0x68, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x4e, 0x6f, 0x64, - 0x65, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, - 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x46, - 0x6c, 0x75, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x23, 0x0a, 0x0d, 0x73, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x73, - 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x72, 0x6f, - 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0xe9, 0x02, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x46, 0x6c, - 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, - 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x6e, 0x6f, - 0x64, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x3b, 0x0a, 0x0e, - 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x6f, 0x6f, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x22, 0x4d, 0x0a, 0x03, 0x46, 0x65, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x30, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x66, 0x65, 0x30, 0x12, 0x10, 0x0a, 0x03, 0x66, - 0x65, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x66, 0x65, 0x31, 0x12, 0x10, 0x0a, - 0x03, 0x66, 0x65, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x66, 0x65, 0x32, 0x12, - 0x10, 0x0a, 0x03, 0x66, 0x65, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x66, 0x65, - 0x33, 0x22, 0x18, 0x0a, 0x06, 0x46, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x66, - 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x02, 0x66, 0x65, 0x22, 0x27, 0x0a, 0x0b, 0x53, - 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, - 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x73, 0x69, 0x62, - 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x33, 0x0a, 0x09, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, - 0x61, 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, 0x22, 0xd4, 0x01, 0x0a, 0x0a, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x04, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4f, 0x44, 0x45, 0x5f, - 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x44, - 0x45, 0x5f, 0x44, 0x42, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, - 0x4e, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x42, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x44, 0x45, 0x5f, - 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, - 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x4d, 0x54, 0x5f, 0x49, 0x4e, 0x56, - 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x0e, - 0x32, 0x82, 0x05, 0x0a, 0x0d, 0x48, 0x61, 0x73, 0x68, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x36, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x03, 0x47, 0x65, - 0x74, 0x12, 0x15, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, - 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x12, 0x1c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x1c, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x06, - 0x4c, 0x6f, 0x61, 0x64, 0x44, 0x42, 0x12, 0x18, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0d, 0x4c, 0x6f, - 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x44, 0x42, 0x12, 0x1f, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x05, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x21, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x75, - 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x1e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x35, 0x5a, 0x33, 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, 0x6d, - 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x74, 0x72, 0x65, 0x65, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_hashdb_proto_rawDescOnce sync.Once - file_hashdb_proto_rawDescData = file_hashdb_proto_rawDesc -) - -func file_hashdb_proto_rawDescGZIP() []byte { - file_hashdb_proto_rawDescOnce.Do(func() { - file_hashdb_proto_rawDescData = protoimpl.X.CompressGZIP(file_hashdb_proto_rawDescData) - }) - return file_hashdb_proto_rawDescData -} - -var file_hashdb_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_hashdb_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_hashdb_proto_goTypes = []interface{}{ - (ResultCode_Code)(0), // 0: hashdb.v1.ResultCode.Code - (*Version)(nil), // 1: hashdb.v1.Version - (*SetRequest)(nil), // 2: hashdb.v1.SetRequest - (*GetRequest)(nil), // 3: hashdb.v1.GetRequest - (*SetProgramRequest)(nil), // 4: hashdb.v1.SetProgramRequest - (*GetProgramRequest)(nil), // 5: hashdb.v1.GetProgramRequest - (*LoadDBRequest)(nil), // 6: hashdb.v1.LoadDBRequest - (*LoadProgramDBRequest)(nil), // 7: hashdb.v1.LoadProgramDBRequest - (*GetFlushDataRequest)(nil), // 8: hashdb.v1.GetFlushDataRequest - (*SetResponse)(nil), // 9: hashdb.v1.SetResponse - (*GetResponse)(nil), // 10: hashdb.v1.GetResponse - (*SetProgramResponse)(nil), // 11: hashdb.v1.SetProgramResponse - (*GetProgramResponse)(nil), // 12: hashdb.v1.GetProgramResponse - (*FlushResponse)(nil), // 13: hashdb.v1.FlushResponse - (*GetFlushStatusResponse)(nil), // 14: hashdb.v1.GetFlushStatusResponse - (*GetFlushDataResponse)(nil), // 15: hashdb.v1.GetFlushDataResponse - (*Fea)(nil), // 16: hashdb.v1.Fea - (*FeList)(nil), // 17: hashdb.v1.FeList - (*SiblingList)(nil), // 18: hashdb.v1.SiblingList - (*FlushData)(nil), // 19: hashdb.v1.FlushData - (*ResultCode)(nil), // 20: hashdb.v1.ResultCode - nil, // 21: hashdb.v1.LoadDBRequest.InputDbEntry - nil, // 22: hashdb.v1.LoadProgramDBRequest.InputProgramDbEntry - nil, // 23: hashdb.v1.SetResponse.SiblingsEntry - nil, // 24: hashdb.v1.SetResponse.DbReadLogEntry - nil, // 25: hashdb.v1.GetResponse.SiblingsEntry - nil, // 26: hashdb.v1.GetResponse.DbReadLogEntry - (*emptypb.Empty)(nil), // 27: google.protobuf.Empty -} -var file_hashdb_proto_depIdxs = []int32{ - 16, // 0: hashdb.v1.SetRequest.old_root:type_name -> hashdb.v1.Fea - 16, // 1: hashdb.v1.SetRequest.key:type_name -> hashdb.v1.Fea - 16, // 2: hashdb.v1.GetRequest.root:type_name -> hashdb.v1.Fea - 16, // 3: hashdb.v1.GetRequest.key:type_name -> hashdb.v1.Fea - 16, // 4: hashdb.v1.SetProgramRequest.key:type_name -> hashdb.v1.Fea - 16, // 5: hashdb.v1.GetProgramRequest.key:type_name -> hashdb.v1.Fea - 21, // 6: hashdb.v1.LoadDBRequest.input_db:type_name -> hashdb.v1.LoadDBRequest.InputDbEntry - 22, // 7: hashdb.v1.LoadProgramDBRequest.input_program_db:type_name -> hashdb.v1.LoadProgramDBRequest.InputProgramDbEntry - 16, // 8: hashdb.v1.SetResponse.old_root:type_name -> hashdb.v1.Fea - 16, // 9: hashdb.v1.SetResponse.new_root:type_name -> hashdb.v1.Fea - 16, // 10: hashdb.v1.SetResponse.key:type_name -> hashdb.v1.Fea - 23, // 11: hashdb.v1.SetResponse.siblings:type_name -> hashdb.v1.SetResponse.SiblingsEntry - 16, // 12: hashdb.v1.SetResponse.ins_key:type_name -> hashdb.v1.Fea - 24, // 13: hashdb.v1.SetResponse.db_read_log:type_name -> hashdb.v1.SetResponse.DbReadLogEntry - 20, // 14: hashdb.v1.SetResponse.result:type_name -> hashdb.v1.ResultCode - 16, // 15: hashdb.v1.GetResponse.root:type_name -> hashdb.v1.Fea - 16, // 16: hashdb.v1.GetResponse.key:type_name -> hashdb.v1.Fea - 25, // 17: hashdb.v1.GetResponse.siblings:type_name -> hashdb.v1.GetResponse.SiblingsEntry - 16, // 18: hashdb.v1.GetResponse.ins_key:type_name -> hashdb.v1.Fea - 26, // 19: hashdb.v1.GetResponse.db_read_log:type_name -> hashdb.v1.GetResponse.DbReadLogEntry - 20, // 20: hashdb.v1.GetResponse.result:type_name -> hashdb.v1.ResultCode - 20, // 21: hashdb.v1.SetProgramResponse.result:type_name -> hashdb.v1.ResultCode - 20, // 22: hashdb.v1.GetProgramResponse.result:type_name -> hashdb.v1.ResultCode - 20, // 23: hashdb.v1.FlushResponse.result:type_name -> hashdb.v1.ResultCode - 19, // 24: hashdb.v1.GetFlushDataResponse.nodes:type_name -> hashdb.v1.FlushData - 19, // 25: hashdb.v1.GetFlushDataResponse.nodes_update:type_name -> hashdb.v1.FlushData - 19, // 26: hashdb.v1.GetFlushDataResponse.program:type_name -> hashdb.v1.FlushData - 19, // 27: hashdb.v1.GetFlushDataResponse.program_update:type_name -> hashdb.v1.FlushData - 20, // 28: hashdb.v1.GetFlushDataResponse.result:type_name -> hashdb.v1.ResultCode - 0, // 29: hashdb.v1.ResultCode.code:type_name -> hashdb.v1.ResultCode.Code - 17, // 30: hashdb.v1.LoadDBRequest.InputDbEntry.value:type_name -> hashdb.v1.FeList - 18, // 31: hashdb.v1.SetResponse.SiblingsEntry.value:type_name -> hashdb.v1.SiblingList - 17, // 32: hashdb.v1.SetResponse.DbReadLogEntry.value:type_name -> hashdb.v1.FeList - 18, // 33: hashdb.v1.GetResponse.SiblingsEntry.value:type_name -> hashdb.v1.SiblingList - 17, // 34: hashdb.v1.GetResponse.DbReadLogEntry.value:type_name -> hashdb.v1.FeList - 2, // 35: hashdb.v1.HashDBService.Set:input_type -> hashdb.v1.SetRequest - 3, // 36: hashdb.v1.HashDBService.Get:input_type -> hashdb.v1.GetRequest - 4, // 37: hashdb.v1.HashDBService.SetProgram:input_type -> hashdb.v1.SetProgramRequest - 5, // 38: hashdb.v1.HashDBService.GetProgram:input_type -> hashdb.v1.GetProgramRequest - 6, // 39: hashdb.v1.HashDBService.LoadDB:input_type -> hashdb.v1.LoadDBRequest - 7, // 40: hashdb.v1.HashDBService.LoadProgramDB:input_type -> hashdb.v1.LoadProgramDBRequest - 27, // 41: hashdb.v1.HashDBService.Flush:input_type -> google.protobuf.Empty - 27, // 42: hashdb.v1.HashDBService.GetFlushStatus:input_type -> google.protobuf.Empty - 8, // 43: hashdb.v1.HashDBService.GetFlushData:input_type -> hashdb.v1.GetFlushDataRequest - 9, // 44: hashdb.v1.HashDBService.Set:output_type -> hashdb.v1.SetResponse - 10, // 45: hashdb.v1.HashDBService.Get:output_type -> hashdb.v1.GetResponse - 11, // 46: hashdb.v1.HashDBService.SetProgram:output_type -> hashdb.v1.SetProgramResponse - 12, // 47: hashdb.v1.HashDBService.GetProgram:output_type -> hashdb.v1.GetProgramResponse - 27, // 48: hashdb.v1.HashDBService.LoadDB:output_type -> google.protobuf.Empty - 27, // 49: hashdb.v1.HashDBService.LoadProgramDB:output_type -> google.protobuf.Empty - 13, // 50: hashdb.v1.HashDBService.Flush:output_type -> hashdb.v1.FlushResponse - 14, // 51: hashdb.v1.HashDBService.GetFlushStatus:output_type -> hashdb.v1.GetFlushStatusResponse - 15, // 52: hashdb.v1.HashDBService.GetFlushData:output_type -> hashdb.v1.GetFlushDataResponse - 44, // [44:53] is the sub-list for method output_type - 35, // [35:44] is the sub-list for method input_type - 35, // [35:35] is the sub-list for extension type_name - 35, // [35:35] is the sub-list for extension extendee - 0, // [0:35] is the sub-list for field type_name -} - -func init() { file_hashdb_proto_init() } -func file_hashdb_proto_init() { - if File_hashdb_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_hashdb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetProgramRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProgramRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadDBRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadProgramDBRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFlushDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetProgramResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProgramResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlushResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFlushStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFlushDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Fea); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FeList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SiblingList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlushData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hashdb_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResultCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_hashdb_proto_rawDesc, - NumEnums: 1, - NumMessages: 26, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_hashdb_proto_goTypes, - DependencyIndexes: file_hashdb_proto_depIdxs, - EnumInfos: file_hashdb_proto_enumTypes, - MessageInfos: file_hashdb_proto_msgTypes, - }.Build() - File_hashdb_proto = out.File - file_hashdb_proto_rawDesc = nil - file_hashdb_proto_goTypes = nil - file_hashdb_proto_depIdxs = nil -} diff --git a/merkletree/split.go b/merkletree/split.go index bc164f0a06..64cfca905a 100644 --- a/merkletree/split.go +++ b/merkletree/split.go @@ -6,7 +6,7 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/cdk-validium-node/hex" poseidon "github.com/iden3/go-iden3-crypto/goldenposeidon" ) diff --git a/merkletree/split_test.go b/merkletree/split_test.go index 12f2302ab9..a72a28e41f 100644 --- a/merkletree/split_test.go +++ b/merkletree/split_test.go @@ -5,8 +5,8 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/stretchr/testify/require" ) diff --git a/merkletree/tree.go b/merkletree/tree.go index 36cefa572d..c70ef5bdbd 100644 --- a/merkletree/tree.go +++ b/merkletree/tree.go @@ -6,19 +6,18 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/merkletree/hashdb" "github.com/ethereum/go-ethereum/common" - "google.golang.org/protobuf/types/known/emptypb" ) // StateTree provides methods to access and modify state in merkletree type StateTree struct { - grpcClient pb.HashDBServiceClient + grpcClient hashdb.HashDBServiceClient } // NewStateTree creates new StateTree. -func NewStateTree(client pb.HashDBServiceClient) *StateTree { +func NewStateTree(client hashdb.HashDBServiceClient) *StateTree { return &StateTree{ grpcClient: client, } @@ -125,7 +124,7 @@ func (tree *StateTree) GetStorageAt(ctx context.Context, address common.Address, } // SetBalance sets balance. -func (tree *StateTree) SetBalance(ctx context.Context, address common.Address, balance *big.Int, root []byte) (newRoot []byte, proof *UpdateProof, err error) { +func (tree *StateTree) SetBalance(ctx context.Context, address common.Address, balance *big.Int, root []byte, uuid string) (newRoot []byte, proof *UpdateProof, err error) { if balance.Cmp(big.NewInt(0)) == -1 { return nil, nil, fmt.Errorf("invalid balance") } @@ -139,7 +138,7 @@ func (tree *StateTree) SetBalance(ctx context.Context, address common.Address, b k := new(big.Int).SetBytes(key) balanceH8 := scalar2fea(balance) - updateProof, err := tree.set(ctx, scalarToh4(r), scalarToh4(k), balanceH8) + updateProof, err := tree.set(ctx, scalarToh4(r), scalarToh4(k), balanceH8, uuid) if err != nil { return nil, nil, err } @@ -148,7 +147,7 @@ func (tree *StateTree) SetBalance(ctx context.Context, address common.Address, b } // SetNonce sets nonce. -func (tree *StateTree) SetNonce(ctx context.Context, address common.Address, nonce *big.Int, root []byte) (newRoot []byte, proof *UpdateProof, err error) { +func (tree *StateTree) SetNonce(ctx context.Context, address common.Address, nonce *big.Int, root []byte, uuid string) (newRoot []byte, proof *UpdateProof, err error) { if nonce.Cmp(big.NewInt(0)) == -1 { return nil, nil, fmt.Errorf("invalid nonce") } @@ -163,7 +162,7 @@ func (tree *StateTree) SetNonce(ctx context.Context, address common.Address, non nonceH8 := scalar2fea(nonce) - updateProof, err := tree.set(ctx, scalarToh4(r), scalarToh4(k), nonceH8) + updateProof, err := tree.set(ctx, scalarToh4(r), scalarToh4(k), nonceH8, uuid) if err != nil { return nil, nil, err } @@ -172,7 +171,7 @@ func (tree *StateTree) SetNonce(ctx context.Context, address common.Address, non } // SetCode sets smart contract code. -func (tree *StateTree) SetCode(ctx context.Context, address common.Address, code []byte, root []byte) (newRoot []byte, proof *UpdateProof, err error) { +func (tree *StateTree) SetCode(ctx context.Context, address common.Address, code []byte, root []byte, uuid string) (newRoot []byte, proof *UpdateProof, err error) { // calculating smart contract code hash scCodeHash4, err := hashContractBytecode(code) if err != nil { @@ -201,7 +200,7 @@ func (tree *StateTree) SetCode(ctx context.Context, address common.Address, code scCodeHashBI := new(big.Int).SetBytes(scCodeHash[:]) scCodeHashH8 := scalar2fea(scCodeHashBI) - updateProof, err := tree.set(ctx, scalarToh4(r), scalarToh4(k), scCodeHashH8) + updateProof, err := tree.set(ctx, scalarToh4(r), scalarToh4(k), scCodeHashH8, uuid) if err != nil { return nil, nil, err } @@ -215,7 +214,7 @@ func (tree *StateTree) SetCode(ctx context.Context, address common.Address, code scCodeLengthBI := new(big.Int).SetInt64(int64(len(code))) scCodeLengthH8 := scalar2fea(scCodeLengthBI) - updateProof, err = tree.set(ctx, updateProof.NewRoot, scalarToh4(k), scCodeLengthH8) + updateProof, err = tree.set(ctx, updateProof.NewRoot, scalarToh4(k), scCodeLengthH8, uuid) if err != nil { return nil, nil, err } @@ -224,7 +223,7 @@ func (tree *StateTree) SetCode(ctx context.Context, address common.Address, code } // SetStorageAt sets storage value at specified position. -func (tree *StateTree) SetStorageAt(ctx context.Context, address common.Address, position *big.Int, value *big.Int, root []byte) (newRoot []byte, proof *UpdateProof, err error) { +func (tree *StateTree) SetStorageAt(ctx context.Context, address common.Address, position *big.Int, value *big.Int, root []byte, uuid string) (newRoot []byte, proof *UpdateProof, err error) { r := new(big.Int).SetBytes(root) key, err := KeyContractStorage(address, position.Bytes()) if err != nil { @@ -233,7 +232,7 @@ func (tree *StateTree) SetStorageAt(ctx context.Context, address common.Address, k := new(big.Int).SetBytes(key[:]) valueH8 := scalar2fea(value) - updateProof, err := tree.set(ctx, scalarToh4(r), scalarToh4(k), valueH8) + updateProof, err := tree.set(ctx, scalarToh4(r), scalarToh4(k), valueH8, uuid) if err != nil { return nil, nil, err } @@ -242,9 +241,9 @@ func (tree *StateTree) SetStorageAt(ctx context.Context, address common.Address, } func (tree *StateTree) get(ctx context.Context, root, key []uint64) (*Proof, error) { - result, err := tree.grpcClient.Get(ctx, &pb.GetRequest{ - Root: &pb.Fea{Fe0: root[0], Fe1: root[1], Fe2: root[2], Fe3: root[3]}, - Key: &pb.Fea{Fe0: key[0], Fe1: key[1], Fe2: key[2], Fe3: key[3]}, + result, err := tree.grpcClient.Get(ctx, &hashdb.GetRequest{ + Root: &hashdb.Fea{Fe0: root[0], Fe1: root[1], Fe2: root[2], Fe3: root[3]}, + Key: &hashdb.Fea{Fe0: key[0], Fe1: key[1], Fe2: key[2], Fe3: key[3]}, }) if err != nil { return nil, err @@ -262,8 +261,8 @@ func (tree *StateTree) get(ctx context.Context, root, key []uint64) (*Proof, err } func (tree *StateTree) getProgram(ctx context.Context, key []uint64) (*ProgramProof, error) { - result, err := tree.grpcClient.GetProgram(ctx, &pb.GetProgramRequest{ - Key: &pb.Fea{Fe0: key[0], Fe1: key[1], Fe2: key[2], Fe3: key[3]}, + result, err := tree.grpcClient.GetProgram(ctx, &hashdb.GetProgramRequest{ + Key: &hashdb.Fea{Fe0: key[0], Fe1: key[1], Fe2: key[2], Fe3: key[3]}, }) if err != nil { return nil, err @@ -274,16 +273,17 @@ func (tree *StateTree) getProgram(ctx context.Context, key []uint64) (*ProgramPr }, nil } -func (tree *StateTree) set(ctx context.Context, oldRoot, key, value []uint64) (*UpdateProof, error) { +func (tree *StateTree) set(ctx context.Context, oldRoot, key, value []uint64, uuid string) (*UpdateProof, error) { feaValue := fea2string(value) if strings.HasPrefix(feaValue, "0x") { // nolint feaValue = feaValue[2:] } - result, err := tree.grpcClient.Set(ctx, &pb.SetRequest{ - OldRoot: &pb.Fea{Fe0: oldRoot[0], Fe1: oldRoot[1], Fe2: oldRoot[2], Fe3: oldRoot[3]}, - Key: &pb.Fea{Fe0: key[0], Fe1: key[1], Fe2: key[2], Fe3: key[3]}, - Value: feaValue, - Persistent: true, + result, err := tree.grpcClient.Set(ctx, &hashdb.SetRequest{ + OldRoot: &hashdb.Fea{Fe0: oldRoot[0], Fe1: oldRoot[1], Fe2: oldRoot[2], Fe3: oldRoot[3]}, + Key: &hashdb.Fea{Fe0: key[0], Fe1: key[1], Fe2: key[2], Fe3: key[3]}, + Value: feaValue, + Persistence: hashdb.Persistence_PERSISTENCE_DATABASE, + BatchUuid: uuid, }) if err != nil { return nil, err @@ -306,8 +306,8 @@ func (tree *StateTree) set(ctx context.Context, oldRoot, key, value []uint64) (* } func (tree *StateTree) setProgram(ctx context.Context, key []uint64, data []byte, persistent bool) error { - _, err := tree.grpcClient.SetProgram(ctx, &pb.SetProgramRequest{ - Key: &pb.Fea{Fe0: key[0], Fe1: key[1], Fe2: key[2], Fe3: key[3]}, + _, err := tree.grpcClient.SetProgram(ctx, &hashdb.SetProgramRequest{ + Key: &hashdb.Fea{Fe0: key[0], Fe1: key[1], Fe2: key[2], Fe3: key[3]}, Data: data, Persistent: persistent, }) @@ -315,7 +315,8 @@ func (tree *StateTree) setProgram(ctx context.Context, key []uint64, data []byte } // Flush flushes all changes to the persistent storage. -func (tree *StateTree) Flush(ctx context.Context) error { - _, err := tree.grpcClient.Flush(ctx, &emptypb.Empty{}) +func (tree *StateTree) Flush(ctx context.Context, uuid string) error { + flushRequest := &hashdb.FlushRequest{BatchUuid: uuid} + _, err := tree.grpcClient.Flush(ctx, flushRequest) return err } diff --git a/metrics/prometheus.go b/metrics/prometheus.go index 4e091b8da0..99a3e18208 100644 --- a/metrics/prometheus.go +++ b/metrics/prometheus.go @@ -4,7 +4,7 @@ import ( "net/http" "sync" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/pool/config.go b/pool/config.go index c744fd6c82..ba9252b33d 100644 --- a/pool/config.go +++ b/pool/config.go @@ -1,8 +1,8 @@ package pool import ( - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/db" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/db" ) // Config is the pool configuration diff --git a/pool/errors.go b/pool/errors.go index 14bcb8b08e..371c94afb4 100644 --- a/pool/errors.go +++ b/pool/errors.go @@ -64,4 +64,13 @@ var ( // ErrGasPrice is returned if the transaction has specified lower gas price than the minimum allowed. ErrGasPrice = errors.New("gas price too low") + + // ErrSenderDisallowedSendTx is returned when transactions by sender are is disallowed by policy + ErrSenderDisallowedSendTx = errors.New("sender disallowed send_tx by policy") + + // ErrContractDisallowedSendTx is returned when transactions to contract are is disallowed by policy + ErrContractDisallowedSendTx = errors.New("contract disallowed send_tx by policy") + + // ErrSenderDisallowedDeploy is returned when deploy transactions are disallowed by policy + ErrSenderDisallowedDeploy = errors.New("sender disallowed deploy by policy") ) diff --git a/pool/interfaces.go b/pool/interfaces.go index 81fa0600d6..e166b21325 100644 --- a/pool/interfaces.go +++ b/pool/interfaces.go @@ -5,7 +5,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -36,6 +36,17 @@ type storage interface { MarkWIPTxsAsPending(ctx context.Context) error GetAllAddressesBlocked(ctx context.Context) ([]common.Address, error) MinL2GasPriceSince(ctx context.Context, timestamp time.Time) (uint64, error) + policy +} + +type policy interface { + CheckPolicy(ctx context.Context, policy PolicyName, address common.Address) (bool, error) + AddAddressesToPolicy(ctx context.Context, policy PolicyName, addresses []common.Address) error + RemoveAddressesFromPolicy(ctx context.Context, policy PolicyName, addresses []common.Address) error + ClearPolicy(ctx context.Context, policy PolicyName) error + DescribePolicies(ctx context.Context) ([]Policy, error) + DescribePolicy(ctx context.Context, name PolicyName) (Policy, error) + ListAcl(ctx context.Context, policy PolicyName, query []common.Address) ([]common.Address, error) } type stateInterface interface { diff --git a/pool/pgpoolstorage/pgpoolstorage.go b/pool/pgpoolstorage/pgpoolstorage.go index 51d5aab1ba..0dbff01ed4 100644 --- a/pool/pgpoolstorage/pgpoolstorage.go +++ b/pool/pgpoolstorage/pgpoolstorage.go @@ -6,10 +6,10 @@ import ( "errors" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/pool/pgpoolstorage/policy.go b/pool/pgpoolstorage/policy.go new file mode 100644 index 0000000000..087c8ebc35 --- /dev/null +++ b/pool/pgpoolstorage/policy.go @@ -0,0 +1,200 @@ +package pgpoolstorage + +import ( + "context" + "errors" + "fmt" + "strings" + + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/ethereum/go-ethereum/common" + "github.com/jackc/pgx/v4" +) + +// CheckPolicy returns the rule for the named policy and address. If the address is associated with the policy, the rule +// will be the setting for the policy. If the address is no associated with the policy, the rule will be the opposite of +// the policy setting. +func (p *PostgresPoolStorage) CheckPolicy(ctx context.Context, policy pool.PolicyName, address common.Address) (bool, error) { + sql := `SELECT + CASE WHEN a.address is null THEN + NOT p.allow + ELSE + p.allow + END + FROM pool.policy p + LEFT JOIN pool.acl a + ON p.name = a.policy + AND a.address = $1 + WHERE p.name = $2` + + rows, err := p.db.Query(ctx, sql, address.Hex(), policy) + + if errors.Is(err, pgx.ErrNoRows) { + return false, pool.ErrNotFound + } else if err != nil { + return false, err + } + if !rows.Next() { // should always be a row if the policy exists + return false, nil + } + + var allow bool + err = rows.Scan(&allow) + if err != nil { + return false, err + } + return allow, nil +} + +// UpdatePolicy sets the allow/deny rule for the named policy +func (p *PostgresPoolStorage) UpdatePolicy(ctx context.Context, policy pool.PolicyName, allow bool) error { + sql := "UPDATE pool.policy SET allow = $1 WHERE name = $2" + _, err := p.db.Exec(ctx, sql, allow, string(policy)) + if err != nil { + return err + } + return nil +} + +// AddAddressesToPolicy adds addresses to the named policy +func (p *PostgresPoolStorage) AddAddressesToPolicy(ctx context.Context, policy pool.PolicyName, addresses []common.Address) error { + sql := "INSERT INTO pool.acl (policy, address) VALUES ($1, $2) ON CONFLICT DO NOTHING" + tx, err := p.db.Begin(ctx) + if err != nil { + return err + } + defer func(tx pgx.Tx, ctx context.Context) { + _ = tx.Rollback(ctx) + }(tx, ctx) + + for _, a := range addresses { + _, err = tx.Exec(ctx, sql, policy, a.Hex()) + if err != nil { + return err + } + } + err = tx.Commit(ctx) + if err != nil { + return nil + } + return nil +} + +// RemoveAddressesFromPolicy removes addresses from the named policy +func (p *PostgresPoolStorage) RemoveAddressesFromPolicy(ctx context.Context, policy pool.PolicyName, addresses []common.Address) error { + sql := "DELETE FROM pool.acl WHERE policy = $1 AND address = $2" + tx, err := p.db.Begin(ctx) + if err != nil { + return err + } + defer func(tx pgx.Tx, ctx context.Context) { + _ = tx.Rollback(ctx) + }(tx, ctx) + + for _, a := range addresses { + _, err = tx.Exec(ctx, sql, policy, a.Hex()) + if err != nil { + return err + } + } + err = tx.Commit(ctx) + if err != nil { + return err + } + return nil +} + +// ClearPolicy removes _all_ addresses from the named policy +func (p *PostgresPoolStorage) ClearPolicy(ctx context.Context, policy pool.PolicyName) error { + sql := "DELETE FROM pool.acl WHERE policy = $1" + _, err := p.db.Exec(ctx, sql, policy) + if err != nil { + return err + } + return nil +} + +// DescribePolicies return all the policies +func (p *PostgresPoolStorage) DescribePolicies(ctx context.Context) ([]pool.Policy, error) { + sql := "SELECT name, allow FROM pool.policy" + rows, err := p.db.Query(ctx, sql) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + return nil, nil + } else { + return nil, err + } + } + defer rows.Close() + + var list []pool.Policy + for rows.Next() { + var name string + var allow bool + err = rows.Scan(&name, &allow) + if err != nil { + return nil, err + } + if pool.IsPolicy(name) { // skip unknown + p := pool.Policy{ + Name: pool.PolicyName(name), + Allow: allow, + } + list = append(list, p) + } + } + return list, nil +} + +// DescribePolicy returns the named policy +func (p *PostgresPoolStorage) DescribePolicy(ctx context.Context, name pool.PolicyName) (pool.Policy, error) { + sql := "SELECT name, allow FROM pool.policy WHERE name = $1 LIMIT 1" + row := p.db.QueryRow(ctx, sql, name) + var ( + pName string + allow bool + ) + err := row.Scan(&pName, &allow) + if err != nil { + return pool.Policy{}, err + } + return pool.Policy{ + Name: pool.PolicyName(pName), + Allow: allow, + }, nil +} + +// ListAcl returns a list of the addresses associated with the policy +func (p *PostgresPoolStorage) ListAcl( + ctx context.Context, policy pool.PolicyName, query []common.Address) ([]common.Address, error) { + sql := "SELECT address FROM pool.acl WHERE policy = $1" + + if len(query) > 0 { + var addrs []string + for _, a := range query { + addrs = append(addrs, a.Hex()) + } + sql = sql + fmt.Sprintf(" IN (%v)", strings.Join(addrs, ",")) + } + + rows, err := p.db.Query(ctx, sql, string(policy)) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + return nil, nil + } else { + return nil, err + } + } + defer rows.Close() + + var addresses []common.Address + for rows.Next() { + var addr string + err = rows.Scan(&addr) + if err != nil { + return nil, err + } + addresses = append(addresses, common.HexToAddress(addr)) + } + return addresses, nil +} diff --git a/pool/policy.go b/pool/policy.go new file mode 100644 index 0000000000..060ce1b3c6 --- /dev/null +++ b/pool/policy.go @@ -0,0 +1,43 @@ +package pool + +import "github.com/ethereum/go-ethereum/common" + +// PolicyName is a named policy +type PolicyName string + +const ( + // SendTx is the name of the policy that governs that an address may send transactions to pool + SendTx PolicyName = "send_tx" + // Deploy is the name of the policy that governs that an address may deploy a contract + Deploy PolicyName = "deploy" +) + +// Policy describes state of a named policy +type Policy struct { + Name PolicyName + Allow bool +} + +// Desc returns the string representation of a policy rule +func (p *Policy) Desc() string { + if p.Allow { + return "allow" + } + return "deny" +} + +// Acl describes exception to a named Policy by address +type Acl struct { + PolicyName PolicyName + Address common.Address +} + +// IsPolicy tests if a string represents a known named Policy +func IsPolicy(name string) bool { + for _, p := range []PolicyName{SendTx, Deploy} { + if name == string(p) { + return true + } + } + return false +} diff --git a/pool/pool.go b/pool/pool.go index 32b44b77c7..75661b2bb9 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -8,11 +8,11 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/types" @@ -73,6 +73,7 @@ func NewPool(cfg Config, s storage, st stateInterface, chainID uint64, eventLog chainID: chainID, blockedAddresses: sync.Map{}, minSuggestedGasPriceMux: new(sync.RWMutex), + minSuggestedGasPrice: big.NewInt(int64(cfg.DefaultMinGasPriceAllowed)), eventLog: eventLog, gasPrices: GasPrices{0, 0}, gasPricesMux: new(sync.RWMutex), @@ -302,6 +303,11 @@ func (p *Pool) IsTxPending(ctx context.Context, hash common.Hash) (bool, error) return p.storage.IsTxPending(ctx, hash) } +// CheckPolicy checks if an address is allowed by policy name +func (p *Pool) CheckPolicy(ctx context.Context, policy PolicyName, address common.Address) (bool, error) { + return p.storage.CheckPolicy(ctx, policy, address) +} + func (p *Pool) validateTx(ctx context.Context, poolTx Transaction) error { // Make sure the transaction is signed properly. if err := state.CheckSignature(poolTx.Transaction); err != nil { diff --git a/pool/pool_test.go b/pool/pool_test.go index 39751375ef..493a8e9f45 100644 --- a/pool/pool_test.go +++ b/pool/pool_test.go @@ -12,22 +12,22 @@ import ( "testing" "time" - cfgTypes "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/pool/pgpoolstorage" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Revert" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + cfgTypes "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/nileventstorage" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/pool/pgpoolstorage" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Revert" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" @@ -653,7 +653,10 @@ func Test_SetAndGetGasPrice(t *testing.T) { nBig, err := rand.Int(rand.Reader, big.NewInt(0).SetUint64(math.MaxUint64)) require.NoError(t, err) - expectedGasPrice := pool.GasPrices{nBig.Uint64(), nBig.Uint64()} + expectedGasPrice := pool.GasPrices{ + L2GasPrice: nBig.Uint64(), + L1GasPrice: nBig.Uint64(), + } ctx := context.Background() err = p.SetGasPrices(ctx, expectedGasPrice.L2GasPrice, expectedGasPrice.L1GasPrice) require.NoError(t, err) @@ -1787,6 +1790,72 @@ func Test_AddTx_NonceTooHigh(t *testing.T) { require.Error(t, err, pool.ErrNonceTooHigh) } +func Test_PolicyAcl(t *testing.T) { + initOrResetDB(t) + + poolSqlDB, err := db.NewSQLDB(poolDBCfg) + require.NoError(t, err) + defer poolSqlDB.Close() //nolint:gosec,errcheck + + ctx := context.Background() + s, err := pgpoolstorage.NewPostgresPoolStorage(poolDBCfg) + require.NoError(t, err) + + p := pool.NewPool(cfg, s, nil, uint64(1), nil) + + randAddr := func() common.Address { + buf := make([]byte, 20) + _, err = rand.Read(buf) + require.NoError(t, err) + return common.BytesToAddress(buf) + } + + // Policies start out as deny lists, since there are no addresses on the + // lists, random addresses will always be allowed + for _, policy := range []pool.PolicyName{pool.SendTx, pool.Deploy} { + allow, err := p.CheckPolicy(ctx, policy, randAddr()) + require.NoError(t, err) + require.True(t, allow) + } + + addr := randAddr() + + // put addr on lists + for _, policy := range []pool.PolicyName{pool.SendTx, pool.Deploy} { + ctag, err := poolSqlDB.Exec(ctx, "INSERT INTO pool.acl (policy, address) VALUES ($1,$2)", policy, addr.Hex()) + require.NoError(t, err) + require.Equal(t, int64(1), ctag.RowsAffected()) + } + + // addr should not be denied by policy + for _, policy := range []pool.PolicyName{pool.SendTx, pool.Deploy} { + allow, err := p.CheckPolicy(ctx, policy, addr) + require.NoError(t, err) + require.False(t, allow) + } + + // change policies to allow by acl + ctag, err := poolSqlDB.Exec(ctx, "UPDATE pool.policy SET allow = true") + require.NoError(t, err) + require.Equal(t, int64(2), ctag.RowsAffected()) + + // addr is now allowed + for _, policy := range []pool.PolicyName{pool.SendTx, pool.Deploy} { + allow, err := p.CheckPolicy(ctx, policy, addr) + require.NoError(t, err) + require.True(t, allow) + } + + // random addrs are now denied + for _, policy := range []pool.PolicyName{pool.SendTx, pool.Deploy} { + for _, a := range []common.Address{randAddr(), randAddr()} { + allow, err := s.CheckPolicy(ctx, policy, a) + require.NoError(t, err) + require.False(t, allow) + } + } +} + func setupPool(t *testing.T, cfg pool.Config, s *pgpoolstorage.PostgresPoolStorage, st *state.State, chainID uint64, ctx context.Context, eventLog *event.EventLog) *pool.Pool { p := pool.NewPool(cfg, s, st, chainID, eventLog) diff --git a/pool/transaction.go b/pool/transaction.go index b958b2c268..4209a1f8b6 100644 --- a/pool/transaction.go +++ b/pool/transaction.go @@ -3,7 +3,7 @@ package pool import ( "time" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/proto/src/proto/aggregator/v1/aggregator.proto b/proto/src/proto/aggregator/v1/aggregator.proto index 66be538775..99bf979cc0 100644 --- a/proto/src/proto/aggregator/v1/aggregator.proto +++ b/proto/src/proto/aggregator/v1/aggregator.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package aggregator.v1; -option go_package = "github.com/0xPolygonHermez/zkevm-node/aggregator/pb"; +option go_package = "github.com/0xPolygon/cdk-validium-node/aggregator/prover"; message Version { string v0_0_1 = 1; diff --git a/proto/src/proto/executor/v1/executor.proto b/proto/src/proto/executor/v1/executor.proto index a195603098..951100d2ea 100644 --- a/proto/src/proto/executor/v1/executor.proto +++ b/proto/src/proto/executor/v1/executor.proto @@ -4,7 +4,7 @@ import "google/protobuf/empty.proto"; package executor.v1; -option go_package = "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor"; +option go_package = "github.com/0xPolygon/cdk-validium-node/state/runtime/executor"; service ExecutorService { /// Processes a batch diff --git a/proto/src/proto/hashdb/v1/hashdb.proto b/proto/src/proto/hashdb/v1/hashdb.proto index cd41cf7c23..28618a5dd9 100644 --- a/proto/src/proto/hashdb/v1/hashdb.proto +++ b/proto/src/proto/hashdb/v1/hashdb.proto @@ -4,7 +4,7 @@ import "google/protobuf/empty.proto"; package hashdb.v1; -option go_package = "github.com/0xPolygonHermez/zkevm-node/merkletree/pb"; +option go_package = "github.com/0xPolygon/cdk-validium-node/merkletree/hashdb"; message Version { string v0_0_1 = 1; @@ -27,7 +27,8 @@ service HashDBService { rpc GetProgram(GetProgramRequest) returns (GetProgramResponse) {} rpc LoadDB(LoadDBRequest) returns (google.protobuf.Empty) {} rpc LoadProgramDB(LoadProgramDBRequest) returns (google.protobuf.Empty) {} - rpc Flush (google.protobuf.Empty) returns (FlushResponse) {} + rpc Flush (FlushRequest) returns (FlushResponse) {} + rpc SemiFlush (SemiFlushRequest) returns (google.protobuf.Empty) {} rpc GetFlushStatus (google.protobuf.Empty) returns (GetFlushStatusResponse) {} rpc GetFlushData (GetFlushDataRequest) returns (GetFlushDataResponse) {} } @@ -36,22 +37,33 @@ service HashDBService { // Request messages /////////////////// +enum Persistence { + PERSISTENCE_CACHE_UNSPECIFIED = 0; + PERSISTENCE_DATABASE = 1; + PERSISTENCE_TEMPORARY = 2; +} + /** * @dev SetRequest * @param {old_root} - merkle-tree root * @param {key} - key to set * @param {value} - scalar value to set (HEX string format) - * @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false) + * @param {persistence} - indicates if it should be stored only in CACHE, in the SQL DATABASE, or it is just TEMPORARY and should be deleted at the flush of this batch UUID * @param {details} - indicates if it should return all response parameters (true) or just the new root (false) * @param {get_db_read_log} - indicates if it should return the DB reads generated during the execution of the request + * @param {batch_uuid} - indicates a unique identifier of the current batch or session; data for this batch can be stored in memory until flushed to database + * @param {tx} - current transaction ordinal number: 0, 1, 2... */ message SetRequest { Fea old_root = 1; Fea key = 2; string value = 3; - bool persistent = 4; + Persistence persistence = 4; bool details = 5; bool get_db_read_log = 6; + string batch_uuid = 7; + uint64 tx = 8; + } /** @@ -60,12 +72,14 @@ message SetRequest { * @param {key} - key to look for * @param {details} - indicates if it should return all response parameters (true) or just the new root (false) * @param {get_db_read_log} - indicates if it should return the DB reads generated during the execution of the request + * @param {batch_uuid} - indicates a unique identifier of the current batch or session; data for this batch can be stored in memory until flushed to database */ message GetRequest { Fea root = 1; Fea key = 2; bool details = 3; bool get_db_read_log = 4; + string batch_uuid = 5; } /** @@ -108,6 +122,26 @@ message LoadProgramDBRequest { bool persistent = 2; } +/** + * @dev FlushRequest + * @param {batch_uuid} - indicates a unique identifier of the current batch or session which data will be flushed to cache (and database if required) + */ +message FlushRequest { + string batch_uuid = 1; +} + +/** + * @dev SemiFlushRequest + * @param {batch_uuid} - indicates a unique identifier of the current batch or session which data will be semi-flushed + * @param {new_state_root} - state root at this point of the execution + * @param {persistence} - indicates if it should be stored only in CACHE, in the SQL DATABASE, or it is just TEMPORARY and should be deleted at the flush of this batch UUID + */ +message SemiFlushRequest { + string batch_uuid = 1; + string new_state_root = 2; + Persistence persistence = 3; +} + /** * @dev GetFlushDataRequest * @param {flush_id} - last stored flush ID got using this method, or 0 if it never was called before @@ -234,20 +268,16 @@ message GetFlushStatusResponse { * @dev GetFlushDataResponse * @param {stored_flush_id} - id of the last flush data sent to database * @param {nodes} - data to insert in the nodes table - * @param {nodes_update} - data to update in the nodes table * @param {program} - data to insert in the program table - * @param {program_update} - data to update in the program table * @param {nodes_state_root} - nodes state root to update in the nodes table * @param {result} - result code */ message GetFlushDataResponse { uint64 stored_flush_id = 1; - repeated FlushData nodes = 2; - repeated FlushData nodes_update = 3; - repeated FlushData program = 4; - repeated FlushData program_update = 5; - string nodes_state_root = 6; - ResultCode result = 7; + map nodes = 2; + map program = 3; + string nodes_state_root = 4; + ResultCode result = 5; } /** @@ -280,16 +310,6 @@ message SiblingList { repeated uint64 sibling = 1; } -/** - * @dev Flush Data - * @param {key} - hash key - * @param {value} - string value -*/ -message FlushData { - string key = 1; - string value = 2; -} - /** * @dev Result code * @param {code} - result code diff --git a/sequencer/addrqueue.go b/sequencer/addrqueue.go index 684a060aed..5802b242cb 100644 --- a/sequencer/addrqueue.go +++ b/sequencer/addrqueue.go @@ -4,31 +4,33 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime" "github.com/ethereum/go-ethereum/common" ) // addrQueue is a struct that stores the ready and notReady txs for a specific from address type addrQueue struct { - from common.Address - fromStr string - currentNonce uint64 - currentBalance *big.Int - readyTx *TxTracker - notReadyTxs map[uint64]*TxTracker + from common.Address + fromStr string + currentNonce uint64 + currentBalance *big.Int + readyTx *TxTracker + notReadyTxs map[uint64]*TxTracker + pendingTxsToStore map[common.Hash]struct{} } // newAddrQueue creates and init a addrQueue func newAddrQueue(addr common.Address, nonce uint64, balance *big.Int) *addrQueue { return &addrQueue{ - from: addr, - fromStr: addr.String(), - currentNonce: nonce, - currentBalance: balance, - readyTx: nil, - notReadyTxs: make(map[uint64]*TxTracker), + from: addr, + fromStr: addr.String(), + currentNonce: nonce, + currentBalance: balance, + readyTx: nil, + notReadyTxs: make(map[uint64]*TxTracker), + pendingTxsToStore: make(map[common.Hash]struct{}), } } @@ -76,6 +78,11 @@ func (a *addrQueue) addTx(tx *TxTracker) (newReadyTx, prevReadyTx, replacedTx *T } } +// addPendingTxToStore adds a tx to the list of pending txs to store in the DB (trusted state) +func (a *addrQueue) addPendingTxToStore(txHash common.Hash) { + a.pendingTxsToStore[txHash] = struct{}{} +} + // ExpireTransactions removes the txs that have been in the queue for more than maxTime func (a *addrQueue) ExpireTransactions(maxTime time.Duration) ([]*TxTracker, *TxTracker) { var ( @@ -95,7 +102,7 @@ func (a *addrQueue) ExpireTransactions(maxTime time.Duration) ([]*TxTracker, *Tx prevReadyTx = a.readyTx txs = append(txs, a.readyTx) a.readyTx = nil - log.Debugf("Deleting notReadyTx %s from addrQueue %s", prevReadyTx.HashStr, a.fromStr) + log.Debugf("Deleting readyTx %s from addrQueue %s", prevReadyTx.HashStr, a.fromStr) } return txs, prevReadyTx @@ -103,7 +110,7 @@ func (a *addrQueue) ExpireTransactions(maxTime time.Duration) ([]*TxTracker, *Tx // IsEmpty returns true if the addrQueue is empty func (a *addrQueue) IsEmpty() bool { - return a.readyTx == nil && len(a.notReadyTxs) == 0 + return a.readyTx == nil && len(a.notReadyTxs) == 0 && len(a.pendingTxsToStore) == 0 } // deleteTx deletes the tx from the addrQueue @@ -126,6 +133,15 @@ func (a *addrQueue) deleteTx(txHash common.Hash) (deletedReadyTx *TxTracker) { } } +// deletePendingTxToStore delete a tx from the list of pending txs to store in the DB (trusted state) +func (a *addrQueue) deletePendingTxToStore(txHash common.Hash) { + if _, found := a.pendingTxsToStore[txHash]; found { + delete(a.pendingTxsToStore, txHash) + } else { + log.Warnf("tx (%s) not found in pendingTxsToStore list", txHash.String()) + } +} + // updateCurrentNonceBalance updates the nonce and balance of the addrQueue and updates the ready and notReady txs func (a *addrQueue) updateCurrentNonceBalance(nonce *uint64, balance *big.Int) (newReadyTx, prevReadyTx *TxTracker, toDelete []*TxTracker) { var oldReadyTx *TxTracker = nil @@ -185,29 +201,19 @@ func (a *addrQueue) updateCurrentNonceBalance(nonce *uint64, balance *big.Int) ( } // UpdateTxZKCounters updates the ZKCounters for the given tx (txHash) -// If the updated tx is the readyTx it returns a copy of the previous readyTx, nil otherwise -func (a *addrQueue) UpdateTxZKCounters(txHash common.Hash, counters state.ZKCounters, constraints batchConstraintsFloat64, weights batchResourceWeights) (newReadyTx, prevReadyTx *TxTracker) { +func (a *addrQueue) UpdateTxZKCounters(txHash common.Hash, counters state.ZKCounters) { txHashStr := txHash.String() if (a.readyTx != nil) && (a.readyTx.HashStr == txHashStr) { - // We need to assign the new readyTx as a new TxTracker copy of the previous one with the updated efficiency - // We need to do in this way because the efficiency value is changed and we use this value as key field to - // add/delete TxTrackers in the efficiencyList - prevReadyTx := a.readyTx - newReadyTx := *a.readyTx - newReadyTx.updateZKCounters(counters, constraints, weights) - a.readyTx = &newReadyTx log.Debugf("Updating readyTx %s with new ZKCounters from addrQueue %s", txHashStr, a.fromStr) - return a.readyTx, prevReadyTx + a.readyTx.updateZKCounters(counters) } else { - txHashStr := txHash.String() for _, txTracker := range a.notReadyTxs { if txTracker.HashStr == txHashStr { log.Debugf("Updating notReadyTx %s with new ZKCounters from addrQueue %s", txHashStr, a.fromStr) - txTracker.updateZKCounters(counters, constraints, weights) + txTracker.updateZKCounters(counters) break } } - return nil, nil } } diff --git a/sequencer/closingsignalsmanager.go b/sequencer/closingsignalsmanager.go index 84aae76b0a..38af6df4f6 100644 --- a/sequencer/closingsignalsmanager.go +++ b/sequencer/closingsignalsmanager.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" ) type closingSignalsManager struct { diff --git a/sequencer/closingsignalsmanager_test.go b/sequencer/closingsignalsmanager_test.go index cb09f40e34..ec963a6f6b 100644 --- a/sequencer/closingsignalsmanager_test.go +++ b/sequencer/closingsignalsmanager_test.go @@ -6,16 +6,16 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - mtDBclientpb "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/nileventstorage" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/merkletree/hashdb" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4/pgxpool" "github.com/stretchr/testify/assert" @@ -30,7 +30,7 @@ var ( localTestDbManager *dbManager localCtx context.Context localMtDBCancel, localExecutorCancel context.CancelFunc - localMtDBServiceClient mtDBclientpb.HashDBServiceClient + localMtDBServiceClient hashdb.HashDBServiceClient localMtDBClientConn, localExecutorClientConn *grpc.ClientConn localState *state.State localExecutorClient executor.ExecutorServiceClient diff --git a/sequencer/config.go b/sequencer/config.go index 9b99af333b..eb4bf7f078 100644 --- a/sequencer/config.go +++ b/sequencer/config.go @@ -1,7 +1,7 @@ package sequencer import ( - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/cdk-validium-node/config/types" ) // Config represents the configuration of a sequencer @@ -47,33 +47,6 @@ type Config struct { // MaxSteps is max steps batch can handle MaxSteps uint32 `mapstructure:"MaxSteps"` - // WeightBatchBytesSize is the cost weight for the BatchBytesSize batch resource - WeightBatchBytesSize int `mapstructure:"WeightBatchBytesSize"` - - // WeightCumulativeGasUsed is the cost weight for the CumulativeGasUsed batch resource - WeightCumulativeGasUsed int `mapstructure:"WeightCumulativeGasUsed"` - - // WeightKeccakHashes is the cost weight for the KeccakHashes batch resource - WeightKeccakHashes int `mapstructure:"WeightKeccakHashes"` - - // WeightPoseidonHashes is the cost weight for the PoseidonHashes batch resource - WeightPoseidonHashes int `mapstructure:"WeightPoseidonHashes"` - - // WeightPoseidonPaddings is the cost weight for the PoseidonPaddings batch resource - WeightPoseidonPaddings int `mapstructure:"WeightPoseidonPaddings"` - - // WeightMemAligns is the cost weight for the MemAligns batch resource - WeightMemAligns int `mapstructure:"WeightMemAligns"` - - // WeightArithmetics is the cost weight for the Arithmetics batch resource - WeightArithmetics int `mapstructure:"WeightArithmetics"` - - // WeightBinaries is the cost weight for the Binaries batch resource - WeightBinaries int `mapstructure:"WeightBinaries"` - - // WeightSteps is the cost weight for the Steps batch resource - WeightSteps int `mapstructure:"WeightSteps"` - // TxLifetimeCheckTimeout is the time the sequencer waits to check txs lifetime TxLifetimeCheckTimeout types.Duration `mapstructure:"TxLifetimeCheckTimeout"` @@ -86,9 +59,6 @@ type Config struct { // DBManager's specific config properties DBManager DBManagerCfg `mapstructure:"DBManager"` - // Worker's specific config properties - Worker WorkerCfg `mapstructure:"Worker"` - // EffectiveGasPrice is the config for the gas price EffectiveGasPrice EffectiveGasPriceCfg `mapstructure:"EffectiveGasPrice"` } @@ -129,12 +99,6 @@ type FinalizerCfg struct { StopSequencerOnBatchNum uint64 `mapstructure:"StopSequencerOnBatchNum"` } -// WorkerCfg contains the Worker's configuration properties -type WorkerCfg struct { - // ResourceCostMultiplier is the multiplier for the resource cost - ResourceCostMultiplier float64 `mapstructure:"ResourceCostMultiplier"` -} - // DBManagerCfg contains the DBManager's configuration properties type DBManagerCfg struct { PoolRetrievalInterval types.Duration `mapstructure:"PoolRetrievalInterval"` diff --git a/sequencer/dbmanager.go b/sequencer/dbmanager.go index b47de338ef..398b410e8f 100644 --- a/sequencer/dbmanager.go +++ b/sequencer/dbmanager.go @@ -5,9 +5,9 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/sequencer/dbmanager_test.go b/sequencer/dbmanager_test.go index 647a134dbf..b73ed98378 100644 --- a/sequencer/dbmanager_test.go +++ b/sequencer/dbmanager_test.go @@ -6,17 +6,17 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - mtDBclientpb "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/nileventstorage" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/merkletree/hashdb" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4/pgxpool" "github.com/stretchr/testify/require" @@ -37,7 +37,7 @@ var ( } dbManagerCfg = DBManagerCfg{PoolRetrievalInterval: types.NewDuration(500 * time.Millisecond)} executorClient executor.ExecutorServiceClient - mtDBServiceClient mtDBclientpb.HashDBServiceClient + mtDBServiceClient hashdb.HashDBServiceClient mtDBClientConn *grpc.ClientConn testDbManager *dbManager ) diff --git a/sequencer/effective_gas_price.go b/sequencer/effective_gas_price.go index 001c3cf80a..5da2955f23 100644 --- a/sequencer/effective_gas_price.go +++ b/sequencer/effective_gas_price.go @@ -6,9 +6,9 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" ) // CalculateTxBreakEvenGasPrice calculates the break even gas price for a transaction diff --git a/sequencer/efficiencylist.go b/sequencer/efficiencylist.go deleted file mode 100644 index 0508046b8d..0000000000 --- a/sequencer/efficiencylist.go +++ /dev/null @@ -1,126 +0,0 @@ -package sequencer - -import ( - "fmt" - "sort" - "sync" - - "github.com/0xPolygonHermez/zkevm-node/log" -) - -// efficiencyList represents a list of tx sorted by efficiency -type efficiencyList struct { - list map[string]*TxTracker - sorted []*TxTracker - mutex sync.Mutex -} - -// newEfficiencyList creates and init an efficiencyList -func newEfficiencyList() *efficiencyList { - return &efficiencyList{ - list: make(map[string]*TxTracker), - sorted: []*TxTracker{}, - } -} - -// add adds a tx to the efficiencyList -func (e *efficiencyList) add(tx *TxTracker) bool { - e.mutex.Lock() - defer e.mutex.Unlock() - - if _, found := e.list[tx.HashStr]; !found { - e.list[tx.HashStr] = tx - e.addSort(tx) - return true - } - return false -} - -// delete deletes the tx from the efficiencyList -func (e *efficiencyList) delete(tx *TxTracker) bool { - e.mutex.Lock() - defer e.mutex.Unlock() - - if tx, found := e.list[tx.HashStr]; found { - sLen := len(e.sorted) - i := sort.Search(sLen, func(i int) bool { - return e.isGreaterThan(tx, e.list[e.sorted[i].HashStr]) - }) - - if (e.sorted[i].HashStr != tx.HashStr) || i == sLen { - log.Errorf("Error deleting tx from efficiencyList: %s", tx.HashStr) - return false - } - - delete(e.list, tx.HashStr) - - copy(e.sorted[i:], e.sorted[i+1:]) - e.sorted[sLen-1] = nil - e.sorted = e.sorted[:sLen-1] - - return true - } - return false -} - -// getByIndex retrieves the tx at the i position in the sorted EfficiencyList -func (e *efficiencyList) getByIndex(i int) *TxTracker { - e.mutex.Lock() - defer e.mutex.Unlock() - - tx := e.sorted[i] - - return tx -} - -// len returns the length of the EfficiencyList -func (e *efficiencyList) len() int { - e.mutex.Lock() - defer e.mutex.Unlock() - - l := len(e.sorted) - - return l -} - -// print prints the contents of the EfficiencyList -func (e *efficiencyList) Print() { - e.mutex.Lock() - defer e.mutex.Unlock() - - fmt.Println("Len: ", len(e.sorted)) - for _, txi := range e.sorted { - fmt.Printf("Hash=%s, efficiency=%f\n", txi.HashStr, txi.Efficiency) - } -} - -// addSort adds the tx to the EfficiencyList in a sorted way -func (e *efficiencyList) addSort(tx *TxTracker) { - i := sort.Search(len(e.sorted), func(i int) bool { - return e.isGreaterThan(tx, e.list[e.sorted[i].HashStr]) - }) - - e.sorted = append(e.sorted, nil) - copy(e.sorted[i+1:], e.sorted[i:]) - e.sorted[i] = tx - log.Infof("Added tx(%s) to efficiencyList. With efficiency(%f) at index(%d) from total(%d)", tx.HashStr, tx.Efficiency, i, len(e.sorted)) -} - -// isGreaterThan returns true if the tx1 has best efficiency than tx2 -func (e *efficiencyList) isGreaterThan(tx1 *TxTracker, tx2 *TxTracker) bool { - if tx1.Efficiency > tx2.Efficiency { - return true - } else if tx1.Efficiency == tx2.Efficiency { - return tx1.HashStr >= tx2.HashStr - } else { - return false - } -} - -// GetSorted returns the sorted list of tx -func (e *efficiencyList) GetSorted() []*TxTracker { - e.mutex.Lock() - defer e.mutex.Unlock() - - return e.sorted -} diff --git a/sequencer/efficiencylist_test.go b/sequencer/efficiencylist_test.go deleted file mode 100644 index cd566edba8..0000000000 --- a/sequencer/efficiencylist_test.go +++ /dev/null @@ -1,94 +0,0 @@ -package sequencer - -import ( - "crypto/rand" - "fmt" - "math/big" - "testing" - "time" -) - -// randomFloat64 is a shortcut for generating a random float between 0 and 1 using crypto/rand. -func randomFloat64() float64 { - nBig, err := rand.Int(rand.Reader, big.NewInt(1<<53)) - if err != nil { - panic(err) - } - return float64(nBig.Int64()) / (1 << 53) -} - -func TestEfficiencyListSort(t *testing.T) { - el := newEfficiencyList() - nItems := 100 - - for i := 0; i < nItems; i++ { - el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", i), Efficiency: randomFloat64()}) - } - - for i := 0; i < nItems-1; i++ { - if !(el.getByIndex(i).Efficiency > el.getByIndex(i+1).Efficiency) { - t.Fatalf("Sort error. [%d].Efficiency(%f) < [%d].Efficiency(%f)", i, el.getByIndex(i).Efficiency, i+1, el.getByIndex(i+1).Efficiency) - } - } - - // el.print() - - if el.len() != nItems { - t.Fatalf("Length error. Length %d. Expected %d", el.len(), nItems) - } -} - -func TestEfficiencyListDelete(t *testing.T) { - el := newEfficiencyList() - - el.add(&TxTracker{HashStr: "0x01", Efficiency: 1}) - el.add(&TxTracker{HashStr: "0x02", Efficiency: 2}) - el.add(&TxTracker{HashStr: "0x03", Efficiency: 2}) - el.add(&TxTracker{HashStr: "0x04", Efficiency: 3}) - el.add(&TxTracker{HashStr: "0x05", Efficiency: 10}) - el.add(&TxTracker{HashStr: "0x06", Efficiency: 1.5}) - el.add(&TxTracker{HashStr: "0x07", Efficiency: 1.5}) - - deltxs := []string{"0x03", "0x07", "0x01", "0x05"} - - for _, deltx := range deltxs { - count := el.len() - el.delete(&TxTracker{HashStr: deltx}) - - for i := 0; i < el.len(); i++ { - if el.getByIndex(i).HashStr == deltx { - t.Fatalf("Delete error. %s tx was not deleted", deltx) - } - } - - if el.len() != count-1 { - t.Fatalf("Length error. Length %d. Expected %d", el.len(), count) - } - } -} - -func TestEfficiencyListBench(t *testing.T) { - el := newEfficiencyList() - - start := time.Now() - for i := 0; i < 10000; i++ { - el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", i), Efficiency: randomFloat64()}) - } - elapsed := time.Since(start) - t.Logf("EfficiencyList adding 10000 items took %s", elapsed) - - start = time.Now() - el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", 10001), Efficiency: randomFloat64()}) - elapsed = time.Since(start) - t.Logf("EfficiencyList adding the 10001 item (efficiency=random) took %s", elapsed) - - start = time.Now() - el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", 10002), Efficiency: 0}) - elapsed = time.Since(start) - t.Logf("EfficiencyList adding the 10002 item (efficiency=0) took %s", elapsed) - - start = time.Now() - el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", 10003), Efficiency: 1000}) - elapsed = time.Since(start) - t.Logf("EfficiencyList adding the 10003 item (efficiency=1000) took %s", elapsed) -} diff --git a/sequencer/finalizer.go b/sequencer/finalizer.go index 6e39945075..284c6d60b9 100644 --- a/sequencer/finalizer.go +++ b/sequencer/finalizer.go @@ -9,14 +9,14 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/sequencer/metrics" - "github.com/0xPolygonHermez/zkevm-node/state" - stateMetrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/sequencer/metrics" + "github.com/0xPolygon/cdk-validium-node/state" + stateMetrics "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" ) @@ -60,12 +60,10 @@ type finalizer struct { maxBreakEvenGasPriceDeviationPercentage *big.Int defaultMinGasPriceAllowed uint64 // Processed txs - pendingTxsToStore chan transactionToStore - pendingTxsToStoreWG *sync.WaitGroup - pendingTxsToStoreMux *sync.RWMutex - pendingTxsPerAddressTrackers map[common.Address]*pendingTxPerAddressTracker + pendingTransactionsToStore chan transactionToStore + pendingTransactionsToStoreWG *sync.WaitGroup storedFlushID uint64 - storedFlushIDCond *sync.Cond + storedFlushIDCond *sync.Cond //Condition to wait until storedFlushID has been updated proverID string lastPendingFlushID uint64 pendingFlushIDCond *sync.Cond @@ -114,8 +112,6 @@ func newFinalizer( closingSignalCh ClosingSignalCh, batchConstraints batchConstraints, eventLog *event.EventLog, - pendingTxsToStoreMux *sync.RWMutex, - pendingTxsPerAddressTrackers map[common.Address]*pendingTxPerAddressTracker, ) *finalizer { return &finalizer{ cfg: cfg, @@ -142,10 +138,8 @@ func newFinalizer( // event log eventLog: eventLog, maxBreakEvenGasPriceDeviationPercentage: new(big.Int).SetUint64(effectiveGasPriceCfg.MaxBreakEvenGasPriceDeviationPercentage), - pendingTxsToStore: make(chan transactionToStore, batchConstraints.MaxTxsPerBatch*pendingTxsBufferSizeMultiplier), - pendingTxsToStoreWG: new(sync.WaitGroup), - pendingTxsToStoreMux: pendingTxsToStoreMux, - pendingTxsPerAddressTrackers: pendingTxsPerAddressTrackers, + pendingTransactionsToStore: make(chan transactionToStore, batchConstraints.MaxTxsPerBatch*pendingTxsBufferSizeMultiplier), + pendingTransactionsToStoreWG: new(sync.WaitGroup), storedFlushID: 0, // Mutex is unlocked when the condition is broadcasted storedFlushIDCond: sync.NewCond(&sync.Mutex{}), @@ -188,10 +182,53 @@ func (f *finalizer) Start(ctx context.Context, batch *WipBatch, processingReq *s f.finalizeBatches(ctx) } +// storePendingTransactions stores the pending transactions in the database +func (f *finalizer) storePendingTransactions(ctx context.Context) { + for { + select { + case tx, ok := <-f.pendingTransactionsToStore: + if !ok { + // Channel is closed + return + } + + // Wait until f.storedFlushID >= tx.flushId + f.storedFlushIDCond.L.Lock() + for f.storedFlushID < tx.flushId { + f.storedFlushIDCond.Wait() + // check if context is done after waking up + if ctx.Err() != nil { + f.storedFlushIDCond.L.Unlock() + return + } + } + f.storedFlushIDCond.L.Unlock() + + // Now f.storedFlushID >= tx.flushId, we can store tx + f.storeProcessedTx(ctx, tx) + + if tx.txTracker != nil { + // Delete the txTracker from the pending list in the worker (addrQueue) + f.worker.DeletePendingTxToStore(tx.txTracker.Hash, tx.txTracker.From) + } + + f.pendingTransactionsToStoreWG.Done() + case <-ctx.Done(): + // The context was cancelled from outside, Wait for all goroutines to finish, cleanup and exit + f.pendingTransactionsToStoreWG.Wait() + return + default: + time.Sleep(100 * time.Millisecond) //nolint:gomnd + } + } +} + // updateProverIdAndFlushId updates the prover id and flush id func (f *finalizer) updateProverIdAndFlushId(ctx context.Context) { for { f.pendingFlushIDCond.L.Lock() + // f.storedFlushID is >= than f.lastPendingFlushID, this means all pending txs (flushid) are stored by the executor. + // We are "synced" with the flush id, therefore we need to wait for new tx (new pending flush id to be stored by the executor) for f.storedFlushID >= f.lastPendingFlushID { f.pendingFlushIDCond.Wait() } @@ -203,7 +240,14 @@ func (f *finalizer) updateProverIdAndFlushId(ctx context.Context) { log.Errorf("failed to get stored flush id, Err: %v", err) } else { if storedFlushID != f.storedFlushID { - f.checkProverIDAndUpdateStoredFlushID(storedFlushID, proverID) + // Check if prover/Executor has been restarted + f.checkIfProverRestarted(proverID) + + // Update f.storeFlushID and signal condition f.storedFlushIDCond + f.storedFlushIDCond.L.Lock() + f.storedFlushID = storedFlushID + f.storedFlushIDCond.Broadcast() + f.storedFlushIDCond.L.Unlock() } } } @@ -245,12 +289,31 @@ func (f *finalizer) listenForClosingSignals(ctx context.Context) { } } -// updateStoredFlushID updates the stored flush id -func (f *finalizer) updateStoredFlushID(newFlushID uint64) { - f.storedFlushIDCond.L.Lock() - f.storedFlushID = newFlushID - f.storedFlushIDCond.Broadcast() - f.storedFlushIDCond.L.Unlock() +// updateLastPendingFLushID updates f.lastPendingFLushID with newFlushID value (it it has changed) and sends +// the signal condition f.pendingFlushIDCond to notify other go funcs that the f.lastPendingFlushID value has changed +func (f *finalizer) updateLastPendingFlushID(newFlushID uint64) { + if newFlushID > f.lastPendingFlushID { + f.lastPendingFlushID = newFlushID + f.pendingFlushIDCond.Broadcast() + } +} + +// addPendingTxToStore adds a pending tx that is ready to be stored in the state DB once its flushid has been stored by the executor +func (f *finalizer) addPendingTxToStore(ctx context.Context, txToStore transactionToStore) { + f.pendingTransactionsToStoreWG.Add(1) + if txToStore.txTracker != nil { + f.worker.AddPendingTxToStore(txToStore.txTracker.Hash, txToStore.txTracker.From) + } + select { + case f.pendingTransactionsToStore <- txToStore: + case <-ctx.Done(): + // If context is cancelled before we can send to the channel, we must decrement the WaitGroup count and + // delete the pending TxToStore added in the worker + f.pendingTransactionsToStoreWG.Done() + if txToStore.txTracker != nil { + f.worker.DeletePendingTxToStore(txToStore.txTracker.Hash, txToStore.txTracker.From) + } + } } // finalizeBatches runs the endless loop for processing transactions finalizing batches. @@ -374,7 +437,7 @@ func (f *finalizer) halt(ctx context.Context, err error) { } // checkProverIDAndUpdateStoredFlushID checks if the proverID changed and updates the stored flush id -func (f *finalizer) checkProverIDAndUpdateStoredFlushID(storedFlushID uint64, proverID string) { +func (f *finalizer) checkIfProverRestarted(proverID string) { if f.proverID != "" && f.proverID != proverID { event := &event.Event{ ReceivedAt: time.Now(), @@ -392,51 +455,6 @@ func (f *finalizer) checkProverIDAndUpdateStoredFlushID(storedFlushID uint64, pr log.Fatal("restarting sequencer to discard current WIP batch and work with new executor") } - f.updateStoredFlushID(storedFlushID) -} - -// storePendingTransactions stores the pending transactions in the database -func (f *finalizer) storePendingTransactions(ctx context.Context) { - for { - select { - case tx, ok := <-f.pendingTxsToStore: - if !ok { - // Channel is closed - return - } - - // Print the formatted timestamp - f.storedFlushIDCond.L.Lock() - for f.storedFlushID < tx.flushId { - f.storedFlushIDCond.Wait() - // check if context is done after waking up - if ctx.Err() != nil { - f.storedFlushIDCond.L.Unlock() - return - } - } - f.storedFlushIDCond.L.Unlock() - - // Now f.storedFlushID >= tx.flushId, you can store tx - f.storeProcessedTx(ctx, tx) - f.pendingTxsToStoreMux.Lock() - f.pendingTxsToStoreWG.Done() - f.pendingTxsPerAddressTrackers[tx.txTracker.From].wg.Done() - f.pendingTxsPerAddressTrackers[tx.txTracker.From].count-- - // Needed to avoid memory leaks - if f.pendingTxsPerAddressTrackers[tx.txTracker.From].count == 0 { - delete(f.pendingTxsPerAddressTrackers, tx.txTracker.From) - } - f.pendingTxsToStoreMux.Unlock() - - case <-ctx.Done(): - // The context was cancelled from outside, Wait for all goroutines to finish, cleanup and exit - f.pendingTxsToStoreWG.Wait() - return - default: - time.Sleep(100 * time.Millisecond) //nolint:gomnd - } - } } // newWIPBatch closes the current batch and opens a new one, potentially processing forced batches between the batch is closed and the resulting new empty batch @@ -446,7 +464,7 @@ func (f *finalizer) newWIPBatch(ctx context.Context) (*WipBatch, error) { // Wait until all processed transactions are saved startWait := time.Now() - f.pendingTxsToStoreWG.Wait() + f.pendingTransactionsToStoreWG.Wait() endWait := time.Now() log.Info("waiting for pending transactions to be stored took: ", endWait.Sub(startWait).String()) @@ -559,7 +577,7 @@ func (f *finalizer) processTransaction(ctx context.Context, tx *TxTracker) (errW effectivePercentage := state.MaxEffectivePercentage - if tx.BreakEvenGasPrice.Uint64() != 0 { + if tx.BreakEvenGasPrice != nil && tx.BreakEvenGasPrice.Uint64() != 0 { // If the tx gas price is lower than the break even gas price, we process the tx with the user gas price (100%) if tx.GasPrice.Cmp(tx.BreakEvenGasPrice) <= 0 { tx.IsEffectiveGasPriceFinalExecution = true @@ -668,12 +686,12 @@ func (f *finalizer) handleProcessTransactionResponse(ctx context.Context, tx *Tx if diff.Cmp(maxDiff) == 1 { reprocessNeeded = true } - log.Infof("calculated newBreakEvenGasPrice: %d, tx.BreakEvenGasprice: %d for tx: %s", newBreakEvenGasPrice, tx.BreakEvenGasPrice, tx.HashStr) + log.Infof("calculated newBreakEvenGasPrice: %d, tx.BreakEvenGasPrice: %d for tx: %s", newBreakEvenGasPrice, tx.BreakEvenGasPrice, tx.HashStr) log.Infof("Would need reprocess: %t, diff: %d, maxDiff: %d", reprocessNeeded, diff, maxDiff) } } - processedTransaction := transactionToStore{ + txToStore := transactionToStore{ txTracker: tx, response: result.Responses[0], batchResponse: result, @@ -685,19 +703,9 @@ func (f *finalizer) handleProcessTransactionResponse(ctx context.Context, tx *Tx flushId: result.FlushID, } - f.pendingTxsToStoreMux.Lock() - f.pendingTxsToStoreWG.Add(1) - if result.FlushID > f.lastPendingFlushID { - f.lastPendingFlushID = result.FlushID - f.pendingFlushIDCond.Broadcast() - } - f.pendingTxsToStoreMux.Unlock() - select { - case f.pendingTxsToStore <- processedTransaction: - case <-ctx.Done(): - // If context is cancelled before we can send to the channel, we must decrement the WaitGroup count - f.pendingTxsToStoreWG.Done() - } + f.updateLastPendingFlushID(result.FlushID) + + f.addPendingTxToStore(ctx, txToStore) f.batch.countOfTxs++ @@ -722,7 +730,7 @@ func (f *finalizer) handleForcedTxsProcessResp(ctx context.Context, request stat } } - processedTransaction := transactionToStore{ + txToStore := transactionToStore{ txTracker: nil, response: txResp, batchResponse: result, @@ -734,35 +742,16 @@ func (f *finalizer) handleForcedTxsProcessResp(ctx context.Context, request stat flushId: result.FlushID, } - f.pendingTxsToStoreMux.Lock() - f.pendingTxsToStoreWG.Add(1) - if result.FlushID > f.lastPendingFlushID { - f.lastPendingFlushID = result.FlushID - f.pendingFlushIDCond.Broadcast() - } - f.pendingTxsToStoreMux.Unlock() oldStateRoot = txResp.StateRoot - select { - case f.pendingTxsToStore <- processedTransaction: - case <-ctx.Done(): - // If context is cancelled before we can send to the channel, we must decrement the WaitGroup count - f.pendingTxsToStoreWG.Done() - } + f.updateLastPendingFlushID(result.FlushID) + + f.addPendingTxToStore(ctx, txToStore) } } // storeProcessedTx stores the processed transaction in the database. func (f *finalizer) storeProcessedTx(ctx context.Context, txToStore transactionToStore) { - f.pendingTxsToStoreMux.Lock() - if _, ok := f.pendingTxsPerAddressTrackers[txToStore.txTracker.From]; !ok { - f.pendingTxsPerAddressTrackers[txToStore.txTracker.From] = new(pendingTxPerAddressTracker) - f.pendingTxsPerAddressTrackers[txToStore.txTracker.From].wg = &sync.WaitGroup{} - } - f.pendingTxsPerAddressTrackers[txToStore.txTracker.From].wg.Add(1) - f.pendingTxsPerAddressTrackers[txToStore.txTracker.From].count++ - f.pendingTxsToStoreMux.Unlock() - if txToStore.response != nil { log.Infof("storeProcessedTx: storing processed txToStore: %s", txToStore.response.TxHash.String()) } else { @@ -777,9 +766,9 @@ func (f *finalizer) storeProcessedTx(ctx context.Context, txToStore transactionT } func (f *finalizer) updateWorkerAfterSuccessfulProcessing(ctx context.Context, tx *TxTracker, result *state.ProcessBatchResponse) { - // Delete the transaction from the efficiency list + // Delete the transaction from the txSorted list f.worker.DeleteTx(tx.Hash, tx.From) - log.Debug("tx deleted from efficiency list", "txHash", tx.Hash.String(), "from", tx.From.Hex()) + log.Debug("tx deleted from txSorted list", "txHash", tx.Hash.String(), "from", tx.From.Hex()) start := time.Now() txsToDelete := f.worker.UpdateAfterSingleSuccessfulTxExecution(tx.From, result.ReadWriteAddresses) @@ -844,9 +833,9 @@ func (f *finalizer) handleProcessTransactionError(ctx context.Context, result *s } metrics.WorkerProcessingTime(time.Since(start)) } else { - // Delete the transaction from the efficiency list + // Delete the transaction from the txSorted list f.worker.DeleteTx(tx.Hash, tx.From) - log.Debug("tx deleted from efficiency list", "txHash", tx.Hash.String(), "from", tx.From.Hex()) + log.Debug("tx deleted from txSorted list", "txHash", tx.Hash.String(), "from", tx.From.Hex()) wg.Add(1) go func() { @@ -1199,7 +1188,7 @@ func (f *finalizer) checkRemainingResources(result *state.ProcessBatchResponse, if err != nil { log.Infof("current transaction exceeds the batch limit, updating metadata for tx in worker and continuing") start := time.Now() - f.worker.UpdateTx(result.Responses[0].TxHash, tx.From, usedResources.ZKCounters) + f.worker.UpdateTxZKCounters(result.Responses[0].TxHash, tx.From, usedResources.ZKCounters) metrics.WorkerProcessingTime(time.Since(start)) return err } diff --git a/sequencer/finalizer_test.go b/sequencer/finalizer_test.go index 173bbf180e..573757a837 100644 --- a/sequencer/finalizer_test.go +++ b/sequencer/finalizer_test.go @@ -9,16 +9,16 @@ import ( "testing" "time" - cfgTypes "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - stateMetrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/test/constants" + cfgTypes "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/nileventstorage" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/state" + stateMetrics "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/state/runtime" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/test/constants" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/assert" @@ -118,9 +118,7 @@ func TestNewFinalizer(t *testing.T) { dbManagerMock.On("GetLastSentFlushID", context.Background()).Return(uint64(0), nil) // arrange and act - pendingTxsToStoreMux := new(sync.RWMutex) - pendingTxsPerAddressTrackers := make(map[common.Address]*pendingTxPerAddressTracker) - f = newFinalizer(cfg, effectiveGasPriceCfg, workerMock, dbManagerMock, executorMock, seqAddr, isSynced, closingSignalCh, bc, eventLog, pendingTxsToStoreMux, pendingTxsPerAddressTrackers) + f = newFinalizer(cfg, effectiveGasPriceCfg, workerMock, dbManagerMock, executorMock, seqAddr, isSynced, closingSignalCh, bc, eventLog) // assert assert.NotNil(t, f) @@ -270,14 +268,14 @@ func TestFinalizer_handleProcessTransactionResponse(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { storedTxs := make([]transactionToStore, 0) - f.pendingTxsToStore = make(chan transactionToStore) + f.pendingTransactionsToStore = make(chan transactionToStore) if tc.expectedStoredTx.batchResponse != nil { done = make(chan bool) // init a new done channel go func() { - for tx := range f.pendingTxsToStore { + for tx := range f.pendingTransactionsToStore { storedTxs = append(storedTxs, tx) - f.pendingTxsToStoreWG.Done() + f.pendingTransactionsToStoreWG.Done() } done <- true // signal that the goroutine is done }() @@ -290,12 +288,13 @@ func TestFinalizer_handleProcessTransactionResponse(t *testing.T) { workerMock.On("MoveTxToNotReady", txHash, senderAddr, addressInfo.Nonce, addressInfo.Balance).Return([]*TxTracker{}).Once() } if tc.expectedUpdateTxCall { - workerMock.On("UpdateTx", txTracker.Hash, txTracker.From, tc.executorResponse.UsedZkCounters).Return().Once() + workerMock.On("UpdateTxZKCounters", txTracker.Hash, txTracker.From, tc.executorResponse.UsedZkCounters).Return().Once() } if tc.expectedError == nil { //dbManagerMock.On("GetGasPrices", ctx).Return(pool.GasPrices{L1GasPrice: 0, L2GasPrice: 0}, nilErr).Once() workerMock.On("DeleteTx", txTracker.Hash, txTracker.From).Return().Once() workerMock.On("UpdateAfterSingleSuccessfulTxExecution", txTracker.From, tc.executorResponse.ReadWriteAddresses).Return([]*TxTracker{}).Once() + workerMock.On("AddPendingTxToStore", txTracker.Hash, txTracker.From).Return().Once() } if tc.expectedUpdateTxStatus != "" { dbManagerMock.On("UpdateTxStatus", ctx, txHash, tc.expectedUpdateTxStatus, false, mock.Anything).Return(nil).Once() @@ -313,9 +312,9 @@ func TestFinalizer_handleProcessTransactionResponse(t *testing.T) { } if tc.expectedStoredTx.batchResponse != nil { - close(f.pendingTxsToStore) // close the channel - <-done // wait for the goroutine to finish - f.pendingTxsToStoreWG.Wait() + close(f.pendingTransactionsToStore) // close the channel + <-done // wait for the goroutine to finish + f.pendingTransactionsToStoreWG.Wait() require.Len(t, storedTxs, 1) actualTx := storedTxs[0] assertEqualTransactionToStore(t, tc.expectedStoredTx, actualTx) @@ -895,13 +894,13 @@ func TestFinalizer_processForcedBatches(t *testing.T) { var newStateRoot common.Hash stateRoot := oldHash storedTxs := make([]transactionToStore, 0) - f.pendingTxsToStore = make(chan transactionToStore) + f.pendingTransactionsToStore = make(chan transactionToStore) if tc.expectedStoredTx != nil && len(tc.expectedStoredTx) > 0 { done = make(chan bool) // init a new done channel go func() { - for tx := range f.pendingTxsToStore { + for tx := range f.pendingTransactionsToStore { storedTxs = append(storedTxs, tx) - f.pendingTxsToStoreWG.Done() + f.pendingTransactionsToStoreWG.Done() } done <- true // signal that the goroutine is done }() @@ -959,9 +958,9 @@ func TestFinalizer_processForcedBatches(t *testing.T) { assert.EqualError(t, err, tc.expectedErr.Error()) } else { if tc.expectedStoredTx != nil && len(tc.expectedStoredTx) > 0 { - close(f.pendingTxsToStore) // ensure the channel is closed - <-done // wait for the goroutine to finish - f.pendingTxsToStoreWG.Wait() + close(f.pendingTransactionsToStore) // ensure the channel is closed + <-done // wait for the goroutine to finish + f.pendingTransactionsToStoreWG.Wait() for i := range tc.expectedStoredTx { require.Equal(t, tc.expectedStoredTx[i], storedTxs[i]) } @@ -1302,7 +1301,7 @@ func TestFinalizer_checkRemainingResources(t *testing.T) { f.batch.remainingResources = tc.remaining dbManagerMock.On("AddEvent", ctx, mock.Anything, nil).Return(nil) if tc.expectedWorkerUpdate { - workerMock.On("UpdateTx", txResponse.TxHash, tc.expectedTxTracker.From, result.UsedZkCounters).Return().Once() + workerMock.On("UpdateTxZKCounters", txResponse.TxHash, tc.expectedTxTracker.From, result.UsedZkCounters).Return().Once() } // act @@ -1316,9 +1315,9 @@ func TestFinalizer_checkRemainingResources(t *testing.T) { assert.NoError(t, err) } if tc.expectedWorkerUpdate { - workerMock.AssertCalled(t, "UpdateTx", txResponse.TxHash, tc.expectedTxTracker.From, result.UsedZkCounters) + workerMock.AssertCalled(t, "UpdateTxZKCounters", txResponse.TxHash, tc.expectedTxTracker.From, result.UsedZkCounters) } else { - workerMock.AssertNotCalled(t, "UpdateTx", mock.Anything, mock.Anything, mock.Anything) + workerMock.AssertNotCalled(t, "UpdateTxZKCounters", mock.Anything, mock.Anything, mock.Anything) } }) } @@ -1496,13 +1495,13 @@ func Test_processTransaction(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { storedTxs := make([]transactionToStore, 0) - f.pendingTxsToStore = make(chan transactionToStore, 1) + f.pendingTransactionsToStore = make(chan transactionToStore, 1) if tc.expectedStoredTx.batchResponse != nil { done = make(chan bool) // init a new done channel go func() { - for tx := range f.pendingTxsToStore { + for tx := range f.pendingTransactionsToStore { storedTxs = append(storedTxs, tx) - f.pendingTxsToStoreWG.Done() + f.pendingTransactionsToStoreWG.Done() } done <- true // signal that the goroutine is done }() @@ -1516,6 +1515,7 @@ func Test_processTransaction(t *testing.T) { } if tc.expectedErr == nil { workerMock.On("UpdateAfterSingleSuccessfulTxExecution", tc.tx.From, tc.expectedResponse.ReadWriteAddresses).Return([]*TxTracker{}).Once() + workerMock.On("AddPendingTxToStore", tc.tx.Hash, tc.tx.From).Return().Once() } if tc.expectedUpdateTxStatus != "" { @@ -1525,9 +1525,9 @@ func Test_processTransaction(t *testing.T) { errWg, err := f.processTransaction(tc.ctx, tc.tx) if tc.expectedStoredTx.batchResponse != nil { - close(f.pendingTxsToStore) // ensure the channel is closed - <-done // wait for the goroutine to finish - f.pendingTxsToStoreWG.Wait() + close(f.pendingTransactionsToStore) // ensure the channel is closed + <-done // wait for the goroutine to finish + f.pendingTransactionsToStoreWG.Wait() require.Equal(t, tc.expectedStoredTx, storedTxs[0]) } if tc.expectedErr != nil { @@ -1681,19 +1681,19 @@ func Test_handleForcedTxsProcessResp(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { storedTxs := make([]transactionToStore, 0) - f.pendingTxsToStore = make(chan transactionToStore) + f.pendingTransactionsToStore = make(chan transactionToStore) // Mock storeProcessedTx to store txs into the storedTxs slice go func() { - for tx := range f.pendingTxsToStore { + for tx := range f.pendingTransactionsToStore { storedTxs = append(storedTxs, tx) - f.pendingTxsToStoreWG.Done() + f.pendingTransactionsToStoreWG.Done() } }() f.handleForcedTxsProcessResp(ctx, tc.request, tc.result, tc.oldStateRoot) - f.pendingTxsToStoreWG.Wait() + f.pendingTransactionsToStoreWG.Wait() require.Nil(t, err) require.Equal(t, len(tc.expectedStoredTxs), len(storedTxs)) for i := 0; i < len(tc.expectedStoredTxs); i++ { @@ -1735,9 +1735,6 @@ func TestFinalizer_storeProcessedTx(t *testing.T) { response: &state.ProcessTransactionResponse{ TxHash: txHash, }, - txTracker: &TxTracker{ - From: senderAddr, - }, isForcedBatch: false, }, }, @@ -1760,9 +1757,6 @@ func TestFinalizer_storeProcessedTx(t *testing.T) { TxHash: txHash2, }, isForcedBatch: true, - txTracker: &TxTracker{ - From: senderAddr, - }, }, }, } @@ -2453,10 +2447,8 @@ func setupFinalizer(withWipBatch bool) *finalizer { handlingL2Reorg: false, eventLog: eventLog, maxBreakEvenGasPriceDeviationPercentage: big.NewInt(10), - pendingTxsToStore: make(chan transactionToStore, bc.MaxTxsPerBatch*pendingTxsBufferSizeMultiplier), - pendingTxsToStoreWG: new(sync.WaitGroup), - pendingTxsToStoreMux: new(sync.RWMutex), - pendingTxsPerAddressTrackers: make(map[common.Address]*pendingTxPerAddressTracker), + pendingTransactionsToStore: make(chan transactionToStore, bc.MaxTxsPerBatch*pendingTxsBufferSizeMultiplier), + pendingTransactionsToStoreWG: new(sync.WaitGroup), storedFlushID: 0, storedFlushIDCond: sync.NewCond(new(sync.Mutex)), proverID: "", diff --git a/sequencer/interfaces.go b/sequencer/interfaces.go index 181326eaaf..988aa5bb93 100644 --- a/sequencer/interfaces.go +++ b/sequencer/interfaces.go @@ -5,12 +5,11 @@ import ( "math/big" "time" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/ethtxmanager" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -34,13 +33,11 @@ type txPool interface { // etherman contains the methods required to interact with ethereum. type etherman interface { - EstimateGasSequenceBatches(sender common.Address, sequences []ethmanTypes.Sequence) (*types.Transaction, error) GetSendSequenceFee(numBatches uint64) (*big.Int, error) TrustedSequencer() (common.Address, error) GetLatestBatchNumber() (uint64, error) GetLastBatchTimestamp() (uint64, error) GetLatestBlockTimestamp(ctx context.Context) (uint64, error) - BuildSequenceBatchesTxData(sender common.Address, sequences []ethmanTypes.Sequence) (to *common.Address, data []byte, err error) GetLatestBlockNumber(ctx context.Context) (uint64, error) } @@ -86,10 +83,12 @@ type stateInterface interface { type workerInterface interface { GetBestFittingTx(resources state.BatchResources) *TxTracker UpdateAfterSingleSuccessfulTxExecution(from common.Address, touchedAddresses map[common.Address]*state.InfoReadWrite) []*TxTracker - UpdateTx(txHash common.Hash, from common.Address, ZKCounters state.ZKCounters) + UpdateTxZKCounters(txHash common.Hash, from common.Address, ZKCounters state.ZKCounters) AddTxTracker(ctx context.Context, txTracker *TxTracker) (replacedTx *TxTracker, dropReason error) MoveTxToNotReady(txHash common.Hash, from common.Address, actualNonce *uint64, actualBalance *big.Int) []*TxTracker DeleteTx(txHash common.Hash, from common.Address) + AddPendingTxToStore(txHash common.Hash, addr common.Address) + DeletePendingTxToStore(txHash common.Hash, addr common.Address) HandleL2Reorg(txHashes []common.Hash) NewTxTracker(tx types.Transaction, counters state.ZKCounters, ip string) (*TxTracker, error) } diff --git a/sequencer/metrics/metrics.go b/sequencer/metrics/metrics.go index f7d5bd7ae2..6a82936f39 100644 --- a/sequencer/metrics/metrics.go +++ b/sequencer/metrics/metrics.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/cdk-validium-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/sequencer/mock_db_manager.go b/sequencer/mock_db_manager.go index c2a12fc589..4e14545866 100644 --- a/sequencer/mock_db_manager.go +++ b/sequencer/mock_db_manager.go @@ -12,9 +12,9 @@ import ( pgx "github.com/jackc/pgx/v4" - pool "github.com/0xPolygonHermez/zkevm-node/pool" + pool "github.com/0xPolygon/cdk-validium-node/pool" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/cdk-validium-node/state" time "time" diff --git a/sequencer/mock_etherman.go b/sequencer/mock_etherman.go index 1089528dfa..ad3192ad53 100644 --- a/sequencer/mock_etherman.go +++ b/sequencer/mock_etherman.go @@ -8,11 +8,7 @@ import ( common "github.com/ethereum/go-ethereum/common" - coretypes "github.com/ethereum/go-ethereum/core/types" - mock "github.com/stretchr/testify/mock" - - types "github.com/0xPolygonHermez/zkevm-node/etherman/types" ) // EthermanMock is an autogenerated mock type for the etherman type @@ -20,67 +16,6 @@ type EthermanMock struct { mock.Mock } -// BuildSequenceBatchesTxData provides a mock function with given fields: sender, sequences -func (_m *EthermanMock) BuildSequenceBatchesTxData(sender common.Address, sequences []types.Sequence) (*common.Address, []byte, error) { - ret := _m.Called(sender, sequences) - - var r0 *common.Address - var r1 []byte - var r2 error - if rf, ok := ret.Get(0).(func(common.Address, []types.Sequence) (*common.Address, []byte, error)); ok { - return rf(sender, sequences) - } - if rf, ok := ret.Get(0).(func(common.Address, []types.Sequence) *common.Address); ok { - r0 = rf(sender, sequences) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*common.Address) - } - } - - if rf, ok := ret.Get(1).(func(common.Address, []types.Sequence) []byte); ok { - r1 = rf(sender, sequences) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).([]byte) - } - } - - if rf, ok := ret.Get(2).(func(common.Address, []types.Sequence) error); ok { - r2 = rf(sender, sequences) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// EstimateGasSequenceBatches provides a mock function with given fields: sender, sequences -func (_m *EthermanMock) EstimateGasSequenceBatches(sender common.Address, sequences []types.Sequence) (*coretypes.Transaction, error) { - ret := _m.Called(sender, sequences) - - var r0 *coretypes.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(common.Address, []types.Sequence) (*coretypes.Transaction, error)); ok { - return rf(sender, sequences) - } - if rf, ok := ret.Get(0).(func(common.Address, []types.Sequence) *coretypes.Transaction); ok { - r0 = rf(sender, sequences) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(common.Address, []types.Sequence) error); ok { - r1 = rf(sender, sequences) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // GetLastBatchTimestamp provides a mock function with given fields: func (_m *EthermanMock) GetLastBatchTimestamp() (uint64, error) { ret := _m.Called() diff --git a/sequencer/mock_pool.go b/sequencer/mock_pool.go index 40723aca09..3f1eb90bf7 100644 --- a/sequencer/mock_pool.go +++ b/sequencer/mock_pool.go @@ -9,9 +9,9 @@ import ( mock "github.com/stretchr/testify/mock" - pool "github.com/0xPolygonHermez/zkevm-node/pool" + pool "github.com/0xPolygon/cdk-validium-node/pool" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/cdk-validium-node/state" ) // PoolMock is an autogenerated mock type for the txPool type diff --git a/sequencer/mock_state.go b/sequencer/mock_state.go index 4590f7fb87..f5b5f1a59b 100644 --- a/sequencer/mock_state.go +++ b/sequencer/mock_state.go @@ -8,15 +8,15 @@ import ( common "github.com/ethereum/go-ethereum/common" - executor "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + executor "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" - metrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" + metrics "github.com/0xPolygon/cdk-validium-node/state/metrics" mock "github.com/stretchr/testify/mock" pgx "github.com/jackc/pgx/v4" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/cdk-validium-node/state" time "time" diff --git a/sequencer/mock_worker.go b/sequencer/mock_worker.go index 1262c09023..cedc270291 100644 --- a/sequencer/mock_worker.go +++ b/sequencer/mock_worker.go @@ -10,7 +10,7 @@ import ( mock "github.com/stretchr/testify/mock" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/cdk-validium-node/state" types "github.com/ethereum/go-ethereum/core/types" ) @@ -20,6 +20,11 @@ type WorkerMock struct { mock.Mock } +// AddPendingTxToStore provides a mock function with given fields: txHash, addr +func (_m *WorkerMock) AddPendingTxToStore(txHash common.Hash, addr common.Address) { + _m.Called(txHash, addr) +} + // AddTxTracker provides a mock function with given fields: ctx, txTracker func (_m *WorkerMock) AddTxTracker(ctx context.Context, txTracker *TxTracker) (*TxTracker, error) { ret := _m.Called(ctx, txTracker) @@ -46,6 +51,11 @@ func (_m *WorkerMock) AddTxTracker(ctx context.Context, txTracker *TxTracker) (* return r0, r1 } +// DeletePendingTxToStore provides a mock function with given fields: txHash, addr +func (_m *WorkerMock) DeletePendingTxToStore(txHash common.Hash, addr common.Address) { + _m.Called(txHash, addr) +} + // DeleteTx provides a mock function with given fields: txHash, from func (_m *WorkerMock) DeleteTx(txHash common.Hash, from common.Address) { _m.Called(txHash, from) @@ -130,8 +140,8 @@ func (_m *WorkerMock) UpdateAfterSingleSuccessfulTxExecution(from common.Address return r0 } -// UpdateTx provides a mock function with given fields: txHash, from, ZKCounters -func (_m *WorkerMock) UpdateTx(txHash common.Hash, from common.Address, ZKCounters state.ZKCounters) { +// UpdateTxZKCounters provides a mock function with given fields: txHash, from, ZKCounters +func (_m *WorkerMock) UpdateTxZKCounters(txHash common.Hash, from common.Address, ZKCounters state.ZKCounters) { _m.Called(txHash, from, ZKCounters) } diff --git a/sequencer/sequencer.go b/sequencer/sequencer.go index 49f285eb47..cf3929de1d 100644 --- a/sequencer/sequencer.go +++ b/sequencer/sequencer.go @@ -4,15 +4,14 @@ import ( "context" "errors" "fmt" - "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/sequencer/metrics" - "github.com/0xPolygonHermez/zkevm-node/state" - stateMetrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/sequencer/metrics" + "github.com/0xPolygon/cdk-validium-node/state" + stateMetrics "github.com/0xPolygon/cdk-validium-node/state/metrics" "github.com/ethereum/go-ethereum/common" ) @@ -43,19 +42,6 @@ type batchConstraints struct { MaxSteps uint32 } -// TODO: Add tests to config_test.go -type batchResourceWeights struct { - WeightBatchBytesSize int - WeightCumulativeGasUsed int - WeightKeccakHashes int - WeightPoseidonHashes int - WeightPoseidonPaddings int - WeightMemAligns int - WeightArithmetics int - WeightBinaries int - WeightSteps int -} - // L2ReorgEvent is the event that is triggered when a reorg happens in the L2 type L2ReorgEvent struct { TxHashes []common.Hash @@ -68,12 +54,6 @@ type ClosingSignalCh struct { L2ReorgCh chan L2ReorgEvent } -// pendingTxPerAddressTracker is a struct that tracks the number of pending transactions per address -type pendingTxPerAddressTracker struct { - wg *sync.WaitGroup - count uint -} - // New init sequencer func New(cfg Config, txPool txPool, state stateInterface, etherman etherman, manager ethTxManager, eventLog *event.EventLog) (*Sequencer, error) { addr, err := etherman.TrustedSequencer() @@ -118,30 +98,17 @@ func (s *Sequencer) Start(ctx context.Context) { MaxBinaries: s.cfg.MaxBinaries, MaxSteps: s.cfg.MaxSteps, } - batchResourceWeights := batchResourceWeights{ - WeightBatchBytesSize: s.cfg.WeightBatchBytesSize, - WeightCumulativeGasUsed: s.cfg.WeightCumulativeGasUsed, - WeightKeccakHashes: s.cfg.WeightKeccakHashes, - WeightPoseidonHashes: s.cfg.WeightPoseidonHashes, - WeightPoseidonPaddings: s.cfg.WeightPoseidonPaddings, - WeightMemAligns: s.cfg.WeightMemAligns, - WeightArithmetics: s.cfg.WeightArithmetics, - WeightBinaries: s.cfg.WeightBinaries, - WeightSteps: s.cfg.WeightSteps, - } err := s.pool.MarkWIPTxsAsPending(ctx) if err != nil { log.Fatalf("failed to mark WIP txs as pending, err: %v", err) } - pendingTxsToStoreMux := new(sync.RWMutex) - pendingTxTrackerPerAddress := make(map[common.Address]*pendingTxPerAddressTracker) - worker := NewWorker(s.cfg.Worker, s.state, batchConstraints, batchResourceWeights, pendingTxsToStoreMux, pendingTxTrackerPerAddress) + worker := NewWorker(s.state) dbManager := newDBManager(ctx, s.cfg.DBManager, s.pool, s.state, worker, closingSignalCh, batchConstraints) go dbManager.Start() - finalizer := newFinalizer(s.cfg.Finalizer, s.cfg.EffectiveGasPrice, worker, dbManager, s.state, s.address, s.isSynced, closingSignalCh, batchConstraints, s.eventLog, pendingTxsToStoreMux, pendingTxTrackerPerAddress) + finalizer := newFinalizer(s.cfg.Finalizer, s.cfg.EffectiveGasPrice, worker, dbManager, s.state, s.address, s.isSynced, closingSignalCh, batchConstraints, s.eventLog) currBatch, processingReq := s.bootstrap(ctx, dbManager, finalizer) go finalizer.Start(ctx, currBatch, processingReq) diff --git a/sequencer/txsorted_list.go b/sequencer/txsorted_list.go new file mode 100644 index 0000000000..9d8a9ae3a8 --- /dev/null +++ b/sequencer/txsorted_list.go @@ -0,0 +1,152 @@ +package sequencer + +import ( + "fmt" + "sort" + "sync" + + "github.com/0xPolygon/cdk-validium-node/log" +) + +// txSortedList represents a list of tx sorted by gasPrice +type txSortedList struct { + list map[string]*TxTracker + sorted []*TxTracker + mutex sync.Mutex +} + +// newTxSortedList creates and init an txSortedList +func newTxSortedList() *txSortedList { + return &txSortedList{ + list: make(map[string]*TxTracker), + sorted: []*TxTracker{}, + } +} + +// add adds a tx to the txSortedList +func (e *txSortedList) add(tx *TxTracker) bool { + e.mutex.Lock() + defer e.mutex.Unlock() + + if _, found := e.list[tx.HashStr]; !found { + e.list[tx.HashStr] = tx + e.addSort(tx) + return true + } + return false +} + +// delete deletes the tx from the txSortedList +func (e *txSortedList) delete(tx *TxTracker) bool { + e.mutex.Lock() + defer e.mutex.Unlock() + + if tx, found := e.list[tx.HashStr]; found { + sLen := len(e.sorted) + i := sort.Search(sLen, func(i int) bool { + return e.isGreaterOrEqualThan(tx, e.list[e.sorted[i].HashStr]) + }) + + // i is the index of the first tx that has equal (or lower) gasPrice than the tx. From here we need to go down in the list + // looking for the sorted[i].HashStr equal to tx.HashStr to get the index of tx in the sorted slice. + // We need to go down until we find the tx or we have a tx with different (lower) gasPrice or we reach the end of the list + for { + if i == sLen { + log.Errorf("Error deleting tx (%s) from txSortedList, we reach the end of the list", tx.HashStr) + return false + } + + if (e.sorted[i].GasPrice.Cmp(tx.GasPrice)) != 0 { + // we have a tx with different (lower) GasPrice than the tx we are looking for, therefore we haven't found the tx + log.Errorf("Error deleting tx (%s) from txSortedList, not found in the list of txs with same gasPrice: %s", tx.HashStr) + return false + } + + if e.sorted[i].HashStr == tx.HashStr { + break + } + + i = i + 1 + } + + delete(e.list, tx.HashStr) + + copy(e.sorted[i:], e.sorted[i+1:]) + e.sorted[sLen-1] = nil + e.sorted = e.sorted[:sLen-1] + + return true + } + return false +} + +// getByIndex retrieves the tx at the i position in the sorted txSortedList +func (e *txSortedList) getByIndex(i int) *TxTracker { + e.mutex.Lock() + defer e.mutex.Unlock() + + tx := e.sorted[i] + + return tx +} + +// len returns the length of the txSortedList +func (e *txSortedList) len() int { + e.mutex.Lock() + defer e.mutex.Unlock() + + l := len(e.sorted) + + return l +} + +// print prints the contents of the txSortedList +func (e *txSortedList) Print() { + e.mutex.Lock() + defer e.mutex.Unlock() + + fmt.Println("Len: ", len(e.sorted)) + for _, txi := range e.sorted { + fmt.Printf("Hash=%s, gasPrice=%d\n", txi.HashStr, txi.GasPrice) + } +} + +// addSort adds the tx to the txSortedList in a sorted way +func (e *txSortedList) addSort(tx *TxTracker) { + i := sort.Search(len(e.sorted), func(i int) bool { + return e.isGreaterThan(tx, e.list[e.sorted[i].HashStr]) + }) + + e.sorted = append(e.sorted, nil) + copy(e.sorted[i+1:], e.sorted[i:]) + e.sorted[i] = tx + log.Infof("Added tx(%s) to txSortedList. With gasPrice(%d) at index(%d) from total(%d)", tx.HashStr, tx.GasPrice, i, len(e.sorted)) +} + +// isGreaterThan returns true if the tx1 has greater gasPrice than tx2 +func (e *txSortedList) isGreaterThan(tx1 *TxTracker, tx2 *TxTracker) bool { + cmp := tx1.GasPrice.Cmp(tx2.GasPrice) + if cmp == 1 { + return true + } else { + return false + } +} + +// isGreaterOrEqualThan returns true if the tx1 has greater or equal gasPrice than tx2 +func (e *txSortedList) isGreaterOrEqualThan(tx1 *TxTracker, tx2 *TxTracker) bool { + cmp := tx1.GasPrice.Cmp(tx2.GasPrice) + if cmp >= 0 { + return true + } else { + return false + } +} + +// GetSorted returns the sorted list of tx +func (e *txSortedList) GetSorted() []*TxTracker { + e.mutex.Lock() + defer e.mutex.Unlock() + + return e.sorted +} diff --git a/sequencer/txsorted_list_test.go b/sequencer/txsorted_list_test.go new file mode 100644 index 0000000000..e3ae43dffb --- /dev/null +++ b/sequencer/txsorted_list_test.go @@ -0,0 +1,114 @@ +package sequencer + +import ( + "crypto/rand" + "fmt" + "math/big" + "testing" + "time" +) + +// randomBigInt is a shortcut for generating a random big.Int +func randomBigInt() *big.Int { + //Max random value, a 130-bits integer, i.e 2^130 - 1 + max := new(big.Int) + max.Exp(big.NewInt(2), big.NewInt(130), nil).Sub(max, big.NewInt(1)) + + //Generate cryptographically strong pseudo-random between 0 - max + n, err := rand.Int(rand.Reader, max) + if err != nil { + //error handling + return nil + } + + return n +} + +func TestTxSortedList(t *testing.T) { + el := newTxSortedList() + nItems := 100 + + for i := 0; i < nItems; i++ { + el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", i), GasPrice: randomBigInt()}) + } + + for i := 0; i < nItems-1; i++ { + if !(el.getByIndex(i).GasPrice.Cmp(el.getByIndex(i+1).GasPrice) == 1) { + t.Fatalf("Sort error. [%d].GasPrice(%f) < [%d].GasPrice(%f)", i, el.getByIndex(i).GasPrice, i+1, el.getByIndex(i+1).GasPrice) + } + } + + // el.print() + + if el.len() != nItems { + t.Fatalf("Length error. Length %d. Expected %d", el.len(), nItems) + } +} + +func TestTxSortedListDelete(t *testing.T) { + el := newTxSortedList() + + el.add(&TxTracker{HashStr: "0x01", GasPrice: new(big.Int).SetInt64(10)}) + el.add(&TxTracker{HashStr: "0x02", GasPrice: new(big.Int).SetInt64(20)}) + el.add(&TxTracker{HashStr: "0x03", GasPrice: new(big.Int).SetInt64(20)}) + el.add(&TxTracker{HashStr: "0x04", GasPrice: new(big.Int).SetInt64(40)}) + el.add(&TxTracker{HashStr: "0x05", GasPrice: new(big.Int).SetInt64(100)}) + el.add(&TxTracker{HashStr: "0x06", GasPrice: new(big.Int).SetInt64(15)}) + el.add(&TxTracker{HashStr: "0x07", GasPrice: new(big.Int).SetInt64(15)}) + el.add(&TxTracker{HashStr: "0x08", GasPrice: new(big.Int).SetInt64(10)}) + + sort := []string{"0x05", "0x04", "0x02", "0x03", "0x06", "0x07", "0x01", "0x08"} + + for index, tx := range el.sorted { + if sort[index] != tx.HashStr { + t.Fatalf("Sort error. Expected %s, Actual %s", sort[index], tx.HashStr) + } + } + + deltxs := []string{"0x03", "0x06", "0x08", "0x05"} + + for _, deltx := range deltxs { + count := el.len() + el.delete(&TxTracker{HashStr: deltx}) + + for i := 0; i < el.len(); i++ { + if el.getByIndex(i).HashStr == deltx { + t.Fatalf("Delete error. %s tx was not deleted", deltx) + } + } + + if el.len() != count-1 { + t.Fatalf("Length error. Length %d. Expected %d", el.len(), count) + } + } + + if el.delete(&TxTracker{HashStr: "0x08"}) { + t.Fatal("Delete error. 0x08 tx was deleted and should not exist in the list") + } +} + +func TestTxSortedListBench(t *testing.T) { + el := newTxSortedList() + + start := time.Now() + for i := 0; i < 10000; i++ { + el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", i), GasPrice: randomBigInt()}) + } + elapsed := time.Since(start) + t.Logf("TxSortedList adding 10000 items took %s", elapsed) + + start = time.Now() + el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", 10001), GasPrice: randomBigInt()}) + elapsed = time.Since(start) + t.Logf("TxSortedList adding the 10001 item (GasPrice=random) took %s", elapsed) + + start = time.Now() + el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", 10002), GasPrice: new(big.Int).SetInt64(0)}) + elapsed = time.Since(start) + t.Logf("TxSortedList adding the 10002 item (GasPrice=0) took %s", elapsed) + + start = time.Now() + el.add(&TxTracker{HashStr: fmt.Sprintf("0x%d", 10003), GasPrice: new(big.Int).SetInt64(1000)}) + elapsed = time.Since(start) + t.Logf("TxSortedList adding the 10003 item (GasPrice=1000) took %s", elapsed) +} diff --git a/sequencer/txtracker.go b/sequencer/txtracker.go index bfc67f5b7b..151e44f0fa 100644 --- a/sequencer/txtracker.go +++ b/sequencer/txtracker.go @@ -4,8 +4,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) @@ -22,15 +21,10 @@ type TxTracker struct { Cost *big.Int // Cost = Amount + Benefit Benefit *big.Int // GasLimit * GasPrice BatchResources state.BatchResources // To check if it fits into a batch - Efficiency float64 RawTx []byte - ReceivedAt time.Time // To check if it has been in the efficiency list for too long + ReceivedAt time.Time // To check if it has been in the txSortedList for too long IP string // IP of the tx sender FailedReason *string // FailedReason is the reason why the tx failed, if it failed - Constraints batchConstraintsFloat64 - WeightMultipliers batchResourceWeightMultipliers - ResourceCostMultiplier float64 - TotalWeight float64 BreakEvenGasPrice *big.Int GasPriceEffectivePercentage uint8 EffectiveGasPriceProcessCount uint8 @@ -38,43 +32,13 @@ type TxTracker struct { L1GasPrice uint64 } -// batchResourceWeightMultipliers is a struct that contains the weight multipliers for each resource -type batchResourceWeightMultipliers struct { - cumulativeGasUsed float64 - arithmetics float64 - binaries float64 - keccakHashes float64 - memAligns float64 - poseidonHashes float64 - poseidonPaddings float64 - steps float64 - batchBytesSize float64 -} - -// batchConstraints represents the Constraints for a batch in float64 -type batchConstraintsFloat64 struct { - maxTxsPerBatch float64 - maxBatchBytesSize float64 - maxCumulativeGasUsed float64 - maxKeccakHashes float64 - maxPoseidonHashes float64 - maxPoseidonPaddings float64 - maxMemAligns float64 - maxArithmetics float64 - maxBinaries float64 - maxSteps float64 -} - // newTxTracker creates and inti a TxTracker -func newTxTracker(tx types.Transaction, counters state.ZKCounters, constraints batchConstraintsFloat64, weights batchResourceWeights, resourceCostMultiplier float64, ip string) (*TxTracker, error) { +func newTxTracker(tx types.Transaction, counters state.ZKCounters, ip string) (*TxTracker, error) { addr, err := state.GetSender(tx) if err != nil { return nil, err } - totalWeight := float64(weights.WeightArithmetics + weights.WeightBatchBytesSize + weights.WeightBinaries + weights.WeightCumulativeGasUsed + - weights.WeightKeccakHashes + weights.WeightMemAligns + weights.WeightPoseidonHashes + weights.WeightPoseidonPaddings + weights.WeightSteps) - rawTx, err := state.EncodeTransactionWithoutEffectivePercentage(tx) if err != nil { return nil, err @@ -93,74 +57,18 @@ func newTxTracker(tx types.Transaction, counters state.ZKCounters, constraints b Bytes: tx.Size(), ZKCounters: counters, }, - Efficiency: 0, RawTx: rawTx, ReceivedAt: time.Now(), IP: ip, - Constraints: constraints, - WeightMultipliers: calculateWeightMultipliers(weights, totalWeight), - ResourceCostMultiplier: resourceCostMultiplier, - TotalWeight: totalWeight, BreakEvenGasPrice: new(big.Int).SetUint64(0), EffectiveGasPriceProcessCount: 0, IsEffectiveGasPriceFinalExecution: false, } - txTracker.calculateEfficiency(constraints, weights) return txTracker, nil } -// updateZKCounters updates the counters of the tx and recalculates the tx efficiency - -func (tx *TxTracker) updateZKCounters(counters state.ZKCounters, constraints batchConstraintsFloat64, weights batchResourceWeights) { +// updateZKCounters updates the counters of the tx +func (tx *TxTracker) updateZKCounters(counters state.ZKCounters) { tx.BatchResources.ZKCounters = counters - tx.calculateEfficiency(constraints, weights) -} - -// calculateEfficiency calculates the tx efficiency -func (tx *TxTracker) calculateEfficiency(constraints batchConstraintsFloat64, weights batchResourceWeights) { - totalWeight := float64(weights.WeightArithmetics + weights.WeightBatchBytesSize + weights.WeightBinaries + weights.WeightCumulativeGasUsed + - weights.WeightKeccakHashes + weights.WeightMemAligns + weights.WeightPoseidonHashes + weights.WeightPoseidonPaddings + weights.WeightSteps) - - // TODO: Optmize tx.Efficiency calculation (precalculate constansts values) - // TODO: Evaluate avoid type conversion (performance impact?) - resourceCost := (float64(tx.BatchResources.ZKCounters.CumulativeGasUsed)/constraints.maxCumulativeGasUsed)*float64(weights.WeightCumulativeGasUsed)/totalWeight + - (float64(tx.BatchResources.ZKCounters.UsedArithmetics)/constraints.maxArithmetics)*float64(weights.WeightArithmetics)/totalWeight + - (float64(tx.BatchResources.ZKCounters.UsedBinaries)/constraints.maxBinaries)*float64(weights.WeightBinaries)/totalWeight + - (float64(tx.BatchResources.ZKCounters.UsedKeccakHashes)/constraints.maxKeccakHashes)*float64(weights.WeightKeccakHashes)/totalWeight + - (float64(tx.BatchResources.ZKCounters.UsedMemAligns)/constraints.maxMemAligns)*float64(weights.WeightMemAligns)/totalWeight + - (float64(tx.BatchResources.ZKCounters.UsedPoseidonHashes)/constraints.maxPoseidonHashes)*float64(weights.WeightPoseidonHashes)/totalWeight + - (float64(tx.BatchResources.ZKCounters.UsedPoseidonPaddings)/constraints.maxPoseidonPaddings)*float64(weights.WeightPoseidonPaddings)/totalWeight + - (float64(tx.BatchResources.ZKCounters.UsedSteps)/constraints.maxSteps)*float64(weights.WeightSteps)/totalWeight + - (float64(tx.BatchResources.Bytes)/constraints.maxBatchBytesSize)*float64(weights.WeightBatchBytesSize)/totalWeight //Meto config - - resourceCost = resourceCost * tx.ResourceCostMultiplier - - var eff *big.Float - - ben := big.NewFloat(0).SetInt(tx.Benefit) - rc := big.NewFloat(0).SetFloat64(resourceCost) - eff = big.NewFloat(0).Quo(ben, rc) - - var accuracy big.Accuracy - tx.Efficiency, accuracy = eff.Float64() - log.Infof("CalculateEfficiency(%f) for tx(%s)", tx.Efficiency, tx.Hash.String()) - if accuracy != big.Exact { - log.Errorf("CalculateEfficiency accuracy warning (%s). Calculated=%s Assigned=%f", accuracy.String(), eff.String(), tx.Efficiency) - } -} - -// calculateWeightMultipliers calculates the weight multipliers for each resource -func calculateWeightMultipliers(weights batchResourceWeights, totalWeight float64) batchResourceWeightMultipliers { - return batchResourceWeightMultipliers{ - cumulativeGasUsed: float64(weights.WeightCumulativeGasUsed) / totalWeight, - arithmetics: float64(weights.WeightArithmetics) / totalWeight, - binaries: float64(weights.WeightBinaries) / totalWeight, - keccakHashes: float64(weights.WeightKeccakHashes) / totalWeight, - memAligns: float64(weights.WeightMemAligns) / totalWeight, - poseidonHashes: float64(weights.WeightPoseidonHashes) / totalWeight, - poseidonPaddings: float64(weights.WeightPoseidonPaddings) / totalWeight, - steps: float64(weights.WeightSteps) / totalWeight, - batchBytesSize: float64(weights.WeightBatchBytesSize) / totalWeight, - } } diff --git a/sequencer/txtracker_test.go b/sequencer/txtracker_test.go deleted file mode 100644 index e5663f78b2..0000000000 --- a/sequencer/txtracker_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package sequencer - -import ( - "fmt" - "math/big" - "testing" - - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/stretchr/testify/assert" -) - -type efficiencyCalcTestCase struct { - Name string - benefit int64 - counters state.ZKCounters - usedBytes uint64 - expectedResult float64 -} - -func TestTxTrackerEfficiencyCalculation(t *testing.T) { - // Init ZKEVM resourceCostWeight values - rcWeigth := batchResourceWeights{} - rcWeigth.WeightCumulativeGasUsed = 1 - rcWeigth.WeightArithmetics = 1 - rcWeigth.WeightBinaries = 1 - rcWeigth.WeightKeccakHashes = 1 - rcWeigth.WeightMemAligns = 1 - rcWeigth.WeightPoseidonHashes = 1 - rcWeigth.WeightPoseidonPaddings = 1 - rcWeigth.WeightSteps = 1 - rcWeigth.WeightBatchBytesSize = 2 - - // Init ZKEVM resourceCostMax values - rcMax := batchConstraintsFloat64{} - rcMax.maxCumulativeGasUsed = 10 - rcMax.maxArithmetics = 10 - rcMax.maxBinaries = 10 - rcMax.maxKeccakHashes = 10 - rcMax.maxMemAligns = 10 - rcMax.maxPoseidonHashes = 10 - rcMax.maxPoseidonPaddings = 10 - rcMax.maxSteps = 10 - rcMax.maxBatchBytesSize = 10 - - totalWeight := float64(rcWeigth.WeightArithmetics + rcWeigth.WeightBatchBytesSize + rcWeigth.WeightBinaries + rcWeigth.WeightCumulativeGasUsed + - rcWeigth.WeightKeccakHashes + rcWeigth.WeightMemAligns + rcWeigth.WeightPoseidonHashes + rcWeigth.WeightPoseidonPaddings + rcWeigth.WeightSteps) - - testCases := []efficiencyCalcTestCase{ - { - Name: "Using all of the resources", - benefit: 1000000, - counters: state.ZKCounters{CumulativeGasUsed: 10, UsedKeccakHashes: 10, UsedPoseidonHashes: 10, UsedPoseidonPaddings: 10, UsedMemAligns: 10, UsedArithmetics: 10, UsedBinaries: 10, UsedSteps: 10}, - usedBytes: 10, - expectedResult: 1000.00, - }, - { - Name: "Using half of the resources", - benefit: 1000000, - counters: state.ZKCounters{CumulativeGasUsed: 5, UsedKeccakHashes: 5, UsedPoseidonHashes: 5, UsedPoseidonPaddings: 5, UsedMemAligns: 5, UsedArithmetics: 5, UsedBinaries: 5, UsedSteps: 5}, - usedBytes: 5, - expectedResult: 2000.00, - }, - { - Name: "Using all the bytes and half of the remain resources", - benefit: 1000000, - counters: state.ZKCounters{CumulativeGasUsed: 5, UsedKeccakHashes: 5, UsedPoseidonHashes: 5, UsedPoseidonPaddings: 5, UsedMemAligns: 5, UsedArithmetics: 5, UsedBinaries: 5, UsedSteps: 5}, - usedBytes: 10, - expectedResult: 1666.67, - }, - { - Name: "Using all the steps and half of the remain resources", - benefit: 1000000, - counters: state.ZKCounters{CumulativeGasUsed: 5, UsedKeccakHashes: 5, UsedPoseidonHashes: 5, UsedPoseidonPaddings: 5, UsedMemAligns: 5, UsedArithmetics: 5, UsedBinaries: 5, UsedSteps: 10}, - usedBytes: 5, - expectedResult: 1818.18, - }, - { - Name: "Using 10% of all the resources", - benefit: 1000000, - counters: state.ZKCounters{CumulativeGasUsed: 1, UsedKeccakHashes: 1, UsedPoseidonHashes: 1, UsedPoseidonPaddings: 1, UsedMemAligns: 1, UsedArithmetics: 1, UsedBinaries: 1, UsedSteps: 1}, - usedBytes: 1, - expectedResult: 10000.00, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.Name, func(t *testing.T) { - tx := TxTracker{} - tx.Benefit = new(big.Int).SetInt64(testCase.benefit) - - tx.BatchResources.Bytes = testCase.usedBytes - tx.updateZKCounters(testCase.counters, rcMax, rcWeigth) - tx.WeightMultipliers = calculateWeightMultipliers(rcWeigth, totalWeight) - tx.ResourceCostMultiplier = 1000 - tx.updateZKCounters(testCase.counters, rcMax, rcWeigth) - t.Logf("%s=%s", testCase.Name, fmt.Sprintf("%.2f", tx.Efficiency)) - assert.Equal(t, fmt.Sprintf("%.2f", testCase.expectedResult), fmt.Sprintf("%.2f", tx.Efficiency), "Efficiency calculation err. Expected=%s, Actual=%s", fmt.Sprintf("%.2f", testCase.expectedResult), fmt.Sprintf("%.2f", tx.Efficiency)) - }) - } -} diff --git a/sequencer/worker.go b/sequencer/worker.go index d0a3e44874..5ed456146b 100644 --- a/sequencer/worker.go +++ b/sequencer/worker.go @@ -8,43 +8,26 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) // Worker represents the worker component of the sequencer type Worker struct { - cfg WorkerCfg - pool map[string]*addrQueue - efficiencyList *efficiencyList - workerMutex sync.Mutex - state stateInterface - batchConstraints batchConstraintsFloat64 - batchResourceWeights batchResourceWeights - pendingTxsToStoreMux *sync.RWMutex - pendingTxsPerAddressTrackers map[common.Address]*pendingTxPerAddressTracker + pool map[string]*addrQueue + txSortedList *txSortedList + workerMutex sync.Mutex + state stateInterface } // NewWorker creates an init a worker -func NewWorker( - cfg WorkerCfg, - state stateInterface, - constraints batchConstraints, - weights batchResourceWeights, - pendingTxsToStoreMux *sync.RWMutex, - pendingTxTrackersPerAddress map[common.Address]*pendingTxPerAddressTracker, -) *Worker { +func NewWorker(state stateInterface) *Worker { w := Worker{ - cfg: cfg, - pool: make(map[string]*addrQueue), - efficiencyList: newEfficiencyList(), - state: state, - batchConstraints: convertBatchConstraintsToFloat64(constraints), - batchResourceWeights: weights, - pendingTxsToStoreMux: pendingTxsToStoreMux, - pendingTxsPerAddressTrackers: pendingTxTrackersPerAddress, + pool: make(map[string]*addrQueue), + txSortedList: newTxSortedList(), + state: state, } return &w @@ -52,13 +35,12 @@ func NewWorker( // NewTxTracker creates and inits a TxTracker func (w *Worker) NewTxTracker(tx types.Transaction, counters state.ZKCounters, ip string) (*TxTracker, error) { - return newTxTracker(tx, counters, w.batchConstraints, w.batchResourceWeights, w.cfg.ResourceCostMultiplier, ip) + return newTxTracker(tx, counters, ip) } // AddTxTracker adds a new Tx to the Worker func (w *Worker) AddTxTracker(ctx context.Context, tx *TxTracker) (replacedTx *TxTracker, dropReason error) { w.workerMutex.Lock() - defer w.workerMutex.Unlock() addr, found := w.pool[tx.FromStr] @@ -66,14 +48,6 @@ func (w *Worker) AddTxTracker(ctx context.Context, tx *TxTracker) (replacedTx *T // Unlock the worker to let execute other worker functions while creating the new AddrQueue w.workerMutex.Unlock() - // Wait until all pending transactions are stored, so we can ensure getting the correct nonce and balance of the new AddrQueue - w.pendingTxsToStoreMux.RLock() - pendingTxsTracker, ok := w.pendingTxsPerAddressTrackers[tx.From] - w.pendingTxsToStoreMux.RUnlock() - if ok && pendingTxsTracker.wg != nil { - pendingTxsTracker.wg.Wait() - } - root, err := w.state.GetLastStateRoot(ctx, nil) if err != nil { dropReason = fmt.Errorf("AddTx GetLastStateRoot error: %v", err) @@ -108,23 +82,25 @@ func (w *Worker) AddTxTracker(ctx context.Context, tx *TxTracker) (replacedTx *T newReadyTx, prevReadyTx, repTx, dropReason = addr.addTx(tx) if dropReason != nil { log.Infof("AddTx tx(%s) dropped from addrQueue(%s), reason: %s", tx.HashStr, tx.FromStr, dropReason.Error()) + w.workerMutex.Unlock() return repTx, dropReason } - // Update the EfficiencyList (if needed) + // Update the txSortedList (if needed) if prevReadyTx != nil { - log.Infof("AddTx prevReadyTx(%s) nonce(%d) cost(%s) deleted from EfficiencyList", prevReadyTx.HashStr, prevReadyTx.Nonce, prevReadyTx.Cost.String()) - w.efficiencyList.delete(prevReadyTx) + log.Infof("AddTx prevReadyTx(%s) nonce(%d) cost(%s) deleted from TxSortedList", prevReadyTx.HashStr, prevReadyTx.Nonce, prevReadyTx.Cost.String()) + w.txSortedList.delete(prevReadyTx) } if newReadyTx != nil { - log.Infof("AddTx newReadyTx(%s) nonce(%d) cost(%s) added to EfficiencyList", newReadyTx.HashStr, newReadyTx.Nonce, newReadyTx.Cost.String()) - w.efficiencyList.add(newReadyTx) + log.Infof("AddTx newReadyTx(%s) nonce(%d) cost(%s) added to TxSortedList", newReadyTx.HashStr, newReadyTx.Nonce, newReadyTx.Cost.String()) + w.txSortedList.add(newReadyTx) } if repTx != nil { log.Infof("AddTx replacedTx(%s) nonce(%d) cost(%s) has been replaced", repTx.HashStr, repTx.Nonce, repTx.Cost.String()) } + w.workerMutex.Unlock() return repTx, nil } @@ -134,14 +110,14 @@ func (w *Worker) applyAddressUpdate(from common.Address, fromNonce *uint64, from if found { newReadyTx, prevReadyTx, txsToDelete := addrQueue.updateCurrentNonceBalance(fromNonce, fromBalance) - // Update the EfficiencyList (if needed) + // Update the TxSortedList (if needed) if prevReadyTx != nil { - log.Infof("applyAddressUpdate prevReadyTx(%s) nonce(%d) cost(%s) deleted from EfficiencyList", prevReadyTx.Hash.String(), prevReadyTx.Nonce, prevReadyTx.Cost.String()) - w.efficiencyList.delete(prevReadyTx) + log.Infof("applyAddressUpdate prevReadyTx(%s) nonce(%d) cost(%s) deleted from TxSortedList", prevReadyTx.Hash.String(), prevReadyTx.Nonce, prevReadyTx.Cost.String()) + w.txSortedList.delete(prevReadyTx) } if newReadyTx != nil { - log.Infof("applyAddressUpdate newReadyTx(%s) nonce(%d) cost(%s) added to EfficiencyList", newReadyTx.Hash.String(), newReadyTx.Nonce, newReadyTx.Cost.String()) - w.efficiencyList.add(newReadyTx) + log.Infof("applyAddressUpdate newReadyTx(%s) nonce(%d) cost(%s) added to TxSortedList", newReadyTx.Hash.String(), newReadyTx.Nonce, newReadyTx.Cost.String()) + w.txSortedList.add(newReadyTx) } return newReadyTx, prevReadyTx, txsToDelete @@ -155,7 +131,7 @@ func (w *Worker) UpdateAfterSingleSuccessfulTxExecution(from common.Address, tou w.workerMutex.Lock() defer w.workerMutex.Unlock() if len(touchedAddresses) == 0 { - log.Errorf("UpdateAfterSingleSuccessfulTxExecution touchedAddresses is nil or empty") + log.Warnf("UpdateAfterSingleSuccessfulTxExecution touchedAddresses is nil or empty") } txsToDelete := make([]*TxTracker, 0) touchedFrom, found := touchedAddresses[from] @@ -163,7 +139,7 @@ func (w *Worker) UpdateAfterSingleSuccessfulTxExecution(from common.Address, tou fromNonce, fromBalance := touchedFrom.Nonce, touchedFrom.Balance _, _, txsToDelete = w.applyAddressUpdate(from, fromNonce, fromBalance) } else { - log.Errorf("UpdateAfterSingleSuccessfulTxExecution from(%s) not found in touchedAddresses", from.String()) + log.Warnf("UpdateAfterSingleSuccessfulTxExecution from(%s) not found in touchedAddresses", from.String()) } for addr, addressInfo := range touchedAddresses { @@ -189,7 +165,7 @@ func (w *Worker) MoveTxToNotReady(txHash common.Hash, from common.Address, actua if addrQueue.readyTx != nil { readyHashStr = addrQueue.readyTx.HashStr } - log.Errorf("MoveTxToNotReady txHash(%s) is not the readyTx(%s)", txHash.String(), readyHashStr) + log.Warnf("MoveTxToNotReady txHash(%s) is not the readyTx(%s)", txHash.String(), readyHashStr) } } _, _, txsToDelete := w.applyAddressUpdate(from, actualNonce, actualBalance) @@ -206,44 +182,63 @@ func (w *Worker) DeleteTx(txHash common.Hash, addr common.Address) { if found { deletedReadyTx := addrQueue.deleteTx(txHash) if deletedReadyTx != nil { - log.Infof("DeleteTx tx(%s) deleted from EfficiencyList", deletedReadyTx.Hash.String()) - w.efficiencyList.delete(deletedReadyTx) + log.Infof("DeleteTx tx(%s) deleted from TxSortedList", deletedReadyTx.Hash.String()) + w.txSortedList.delete(deletedReadyTx) } } else { - log.Errorf("DeleteTx addrQueue(%s) not found", addr.String()) + log.Warnf("DeleteTx addrQueue(%s) not found", addr.String()) } } -// UpdateTx updates the ZKCounter of a tx and resort the tx in the efficiency list if needed -func (w *Worker) UpdateTx(txHash common.Hash, addr common.Address, counters state.ZKCounters) { +// UpdateTxZKCounters updates the ZKCounter of a tx +func (w *Worker) UpdateTxZKCounters(txHash common.Hash, addr common.Address, counters state.ZKCounters) { w.workerMutex.Lock() defer w.workerMutex.Unlock() - log.Infof("UpdateTx tx(%s) addr(%s)", txHash.String(), addr.String()) - log.Debugf("UpdateTx counters.CumulativeGasUsed: %d", counters.CumulativeGasUsed) - log.Debugf("UpdateTx counters.UsedKeccakHashes: %d", counters.UsedKeccakHashes) - log.Debugf("UpdateTx counters.UsedPoseidonHashes: %d", counters.UsedPoseidonHashes) - log.Debugf("UpdateTx counters.UsedPoseidonPaddings: %d", counters.UsedPoseidonPaddings) - log.Debugf("UpdateTx counters.UsedMemAligns: %d", counters.UsedMemAligns) - log.Debugf("UpdateTx counters.UsedArithmetics: %d", counters.UsedArithmetics) - log.Debugf("UpdateTx counters.UsedBinaries: %d", counters.UsedBinaries) - log.Debugf("UpdateTx counters.UsedSteps: %d", counters.UsedSteps) + + log.Infof("UpdateTxZKCounters tx(%s) addr(%s)", txHash.String(), addr.String()) + log.Debugf("UpdateTxZKCounters counters.CumulativeGasUsed: %d", counters.CumulativeGasUsed) + log.Debugf("UpdateTxZKCounters counters.UsedKeccakHashes: %d", counters.UsedKeccakHashes) + log.Debugf("UpdateTxZKCounters counters.UsedPoseidonHashes: %d", counters.UsedPoseidonHashes) + log.Debugf("UpdateTxZKCounters counters.UsedPoseidonPaddings: %d", counters.UsedPoseidonPaddings) + log.Debugf("UpdateTxZKCounters counters.UsedMemAligns: %d", counters.UsedMemAligns) + log.Debugf("UpdateTxZKCounters counters.UsedArithmetics: %d", counters.UsedArithmetics) + log.Debugf("UpdateTxZKCounters counters.UsedBinaries: %d", counters.UsedBinaries) + log.Debugf("UpdateTxZKCounters counters.UsedSteps: %d", counters.UsedSteps) addrQueue, found := w.pool[addr.String()] if found { - newReadyTx, prevReadyTx := addrQueue.UpdateTxZKCounters(txHash, counters, w.batchConstraints, w.batchResourceWeights) + addrQueue.UpdateTxZKCounters(txHash, counters) + } else { + log.Warnf("UpdateTxZKCounters addrQueue(%s) not found", addr.String()) + } +} - // Resort the newReadyTx in efficiencyList - if prevReadyTx != nil { - log.Infof("UpdateTx prevReadyTx(%s) nonce(%d) cost(%s) deleted from EfficiencyList", prevReadyTx.Hash.String(), prevReadyTx.Nonce, prevReadyTx.Cost.String()) - w.efficiencyList.delete(prevReadyTx) - } - if newReadyTx != nil { - log.Infof("UpdateTx newReadyTx(%s) nonce(%d) cost(%s) added to EfficiencyList", newReadyTx.Hash.String(), newReadyTx.Nonce, newReadyTx.Cost.String()) - w.efficiencyList.add(newReadyTx) - } +// AddPendingTxToStore adds a tx to the addrQueue list of pending txs to store in the DB (trusted state) +func (w *Worker) AddPendingTxToStore(txHash common.Hash, addr common.Address) { + w.workerMutex.Lock() + defer w.workerMutex.Unlock() + + addrQueue, found := w.pool[addr.String()] + + if found { + addrQueue.addPendingTxToStore(txHash) + } else { + log.Warnf("AddPendingTxToStore addrQueue(%s) not found", addr.String()) + } +} + +// DeletePendingTxToStore delete a tx from the addrQueue list of pending txs to store in the DB (trusted state) +func (w *Worker) DeletePendingTxToStore(txHash common.Hash, addr common.Address) { + w.workerMutex.Lock() + defer w.workerMutex.Unlock() + + addrQueue, found := w.pool[addr.String()] + + if found { + addrQueue.deletePendingTxToStore(txHash) } else { - log.Errorf("UpdateTx addrQueue(%s) not found", addr.String()) + log.Warnf("DeletePendingTxToStore addrQueue(%s) not found", addr.String()) } } @@ -267,7 +262,7 @@ func (w *Worker) GetBestFittingTx(resources state.BatchResources) *TxTracker { for i := 0; i < nGoRoutines; i++ { go func(n int, bresources state.BatchResources) { defer wg.Done() - for i := n; i < w.efficiencyList.len(); i += nGoRoutines { + for i := n; i < w.txSortedList.len(); i += nGoRoutines { foundMutex.RLock() if foundAt != -1 && i > foundAt { foundMutex.RUnlock() @@ -275,7 +270,7 @@ func (w *Worker) GetBestFittingTx(resources state.BatchResources) *TxTracker { } foundMutex.RUnlock() - txCandidate := w.efficiencyList.getByIndex(i) + txCandidate := w.txSortedList.getByIndex(i) err := bresources.Sub(txCandidate.BatchResources) if err != nil { // We don't add this Tx @@ -296,7 +291,7 @@ func (w *Worker) GetBestFittingTx(resources state.BatchResources) *TxTracker { wg.Wait() if foundAt != -1 { - log.Infof("GetBestFittingTx found tx(%s) at index(%d) with efficiency(%f)", tx.Hash.String(), foundAt, tx.Efficiency) + log.Infof("GetBestFittingTx found tx(%s) at index(%d) with gasPrice(%d)", tx.Hash.String(), foundAt, tx.GasPrice) } else { log.Debugf("GetBestFittingTx no tx found") } @@ -317,7 +312,7 @@ func (w *Worker) ExpireTransactions(maxTime time.Duration) []*TxTracker { txs = append(txs, subTxs...) if prevReadyTx != nil { - w.efficiencyList.delete(prevReadyTx) + w.txSortedList.delete(prevReadyTx) } if addrQueue.IsEmpty() { @@ -329,28 +324,7 @@ func (w *Worker) ExpireTransactions(maxTime time.Duration) []*TxTracker { return txs } -// GetEfficiencyList returns the efficiency list -func (w *Worker) GetEfficiencyList() *efficiencyList { - return w.efficiencyList -} - // HandleL2Reorg handles the L2 reorg signal func (w *Worker) HandleL2Reorg(txHashes []common.Hash) { log.Fatal("L2 Reorg detected. Restarting to sync with the new L2 state...") } - -// convertBatchConstraintsToFloat64 converts the batch Constraints to float64 -func convertBatchConstraintsToFloat64(constraints batchConstraints) batchConstraintsFloat64 { - return batchConstraintsFloat64{ - maxTxsPerBatch: float64(constraints.MaxTxsPerBatch), - maxBatchBytesSize: float64(constraints.MaxBatchBytesSize), - maxCumulativeGasUsed: float64(constraints.MaxCumulativeGasUsed), - maxKeccakHashes: float64(constraints.MaxKeccakHashes), - maxPoseidonHashes: float64(constraints.MaxPoseidonHashes), - maxPoseidonPaddings: float64(constraints.MaxPoseidonPaddings), - maxMemAligns: float64(constraints.MaxMemAligns), - maxArithmetics: float64(constraints.MaxArithmetics), - maxBinaries: float64(constraints.MaxBinaries), - maxSteps: float64(constraints.MaxSteps), - } -} diff --git a/sequencer/worker_test.go b/sequencer/worker_test.go index 1d254984f5..79844d7bf5 100644 --- a/sequencer/worker_test.go +++ b/sequencer/worker_test.go @@ -2,33 +2,24 @@ package sequencer import ( "context" - "fmt" "math/big" - "sync" "testing" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" ) -var ( - workerCfg = WorkerCfg{ - ResourceCostMultiplier: 1000, - } -) - type workerAddTxTestCase struct { - name string - from common.Address - txHash common.Hash - nonce uint64 - // isClaim bool - benefit int64 - cost *big.Int - counters state.ZKCounters - usedBytes uint64 - expectedEfficiencyList []common.Hash + name string + from common.Address + txHash common.Hash + nonce uint64 + cost *big.Int + counters state.ZKCounters + usedBytes uint64 + gasPrice *big.Int + expectedTxSortedList []common.Hash } type workerAddrQueueInfo struct { @@ -37,43 +28,34 @@ type workerAddrQueueInfo struct { balance *big.Int } -func processWorkerAddTxTestCases(t *testing.T, worker *Worker, testCases []workerAddTxTestCase) { - totalWeight := float64(worker.batchResourceWeights.WeightArithmetics + - worker.batchResourceWeights.WeightBatchBytesSize + worker.batchResourceWeights.WeightBinaries + - worker.batchResourceWeights.WeightCumulativeGasUsed + worker.batchResourceWeights.WeightKeccakHashes + - worker.batchResourceWeights.WeightMemAligns + worker.batchResourceWeights.WeightPoseidonHashes + - worker.batchResourceWeights.WeightPoseidonPaddings + worker.batchResourceWeights.WeightSteps) - +func processWorkerAddTxTestCases(ctx context.Context, t *testing.T, worker *Worker, testCases []workerAddTxTestCase) { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { tx := TxTracker{} - tx.WeightMultipliers = calculateWeightMultipliers(worker.batchResourceWeights, totalWeight) - tx.Constraints = worker.batchConstraints - tx.ResourceCostMultiplier = worker.cfg.ResourceCostMultiplier tx.Hash = testCase.txHash tx.HashStr = testCase.txHash.String() tx.From = testCase.from tx.FromStr = testCase.from.String() tx.Nonce = testCase.nonce - tx.Benefit = new(big.Int).SetInt64(testCase.benefit) tx.Cost = testCase.cost tx.BatchResources.Bytes = testCase.usedBytes - tx.updateZKCounters(testCase.counters, worker.batchConstraints, worker.batchResourceWeights) - t.Logf("%s=%s", testCase.name, fmt.Sprintf("%.2f", tx.Efficiency)) + tx.GasPrice = testCase.gasPrice + tx.updateZKCounters(testCase.counters) + t.Logf("%s=%d", testCase.name, tx.GasPrice) _, err := worker.AddTxTracker(ctx, &tx) if err != nil { return } - el := worker.efficiencyList - if el.len() != len(testCase.expectedEfficiencyList) { - t.Fatalf("Error efficiencylist.len(%d) != expectedEfficiencyList.len(%d)", el.len(), len(testCase.expectedEfficiencyList)) + el := worker.txSortedList + if el.len() != len(testCase.expectedTxSortedList) { + t.Fatalf("Error txSortedList.len(%d) != expectedTxSortedList.len(%d)", el.len(), len(testCase.expectedTxSortedList)) } for i := 0; i < el.len(); i++ { - if el.getByIndex(i).HashStr != string(testCase.expectedEfficiencyList[i].String()) { - t.Fatalf("Error efficiencylist(%d). Expected=%s, Actual=%s", i, testCase.expectedEfficiencyList[i].String(), el.getByIndex(i).HashStr) + if el.getByIndex(i).HashStr != string(testCase.expectedTxSortedList[i].String()) { + t.Fatalf("Error txSortedList(%d). Expected=%s, Actual=%s", i, testCase.expectedTxSortedList[i].String(), el.getByIndex(i).HashStr) } } }) @@ -83,32 +65,8 @@ func processWorkerAddTxTestCases(t *testing.T, worker *Worker, testCases []worke func TestWorkerAddTx(t *testing.T) { var nilErr error - // Init ZKEVM resourceCostWeight values - rcWeigth := batchResourceWeights{} - rcWeigth.WeightCumulativeGasUsed = 1 - rcWeigth.WeightArithmetics = 1 - rcWeigth.WeightBinaries = 1 - rcWeigth.WeightKeccakHashes = 1 - rcWeigth.WeightMemAligns = 1 - rcWeigth.WeightPoseidonHashes = 1 - rcWeigth.WeightPoseidonPaddings = 1 - rcWeigth.WeightSteps = 1 - rcWeigth.WeightBatchBytesSize = 2 - - // Init ZKEVM resourceCostMax values - rcMax := batchConstraints{} - rcMax.MaxCumulativeGasUsed = 10 - rcMax.MaxArithmetics = 10 - rcMax.MaxBinaries = 10 - rcMax.MaxKeccakHashes = 10 - rcMax.MaxMemAligns = 10 - rcMax.MaxPoseidonHashes = 10 - rcMax.MaxPoseidonPaddings = 10 - rcMax.MaxSteps = 10 - rcMax.MaxBatchBytesSize = 10 - stateMock := NewStateMock(t) - worker := initWorker(stateMock, rcMax, rcWeigth) + worker := initWorker(stateMock) ctx := context.Background() @@ -128,98 +86,65 @@ func TestWorkerAddTx(t *testing.T) { addTxsTC := []workerAddTxTestCase{ { - name: "Adding from:0x01, tx:0x01/ef:10", from: common.Address{1}, txHash: common.Hash{1}, nonce: 1, - benefit: 1000, cost: new(big.Int).SetInt64(5), + name: "Adding from:0x01, tx:0x01/gp:10", from: common.Address{1}, txHash: common.Hash{1}, nonce: 1, gasPrice: new(big.Int).SetInt64(10), + cost: new(big.Int).SetInt64(5), counters: state.ZKCounters{CumulativeGasUsed: 1, UsedKeccakHashes: 1, UsedPoseidonHashes: 1, UsedPoseidonPaddings: 1, UsedMemAligns: 1, UsedArithmetics: 1, UsedBinaries: 1, UsedSteps: 1}, usedBytes: 1, - expectedEfficiencyList: []common.Hash{ + expectedTxSortedList: []common.Hash{ {1}, }, }, { - name: "Adding from:0x02, tx:0x02/ef:20", from: common.Address{2}, txHash: common.Hash{2}, nonce: 1, - benefit: 2000, cost: new(big.Int).SetInt64(5), + name: "Adding from:0x02, tx:0x02/gp:4", from: common.Address{2}, txHash: common.Hash{2}, nonce: 1, gasPrice: new(big.Int).SetInt64(4), + cost: new(big.Int).SetInt64(5), counters: state.ZKCounters{CumulativeGasUsed: 1, UsedKeccakHashes: 1, UsedPoseidonHashes: 1, UsedPoseidonPaddings: 1, UsedMemAligns: 1, UsedArithmetics: 1, UsedBinaries: 1, UsedSteps: 1}, usedBytes: 1, - expectedEfficiencyList: []common.Hash{ - {2}, {1}, + expectedTxSortedList: []common.Hash{ + {1}, {2}, }, }, { - name: "Readding from:0x02, tx:0x02/ef:4", from: common.Address{2}, txHash: common.Hash{2}, nonce: 1, - benefit: 2000, cost: new(big.Int).SetInt64(5), + name: "Readding from:0x02, tx:0x02/gp:20", from: common.Address{2}, txHash: common.Hash{2}, nonce: 1, gasPrice: new(big.Int).SetInt64(20), + cost: new(big.Int).SetInt64(5), counters: state.ZKCounters{CumulativeGasUsed: 5, UsedKeccakHashes: 5, UsedPoseidonHashes: 5, UsedPoseidonPaddings: 5, UsedMemAligns: 5, UsedArithmetics: 5, UsedBinaries: 5, UsedSteps: 5}, usedBytes: 5, - expectedEfficiencyList: []common.Hash{ - {1}, {2}, + expectedTxSortedList: []common.Hash{ + {2}, {1}, }, }, { - name: "Readding from:0x03, tx:0x03/ef:25", from: common.Address{3}, txHash: common.Hash{3}, nonce: 1, - benefit: 5000, cost: new(big.Int).SetInt64(5), + name: "Readding from:0x03, tx:0x03/gp:25", from: common.Address{3}, txHash: common.Hash{3}, nonce: 1, gasPrice: new(big.Int).SetInt64(25), + cost: new(big.Int).SetInt64(5), counters: state.ZKCounters{CumulativeGasUsed: 2, UsedKeccakHashes: 2, UsedPoseidonHashes: 2, UsedPoseidonPaddings: 2, UsedMemAligns: 2, UsedArithmetics: 2, UsedBinaries: 2, UsedSteps: 2}, usedBytes: 2, - expectedEfficiencyList: []common.Hash{ - {3}, {1}, {2}, + expectedTxSortedList: []common.Hash{ + {3}, {2}, {1}, }, }, - } - - processWorkerAddTxTestCases(t, worker, addTxsTC) - - // Change counters fpr tx:0x03/ef:9.61 - counters := state.ZKCounters{CumulativeGasUsed: 6, UsedKeccakHashes: 6, UsedPoseidonHashes: 6, UsedPoseidonPaddings: 6, UsedMemAligns: 6, UsedArithmetics: 6, UsedBinaries: 6, UsedSteps: 6} - worker.UpdateTx(common.Hash{3}, common.Address{3}, counters) - - addTxsTC = []workerAddTxTestCase{ { - name: "Adding from:0x04, tx:0x04/ef:100", from: common.Address{4}, txHash: common.Hash{4}, nonce: 1, - benefit: 10000, cost: new(big.Int).SetInt64(5), + name: "Adding from:0x04, tx:0x04/gp:100", from: common.Address{4}, txHash: common.Hash{4}, nonce: 1, gasPrice: new(big.Int).SetInt64(100), + cost: new(big.Int).SetInt64(5), counters: state.ZKCounters{CumulativeGasUsed: 1, UsedKeccakHashes: 1, UsedPoseidonHashes: 1, UsedPoseidonPaddings: 1, UsedMemAligns: 1, UsedArithmetics: 1, UsedBinaries: 1, UsedSteps: 1}, usedBytes: 1, - expectedEfficiencyList: []common.Hash{ - {4}, {1}, {3}, {2}, + expectedTxSortedList: []common.Hash{ + {4}, {3}, {2}, {1}, }, }, } - processWorkerAddTxTestCases(t, worker, addTxsTC) + processWorkerAddTxTestCases(ctx, t, worker, addTxsTC) } func TestWorkerGetBestTx(t *testing.T) { var nilErr error - // Init ZKEVM resourceCostWeight values - rcWeight := batchResourceWeights{} - rcWeight.WeightCumulativeGasUsed = 1 - rcWeight.WeightArithmetics = 1 - rcWeight.WeightBinaries = 1 - rcWeight.WeightKeccakHashes = 1 - rcWeight.WeightMemAligns = 1 - rcWeight.WeightPoseidonHashes = 1 - rcWeight.WeightPoseidonPaddings = 1 - rcWeight.WeightSteps = 1 - rcWeight.WeightBatchBytesSize = 2 - - // Init ZKEVM resourceCostMax values - rcMax := batchConstraints{} - rcMax.MaxCumulativeGasUsed = 10 - rcMax.MaxArithmetics = 10 - rcMax.MaxBinaries = 10 - rcMax.MaxKeccakHashes = 10 - rcMax.MaxMemAligns = 10 - rcMax.MaxPoseidonHashes = 10 - rcMax.MaxPoseidonPaddings = 10 - rcMax.MaxSteps = 10 - rcMax.MaxBatchBytesSize = 10 - rc := state.BatchResources{ ZKCounters: state.ZKCounters{CumulativeGasUsed: 10, UsedKeccakHashes: 10, UsedPoseidonHashes: 10, UsedPoseidonPaddings: 10, UsedMemAligns: 10, UsedArithmetics: 10, UsedBinaries: 10, UsedSteps: 10}, Bytes: 10, } stateMock := NewStateMock(t) - worker := initWorker(stateMock, rcMax, rcWeight) + worker := initWorker(stateMock) ctx := context.Background() @@ -239,44 +164,44 @@ func TestWorkerGetBestTx(t *testing.T) { addTxsTC := []workerAddTxTestCase{ { - name: "Adding from:0x01, tx:0x01/ef:10", from: common.Address{1}, txHash: common.Hash{1}, nonce: 1, - benefit: 1000, cost: new(big.Int).SetInt64(5), + name: "Adding from:0x01, tx:0x01/gp:10", from: common.Address{1}, txHash: common.Hash{1}, nonce: 1, gasPrice: new(big.Int).SetInt64(10), + cost: new(big.Int).SetInt64(5), counters: state.ZKCounters{CumulativeGasUsed: 1, UsedKeccakHashes: 1, UsedPoseidonHashes: 1, UsedPoseidonPaddings: 1, UsedMemAligns: 1, UsedArithmetics: 1, UsedBinaries: 1, UsedSteps: 1}, usedBytes: 1, - expectedEfficiencyList: []common.Hash{ + expectedTxSortedList: []common.Hash{ {1}, }, }, { - name: "Adding from:0x02, tx:0x02/ef:12", from: common.Address{2}, txHash: common.Hash{2}, nonce: 1, - benefit: 6000, cost: new(big.Int).SetInt64(5), + name: "Adding from:0x02, tx:0x02/gp:12", from: common.Address{2}, txHash: common.Hash{2}, nonce: 1, gasPrice: new(big.Int).SetInt64(12), + cost: new(big.Int).SetInt64(5), counters: state.ZKCounters{CumulativeGasUsed: 5, UsedKeccakHashes: 5, UsedPoseidonHashes: 5, UsedPoseidonPaddings: 5, UsedMemAligns: 5, UsedArithmetics: 5, UsedBinaries: 5, UsedSteps: 5}, usedBytes: 5, - expectedEfficiencyList: []common.Hash{ + expectedTxSortedList: []common.Hash{ {2}, {1}, }, }, { - name: "Readding from:0x03, tx:0x03/ef:25", from: common.Address{3}, txHash: common.Hash{3}, nonce: 1, - benefit: 5000, cost: new(big.Int).SetInt64(5), + name: "Readding from:0x03, tx:0x03/gp:25", from: common.Address{3}, txHash: common.Hash{3}, nonce: 1, gasPrice: new(big.Int).SetInt64(25), + cost: new(big.Int).SetInt64(5), counters: state.ZKCounters{CumulativeGasUsed: 2, UsedKeccakHashes: 2, UsedPoseidonHashes: 2, UsedPoseidonPaddings: 2, UsedMemAligns: 2, UsedArithmetics: 2, UsedBinaries: 2, UsedSteps: 2}, usedBytes: 2, - expectedEfficiencyList: []common.Hash{ + expectedTxSortedList: []common.Hash{ {3}, {2}, {1}, }, }, { - name: "Adding from:0x04, tx:0x04/ef:100", from: common.Address{4}, txHash: common.Hash{4}, nonce: 1, - benefit: 40000, cost: new(big.Int).SetInt64(5), + name: "Adding from:0x04, tx:0x04/gp:100", from: common.Address{4}, txHash: common.Hash{4}, nonce: 1, gasPrice: new(big.Int).SetInt64(100), + cost: new(big.Int).SetInt64(5), counters: state.ZKCounters{CumulativeGasUsed: 4, UsedKeccakHashes: 4, UsedPoseidonHashes: 4, UsedPoseidonPaddings: 4, UsedMemAligns: 4, UsedArithmetics: 4, UsedBinaries: 4, UsedSteps: 4}, usedBytes: 4, - expectedEfficiencyList: []common.Hash{ + expectedTxSortedList: []common.Hash{ {4}, {3}, {2}, {1}, }, }, } - processWorkerAddTxTestCases(t, worker, addTxsTC) + processWorkerAddTxTestCases(ctx, t, worker, addTxsTC) expectedGetBestTx := []common.Hash{{4}, {3}, {1}} ct := 0 @@ -307,10 +232,7 @@ func TestWorkerGetBestTx(t *testing.T) { } } -func initWorker(stateMock *StateMock, rcMax batchConstraints, rcWeigth batchResourceWeights) *Worker { - pendingTxsToStoreMux := new(sync.RWMutex) - pendingTxsPerAddressTrackers := make(map[common.Address]*pendingTxPerAddressTracker) - worker := NewWorker(workerCfg, stateMock, rcMax, rcWeigth, pendingTxsToStoreMux, pendingTxsPerAddressTrackers) - +func initWorker(stateMock *StateMock) *Worker { + worker := NewWorker(stateMock) return worker } diff --git a/sequencesender/config.go b/sequencesender/config.go index c6e062dfb5..a77b495f4c 100644 --- a/sequencesender/config.go +++ b/sequencesender/config.go @@ -1,7 +1,8 @@ package sequencesender import ( - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/ethereum/go-ethereum/common" ) // Config represents the configuration of a sequence sender @@ -11,17 +12,16 @@ type Config struct { WaitPeriodSendSequence types.Duration `mapstructure:"WaitPeriodSendSequence"` // LastBatchVirtualizationTimeMaxWaitPeriod is time since sequences should be sent LastBatchVirtualizationTimeMaxWaitPeriod types.Duration `mapstructure:"LastBatchVirtualizationTimeMaxWaitPeriod"` - // MaxTxSizeForL1 is the maximum size a single transaction can have. This field has - // non-trivial consequences: larger transactions than 128KB are significantly harder and - // more expensive to propagate; larger transactions also take more resources - // to validate whether they fit into the pool or not. - MaxTxSizeForL1 uint64 `mapstructure:"MaxTxSizeForL1"` + // MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx + MaxBatchesForL1 uint64 `mapstructure:"MaxBatchesForL1"` // SenderAddress defines which private key the eth tx manager needs to use // to sign the L1 txs - SenderAddress string `mapstructure:"SenderAddress"` - // PrivateKeys defines all the key store files that are going + SenderAddress common.Address + // L2Coinbase defines which addess is going to receive the fees + L2Coinbase common.Address `mapstructure:"L2Coinbase"` + // PrivateKey defines all the key store files that are going // to be read in order to provide the private keys to sign the L1 txs - PrivateKeys []types.KeystoreFileConfig `mapstructure:"PrivateKeys"` + PrivateKey types.KeystoreFileConfig `mapstructure:"PrivateKey"` // Batch number where there is a forkid change (fork upgrade) ForkUpgradeBatchNumber uint64 } diff --git a/sequencesender/datacommittee.go b/sequencesender/datacommittee.go new file mode 100644 index 0000000000..54f3d83a06 --- /dev/null +++ b/sequencesender/datacommittee.go @@ -0,0 +1,151 @@ +package sequencesender + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "github.com/0xPolygon/cdk-data-availability/batch" + "github.com/0xPolygon/cdk-data-availability/client" + "github.com/0xPolygon/cdk-data-availability/sequence" + ethman "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/etherman/types" + jTypes "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/ethereum/go-ethereum/common" +) + +type signatureMsg struct { + addr common.Address + signature []byte + err error +} + +func (s *SequenceSender) getSignaturesAndAddrsFromDataCommittee(ctx context.Context, sequences []types.Sequence) ([]byte, error) { + // Get current committee + committee, err := s.etherman.GetCurrentDataCommittee() + if err != nil { + return nil, err + } + + // Get last accInputHash + var accInputHash common.Hash + if sequences[0].BatchNumber != 0 { + prevBatch, err := s.state.GetBatchByNumber(ctx, sequences[0].BatchNumber-1, nil) + if err != nil { + return nil, err + } + accInputHash = prevBatch.AccInputHash + } + + // Authenticate as trusted sequencer by signing the sequences + sequence := sequence.Sequence{ + Batches: []batch.Batch{}, + OldAccInputHash: accInputHash, + } + for _, seq := range sequences { + sequence.Batches = append(sequence.Batches, batch.Batch{ + Number: jTypes.ArgUint64(seq.BatchNumber), + GlobalExitRoot: seq.GlobalExitRoot, + Timestamp: jTypes.ArgUint64(seq.Timestamp), + Coinbase: s.cfg.L2Coinbase, + L2Data: seq.BatchL2Data, + }) + } + signedSequence, err := sequence.Sign(s.privKey) + if err != nil { + return nil, err + } + + // Request signatures to all members in parallel + ch := make(chan signatureMsg, len(committee.Members)) + signatureCtx, cancelSignatureCollection := context.WithCancel(ctx) + for _, member := range committee.Members { + go requestSignatureFromMember(signatureCtx, *signedSequence, member, ch) + } + + // Collect signatures + msgs := []signatureMsg{} + var collectedSignatures uint64 + var failedToCollect uint64 + for collectedSignatures < committee.RequiredSignatures { + msg := <-ch + if msg.err != nil { + log.Errorf("error when trying to get signature from %s: %s", msg.addr, msg.err) + failedToCollect++ + if len(committee.Members)-int(failedToCollect) < int(committee.RequiredSignatures) { + cancelSignatureCollection() + return nil, errors.New("too many members failed to send their signature") + } + } else { + log.Infof("received signature from %s", msg.addr) + collectedSignatures++ + } + msgs = append(msgs, msg) + } + + // Stop requesting as soon as we have N valid signatures + cancelSignatureCollection() + + return buildSignaturesAndAddrs(signatureMsgs(msgs), committee.Members), nil +} + +func requestSignatureFromMember(ctx context.Context, signedSequence sequence.SignedSequence, member ethman.DataCommitteeMember, ch chan signatureMsg) { + // request + c := client.New(member.URL) + log.Infof("sending request to sign the sequence to %s at %s", member.Addr.Hex(), member.URL) + signature, err := c.SignSequence(signedSequence) + if err != nil { + ch <- signatureMsg{ + addr: member.Addr, + err: err, + } + return + } + // verify returned signature + signedSequence.Signature = signature + signer, err := signedSequence.Signer() + if err != nil { + ch <- signatureMsg{ + addr: member.Addr, + err: err, + } + return + } + if signer != member.Addr { + ch <- signatureMsg{ + addr: member.Addr, + err: fmt.Errorf("invalid signer. Expected %s, actual %s", member.Addr.Hex(), signer.Hex()), + } + return + } + ch <- signatureMsg{ + addr: member.Addr, + signature: signature, + } +} + +func buildSignaturesAndAddrs(msgs signatureMsgs, members []ethman.DataCommitteeMember) []byte { + res := []byte{} + sort.Sort(msgs) + for _, msg := range msgs { + log.Debugf("adding signature %s from %s", common.Bytes2Hex(msg.signature), msg.addr.Hex()) + res = append(res, msg.signature...) + } + for _, member := range members { + log.Debugf("adding addr %s", common.Bytes2Hex(member.Addr.Bytes())) + res = append(res, member.Addr.Bytes()...) + } + log.Debugf("full res %s", common.Bytes2Hex(res)) + return res +} + +type signatureMsgs []signatureMsg + +func (s signatureMsgs) Len() int { return len(s) } +func (s signatureMsgs) Less(i, j int) bool { + return strings.ToUpper(s[i].addr.Hex()) < strings.ToUpper(s[j].addr.Hex()) +} +func (s signatureMsgs) Swap(i, j int) { s[i], s[j] = s[j], s[i] } diff --git a/sequencesender/interfaces.go b/sequencesender/interfaces.go index d203e13c29..6adc72b1b1 100644 --- a/sequencesender/interfaces.go +++ b/sequencesender/interfaces.go @@ -5,9 +5,10 @@ import ( "math/big" "time" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/state" + theEtherman "github.com/0xPolygon/cdk-validium-node/etherman" + ethmanTypes "github.com/0xPolygon/cdk-validium-node/etherman/types" + "github.com/0xPolygon/cdk-validium-node/ethtxmanager" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -17,11 +18,12 @@ import ( // etherman contains the methods required to interact with ethereum. type etherman interface { - BuildSequenceBatchesTxData(sender common.Address, sequences []ethmanTypes.Sequence) (to *common.Address, data []byte, err error) - EstimateGasSequenceBatches(sender common.Address, sequences []ethmanTypes.Sequence) (*types.Transaction, error) + BuildSequenceBatchesTxData(sender common.Address, sequences []ethmanTypes.Sequence, l2Coinbase common.Address, committeeSignaturesAndAddrs []byte) (to *common.Address, data []byte, err error) + EstimateGasSequenceBatches(sender common.Address, sequences []ethmanTypes.Sequence, l2Coinbase common.Address, committeeSignaturesAndAddrs []byte) (*types.Transaction, error) GetLastBatchTimestamp() (uint64, error) GetLatestBlockTimestamp(ctx context.Context) (uint64, error) GetLatestBatchNumber() (uint64, error) + GetCurrentDataCommittee() (*theEtherman.DataCommittee, error) } // stateInterface gathers the methods required to interact with the state. diff --git a/sequencesender/sequencesender.go b/sequencesender/sequencesender.go index 321623bba5..68d3e7d10b 100644 --- a/sequencesender/sequencesender.go +++ b/sequencesender/sequencesender.go @@ -2,19 +2,18 @@ package sequencesender import ( "context" + "crypto/ecdsa" "errors" "fmt" "time" - ethman "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/sequencer/metrics" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/etherman/types" + "github.com/0xPolygon/cdk-validium-node/ethtxmanager" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/sequencer/metrics" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" - ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" ) @@ -33,6 +32,7 @@ var ( // SequenceSender represents a sequence sender type SequenceSender struct { cfg Config + privKey *ecdsa.PrivateKey state stateInterface ethTxManager ethTxManager etherman etherman @@ -40,13 +40,14 @@ type SequenceSender struct { } // New inits sequence sender -func New(cfg Config, state stateInterface, etherman etherman, manager ethTxManager, eventLog *event.EventLog) (*SequenceSender, error) { +func New(cfg Config, state stateInterface, etherman etherman, manager ethTxManager, eventLog *event.EventLog, privKey *ecdsa.PrivateKey) (*SequenceSender, error) { return &SequenceSender{ cfg: cfg, state: state, etherman: etherman, ethTxManager: manager, eventLog: eventLog, + privKey: privKey, }, nil } @@ -108,8 +109,13 @@ func (s *SequenceSender) tryToSendSequence(ctx context.Context, ticker *time.Tic metrics.SequencesSentToL1(float64(sequenceCount)) // add sequence to be monitored - sender := common.HexToAddress(s.cfg.SenderAddress) - to, data, err := s.etherman.BuildSequenceBatchesTxData(sender, sequences) + signaturesAndAddrs, err := s.getSignaturesAndAddrsFromDataCommittee(ctx, sequences) + if err != nil { + log.Error("error getting signatures and addresses from the data committee: ", err) + return + } + to, data, err := s.etherman.BuildSequenceBatchesTxData(s.cfg.SenderAddress, sequences, s.cfg.L2Coinbase, signaturesAndAddrs) + log.Warnf("to %s, data: %s", to, common.Bytes2Hex(data)) if err != nil { log.Error("error estimating new sequenceBatches to add to eth tx manager: ", err) return @@ -117,7 +123,7 @@ func (s *SequenceSender) tryToSendSequence(ctx context.Context, ticker *time.Tic firstSequence := sequences[0] lastSequence := sequences[len(sequences)-1] monitoredTxID := fmt.Sprintf(monitoredIDFormat, firstSequence.BatchNumber, lastSequence.BatchNumber) - err = s.ethTxManager.Add(ctx, ethTxManagerOwner, monitoredTxID, sender, to, nil, data, nil) + err = s.ethTxManager.Add(ctx, ethTxManagerOwner, monitoredTxID, s.cfg.SenderAddress, to, nil, data, nil) if err != nil { log.Error("error to add sequences tx to eth tx manager: ", err) return @@ -137,7 +143,7 @@ func (s *SequenceSender) getSequencesToSend(ctx context.Context) ([]types.Sequen sequences := []types.Sequence{} // var estimatedGas uint64 - var tx *ethTypes.Transaction + // var tx *ethTypes.Transaction // Add sequences until too big for a single L1 tx or last batch is reached for { @@ -178,29 +184,11 @@ func (s *SequenceSender) getSequencesToSend(ctx context.Context) ([]types.Sequen } sequences = append(sequences, seq) - // Check if can be send - sender := common.HexToAddress(s.cfg.SenderAddress) - tx, err = s.etherman.EstimateGasSequenceBatches(sender, sequences) - if err == nil && tx.Size() > s.cfg.MaxTxSizeForL1 { - metrics.SequencesOvesizedDataError() - log.Infof("oversized Data on TX oldHash %s (txSize %d > %d)", tx.Hash(), tx.Size(), s.cfg.MaxTxSizeForL1) - err = ErrOversizedData - } - if err != nil { - log.Infof("Handling estimage gas send sequence error: %v", err) - sequences, err = s.handleEstimateGasSendSequenceErr(ctx, sequences, currentBatchNumToSequence, err) - if sequences != nil { - // Handling the error gracefully, re-processing the sequence as a sanity check - _, err = s.etherman.EstimateGasSequenceBatches(sender, sequences) - return sequences, err - } - return sequences, err - } - // estimatedGas = tx.Gas() - - //Check if the current batch is the last before a change to a new forkid, in this case we need to close and send the sequence to L1 - if (s.cfg.ForkUpgradeBatchNumber != 0) && (currentBatchNumToSequence == (s.cfg.ForkUpgradeBatchNumber)) { - log.Info("sequence should be sent to L1, as we have reached the batch %d from which a new forkid is applied (upgrade)", s.cfg.ForkUpgradeBatchNumber) + if len(sequences) == int(s.cfg.MaxBatchesForL1) { + log.Info( + "sequence should be sent to L1, because MaxBatchesForL1 (%d) has been reached", + s.cfg.MaxBatchesForL1, + ) return sequences, nil } @@ -231,78 +219,6 @@ func (s *SequenceSender) getSequencesToSend(ctx context.Context) ([]types.Sequen return nil, nil } -// handleEstimateGasSendSequenceErr handles an error on the estimate gas. It will return: -// nil, error: impossible to handle gracefully -// sequence, nil: handled gracefully. Potentially manipulating the sequences -// nil, nil: a situation that requires waiting -func (s *SequenceSender) handleEstimateGasSendSequenceErr( - ctx context.Context, - sequences []types.Sequence, - currentBatchNumToSequence uint64, - err error, -) ([]types.Sequence, error) { - // Insufficient allowance - if errors.Is(err, ethman.ErrInsufficientAllowance) { - return nil, err - } - if isDataForEthTxTooBig(err) { - // Remove the latest item and send the sequences - log.Infof( - "Done building sequences, selected batches to %d. Batch %d caused the L1 tx to be too big", - currentBatchNumToSequence-1, currentBatchNumToSequence, - ) - sequences = sequences[:len(sequences)-1] - return sequences, nil - } - - // while estimating gas a new block is not created and the POE SC may return - // an error regarding timestamp verification, this must be handled - if errors.Is(err, ethman.ErrTimestampMustBeInsideRange) { - // query the sc about the value of its lastTimestamp variable - lastTimestamp, err := s.etherman.GetLastBatchTimestamp() - if err != nil { - return nil, err - } - // check POE SC lastTimestamp against sequences' one - for _, seq := range sequences { - if seq.Timestamp < int64(lastTimestamp) { - // TODO: gracefully handle this situation by creating an L2 reorg - log.Fatalf("sequence timestamp %d is < POE SC lastTimestamp %d", seq.Timestamp, lastTimestamp) - } - lastTimestamp = uint64(seq.Timestamp) - } - blockTimestamp, err := s.etherman.GetLatestBlockTimestamp(ctx) - if err != nil { - log.Error("error getting block timestamp: ", err) - } - log.Debugf("block.timestamp: %d is smaller than seq.Timestamp: %d. A new block must be mined in L1 before the gas can be estimated.", blockTimestamp, sequences[0].Timestamp) - return nil, nil - } - - // Unknown error - if len(sequences) == 1 { - // TODO: gracefully handle this situation by creating an L2 reorg - log.Errorf( - "Error when estimating gas for BatchNum %d (alone in the sequences): %v", - currentBatchNumToSequence, err, - ) - } - // Remove the latest item and send the sequences - log.Infof( - "Done building sequences, selected batches to %d. Batch %d excluded due to unknown error: %v", - currentBatchNumToSequence, currentBatchNumToSequence+1, err, - ) - sequences = sequences[:len(sequences)-1] - - return sequences, nil -} - -func isDataForEthTxTooBig(err error) bool { - return errors.Is(err, ethman.ErrGasRequiredExceedsAllowance) || - errors.Is(err, ErrOversizedData) || - errors.Is(err, ethman.ErrContentLengthTooLarge) -} - func waitTick(ctx context.Context, ticker *time.Ticker) { select { case <-ticker.C: diff --git a/state/batch.go b/state/batch.go index e1a97d728c..c6f70c7239 100644 --- a/state/batch.go +++ b/state/batch.go @@ -6,10 +6,10 @@ import ( "fmt" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -44,6 +44,7 @@ type ProcessingContext struct { Timestamp time.Time GlobalExitRoot common.Hash ForcedBatchNum *uint64 + BatchL2Data *[]byte } // ClosingReason represents the reason why a batch is closed. diff --git a/state/config.go b/state/config.go index 62cae08c93..46d4f1c27f 100644 --- a/state/config.go +++ b/state/config.go @@ -1,6 +1,6 @@ package state -import "github.com/0xPolygonHermez/zkevm-node/config/types" +import "github.com/0xPolygon/cdk-validium-node/config/types" // Config is state config type Config struct { diff --git a/state/converters.go b/state/converters.go index 9881d78567..4d960f2841 100644 --- a/state/converters.go +++ b/state/converters.go @@ -6,13 +6,13 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/state/fakedb.go b/state/fakedb.go index f204f8b9b3..63f24b3905 100644 --- a/state/fakedb.go +++ b/state/fakedb.go @@ -4,7 +4,7 @@ import ( "context" "math/big" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" diff --git a/state/forkid.go b/state/forkid.go index 9abd6224d8..31a3c21015 100644 --- a/state/forkid.go +++ b/state/forkid.go @@ -1,6 +1,6 @@ package state -import "github.com/0xPolygonHermez/zkevm-node/log" +import "github.com/0xPolygon/cdk-validium-node/log" // ForkIDInterval is a fork id interval type ForkIDInterval struct { diff --git a/state/genesis.go b/state/genesis.go index e48a89a3b6..6664f83c8c 100644 --- a/state/genesis.go +++ b/state/genesis.go @@ -5,13 +5,14 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/trie" + "github.com/google/uuid" "github.com/jackc/pgx/v4" ) @@ -50,6 +51,8 @@ func (s *State) SetGenesis(ctx context.Context, block Block, genesis Genesis, db return newRoot, ErrStateTreeNil } + uuid := uuid.New().String() + for _, action := range genesis.GenesisActions { address := common.HexToAddress(action.Address) switch action.Type { @@ -58,7 +61,7 @@ func (s *State) SetGenesis(ctx context.Context, block Block, genesis Genesis, db if err != nil { return newRoot, err } - newRoot, _, err = s.tree.SetBalance(ctx, address, balance, newRoot) + newRoot, _, err = s.tree.SetBalance(ctx, address, balance, newRoot, uuid) if err != nil { return newRoot, err } @@ -67,7 +70,7 @@ func (s *State) SetGenesis(ctx context.Context, block Block, genesis Genesis, db if err != nil { return newRoot, err } - newRoot, _, err = s.tree.SetNonce(ctx, address, nonce, newRoot) + newRoot, _, err = s.tree.SetNonce(ctx, address, nonce, newRoot, uuid) if err != nil { return newRoot, err } @@ -76,7 +79,7 @@ func (s *State) SetGenesis(ctx context.Context, block Block, genesis Genesis, db if err != nil { return newRoot, fmt.Errorf("could not decode SC bytecode for address %q: %v", address, err) } - newRoot, _, err = s.tree.SetCode(ctx, address, code, newRoot) + newRoot, _, err = s.tree.SetCode(ctx, address, code, newRoot, uuid) if err != nil { return newRoot, err } @@ -91,7 +94,7 @@ func (s *State) SetGenesis(ctx context.Context, block Block, genesis Genesis, db return newRoot, err } // Store - newRoot, _, err = s.tree.SetStorageAt(ctx, address, positionBI, valueBI, newRoot) + newRoot, _, err = s.tree.SetStorageAt(ctx, address, positionBI, valueBI, newRoot, uuid) if err != nil { return newRoot, err } @@ -105,7 +108,7 @@ func (s *State) SetGenesis(ctx context.Context, block Block, genesis Genesis, db root.SetBytes(newRoot) // flush state db - err = s.tree.Flush(ctx) + err = s.tree.Flush(ctx, uuid) if err != nil { log.Errorf("error flushing state tree after genesis: %v", err) return newRoot, err diff --git a/state/genesis_test.go b/state/genesis_test.go index 1010515912..fe06baa968 100644 --- a/state/genesis_test.go +++ b/state/genesis_test.go @@ -11,9 +11,9 @@ import ( "runtime" "testing" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/tools/genesis/genesisparser" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/tools/genesis/genesisparser" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/state/helper.go b/state/helper.go index b009047555..772c8ee3c2 100644 --- a/state/helper.go +++ b/state/helper.go @@ -6,8 +6,8 @@ import ( "sort" "strconv" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" ) diff --git a/state/helper_test.go b/state/helper_test.go index 2f4e1f62f7..543d10f99f 100644 --- a/state/helper_test.go +++ b/state/helper_test.go @@ -6,8 +6,8 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/assert" diff --git a/state/l2block.go b/state/l2block.go index 3d6021717c..238dcb0f8f 100644 --- a/state/l2block.go +++ b/state/l2block.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/state/metrics/metrics.go b/state/metrics/metrics.go index 43daf73450..4f17adb12c 100644 --- a/state/metrics/metrics.go +++ b/state/metrics/metrics.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/cdk-validium-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/state/pgstatestorage.go b/state/pgstatestorage.go index e0fc51105f..4aa11daa04 100644 --- a/state/pgstatestorage.go +++ b/state/pgstatestorage.go @@ -8,7 +8,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/cdk-validium-node/hex" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -474,7 +474,7 @@ func (p *PostgresStorage) GetLastNBatchesByL2BlockNumber(ctx context.Context, l2 l2BlockStateRoot = _l2BlockStateRoot } // if there is no corresponding l2_block, it will use the latest batch state_root - // it is related to https://github.com/0xPolygonHermez/zkevm-node/issues/1299 + // it is related to https://github.com/0xPolygon/cdk-validium-node/issues/1299 if l2BlockStateRoot == nil && batch.StateRoot != emptyHash { l2BlockStateRoot = &batch.StateRoot } @@ -585,6 +585,21 @@ func (p *PostgresStorage) GetBatchByNumber(ctx context.Context, batchNumber uint return &batch, nil } +// GetBatchL2DataByNumber returns the batch L2 data of the given batch number. +func (p *PostgresStorage) GetBatchL2DataByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]byte, error) { + getBatchL2DataByBatchNumber := "SELECT raw_txs_data FROM state.batch WHERE batch_num = $1" + q := p.getExecQuerier(dbTx) + var batchL2Data []byte + err := q.QueryRow(ctx, getBatchL2DataByBatchNumber, batchNumber).Scan(&batchL2Data) + + if errors.Is(err, pgx.ErrNoRows) { + return nil, ErrNotFound + } else if err != nil { + return nil, err + } + return batchL2Data, nil +} + // GetBatchByTxHash returns the batch including the given tx func (p *PostgresStorage) GetBatchByTxHash(ctx context.Context, transactionHash common.Hash, dbTx pgx.Tx) (*Batch, error) { const getBatchByTxHashSQL = ` @@ -964,7 +979,7 @@ func (p *PostgresStorage) storeGenesisBatch(ctx context.Context, batch Batch, db // in this batch yet. In other words it's the creation of a WIP batch. // Note that this will add a batch with batch number N + 1, where N it's the greatest batch number on the state. func (p *PostgresStorage) openBatch(ctx context.Context, batchContext ProcessingContext, dbTx pgx.Tx) error { - const openBatchSQL = "INSERT INTO state.batch (batch_num, global_exit_root, timestamp, coinbase, forced_batch_num) VALUES ($1, $2, $3, $4, $5)" + const openBatchSQL = "INSERT INTO state.batch (batch_num, global_exit_root, timestamp, coinbase, forced_batch_num, raw_txs_data) VALUES ($1, $2, $3, $4, $5, $6)" e := p.getExecQuerier(dbTx) _, err := e.Exec( @@ -974,6 +989,7 @@ func (p *PostgresStorage) openBatch(ctx context.Context, batchContext Processing batchContext.Timestamp.UTC(), batchContext.Coinbase.String(), batchContext.ForcedBatchNum, + batchContext.BatchL2Data, ) return err } diff --git a/state/pgstatestorage_test.go b/state/pgstatestorage_test.go index c14518d9e1..e975dd10de 100644 --- a/state/pgstatestorage_test.go +++ b/state/pgstatestorage_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/trie" @@ -438,3 +438,30 @@ func TestVirtualBatch(t *testing.T) { require.Equal(t, virtualBatch, *actualVirtualBatch) require.NoError(t, dbTx.Commit(ctx)) } + +func TestGetBatchL2DataByNumber(t *testing.T) { + // Init database instance + initOrResetDB() + ctx := context.Background() + tx, err := testState.BeginStateTransaction(ctx) + require.NoError(t, err) + defer func() { require.NoError(t, tx.Commit(ctx)) }() + + // empty case + var batchNum uint64 = 4 + const openBatchSQL = "INSERT INTO state.batch (batch_num, raw_txs_data) VALUES ($1, $2)" + _, err = tx.Exec(ctx, openBatchSQL, batchNum, nil) + require.NoError(t, err) + data, err := testState.GetBatchL2DataByNumber(ctx, batchNum, tx) + require.NoError(t, err) + assert.Nil(t, data) + + // not empty case + expectedData := []byte("foo bar") + batchNum = 5 + _, err = tx.Exec(ctx, openBatchSQL, batchNum, expectedData) + require.NoError(t, err) + actualData, err := testState.GetBatchL2DataByNumber(ctx, batchNum, tx) + require.NoError(t, err) + assert.Equal(t, expectedData, actualData) +} diff --git a/state/runtime/executor/client.go b/state/runtime/executor/client.go index b386d4320f..c4ee3df7d7 100644 --- a/state/runtime/executor/client.go +++ b/state/runtime/executor/client.go @@ -5,7 +5,7 @@ import ( "os/exec" "time" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) @@ -33,7 +33,7 @@ func NewExecutorClient(ctx context.Context, c Config) (ExecutorServiceClient, *g log.Infof("Retrying connection to executor #%d", connectionRetries) time.Sleep(time.Duration(delay) * time.Second) connectionRetries = connectionRetries + 1 - out, err := exec.Command("docker", []string{"logs", "zkevm-prover"}...).Output() + out, err := exec.Command("docker", []string{"logs", "cdk-validium-prover"}...).Output() if err == nil { log.Infof("Prover logs:\n%s\n", out) } diff --git a/state/runtime/executor/config.go b/state/runtime/executor/config.go index c7a700b446..e6ff983975 100644 --- a/state/runtime/executor/config.go +++ b/state/runtime/executor/config.go @@ -1,6 +1,6 @@ package executor -import "github.com/0xPolygonHermez/zkevm-node/config/types" +import "github.com/0xPolygon/cdk-validium-node/config/types" // Config represents the configuration of the executor server type Config struct { diff --git a/state/runtime/executor/errors.go b/state/runtime/executor/errors.go index 2507913f95..3a36ea4e1c 100644 --- a/state/runtime/executor/errors.go +++ b/state/runtime/executor/errors.go @@ -4,7 +4,7 @@ import ( "fmt" "math" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/cdk-validium-node/state/runtime" ) var ( diff --git a/state/runtime/executor/executor.pb.go b/state/runtime/executor/executor.pb.go index 08f8a33b22..21006606b4 100644 --- a/state/runtime/executor/executor.pb.go +++ b/state/runtime/executor/executor.pb.go @@ -1,25 +1,25 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc v3.21.12 // source: executor.proto package executor import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + _ "github.com/golang/protobuf/ptypes/empty" + math "math" ) -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type RomError int32 @@ -85,99 +85,78 @@ const ( RomError_ROM_ERROR_INVALID_RLP RomError = 29 ) -// Enum value maps for RomError. -var ( - RomError_name = map[int32]string{ - 0: "ROM_ERROR_UNSPECIFIED", - 1: "ROM_ERROR_NO_ERROR", - 2: "ROM_ERROR_OUT_OF_GAS", - 3: "ROM_ERROR_STACK_OVERFLOW", - 4: "ROM_ERROR_STACK_UNDERFLOW", - 5: "ROM_ERROR_MAX_CODE_SIZE_EXCEEDED", - 6: "ROM_ERROR_CONTRACT_ADDRESS_COLLISION", - 7: "ROM_ERROR_EXECUTION_REVERTED", - 8: "ROM_ERROR_OUT_OF_COUNTERS_STEP", - 9: "ROM_ERROR_OUT_OF_COUNTERS_KECCAK", - 10: "ROM_ERROR_OUT_OF_COUNTERS_BINARY", - 11: "ROM_ERROR_OUT_OF_COUNTERS_MEM", - 12: "ROM_ERROR_OUT_OF_COUNTERS_ARITH", - 13: "ROM_ERROR_OUT_OF_COUNTERS_PADDING", - 14: "ROM_ERROR_OUT_OF_COUNTERS_POSEIDON", - 15: "ROM_ERROR_INVALID_JUMP", - 16: "ROM_ERROR_INVALID_OPCODE", - 17: "ROM_ERROR_INVALID_STATIC", - 18: "ROM_ERROR_INVALID_BYTECODE_STARTS_EF", - 19: "ROM_ERROR_INTRINSIC_INVALID_SIGNATURE", - 20: "ROM_ERROR_INTRINSIC_INVALID_CHAIN_ID", - 21: "ROM_ERROR_INTRINSIC_INVALID_NONCE", - 22: "ROM_ERROR_INTRINSIC_INVALID_GAS_LIMIT", - 23: "ROM_ERROR_INTRINSIC_INVALID_BALANCE", - 24: "ROM_ERROR_INTRINSIC_INVALID_BATCH_GAS_LIMIT", - 25: "ROM_ERROR_INTRINSIC_INVALID_SENDER_CODE", - 26: "ROM_ERROR_INTRINSIC_TX_GAS_OVERFLOW", - 27: "ROM_ERROR_BATCH_DATA_TOO_BIG", - 28: "ROM_ERROR_UNSUPPORTED_FORK_ID", - 29: "ROM_ERROR_INVALID_RLP", - } - RomError_value = map[string]int32{ - "ROM_ERROR_UNSPECIFIED": 0, - "ROM_ERROR_NO_ERROR": 1, - "ROM_ERROR_OUT_OF_GAS": 2, - "ROM_ERROR_STACK_OVERFLOW": 3, - "ROM_ERROR_STACK_UNDERFLOW": 4, - "ROM_ERROR_MAX_CODE_SIZE_EXCEEDED": 5, - "ROM_ERROR_CONTRACT_ADDRESS_COLLISION": 6, - "ROM_ERROR_EXECUTION_REVERTED": 7, - "ROM_ERROR_OUT_OF_COUNTERS_STEP": 8, - "ROM_ERROR_OUT_OF_COUNTERS_KECCAK": 9, - "ROM_ERROR_OUT_OF_COUNTERS_BINARY": 10, - "ROM_ERROR_OUT_OF_COUNTERS_MEM": 11, - "ROM_ERROR_OUT_OF_COUNTERS_ARITH": 12, - "ROM_ERROR_OUT_OF_COUNTERS_PADDING": 13, - "ROM_ERROR_OUT_OF_COUNTERS_POSEIDON": 14, - "ROM_ERROR_INVALID_JUMP": 15, - "ROM_ERROR_INVALID_OPCODE": 16, - "ROM_ERROR_INVALID_STATIC": 17, - "ROM_ERROR_INVALID_BYTECODE_STARTS_EF": 18, - "ROM_ERROR_INTRINSIC_INVALID_SIGNATURE": 19, - "ROM_ERROR_INTRINSIC_INVALID_CHAIN_ID": 20, - "ROM_ERROR_INTRINSIC_INVALID_NONCE": 21, - "ROM_ERROR_INTRINSIC_INVALID_GAS_LIMIT": 22, - "ROM_ERROR_INTRINSIC_INVALID_BALANCE": 23, - "ROM_ERROR_INTRINSIC_INVALID_BATCH_GAS_LIMIT": 24, - "ROM_ERROR_INTRINSIC_INVALID_SENDER_CODE": 25, - "ROM_ERROR_INTRINSIC_TX_GAS_OVERFLOW": 26, - "ROM_ERROR_BATCH_DATA_TOO_BIG": 27, - "ROM_ERROR_UNSUPPORTED_FORK_ID": 28, - "ROM_ERROR_INVALID_RLP": 29, - } -) - -func (x RomError) Enum() *RomError { - p := new(RomError) - *p = x - return p +var RomError_name = map[int32]string{ + 0: "ROM_ERROR_UNSPECIFIED", + 1: "ROM_ERROR_NO_ERROR", + 2: "ROM_ERROR_OUT_OF_GAS", + 3: "ROM_ERROR_STACK_OVERFLOW", + 4: "ROM_ERROR_STACK_UNDERFLOW", + 5: "ROM_ERROR_MAX_CODE_SIZE_EXCEEDED", + 6: "ROM_ERROR_CONTRACT_ADDRESS_COLLISION", + 7: "ROM_ERROR_EXECUTION_REVERTED", + 8: "ROM_ERROR_OUT_OF_COUNTERS_STEP", + 9: "ROM_ERROR_OUT_OF_COUNTERS_KECCAK", + 10: "ROM_ERROR_OUT_OF_COUNTERS_BINARY", + 11: "ROM_ERROR_OUT_OF_COUNTERS_MEM", + 12: "ROM_ERROR_OUT_OF_COUNTERS_ARITH", + 13: "ROM_ERROR_OUT_OF_COUNTERS_PADDING", + 14: "ROM_ERROR_OUT_OF_COUNTERS_POSEIDON", + 15: "ROM_ERROR_INVALID_JUMP", + 16: "ROM_ERROR_INVALID_OPCODE", + 17: "ROM_ERROR_INVALID_STATIC", + 18: "ROM_ERROR_INVALID_BYTECODE_STARTS_EF", + 19: "ROM_ERROR_INTRINSIC_INVALID_SIGNATURE", + 20: "ROM_ERROR_INTRINSIC_INVALID_CHAIN_ID", + 21: "ROM_ERROR_INTRINSIC_INVALID_NONCE", + 22: "ROM_ERROR_INTRINSIC_INVALID_GAS_LIMIT", + 23: "ROM_ERROR_INTRINSIC_INVALID_BALANCE", + 24: "ROM_ERROR_INTRINSIC_INVALID_BATCH_GAS_LIMIT", + 25: "ROM_ERROR_INTRINSIC_INVALID_SENDER_CODE", + 26: "ROM_ERROR_INTRINSIC_TX_GAS_OVERFLOW", + 27: "ROM_ERROR_BATCH_DATA_TOO_BIG", + 28: "ROM_ERROR_UNSUPPORTED_FORK_ID", + 29: "ROM_ERROR_INVALID_RLP", +} + +var RomError_value = map[string]int32{ + "ROM_ERROR_UNSPECIFIED": 0, + "ROM_ERROR_NO_ERROR": 1, + "ROM_ERROR_OUT_OF_GAS": 2, + "ROM_ERROR_STACK_OVERFLOW": 3, + "ROM_ERROR_STACK_UNDERFLOW": 4, + "ROM_ERROR_MAX_CODE_SIZE_EXCEEDED": 5, + "ROM_ERROR_CONTRACT_ADDRESS_COLLISION": 6, + "ROM_ERROR_EXECUTION_REVERTED": 7, + "ROM_ERROR_OUT_OF_COUNTERS_STEP": 8, + "ROM_ERROR_OUT_OF_COUNTERS_KECCAK": 9, + "ROM_ERROR_OUT_OF_COUNTERS_BINARY": 10, + "ROM_ERROR_OUT_OF_COUNTERS_MEM": 11, + "ROM_ERROR_OUT_OF_COUNTERS_ARITH": 12, + "ROM_ERROR_OUT_OF_COUNTERS_PADDING": 13, + "ROM_ERROR_OUT_OF_COUNTERS_POSEIDON": 14, + "ROM_ERROR_INVALID_JUMP": 15, + "ROM_ERROR_INVALID_OPCODE": 16, + "ROM_ERROR_INVALID_STATIC": 17, + "ROM_ERROR_INVALID_BYTECODE_STARTS_EF": 18, + "ROM_ERROR_INTRINSIC_INVALID_SIGNATURE": 19, + "ROM_ERROR_INTRINSIC_INVALID_CHAIN_ID": 20, + "ROM_ERROR_INTRINSIC_INVALID_NONCE": 21, + "ROM_ERROR_INTRINSIC_INVALID_GAS_LIMIT": 22, + "ROM_ERROR_INTRINSIC_INVALID_BALANCE": 23, + "ROM_ERROR_INTRINSIC_INVALID_BATCH_GAS_LIMIT": 24, + "ROM_ERROR_INTRINSIC_INVALID_SENDER_CODE": 25, + "ROM_ERROR_INTRINSIC_TX_GAS_OVERFLOW": 26, + "ROM_ERROR_BATCH_DATA_TOO_BIG": 27, + "ROM_ERROR_UNSUPPORTED_FORK_ID": 28, + "ROM_ERROR_INVALID_RLP": 29, } func (x RomError) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RomError) Descriptor() protoreflect.EnumDescriptor { - return file_executor_proto_enumTypes[0].Descriptor() -} - -func (RomError) Type() protoreflect.EnumType { - return &file_executor_proto_enumTypes[0] + return proto.EnumName(RomError_name, int32(x)) } -func (x RomError) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RomError.Descriptor instead. func (RomError) EnumDescriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{0} + return fileDescriptor_12d1cdcda51e000f, []int{0} } type ExecutorError int32 @@ -208,70 +187,45 @@ const ( ExecutorError_EXECUTOR_ERROR_TOS32 ExecutorError = 11 ) -// Enum value maps for ExecutorError. -var ( - ExecutorError_name = map[int32]string{ - 0: "EXECUTOR_ERROR_UNSPECIFIED", - 1: "EXECUTOR_ERROR_NO_ERROR", - 2: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_KECCAK", - 3: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_BINARY", - 4: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_MEM", - 5: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_ARITH", - 6: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_PADDING", - 7: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_POSEIDON", - 8: "EXECUTOR_ERROR_UNSUPPORTED_FORK_ID", - 9: "EXECUTOR_ERROR_BALANCE_MISMATCH", - 10: "EXECUTOR_ERROR_FEA2SCALAR", - 11: "EXECUTOR_ERROR_TOS32", - } - ExecutorError_value = map[string]int32{ - "EXECUTOR_ERROR_UNSPECIFIED": 0, - "EXECUTOR_ERROR_NO_ERROR": 1, - "EXECUTOR_ERROR_COUNTERS_OVERFLOW_KECCAK": 2, - "EXECUTOR_ERROR_COUNTERS_OVERFLOW_BINARY": 3, - "EXECUTOR_ERROR_COUNTERS_OVERFLOW_MEM": 4, - "EXECUTOR_ERROR_COUNTERS_OVERFLOW_ARITH": 5, - "EXECUTOR_ERROR_COUNTERS_OVERFLOW_PADDING": 6, - "EXECUTOR_ERROR_COUNTERS_OVERFLOW_POSEIDON": 7, - "EXECUTOR_ERROR_UNSUPPORTED_FORK_ID": 8, - "EXECUTOR_ERROR_BALANCE_MISMATCH": 9, - "EXECUTOR_ERROR_FEA2SCALAR": 10, - "EXECUTOR_ERROR_TOS32": 11, - } -) - -func (x ExecutorError) Enum() *ExecutorError { - p := new(ExecutorError) - *p = x - return p +var ExecutorError_name = map[int32]string{ + 0: "EXECUTOR_ERROR_UNSPECIFIED", + 1: "EXECUTOR_ERROR_NO_ERROR", + 2: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_KECCAK", + 3: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_BINARY", + 4: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_MEM", + 5: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_ARITH", + 6: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_PADDING", + 7: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_POSEIDON", + 8: "EXECUTOR_ERROR_UNSUPPORTED_FORK_ID", + 9: "EXECUTOR_ERROR_BALANCE_MISMATCH", + 10: "EXECUTOR_ERROR_FEA2SCALAR", + 11: "EXECUTOR_ERROR_TOS32", +} + +var ExecutorError_value = map[string]int32{ + "EXECUTOR_ERROR_UNSPECIFIED": 0, + "EXECUTOR_ERROR_NO_ERROR": 1, + "EXECUTOR_ERROR_COUNTERS_OVERFLOW_KECCAK": 2, + "EXECUTOR_ERROR_COUNTERS_OVERFLOW_BINARY": 3, + "EXECUTOR_ERROR_COUNTERS_OVERFLOW_MEM": 4, + "EXECUTOR_ERROR_COUNTERS_OVERFLOW_ARITH": 5, + "EXECUTOR_ERROR_COUNTERS_OVERFLOW_PADDING": 6, + "EXECUTOR_ERROR_COUNTERS_OVERFLOW_POSEIDON": 7, + "EXECUTOR_ERROR_UNSUPPORTED_FORK_ID": 8, + "EXECUTOR_ERROR_BALANCE_MISMATCH": 9, + "EXECUTOR_ERROR_FEA2SCALAR": 10, + "EXECUTOR_ERROR_TOS32": 11, } func (x ExecutorError) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ExecutorError) Descriptor() protoreflect.EnumDescriptor { - return file_executor_proto_enumTypes[1].Descriptor() -} - -func (ExecutorError) Type() protoreflect.EnumType { - return &file_executor_proto_enumTypes[1] + return proto.EnumName(ExecutorError_name, int32(x)) } -func (x ExecutorError) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ExecutorError.Descriptor instead. func (ExecutorError) EnumDescriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{1} + return fileDescriptor_12d1cdcda51e000f, []int{1} } type ProcessBatchRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - OldStateRoot []byte `protobuf:"bytes,1,opt,name=old_state_root,json=oldStateRoot,proto3" json:"old_state_root,omitempty"` OldAccInputHash []byte `protobuf:"bytes,2,opt,name=old_acc_input_hash,json=oldAccInputHash,proto3" json:"old_acc_input_hash,omitempty"` OldBatchNum uint64 `protobuf:"varint,3,opt,name=old_batch_num,json=oldBatchNum,proto3" json:"old_batch_num,omitempty"` @@ -287,332 +241,320 @@ type ProcessBatchRequest struct { // from is used for unsigned transactions with sender From string `protobuf:"bytes,12,opt,name=from,proto3" json:"from,omitempty"` // For testing purposes only - Db map[string]string `protobuf:"bytes,13,rep,name=db,proto3" json:"db,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ContractsBytecode map[string]string `protobuf:"bytes,14,rep,name=contracts_bytecode,json=contractsBytecode,proto3" json:"contracts_bytecode,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // For debug/testing purpposes only. Don't fill this on production - TraceConfig *TraceConfig `protobuf:"bytes,15,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` + Db map[string]string `protobuf:"bytes,13,rep,name=db,proto3" json:"db,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ContractsBytecode map[string]string `protobuf:"bytes,14,rep,name=contracts_bytecode,json=contractsBytecode,proto3" json:"contracts_bytecode,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TraceConfig *TraceConfig `protobuf:"bytes,15,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *ProcessBatchRequest) Reset() { - *x = ProcessBatchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *ProcessBatchRequest) Reset() { *m = ProcessBatchRequest{} } +func (m *ProcessBatchRequest) String() string { return proto.CompactTextString(m) } +func (*ProcessBatchRequest) ProtoMessage() {} +func (*ProcessBatchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{0} } -func (x *ProcessBatchRequest) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *ProcessBatchRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProcessBatchRequest.Unmarshal(m, b) } - -func (*ProcessBatchRequest) ProtoMessage() {} - -func (x *ProcessBatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *ProcessBatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProcessBatchRequest.Marshal(b, m, deterministic) } - -// Deprecated: Use ProcessBatchRequest.ProtoReflect.Descriptor instead. -func (*ProcessBatchRequest) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{0} +func (m *ProcessBatchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProcessBatchRequest.Merge(m, src) } +func (m *ProcessBatchRequest) XXX_Size() int { + return xxx_messageInfo_ProcessBatchRequest.Size(m) +} +func (m *ProcessBatchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ProcessBatchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ProcessBatchRequest proto.InternalMessageInfo -func (x *ProcessBatchRequest) GetOldStateRoot() []byte { - if x != nil { - return x.OldStateRoot +func (m *ProcessBatchRequest) GetOldStateRoot() []byte { + if m != nil { + return m.OldStateRoot } return nil } -func (x *ProcessBatchRequest) GetOldAccInputHash() []byte { - if x != nil { - return x.OldAccInputHash +func (m *ProcessBatchRequest) GetOldAccInputHash() []byte { + if m != nil { + return m.OldAccInputHash } return nil } -func (x *ProcessBatchRequest) GetOldBatchNum() uint64 { - if x != nil { - return x.OldBatchNum +func (m *ProcessBatchRequest) GetOldBatchNum() uint64 { + if m != nil { + return m.OldBatchNum } return 0 } -func (x *ProcessBatchRequest) GetChainId() uint64 { - if x != nil { - return x.ChainId +func (m *ProcessBatchRequest) GetChainId() uint64 { + if m != nil { + return m.ChainId } return 0 } -func (x *ProcessBatchRequest) GetForkId() uint64 { - if x != nil { - return x.ForkId +func (m *ProcessBatchRequest) GetForkId() uint64 { + if m != nil { + return m.ForkId } return 0 } -func (x *ProcessBatchRequest) GetBatchL2Data() []byte { - if x != nil { - return x.BatchL2Data +func (m *ProcessBatchRequest) GetBatchL2Data() []byte { + if m != nil { + return m.BatchL2Data } return nil } -func (x *ProcessBatchRequest) GetGlobalExitRoot() []byte { - if x != nil { - return x.GlobalExitRoot +func (m *ProcessBatchRequest) GetGlobalExitRoot() []byte { + if m != nil { + return m.GlobalExitRoot } return nil } -func (x *ProcessBatchRequest) GetEthTimestamp() uint64 { - if x != nil { - return x.EthTimestamp +func (m *ProcessBatchRequest) GetEthTimestamp() uint64 { + if m != nil { + return m.EthTimestamp } return 0 } -func (x *ProcessBatchRequest) GetCoinbase() string { - if x != nil { - return x.Coinbase +func (m *ProcessBatchRequest) GetCoinbase() string { + if m != nil { + return m.Coinbase } return "" } -func (x *ProcessBatchRequest) GetUpdateMerkleTree() uint32 { - if x != nil { - return x.UpdateMerkleTree +func (m *ProcessBatchRequest) GetUpdateMerkleTree() uint32 { + if m != nil { + return m.UpdateMerkleTree } return 0 } -func (x *ProcessBatchRequest) GetNoCounters() uint64 { - if x != nil { - return x.NoCounters +func (m *ProcessBatchRequest) GetNoCounters() uint64 { + if m != nil { + return m.NoCounters } return 0 } -func (x *ProcessBatchRequest) GetFrom() string { - if x != nil { - return x.From +func (m *ProcessBatchRequest) GetFrom() string { + if m != nil { + return m.From } return "" } -func (x *ProcessBatchRequest) GetDb() map[string]string { - if x != nil { - return x.Db +func (m *ProcessBatchRequest) GetDb() map[string]string { + if m != nil { + return m.Db } return nil } -func (x *ProcessBatchRequest) GetContractsBytecode() map[string]string { - if x != nil { - return x.ContractsBytecode +func (m *ProcessBatchRequest) GetContractsBytecode() map[string]string { + if m != nil { + return m.ContractsBytecode } return nil } -func (x *ProcessBatchRequest) GetTraceConfig() *TraceConfig { - if x != nil { - return x.TraceConfig +func (m *ProcessBatchRequest) GetTraceConfig() *TraceConfig { + if m != nil { + return m.TraceConfig } return nil } type ProcessBatchResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NewStateRoot []byte `protobuf:"bytes,1,opt,name=new_state_root,json=newStateRoot,proto3" json:"new_state_root,omitempty"` - NewAccInputHash []byte `protobuf:"bytes,2,opt,name=new_acc_input_hash,json=newAccInputHash,proto3" json:"new_acc_input_hash,omitempty"` - NewLocalExitRoot []byte `protobuf:"bytes,3,opt,name=new_local_exit_root,json=newLocalExitRoot,proto3" json:"new_local_exit_root,omitempty"` - NewBatchNum uint64 `protobuf:"varint,4,opt,name=new_batch_num,json=newBatchNum,proto3" json:"new_batch_num,omitempty"` - CntKeccakHashes uint32 `protobuf:"varint,5,opt,name=cnt_keccak_hashes,json=cntKeccakHashes,proto3" json:"cnt_keccak_hashes,omitempty"` - CntPoseidonHashes uint32 `protobuf:"varint,6,opt,name=cnt_poseidon_hashes,json=cntPoseidonHashes,proto3" json:"cnt_poseidon_hashes,omitempty"` - CntPoseidonPaddings uint32 `protobuf:"varint,7,opt,name=cnt_poseidon_paddings,json=cntPoseidonPaddings,proto3" json:"cnt_poseidon_paddings,omitempty"` - CntMemAligns uint32 `protobuf:"varint,8,opt,name=cnt_mem_aligns,json=cntMemAligns,proto3" json:"cnt_mem_aligns,omitempty"` - CntArithmetics uint32 `protobuf:"varint,9,opt,name=cnt_arithmetics,json=cntArithmetics,proto3" json:"cnt_arithmetics,omitempty"` - CntBinaries uint32 `protobuf:"varint,10,opt,name=cnt_binaries,json=cntBinaries,proto3" json:"cnt_binaries,omitempty"` - CntSteps uint32 `protobuf:"varint,11,opt,name=cnt_steps,json=cntSteps,proto3" json:"cnt_steps,omitempty"` - CumulativeGasUsed uint64 `protobuf:"varint,12,opt,name=cumulative_gas_used,json=cumulativeGasUsed,proto3" json:"cumulative_gas_used,omitempty"` - Responses []*ProcessTransactionResponse `protobuf:"bytes,13,rep,name=responses,proto3" json:"responses,omitempty"` - Error ExecutorError `protobuf:"varint,14,opt,name=error,proto3,enum=executor.v1.ExecutorError" json:"error,omitempty"` - ReadWriteAddresses map[string]*InfoReadWrite `protobuf:"bytes,15,rep,name=read_write_addresses,json=readWriteAddresses,proto3" json:"read_write_addresses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - FlushId uint64 `protobuf:"varint,16,opt,name=flush_id,json=flushId,proto3" json:"flush_id,omitempty"` - StoredFlushId uint64 `protobuf:"varint,17,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` - ProverId string `protobuf:"bytes,18,opt,name=prover_id,json=proverId,proto3" json:"prover_id,omitempty"` -} - -func (x *ProcessBatchResponse) Reset() { - *x = ProcessBatchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProcessBatchResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProcessBatchResponse) ProtoMessage() {} - -func (x *ProcessBatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProcessBatchResponse.ProtoReflect.Descriptor instead. + NewStateRoot []byte `protobuf:"bytes,1,opt,name=new_state_root,json=newStateRoot,proto3" json:"new_state_root,omitempty"` + NewAccInputHash []byte `protobuf:"bytes,2,opt,name=new_acc_input_hash,json=newAccInputHash,proto3" json:"new_acc_input_hash,omitempty"` + NewLocalExitRoot []byte `protobuf:"bytes,3,opt,name=new_local_exit_root,json=newLocalExitRoot,proto3" json:"new_local_exit_root,omitempty"` + NewBatchNum uint64 `protobuf:"varint,4,opt,name=new_batch_num,json=newBatchNum,proto3" json:"new_batch_num,omitempty"` + CntKeccakHashes uint32 `protobuf:"varint,5,opt,name=cnt_keccak_hashes,json=cntKeccakHashes,proto3" json:"cnt_keccak_hashes,omitempty"` + CntPoseidonHashes uint32 `protobuf:"varint,6,opt,name=cnt_poseidon_hashes,json=cntPoseidonHashes,proto3" json:"cnt_poseidon_hashes,omitempty"` + CntPoseidonPaddings uint32 `protobuf:"varint,7,opt,name=cnt_poseidon_paddings,json=cntPoseidonPaddings,proto3" json:"cnt_poseidon_paddings,omitempty"` + CntMemAligns uint32 `protobuf:"varint,8,opt,name=cnt_mem_aligns,json=cntMemAligns,proto3" json:"cnt_mem_aligns,omitempty"` + CntArithmetics uint32 `protobuf:"varint,9,opt,name=cnt_arithmetics,json=cntArithmetics,proto3" json:"cnt_arithmetics,omitempty"` + CntBinaries uint32 `protobuf:"varint,10,opt,name=cnt_binaries,json=cntBinaries,proto3" json:"cnt_binaries,omitempty"` + CntSteps uint32 `protobuf:"varint,11,opt,name=cnt_steps,json=cntSteps,proto3" json:"cnt_steps,omitempty"` + CumulativeGasUsed uint64 `protobuf:"varint,12,opt,name=cumulative_gas_used,json=cumulativeGasUsed,proto3" json:"cumulative_gas_used,omitempty"` + Responses []*ProcessTransactionResponse `protobuf:"bytes,13,rep,name=responses,proto3" json:"responses,omitempty"` + Error ExecutorError `protobuf:"varint,14,opt,name=error,proto3,enum=executor.v1.ExecutorError" json:"error,omitempty"` + ReadWriteAddresses map[string]*InfoReadWrite `protobuf:"bytes,15,rep,name=read_write_addresses,json=readWriteAddresses,proto3" json:"read_write_addresses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + FlushId uint64 `protobuf:"varint,16,opt,name=flush_id,json=flushId,proto3" json:"flush_id,omitempty"` + StoredFlushId uint64 `protobuf:"varint,17,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` + ProverId string `protobuf:"bytes,18,opt,name=prover_id,json=proverId,proto3" json:"prover_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProcessBatchResponse) Reset() { *m = ProcessBatchResponse{} } +func (m *ProcessBatchResponse) String() string { return proto.CompactTextString(m) } +func (*ProcessBatchResponse) ProtoMessage() {} func (*ProcessBatchResponse) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{1} + return fileDescriptor_12d1cdcda51e000f, []int{1} +} + +func (m *ProcessBatchResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProcessBatchResponse.Unmarshal(m, b) +} +func (m *ProcessBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProcessBatchResponse.Marshal(b, m, deterministic) +} +func (m *ProcessBatchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProcessBatchResponse.Merge(m, src) +} +func (m *ProcessBatchResponse) XXX_Size() int { + return xxx_messageInfo_ProcessBatchResponse.Size(m) +} +func (m *ProcessBatchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ProcessBatchResponse.DiscardUnknown(m) } -func (x *ProcessBatchResponse) GetNewStateRoot() []byte { - if x != nil { - return x.NewStateRoot +var xxx_messageInfo_ProcessBatchResponse proto.InternalMessageInfo + +func (m *ProcessBatchResponse) GetNewStateRoot() []byte { + if m != nil { + return m.NewStateRoot } return nil } -func (x *ProcessBatchResponse) GetNewAccInputHash() []byte { - if x != nil { - return x.NewAccInputHash +func (m *ProcessBatchResponse) GetNewAccInputHash() []byte { + if m != nil { + return m.NewAccInputHash } return nil } -func (x *ProcessBatchResponse) GetNewLocalExitRoot() []byte { - if x != nil { - return x.NewLocalExitRoot +func (m *ProcessBatchResponse) GetNewLocalExitRoot() []byte { + if m != nil { + return m.NewLocalExitRoot } return nil } -func (x *ProcessBatchResponse) GetNewBatchNum() uint64 { - if x != nil { - return x.NewBatchNum +func (m *ProcessBatchResponse) GetNewBatchNum() uint64 { + if m != nil { + return m.NewBatchNum } return 0 } -func (x *ProcessBatchResponse) GetCntKeccakHashes() uint32 { - if x != nil { - return x.CntKeccakHashes +func (m *ProcessBatchResponse) GetCntKeccakHashes() uint32 { + if m != nil { + return m.CntKeccakHashes } return 0 } -func (x *ProcessBatchResponse) GetCntPoseidonHashes() uint32 { - if x != nil { - return x.CntPoseidonHashes +func (m *ProcessBatchResponse) GetCntPoseidonHashes() uint32 { + if m != nil { + return m.CntPoseidonHashes } return 0 } -func (x *ProcessBatchResponse) GetCntPoseidonPaddings() uint32 { - if x != nil { - return x.CntPoseidonPaddings +func (m *ProcessBatchResponse) GetCntPoseidonPaddings() uint32 { + if m != nil { + return m.CntPoseidonPaddings } return 0 } -func (x *ProcessBatchResponse) GetCntMemAligns() uint32 { - if x != nil { - return x.CntMemAligns +func (m *ProcessBatchResponse) GetCntMemAligns() uint32 { + if m != nil { + return m.CntMemAligns } return 0 } -func (x *ProcessBatchResponse) GetCntArithmetics() uint32 { - if x != nil { - return x.CntArithmetics +func (m *ProcessBatchResponse) GetCntArithmetics() uint32 { + if m != nil { + return m.CntArithmetics } return 0 } -func (x *ProcessBatchResponse) GetCntBinaries() uint32 { - if x != nil { - return x.CntBinaries +func (m *ProcessBatchResponse) GetCntBinaries() uint32 { + if m != nil { + return m.CntBinaries } return 0 } -func (x *ProcessBatchResponse) GetCntSteps() uint32 { - if x != nil { - return x.CntSteps +func (m *ProcessBatchResponse) GetCntSteps() uint32 { + if m != nil { + return m.CntSteps } return 0 } -func (x *ProcessBatchResponse) GetCumulativeGasUsed() uint64 { - if x != nil { - return x.CumulativeGasUsed +func (m *ProcessBatchResponse) GetCumulativeGasUsed() uint64 { + if m != nil { + return m.CumulativeGasUsed } return 0 } -func (x *ProcessBatchResponse) GetResponses() []*ProcessTransactionResponse { - if x != nil { - return x.Responses +func (m *ProcessBatchResponse) GetResponses() []*ProcessTransactionResponse { + if m != nil { + return m.Responses } return nil } -func (x *ProcessBatchResponse) GetError() ExecutorError { - if x != nil { - return x.Error +func (m *ProcessBatchResponse) GetError() ExecutorError { + if m != nil { + return m.Error } return ExecutorError_EXECUTOR_ERROR_UNSPECIFIED } -func (x *ProcessBatchResponse) GetReadWriteAddresses() map[string]*InfoReadWrite { - if x != nil { - return x.ReadWriteAddresses +func (m *ProcessBatchResponse) GetReadWriteAddresses() map[string]*InfoReadWrite { + if m != nil { + return m.ReadWriteAddresses } return nil } -func (x *ProcessBatchResponse) GetFlushId() uint64 { - if x != nil { - return x.FlushId +func (m *ProcessBatchResponse) GetFlushId() uint64 { + if m != nil { + return m.FlushId } return 0 } -func (x *ProcessBatchResponse) GetStoredFlushId() uint64 { - if x != nil { - return x.StoredFlushId +func (m *ProcessBatchResponse) GetStoredFlushId() uint64 { + if m != nil { + return m.StoredFlushId } return 0 } -func (x *ProcessBatchResponse) GetProverId() string { - if x != nil { - return x.ProverId +func (m *ProcessBatchResponse) GetProverId() string { + if m != nil { + return m.ProverId } return "" } -// * +//* // @dev GetFlushStatusResponse // @param {last_sent_flush_id} - id of the last flush data sent to database // @param {sending_flush_id} - id of the flush data being sent now to database @@ -623,114 +565,102 @@ func (x *ProcessBatchResponse) GetProverId() string { // @param {storing_program} - number of SC programs being stored in the hash database // @param {prover_id} - id assigned to this instance of the prover process type GetFlushStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StoredFlushId uint64 `protobuf:"varint,1,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` - StoringFlushId uint64 `protobuf:"varint,2,opt,name=storing_flush_id,json=storingFlushId,proto3" json:"storing_flush_id,omitempty"` - LastFlushId uint64 `protobuf:"varint,3,opt,name=last_flush_id,json=lastFlushId,proto3" json:"last_flush_id,omitempty"` - PendingToFlushNodes uint64 `protobuf:"varint,4,opt,name=pending_to_flush_nodes,json=pendingToFlushNodes,proto3" json:"pending_to_flush_nodes,omitempty"` - PendingToFlushProgram uint64 `protobuf:"varint,5,opt,name=pending_to_flush_program,json=pendingToFlushProgram,proto3" json:"pending_to_flush_program,omitempty"` - StoringNodes uint64 `protobuf:"varint,6,opt,name=storing_nodes,json=storingNodes,proto3" json:"storing_nodes,omitempty"` - StoringProgram uint64 `protobuf:"varint,7,opt,name=storing_program,json=storingProgram,proto3" json:"storing_program,omitempty"` - ProverId string `protobuf:"bytes,8,opt,name=prover_id,json=proverId,proto3" json:"prover_id,omitempty"` + StoredFlushId uint64 `protobuf:"varint,1,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"` + StoringFlushId uint64 `protobuf:"varint,2,opt,name=storing_flush_id,json=storingFlushId,proto3" json:"storing_flush_id,omitempty"` + LastFlushId uint64 `protobuf:"varint,3,opt,name=last_flush_id,json=lastFlushId,proto3" json:"last_flush_id,omitempty"` + PendingToFlushNodes uint64 `protobuf:"varint,4,opt,name=pending_to_flush_nodes,json=pendingToFlushNodes,proto3" json:"pending_to_flush_nodes,omitempty"` + PendingToFlushProgram uint64 `protobuf:"varint,5,opt,name=pending_to_flush_program,json=pendingToFlushProgram,proto3" json:"pending_to_flush_program,omitempty"` + StoringNodes uint64 `protobuf:"varint,6,opt,name=storing_nodes,json=storingNodes,proto3" json:"storing_nodes,omitempty"` + StoringProgram uint64 `protobuf:"varint,7,opt,name=storing_program,json=storingProgram,proto3" json:"storing_program,omitempty"` + ProverId string `protobuf:"bytes,8,opt,name=prover_id,json=proverId,proto3" json:"prover_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetFlushStatusResponse) Reset() { *m = GetFlushStatusResponse{} } +func (m *GetFlushStatusResponse) String() string { return proto.CompactTextString(m) } +func (*GetFlushStatusResponse) ProtoMessage() {} +func (*GetFlushStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{2} } -func (x *GetFlushStatusResponse) Reset() { - *x = GetFlushStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *GetFlushStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFlushStatusResponse.Unmarshal(m, b) } - -func (x *GetFlushStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *GetFlushStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFlushStatusResponse.Marshal(b, m, deterministic) } - -func (*GetFlushStatusResponse) ProtoMessage() {} - -func (x *GetFlushStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *GetFlushStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFlushStatusResponse.Merge(m, src) } - -// Deprecated: Use GetFlushStatusResponse.ProtoReflect.Descriptor instead. -func (*GetFlushStatusResponse) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{2} +func (m *GetFlushStatusResponse) XXX_Size() int { + return xxx_messageInfo_GetFlushStatusResponse.Size(m) } +func (m *GetFlushStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetFlushStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetFlushStatusResponse proto.InternalMessageInfo -func (x *GetFlushStatusResponse) GetStoredFlushId() uint64 { - if x != nil { - return x.StoredFlushId +func (m *GetFlushStatusResponse) GetStoredFlushId() uint64 { + if m != nil { + return m.StoredFlushId } return 0 } -func (x *GetFlushStatusResponse) GetStoringFlushId() uint64 { - if x != nil { - return x.StoringFlushId +func (m *GetFlushStatusResponse) GetStoringFlushId() uint64 { + if m != nil { + return m.StoringFlushId } return 0 } -func (x *GetFlushStatusResponse) GetLastFlushId() uint64 { - if x != nil { - return x.LastFlushId +func (m *GetFlushStatusResponse) GetLastFlushId() uint64 { + if m != nil { + return m.LastFlushId } return 0 } -func (x *GetFlushStatusResponse) GetPendingToFlushNodes() uint64 { - if x != nil { - return x.PendingToFlushNodes +func (m *GetFlushStatusResponse) GetPendingToFlushNodes() uint64 { + if m != nil { + return m.PendingToFlushNodes } return 0 } -func (x *GetFlushStatusResponse) GetPendingToFlushProgram() uint64 { - if x != nil { - return x.PendingToFlushProgram +func (m *GetFlushStatusResponse) GetPendingToFlushProgram() uint64 { + if m != nil { + return m.PendingToFlushProgram } return 0 } -func (x *GetFlushStatusResponse) GetStoringNodes() uint64 { - if x != nil { - return x.StoringNodes +func (m *GetFlushStatusResponse) GetStoringNodes() uint64 { + if m != nil { + return m.StoringNodes } return 0 } -func (x *GetFlushStatusResponse) GetStoringProgram() uint64 { - if x != nil { - return x.StoringProgram +func (m *GetFlushStatusResponse) GetStoringProgram() uint64 { + if m != nil { + return m.StoringProgram } return 0 } -func (x *GetFlushStatusResponse) GetProverId() string { - if x != nil { - return x.ProverId +func (m *GetFlushStatusResponse) GetProverId() string { + if m != nil { + return m.ProverId } return "" } // Trace configuration request params type TraceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - // Disables storage (default=false) DisableStorage uint32 `protobuf:"varint,1,opt,name=disable_storage,json=disableStorage,proto3" json:"disable_storage,omitempty"` // Disables stack (default=false) @@ -742,200 +672,176 @@ type TraceConfig struct { // Hash of tx in batch to retrieve the execution trace TxHashToGenerateExecuteTrace []byte `protobuf:"bytes,5,opt,name=tx_hash_to_generate_execute_trace,json=txHashToGenerateExecuteTrace,proto3" json:"tx_hash_to_generate_execute_trace,omitempty"` // Hash of tx in batch to retrieve the call trace - TxHashToGenerateCallTrace []byte `protobuf:"bytes,6,opt,name=tx_hash_to_generate_call_trace,json=txHashToGenerateCallTrace,proto3" json:"tx_hash_to_generate_call_trace,omitempty"` + TxHashToGenerateCallTrace []byte `protobuf:"bytes,6,opt,name=tx_hash_to_generate_call_trace,json=txHashToGenerateCallTrace,proto3" json:"tx_hash_to_generate_call_trace,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *TraceConfig) Reset() { - *x = TraceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *TraceConfig) Reset() { *m = TraceConfig{} } +func (m *TraceConfig) String() string { return proto.CompactTextString(m) } +func (*TraceConfig) ProtoMessage() {} +func (*TraceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{3} } -func (x *TraceConfig) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *TraceConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TraceConfig.Unmarshal(m, b) } - -func (*TraceConfig) ProtoMessage() {} - -func (x *TraceConfig) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic) } - -// Deprecated: Use TraceConfig.ProtoReflect.Descriptor instead. -func (*TraceConfig) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{3} +func (m *TraceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_TraceConfig.Merge(m, src) +} +func (m *TraceConfig) XXX_Size() int { + return xxx_messageInfo_TraceConfig.Size(m) +} +func (m *TraceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_TraceConfig.DiscardUnknown(m) } -func (x *TraceConfig) GetDisableStorage() uint32 { - if x != nil { - return x.DisableStorage +var xxx_messageInfo_TraceConfig proto.InternalMessageInfo + +func (m *TraceConfig) GetDisableStorage() uint32 { + if m != nil { + return m.DisableStorage } return 0 } -func (x *TraceConfig) GetDisableStack() uint32 { - if x != nil { - return x.DisableStack +func (m *TraceConfig) GetDisableStack() uint32 { + if m != nil { + return m.DisableStack } return 0 } -func (x *TraceConfig) GetEnableMemory() uint32 { - if x != nil { - return x.EnableMemory +func (m *TraceConfig) GetEnableMemory() uint32 { + if m != nil { + return m.EnableMemory } return 0 } -func (x *TraceConfig) GetEnableReturnData() uint32 { - if x != nil { - return x.EnableReturnData +func (m *TraceConfig) GetEnableReturnData() uint32 { + if m != nil { + return m.EnableReturnData } return 0 } -func (x *TraceConfig) GetTxHashToGenerateExecuteTrace() []byte { - if x != nil { - return x.TxHashToGenerateExecuteTrace +func (m *TraceConfig) GetTxHashToGenerateExecuteTrace() []byte { + if m != nil { + return m.TxHashToGenerateExecuteTrace } return nil } -func (x *TraceConfig) GetTxHashToGenerateCallTrace() []byte { - if x != nil { - return x.TxHashToGenerateCallTrace +func (m *TraceConfig) GetTxHashToGenerateCallTrace() []byte { + if m != nil { + return m.TxHashToGenerateCallTrace } return nil } type InfoReadWrite struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - // If nonce="" then it has not been set; if set, string is in decimal (base 10) Nonce string `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` // If balance="" then it has not been set; if set, string is in decimal (base 10) - Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` + Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *InfoReadWrite) Reset() { - *x = InfoReadWrite{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *InfoReadWrite) Reset() { *m = InfoReadWrite{} } +func (m *InfoReadWrite) String() string { return proto.CompactTextString(m) } +func (*InfoReadWrite) ProtoMessage() {} +func (*InfoReadWrite) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{4} } -func (x *InfoReadWrite) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *InfoReadWrite) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InfoReadWrite.Unmarshal(m, b) } - -func (*InfoReadWrite) ProtoMessage() {} - -func (x *InfoReadWrite) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *InfoReadWrite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InfoReadWrite.Marshal(b, m, deterministic) } - -// Deprecated: Use InfoReadWrite.ProtoReflect.Descriptor instead. -func (*InfoReadWrite) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{4} +func (m *InfoReadWrite) XXX_Merge(src proto.Message) { + xxx_messageInfo_InfoReadWrite.Merge(m, src) +} +func (m *InfoReadWrite) XXX_Size() int { + return xxx_messageInfo_InfoReadWrite.Size(m) } +func (m *InfoReadWrite) XXX_DiscardUnknown() { + xxx_messageInfo_InfoReadWrite.DiscardUnknown(m) +} + +var xxx_messageInfo_InfoReadWrite proto.InternalMessageInfo -func (x *InfoReadWrite) GetNonce() string { - if x != nil { - return x.Nonce +func (m *InfoReadWrite) GetNonce() string { + if m != nil { + return m.Nonce } return "" } -func (x *InfoReadWrite) GetBalance() string { - if x != nil { - return x.Balance +func (m *InfoReadWrite) GetBalance() string { + if m != nil { + return m.Balance } return "" } type CallTrace struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Context *TransactionContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - Steps []*TransactionStep `protobuf:"bytes,2,rep,name=steps,proto3" json:"steps,omitempty"` + Context *TransactionContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` + Steps []*TransactionStep `protobuf:"bytes,2,rep,name=steps,proto3" json:"steps,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *CallTrace) Reset() { - *x = CallTrace{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *CallTrace) Reset() { *m = CallTrace{} } +func (m *CallTrace) String() string { return proto.CompactTextString(m) } +func (*CallTrace) ProtoMessage() {} +func (*CallTrace) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{5} } -func (x *CallTrace) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *CallTrace) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CallTrace.Unmarshal(m, b) } - -func (*CallTrace) ProtoMessage() {} - -func (x *CallTrace) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *CallTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CallTrace.Marshal(b, m, deterministic) } - -// Deprecated: Use CallTrace.ProtoReflect.Descriptor instead. -func (*CallTrace) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{5} +func (m *CallTrace) XXX_Merge(src proto.Message) { + xxx_messageInfo_CallTrace.Merge(m, src) +} +func (m *CallTrace) XXX_Size() int { + return xxx_messageInfo_CallTrace.Size(m) } +func (m *CallTrace) XXX_DiscardUnknown() { + xxx_messageInfo_CallTrace.DiscardUnknown(m) +} + +var xxx_messageInfo_CallTrace proto.InternalMessageInfo -func (x *CallTrace) GetContext() *TransactionContext { - if x != nil { - return x.Context +func (m *CallTrace) GetContext() *TransactionContext { + if m != nil { + return m.Context } return nil } -func (x *CallTrace) GetSteps() []*TransactionStep { - if x != nil { - return x.Steps +func (m *CallTrace) GetSteps() []*TransactionStep { + if m != nil { + return m.Steps } return nil } type TransactionContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - // CALL or CREATE Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Sender of the transaction @@ -959,130 +865,122 @@ type TransactionContext struct { // Execution Time ExecutionTime uint32 `protobuf:"varint,11,opt,name=execution_time,json=executionTime,proto3" json:"execution_time,omitempty"` // Starting state root - OldStateRoot []byte `protobuf:"bytes,12,opt,name=old_state_root,json=oldStateRoot,proto3" json:"old_state_root,omitempty"` + OldStateRoot []byte `protobuf:"bytes,12,opt,name=old_state_root,json=oldStateRoot,proto3" json:"old_state_root,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *TransactionContext) Reset() { - *x = TransactionContext{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *TransactionContext) Reset() { *m = TransactionContext{} } +func (m *TransactionContext) String() string { return proto.CompactTextString(m) } +func (*TransactionContext) ProtoMessage() {} +func (*TransactionContext) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{6} } -func (x *TransactionContext) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *TransactionContext) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransactionContext.Unmarshal(m, b) } - -func (*TransactionContext) ProtoMessage() {} - -func (x *TransactionContext) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *TransactionContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransactionContext.Marshal(b, m, deterministic) } - -// Deprecated: Use TransactionContext.ProtoReflect.Descriptor instead. -func (*TransactionContext) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{6} +func (m *TransactionContext) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransactionContext.Merge(m, src) +} +func (m *TransactionContext) XXX_Size() int { + return xxx_messageInfo_TransactionContext.Size(m) +} +func (m *TransactionContext) XXX_DiscardUnknown() { + xxx_messageInfo_TransactionContext.DiscardUnknown(m) } -func (x *TransactionContext) GetType() string { - if x != nil { - return x.Type +var xxx_messageInfo_TransactionContext proto.InternalMessageInfo + +func (m *TransactionContext) GetType() string { + if m != nil { + return m.Type } return "" } -func (x *TransactionContext) GetFrom() string { - if x != nil { - return x.From +func (m *TransactionContext) GetFrom() string { + if m != nil { + return m.From } return "" } -func (x *TransactionContext) GetTo() string { - if x != nil { - return x.To +func (m *TransactionContext) GetTo() string { + if m != nil { + return m.To } return "" } -func (x *TransactionContext) GetData() []byte { - if x != nil { - return x.Data +func (m *TransactionContext) GetData() []byte { + if m != nil { + return m.Data } return nil } -func (x *TransactionContext) GetGas() uint64 { - if x != nil { - return x.Gas +func (m *TransactionContext) GetGas() uint64 { + if m != nil { + return m.Gas } return 0 } -func (x *TransactionContext) GetValue() string { - if x != nil { - return x.Value +func (m *TransactionContext) GetValue() string { + if m != nil { + return m.Value } return "" } -func (x *TransactionContext) GetBatch() []byte { - if x != nil { - return x.Batch +func (m *TransactionContext) GetBatch() []byte { + if m != nil { + return m.Batch } return nil } -func (x *TransactionContext) GetOutput() []byte { - if x != nil { - return x.Output +func (m *TransactionContext) GetOutput() []byte { + if m != nil { + return m.Output } return nil } -func (x *TransactionContext) GetGasUsed() uint64 { - if x != nil { - return x.GasUsed +func (m *TransactionContext) GetGasUsed() uint64 { + if m != nil { + return m.GasUsed } return 0 } -func (x *TransactionContext) GetGasPrice() string { - if x != nil { - return x.GasPrice +func (m *TransactionContext) GetGasPrice() string { + if m != nil { + return m.GasPrice } return "" } -func (x *TransactionContext) GetExecutionTime() uint32 { - if x != nil { - return x.ExecutionTime +func (m *TransactionContext) GetExecutionTime() uint32 { + if m != nil { + return m.ExecutionTime } return 0 } -func (x *TransactionContext) GetOldStateRoot() []byte { - if x != nil { - return x.OldStateRoot +func (m *TransactionContext) GetOldStateRoot() []byte { + if m != nil { + return m.OldStateRoot } return nil } type TransactionStep struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - StateRoot []byte `protobuf:"bytes,1,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // Call depth Depth uint32 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"` @@ -1110,223 +1008,207 @@ type TransactionStep struct { // Contract information Contract *Contract `protobuf:"bytes,13,opt,name=contract,proto3" json:"contract,omitempty"` // Error - Error RomError `protobuf:"varint,14,opt,name=error,proto3,enum=executor.v1.RomError" json:"error,omitempty"` + Error RomError `protobuf:"varint,14,opt,name=error,proto3,enum=executor.v1.RomError" json:"error,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *TransactionStep) Reset() { - *x = TransactionStep{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *TransactionStep) Reset() { *m = TransactionStep{} } +func (m *TransactionStep) String() string { return proto.CompactTextString(m) } +func (*TransactionStep) ProtoMessage() {} +func (*TransactionStep) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{7} } -func (x *TransactionStep) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *TransactionStep) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransactionStep.Unmarshal(m, b) } - -func (*TransactionStep) ProtoMessage() {} - -func (x *TransactionStep) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *TransactionStep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransactionStep.Marshal(b, m, deterministic) } - -// Deprecated: Use TransactionStep.ProtoReflect.Descriptor instead. -func (*TransactionStep) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{7} +func (m *TransactionStep) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransactionStep.Merge(m, src) +} +func (m *TransactionStep) XXX_Size() int { + return xxx_messageInfo_TransactionStep.Size(m) } +func (m *TransactionStep) XXX_DiscardUnknown() { + xxx_messageInfo_TransactionStep.DiscardUnknown(m) +} + +var xxx_messageInfo_TransactionStep proto.InternalMessageInfo -func (x *TransactionStep) GetStateRoot() []byte { - if x != nil { - return x.StateRoot +func (m *TransactionStep) GetStateRoot() []byte { + if m != nil { + return m.StateRoot } return nil } -func (x *TransactionStep) GetDepth() uint32 { - if x != nil { - return x.Depth +func (m *TransactionStep) GetDepth() uint32 { + if m != nil { + return m.Depth } return 0 } -func (x *TransactionStep) GetPc() uint64 { - if x != nil { - return x.Pc +func (m *TransactionStep) GetPc() uint64 { + if m != nil { + return m.Pc } return 0 } -func (x *TransactionStep) GetGas() uint64 { - if x != nil { - return x.Gas +func (m *TransactionStep) GetGas() uint64 { + if m != nil { + return m.Gas } return 0 } -func (x *TransactionStep) GetGasCost() uint64 { - if x != nil { - return x.GasCost +func (m *TransactionStep) GetGasCost() uint64 { + if m != nil { + return m.GasCost } return 0 } -func (x *TransactionStep) GetGasRefund() uint64 { - if x != nil { - return x.GasRefund +func (m *TransactionStep) GetGasRefund() uint64 { + if m != nil { + return m.GasRefund } return 0 } -func (x *TransactionStep) GetOp() uint32 { - if x != nil { - return x.Op +func (m *TransactionStep) GetOp() uint32 { + if m != nil { + return m.Op } return 0 } -func (x *TransactionStep) GetStack() []string { - if x != nil { - return x.Stack +func (m *TransactionStep) GetStack() []string { + if m != nil { + return m.Stack } return nil } -func (x *TransactionStep) GetMemory() []byte { - if x != nil { - return x.Memory +func (m *TransactionStep) GetMemory() []byte { + if m != nil { + return m.Memory } return nil } -func (x *TransactionStep) GetMemorySize() uint32 { - if x != nil { - return x.MemorySize +func (m *TransactionStep) GetMemorySize() uint32 { + if m != nil { + return m.MemorySize } return 0 } -func (x *TransactionStep) GetMemoryOffset() uint32 { - if x != nil { - return x.MemoryOffset +func (m *TransactionStep) GetMemoryOffset() uint32 { + if m != nil { + return m.MemoryOffset } return 0 } -func (x *TransactionStep) GetReturnData() []byte { - if x != nil { - return x.ReturnData +func (m *TransactionStep) GetReturnData() []byte { + if m != nil { + return m.ReturnData } return nil } -func (x *TransactionStep) GetContract() *Contract { - if x != nil { - return x.Contract +func (m *TransactionStep) GetContract() *Contract { + if m != nil { + return m.Contract } return nil } -func (x *TransactionStep) GetError() RomError { - if x != nil { - return x.Error +func (m *TransactionStep) GetError() RomError { + if m != nil { + return m.Error } return RomError_ROM_ERROR_UNSPECIFIED } type Contract struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Caller string `protobuf:"bytes,2,opt,name=caller,proto3" json:"caller,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - Gas uint64 `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Caller string `protobuf:"bytes,2,opt,name=caller,proto3" json:"caller,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + Gas uint64 `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Contract) Reset() { *m = Contract{} } +func (m *Contract) String() string { return proto.CompactTextString(m) } +func (*Contract) ProtoMessage() {} +func (*Contract) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{8} } -func (x *Contract) Reset() { - *x = Contract{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *Contract) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Contract.Unmarshal(m, b) } - -func (x *Contract) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Contract.Marshal(b, m, deterministic) } - -func (*Contract) ProtoMessage() {} - -func (x *Contract) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *Contract) XXX_Merge(src proto.Message) { + xxx_messageInfo_Contract.Merge(m, src) } - -// Deprecated: Use Contract.ProtoReflect.Descriptor instead. -func (*Contract) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{8} +func (m *Contract) XXX_Size() int { + return xxx_messageInfo_Contract.Size(m) +} +func (m *Contract) XXX_DiscardUnknown() { + xxx_messageInfo_Contract.DiscardUnknown(m) } -func (x *Contract) GetAddress() string { - if x != nil { - return x.Address +var xxx_messageInfo_Contract proto.InternalMessageInfo + +func (m *Contract) GetAddress() string { + if m != nil { + return m.Address } return "" } -func (x *Contract) GetCaller() string { - if x != nil { - return x.Caller +func (m *Contract) GetCaller() string { + if m != nil { + return m.Caller } return "" } -func (x *Contract) GetValue() string { - if x != nil { - return x.Value +func (m *Contract) GetValue() string { + if m != nil { + return m.Value } return "" } -func (x *Contract) GetData() []byte { - if x != nil { - return x.Data +func (m *Contract) GetData() []byte { + if m != nil { + return m.Data } return nil } -func (x *Contract) GetGas() uint64 { - if x != nil { - return x.Gas +func (m *Contract) GetGas() uint64 { + if m != nil { + return m.Gas } return 0 } type ProcessTransactionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - // Hash of the transaction TxHash []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // RLP encoded transaction @@ -1355,152 +1237,144 @@ type ProcessTransactionResponse struct { ExecutionTrace []*ExecutionTraceStep `protobuf:"bytes,13,rep,name=execution_trace,json=executionTrace,proto3" json:"execution_trace,omitempty"` CallTrace *CallTrace `protobuf:"bytes,14,opt,name=call_trace,json=callTrace,proto3" json:"call_trace,omitempty"` // Efective Gas Price - EffectiveGasPrice string `protobuf:"bytes,15,opt,name=effective_gas_price,json=effectiveGasPrice,proto3" json:"effective_gas_price,omitempty"` - EffectivePercentage uint32 `protobuf:"varint,16,opt,name=effective_percentage,json=effectivePercentage,proto3" json:"effective_percentage,omitempty"` + EffectiveGasPrice string `protobuf:"bytes,15,opt,name=effective_gas_price,json=effectiveGasPrice,proto3" json:"effective_gas_price,omitempty"` + EffectivePercentage uint32 `protobuf:"varint,16,opt,name=effective_percentage,json=effectivePercentage,proto3" json:"effective_percentage,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *ProcessTransactionResponse) Reset() { - *x = ProcessTransactionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *ProcessTransactionResponse) Reset() { *m = ProcessTransactionResponse{} } +func (m *ProcessTransactionResponse) String() string { return proto.CompactTextString(m) } +func (*ProcessTransactionResponse) ProtoMessage() {} +func (*ProcessTransactionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{9} } -func (x *ProcessTransactionResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *ProcessTransactionResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProcessTransactionResponse.Unmarshal(m, b) } - -func (*ProcessTransactionResponse) ProtoMessage() {} - -func (x *ProcessTransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *ProcessTransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProcessTransactionResponse.Marshal(b, m, deterministic) } - -// Deprecated: Use ProcessTransactionResponse.ProtoReflect.Descriptor instead. -func (*ProcessTransactionResponse) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{9} +func (m *ProcessTransactionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProcessTransactionResponse.Merge(m, src) +} +func (m *ProcessTransactionResponse) XXX_Size() int { + return xxx_messageInfo_ProcessTransactionResponse.Size(m) +} +func (m *ProcessTransactionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ProcessTransactionResponse.DiscardUnknown(m) } -func (x *ProcessTransactionResponse) GetTxHash() []byte { - if x != nil { - return x.TxHash +var xxx_messageInfo_ProcessTransactionResponse proto.InternalMessageInfo + +func (m *ProcessTransactionResponse) GetTxHash() []byte { + if m != nil { + return m.TxHash } return nil } -func (x *ProcessTransactionResponse) GetRlpTx() []byte { - if x != nil { - return x.RlpTx +func (m *ProcessTransactionResponse) GetRlpTx() []byte { + if m != nil { + return m.RlpTx } return nil } -func (x *ProcessTransactionResponse) GetType() uint32 { - if x != nil { - return x.Type +func (m *ProcessTransactionResponse) GetType() uint32 { + if m != nil { + return m.Type } return 0 } -func (x *ProcessTransactionResponse) GetReturnValue() []byte { - if x != nil { - return x.ReturnValue +func (m *ProcessTransactionResponse) GetReturnValue() []byte { + if m != nil { + return m.ReturnValue } return nil } -func (x *ProcessTransactionResponse) GetGasLeft() uint64 { - if x != nil { - return x.GasLeft +func (m *ProcessTransactionResponse) GetGasLeft() uint64 { + if m != nil { + return m.GasLeft } return 0 } -func (x *ProcessTransactionResponse) GetGasUsed() uint64 { - if x != nil { - return x.GasUsed +func (m *ProcessTransactionResponse) GetGasUsed() uint64 { + if m != nil { + return m.GasUsed } return 0 } -func (x *ProcessTransactionResponse) GetGasRefunded() uint64 { - if x != nil { - return x.GasRefunded +func (m *ProcessTransactionResponse) GetGasRefunded() uint64 { + if m != nil { + return m.GasRefunded } return 0 } -func (x *ProcessTransactionResponse) GetError() RomError { - if x != nil { - return x.Error +func (m *ProcessTransactionResponse) GetError() RomError { + if m != nil { + return m.Error } return RomError_ROM_ERROR_UNSPECIFIED } -func (x *ProcessTransactionResponse) GetCreateAddress() string { - if x != nil { - return x.CreateAddress +func (m *ProcessTransactionResponse) GetCreateAddress() string { + if m != nil { + return m.CreateAddress } return "" } -func (x *ProcessTransactionResponse) GetStateRoot() []byte { - if x != nil { - return x.StateRoot +func (m *ProcessTransactionResponse) GetStateRoot() []byte { + if m != nil { + return m.StateRoot } return nil } -func (x *ProcessTransactionResponse) GetLogs() []*Log { - if x != nil { - return x.Logs +func (m *ProcessTransactionResponse) GetLogs() []*Log { + if m != nil { + return m.Logs } return nil } -func (x *ProcessTransactionResponse) GetExecutionTrace() []*ExecutionTraceStep { - if x != nil { - return x.ExecutionTrace +func (m *ProcessTransactionResponse) GetExecutionTrace() []*ExecutionTraceStep { + if m != nil { + return m.ExecutionTrace } return nil } -func (x *ProcessTransactionResponse) GetCallTrace() *CallTrace { - if x != nil { - return x.CallTrace +func (m *ProcessTransactionResponse) GetCallTrace() *CallTrace { + if m != nil { + return m.CallTrace } return nil } -func (x *ProcessTransactionResponse) GetEffectiveGasPrice() string { - if x != nil { - return x.EffectiveGasPrice +func (m *ProcessTransactionResponse) GetEffectiveGasPrice() string { + if m != nil { + return m.EffectiveGasPrice } return "" } -func (x *ProcessTransactionResponse) GetEffectivePercentage() uint32 { - if x != nil { - return x.EffectivePercentage +func (m *ProcessTransactionResponse) GetEffectivePercentage() uint32 { + if m != nil { + return m.EffectivePercentage } return 0 } type Log struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - // Address of the contract that generated the event Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // List of topics provided by the contract @@ -1516,102 +1390,94 @@ type Log struct { // Hash of the batch in which the transaction was included BatchHash []byte `protobuf:"bytes,7,opt,name=batch_hash,json=batchHash,proto3" json:"batch_hash,omitempty"` // Index of the log in the block - Index uint32 `protobuf:"varint,8,opt,name=index,proto3" json:"index,omitempty"` + Index uint32 `protobuf:"varint,8,opt,name=index,proto3" json:"index,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *Log) Reset() { - *x = Log{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *Log) Reset() { *m = Log{} } +func (m *Log) String() string { return proto.CompactTextString(m) } +func (*Log) ProtoMessage() {} +func (*Log) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{10} } -func (x *Log) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *Log) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Log.Unmarshal(m, b) } - -func (*Log) ProtoMessage() {} - -func (x *Log) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Log.Marshal(b, m, deterministic) } - -// Deprecated: Use Log.ProtoReflect.Descriptor instead. -func (*Log) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{10} +func (m *Log) XXX_Merge(src proto.Message) { + xxx_messageInfo_Log.Merge(m, src) +} +func (m *Log) XXX_Size() int { + return xxx_messageInfo_Log.Size(m) +} +func (m *Log) XXX_DiscardUnknown() { + xxx_messageInfo_Log.DiscardUnknown(m) } -func (x *Log) GetAddress() string { - if x != nil { - return x.Address +var xxx_messageInfo_Log proto.InternalMessageInfo + +func (m *Log) GetAddress() string { + if m != nil { + return m.Address } return "" } -func (x *Log) GetTopics() [][]byte { - if x != nil { - return x.Topics +func (m *Log) GetTopics() [][]byte { + if m != nil { + return m.Topics } return nil } -func (x *Log) GetData() []byte { - if x != nil { - return x.Data +func (m *Log) GetData() []byte { + if m != nil { + return m.Data } return nil } -func (x *Log) GetBatchNumber() uint64 { - if x != nil { - return x.BatchNumber +func (m *Log) GetBatchNumber() uint64 { + if m != nil { + return m.BatchNumber } return 0 } -func (x *Log) GetTxHash() []byte { - if x != nil { - return x.TxHash +func (m *Log) GetTxHash() []byte { + if m != nil { + return m.TxHash } return nil } -func (x *Log) GetTxIndex() uint32 { - if x != nil { - return x.TxIndex +func (m *Log) GetTxIndex() uint32 { + if m != nil { + return m.TxIndex } return 0 } -func (x *Log) GetBatchHash() []byte { - if x != nil { - return x.BatchHash +func (m *Log) GetBatchHash() []byte { + if m != nil { + return m.BatchHash } return nil } -func (x *Log) GetIndex() uint32 { - if x != nil { - return x.Index +func (m *Log) GetIndex() uint32 { + if m != nil { + return m.Index } return 0 } type ExecutionTraceStep struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - // Program Counter Pc uint64 `protobuf:"varint,1,opt,name=pc,proto3" json:"pc,omitempty"` // OpCode @@ -1637,787 +1503,320 @@ type ExecutionTraceStep struct { // Gas refund GasRefund uint64 `protobuf:"varint,12,opt,name=gas_refund,json=gasRefund,proto3" json:"gas_refund,omitempty"` // Error - Error RomError `protobuf:"varint,13,opt,name=error,proto3,enum=executor.v1.RomError" json:"error,omitempty"` + Error RomError `protobuf:"varint,13,opt,name=error,proto3,enum=executor.v1.RomError" json:"error,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *ExecutionTraceStep) Reset() { - *x = ExecutionTraceStep{} - if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *ExecutionTraceStep) Reset() { *m = ExecutionTraceStep{} } +func (m *ExecutionTraceStep) String() string { return proto.CompactTextString(m) } +func (*ExecutionTraceStep) ProtoMessage() {} +func (*ExecutionTraceStep) Descriptor() ([]byte, []int) { + return fileDescriptor_12d1cdcda51e000f, []int{11} } -func (x *ExecutionTraceStep) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *ExecutionTraceStep) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExecutionTraceStep.Unmarshal(m, b) } - -func (*ExecutionTraceStep) ProtoMessage() {} - -func (x *ExecutionTraceStep) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (m *ExecutionTraceStep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExecutionTraceStep.Marshal(b, m, deterministic) } - -// Deprecated: Use ExecutionTraceStep.ProtoReflect.Descriptor instead. -func (*ExecutionTraceStep) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{11} +func (m *ExecutionTraceStep) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecutionTraceStep.Merge(m, src) +} +func (m *ExecutionTraceStep) XXX_Size() int { + return xxx_messageInfo_ExecutionTraceStep.Size(m) } +func (m *ExecutionTraceStep) XXX_DiscardUnknown() { + xxx_messageInfo_ExecutionTraceStep.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecutionTraceStep proto.InternalMessageInfo -func (x *ExecutionTraceStep) GetPc() uint64 { - if x != nil { - return x.Pc +func (m *ExecutionTraceStep) GetPc() uint64 { + if m != nil { + return m.Pc } return 0 } -func (x *ExecutionTraceStep) GetOp() string { - if x != nil { - return x.Op +func (m *ExecutionTraceStep) GetOp() string { + if m != nil { + return m.Op } return "" } -func (x *ExecutionTraceStep) GetRemainingGas() uint64 { - if x != nil { - return x.RemainingGas +func (m *ExecutionTraceStep) GetRemainingGas() uint64 { + if m != nil { + return m.RemainingGas } return 0 } -func (x *ExecutionTraceStep) GetGasCost() uint64 { - if x != nil { - return x.GasCost +func (m *ExecutionTraceStep) GetGasCost() uint64 { + if m != nil { + return m.GasCost } return 0 } -func (x *ExecutionTraceStep) GetMemory() []byte { - if x != nil { - return x.Memory +func (m *ExecutionTraceStep) GetMemory() []byte { + if m != nil { + return m.Memory } return nil } -func (x *ExecutionTraceStep) GetMemorySize() uint32 { - if x != nil { - return x.MemorySize +func (m *ExecutionTraceStep) GetMemorySize() uint32 { + if m != nil { + return m.MemorySize } return 0 } -func (x *ExecutionTraceStep) GetMemoryOffset() uint32 { - if x != nil { - return x.MemoryOffset +func (m *ExecutionTraceStep) GetMemoryOffset() uint32 { + if m != nil { + return m.MemoryOffset } return 0 } -func (x *ExecutionTraceStep) GetStack() []string { - if x != nil { - return x.Stack +func (m *ExecutionTraceStep) GetStack() []string { + if m != nil { + return m.Stack } return nil } -func (x *ExecutionTraceStep) GetReturnData() []byte { - if x != nil { - return x.ReturnData +func (m *ExecutionTraceStep) GetReturnData() []byte { + if m != nil { + return m.ReturnData } return nil } -func (x *ExecutionTraceStep) GetStorage() map[string]string { - if x != nil { - return x.Storage +func (m *ExecutionTraceStep) GetStorage() map[string]string { + if m != nil { + return m.Storage } return nil } -func (x *ExecutionTraceStep) GetDepth() uint32 { - if x != nil { - return x.Depth +func (m *ExecutionTraceStep) GetDepth() uint32 { + if m != nil { + return m.Depth } return 0 } -func (x *ExecutionTraceStep) GetGasRefund() uint64 { - if x != nil { - return x.GasRefund +func (m *ExecutionTraceStep) GetGasRefund() uint64 { + if m != nil { + return m.GasRefund } return 0 } -func (x *ExecutionTraceStep) GetError() RomError { - if x != nil { - return x.Error +func (m *ExecutionTraceStep) GetError() RomError { + if m != nil { + return m.Error } return RomError_ROM_ERROR_UNSPECIFIED } -var File_executor_proto protoreflect.FileDescriptor - -var file_executor_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, - 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x06, 0x0a, 0x13, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x5f, 0x74, 0x72, - 0x65, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x66, - 0x72, 0x6f, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, - 0x38, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x62, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x02, 0x64, 0x62, 0x12, 0x66, 0x0a, 0x12, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x3b, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0xb4, 0x07, 0x0a, 0x14, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 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, 0x02, 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, 0x03, - 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, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, - 0x65, 0x77, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6e, - 0x74, 0x5f, 0x6b, 0x65, 0x63, 0x63, 0x61, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x63, 0x6e, 0x74, 0x4b, 0x65, 0x63, 0x63, 0x61, 0x6b, - 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6e, 0x74, 0x5f, 0x70, 0x6f, - 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x11, 0x63, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, - 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6e, 0x74, 0x5f, 0x70, 0x6f, - 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x63, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x69, 0x64, - 0x6f, 0x6e, 0x50, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x6e, - 0x74, 0x5f, 0x6d, 0x65, 0x6d, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x73, - 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6e, 0x74, 0x5f, 0x61, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x65, 0x74, - 0x69, 0x63, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x63, 0x6e, 0x74, 0x41, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6e, 0x74, - 0x5f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0b, 0x63, 0x6e, 0x74, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, - 0x63, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x08, 0x63, 0x6e, 0x74, 0x53, 0x74, 0x65, 0x70, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x09, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1a, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x6b, 0x0a, 0x14, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x39, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x72, 0x65, 0x61, - 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x07, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x46, 0x6c, 0x75, 0x73, 0x68, - 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x49, 0x64, 0x1a, - 0x61, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xe7, 0x02, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, - 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x46, 0x6c, - 0x75, 0x73, 0x68, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x64, 0x12, - 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x75, 0x73, - 0x68, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x6f, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x13, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x46, 0x6c, - 0x75, 0x73, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x70, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x70, 0x72, 0x6f, - 0x67, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x70, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, - 0x1b, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0xba, 0x02, 0x0a, - 0x0b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x0a, 0x0f, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, - 0x2c, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x47, 0x0a, - 0x21, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x1c, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, - 0x54, 0x6f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x1e, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, - 0x6c, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x19, - 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x54, 0x6f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0x3f, 0x0a, 0x0d, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x7a, 0x0a, 0x09, 0x43, 0x61, - 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x52, - 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x22, 0xbb, 0x02, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, - 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, - 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, - 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, - 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x6f, 0x6f, 0x74, 0x22, 0xa7, 0x03, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x0e, 0x0a, - 0x02, 0x70, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x70, 0x63, 0x12, 0x10, 0x0a, - 0x03, 0x67, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, - 0x73, 0x5f, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x67, 0x61, 0x73, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x70, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, - 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x6d, 0x6f, - 0x72, 0x79, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x31, - 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x15, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x78, - 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x61, 0x73, 0x22, 0xd9, 0x04, 0x0a, 0x1a, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x15, 0x0a, 0x06, 0x72, 0x6c, 0x70, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x72, 0x6c, 0x70, 0x54, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x67, 0x61, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, - 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, - 0x55, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x61, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x75, - 0x6e, 0x64, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x52, - 0x65, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x6c, 0x6f, - 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, - 0x12, 0x48, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x65, 0x70, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x61, - 0x6c, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, - 0x6c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, - 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x61, 0x67, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, - 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x07, 0x74, 0x78, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x74, - 0x63, 0x68, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, - 0x61, 0x74, 0x63, 0x68, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xef, - 0x03, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x53, 0x74, 0x65, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x02, 0x70, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, - 0x6e, 0x67, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x72, 0x65, - 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x61, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, - 0x73, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, - 0x73, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, - 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x46, 0x0a, 0x07, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x65, 0x70, 0x2e, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, - 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x67, 0x61, - 0x73, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 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, - 0x2a, 0xc6, 0x08, 0x0a, 0x08, 0x52, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x19, 0x0a, - 0x15, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x4f, 0x4d, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, - 0x12, 0x18, 0x0a, 0x14, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, - 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x47, 0x41, 0x53, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x4f, - 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x5f, 0x4f, 0x56, - 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x4f, 0x4d, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x5f, 0x55, 0x4e, 0x44, 0x45, - 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x52, 0x4f, 0x4d, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, - 0x5a, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x05, 0x12, 0x28, 0x0a, - 0x24, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, - 0x41, 0x43, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4c, 0x4c, - 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x4f, 0x4d, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, - 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x4f, 0x4d, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, - 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x53, 0x54, 0x45, 0x50, 0x10, 0x08, 0x12, 0x24, 0x0a, - 0x20, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, - 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x4b, 0x45, 0x43, 0x43, 0x41, - 0x4b, 0x10, 0x09, 0x12, 0x24, 0x0a, 0x20, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, - 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0a, 0x12, 0x21, 0x0a, 0x1d, 0x52, 0x4f, 0x4d, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, - 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x4d, 0x45, 0x4d, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, - 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, - 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x41, 0x52, 0x49, 0x54, 0x48, 0x10, - 0x0c, 0x12, 0x25, 0x0a, 0x21, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, - 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x50, - 0x41, 0x44, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x0d, 0x12, 0x26, 0x0a, 0x22, 0x52, 0x4f, 0x4d, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x4f, 0x53, 0x45, 0x49, 0x44, 0x4f, 0x4e, 0x10, 0x0e, - 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4a, 0x55, 0x4d, 0x50, 0x10, 0x0f, 0x12, 0x1c, 0x0a, 0x18, - 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x5f, 0x4f, 0x50, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x10, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x4f, - 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x11, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x4f, 0x4d, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x42, 0x59, - 0x54, 0x45, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x53, 0x5f, 0x45, 0x46, - 0x10, 0x12, 0x12, 0x29, 0x0a, 0x25, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x10, 0x13, 0x12, 0x28, 0x0a, - 0x24, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, - 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x43, 0x48, 0x41, - 0x49, 0x4e, 0x5f, 0x49, 0x44, 0x10, 0x14, 0x12, 0x25, 0x0a, 0x21, 0x52, 0x4f, 0x4d, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, - 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4e, 0x4f, 0x4e, 0x43, 0x45, 0x10, 0x15, 0x12, 0x29, - 0x0a, 0x25, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, - 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x47, 0x41, - 0x53, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x16, 0x12, 0x27, 0x0a, 0x23, 0x52, 0x4f, 0x4d, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, - 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, - 0x10, 0x17, 0x12, 0x2f, 0x0a, 0x2b, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x47, 0x41, 0x53, 0x5f, 0x4c, 0x49, 0x4d, 0x49, - 0x54, 0x10, 0x18, 0x12, 0x2b, 0x0a, 0x27, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, - 0x49, 0x44, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x19, - 0x12, 0x27, 0x0a, 0x23, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, - 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x54, 0x58, 0x5f, 0x47, 0x41, 0x53, 0x5f, 0x4f, - 0x56, 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x10, 0x1a, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x4f, 0x4d, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x44, 0x41, 0x54, - 0x41, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x42, 0x49, 0x47, 0x10, 0x1b, 0x12, 0x21, 0x0a, 0x1d, 0x52, - 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, - 0x52, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x4b, 0x5f, 0x49, 0x44, 0x10, 0x1c, 0x12, 0x19, - 0x0a, 0x15, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x4c, 0x50, 0x10, 0x1d, 0x2a, 0xdf, 0x03, 0x0a, 0x0d, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x45, - 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x45, - 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x2b, 0x0a, 0x27, 0x45, 0x58, 0x45, 0x43, - 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, - 0x45, 0x52, 0x53, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x4b, 0x45, 0x43, - 0x43, 0x41, 0x4b, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, - 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, - 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, - 0x10, 0x03, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x4f, 0x56, - 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x4d, 0x45, 0x4d, 0x10, 0x04, 0x12, 0x2a, 0x0a, 0x26, - 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, - 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, - 0x5f, 0x41, 0x52, 0x49, 0x54, 0x48, 0x10, 0x05, 0x12, 0x2c, 0x0a, 0x28, 0x45, 0x58, 0x45, 0x43, - 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, - 0x45, 0x52, 0x53, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x50, 0x41, 0x44, - 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x2d, 0x0a, 0x29, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, - 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, - 0x53, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x50, 0x4f, 0x53, 0x45, 0x49, - 0x44, 0x4f, 0x4e, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, - 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, - 0x54, 0x45, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x4b, 0x5f, 0x49, 0x44, 0x10, 0x08, 0x12, 0x23, 0x0a, - 0x1f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, - 0x10, 0x09, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x46, 0x45, 0x41, 0x32, 0x53, 0x43, 0x41, 0x4c, 0x41, 0x52, 0x10, - 0x0a, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x5f, 0x54, 0x4f, 0x53, 0x33, 0x32, 0x10, 0x0b, 0x32, 0xb9, 0x01, 0x0a, 0x0f, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x55, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x20, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x75, - 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x23, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3e, 0x5a, 0x3c, 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, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_executor_proto_rawDescOnce sync.Once - file_executor_proto_rawDescData = file_executor_proto_rawDesc -) - -func file_executor_proto_rawDescGZIP() []byte { - file_executor_proto_rawDescOnce.Do(func() { - file_executor_proto_rawDescData = protoimpl.X.CompressGZIP(file_executor_proto_rawDescData) - }) - return file_executor_proto_rawDescData -} - -var file_executor_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_executor_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_executor_proto_goTypes = []interface{}{ - (RomError)(0), // 0: executor.v1.RomError - (ExecutorError)(0), // 1: executor.v1.ExecutorError - (*ProcessBatchRequest)(nil), // 2: executor.v1.ProcessBatchRequest - (*ProcessBatchResponse)(nil), // 3: executor.v1.ProcessBatchResponse - (*GetFlushStatusResponse)(nil), // 4: executor.v1.GetFlushStatusResponse - (*TraceConfig)(nil), // 5: executor.v1.TraceConfig - (*InfoReadWrite)(nil), // 6: executor.v1.InfoReadWrite - (*CallTrace)(nil), // 7: executor.v1.CallTrace - (*TransactionContext)(nil), // 8: executor.v1.TransactionContext - (*TransactionStep)(nil), // 9: executor.v1.TransactionStep - (*Contract)(nil), // 10: executor.v1.Contract - (*ProcessTransactionResponse)(nil), // 11: executor.v1.ProcessTransactionResponse - (*Log)(nil), // 12: executor.v1.Log - (*ExecutionTraceStep)(nil), // 13: executor.v1.ExecutionTraceStep - nil, // 14: executor.v1.ProcessBatchRequest.DbEntry - nil, // 15: executor.v1.ProcessBatchRequest.ContractsBytecodeEntry - nil, // 16: executor.v1.ProcessBatchResponse.ReadWriteAddressesEntry - nil, // 17: executor.v1.ExecutionTraceStep.StorageEntry - (*emptypb.Empty)(nil), // 18: google.protobuf.Empty -} -var file_executor_proto_depIdxs = []int32{ - 14, // 0: executor.v1.ProcessBatchRequest.db:type_name -> executor.v1.ProcessBatchRequest.DbEntry - 15, // 1: executor.v1.ProcessBatchRequest.contracts_bytecode:type_name -> executor.v1.ProcessBatchRequest.ContractsBytecodeEntry - 5, // 2: executor.v1.ProcessBatchRequest.trace_config:type_name -> executor.v1.TraceConfig - 11, // 3: executor.v1.ProcessBatchResponse.responses:type_name -> executor.v1.ProcessTransactionResponse - 1, // 4: executor.v1.ProcessBatchResponse.error:type_name -> executor.v1.ExecutorError - 16, // 5: executor.v1.ProcessBatchResponse.read_write_addresses:type_name -> executor.v1.ProcessBatchResponse.ReadWriteAddressesEntry - 8, // 6: executor.v1.CallTrace.context:type_name -> executor.v1.TransactionContext - 9, // 7: executor.v1.CallTrace.steps:type_name -> executor.v1.TransactionStep - 10, // 8: executor.v1.TransactionStep.contract:type_name -> executor.v1.Contract - 0, // 9: executor.v1.TransactionStep.error:type_name -> executor.v1.RomError - 0, // 10: executor.v1.ProcessTransactionResponse.error:type_name -> executor.v1.RomError - 12, // 11: executor.v1.ProcessTransactionResponse.logs:type_name -> executor.v1.Log - 13, // 12: executor.v1.ProcessTransactionResponse.execution_trace:type_name -> executor.v1.ExecutionTraceStep - 7, // 13: executor.v1.ProcessTransactionResponse.call_trace:type_name -> executor.v1.CallTrace - 17, // 14: executor.v1.ExecutionTraceStep.storage:type_name -> executor.v1.ExecutionTraceStep.StorageEntry - 0, // 15: executor.v1.ExecutionTraceStep.error:type_name -> executor.v1.RomError - 6, // 16: executor.v1.ProcessBatchResponse.ReadWriteAddressesEntry.value:type_name -> executor.v1.InfoReadWrite - 2, // 17: executor.v1.ExecutorService.ProcessBatch:input_type -> executor.v1.ProcessBatchRequest - 18, // 18: executor.v1.ExecutorService.GetFlushStatus:input_type -> google.protobuf.Empty - 3, // 19: executor.v1.ExecutorService.ProcessBatch:output_type -> executor.v1.ProcessBatchResponse - 4, // 20: executor.v1.ExecutorService.GetFlushStatus:output_type -> executor.v1.GetFlushStatusResponse - 19, // [19:21] is the sub-list for method output_type - 17, // [17:19] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name -} - -func init() { file_executor_proto_init() } -func file_executor_proto_init() { - if File_executor_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_executor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessBatchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessBatchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFlushStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TraceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InfoReadWrite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CallTrace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactionContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactionStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Contract); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessTransactionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Log); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_executor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionTraceStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_executor_proto_rawDesc, - NumEnums: 2, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_executor_proto_goTypes, - DependencyIndexes: file_executor_proto_depIdxs, - EnumInfos: file_executor_proto_enumTypes, - MessageInfos: file_executor_proto_msgTypes, - }.Build() - File_executor_proto = out.File - file_executor_proto_rawDesc = nil - file_executor_proto_goTypes = nil - file_executor_proto_depIdxs = nil +func init() { + proto.RegisterEnum("executor.v1.RomError", RomError_name, RomError_value) + proto.RegisterEnum("executor.v1.ExecutorError", ExecutorError_name, ExecutorError_value) + proto.RegisterType((*ProcessBatchRequest)(nil), "executor.v1.ProcessBatchRequest") + proto.RegisterMapType((map[string]string)(nil), "executor.v1.ProcessBatchRequest.ContractsBytecodeEntry") + proto.RegisterMapType((map[string]string)(nil), "executor.v1.ProcessBatchRequest.DbEntry") + proto.RegisterType((*ProcessBatchResponse)(nil), "executor.v1.ProcessBatchResponse") + proto.RegisterMapType((map[string]*InfoReadWrite)(nil), "executor.v1.ProcessBatchResponse.ReadWriteAddressesEntry") + proto.RegisterType((*GetFlushStatusResponse)(nil), "executor.v1.GetFlushStatusResponse") + proto.RegisterType((*TraceConfig)(nil), "executor.v1.TraceConfig") + proto.RegisterType((*InfoReadWrite)(nil), "executor.v1.InfoReadWrite") + proto.RegisterType((*CallTrace)(nil), "executor.v1.CallTrace") + proto.RegisterType((*TransactionContext)(nil), "executor.v1.TransactionContext") + proto.RegisterType((*TransactionStep)(nil), "executor.v1.TransactionStep") + proto.RegisterType((*Contract)(nil), "executor.v1.Contract") + proto.RegisterType((*ProcessTransactionResponse)(nil), "executor.v1.ProcessTransactionResponse") + proto.RegisterType((*Log)(nil), "executor.v1.Log") + proto.RegisterType((*ExecutionTraceStep)(nil), "executor.v1.ExecutionTraceStep") + proto.RegisterMapType((map[string]string)(nil), "executor.v1.ExecutionTraceStep.StorageEntry") +} + +func init() { + proto.RegisterFile("executor.proto", fileDescriptor_12d1cdcda51e000f) +} + +var fileDescriptor_12d1cdcda51e000f = []byte{ + // 2671 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x59, 0xdf, 0x52, 0xdb, 0x48, + 0xf6, 0x1e, 0x0c, 0x18, 0x7c, 0x6c, 0x83, 0xd2, 0x10, 0xe2, 0x90, 0x64, 0x02, 0x4e, 0x66, 0xc2, + 0x24, 0x33, 0x30, 0x43, 0x6a, 0x6a, 0xfe, 0xfc, 0x7e, 0xb5, 0x5b, 0xc6, 0x16, 0xa0, 0x0d, 0xd8, + 0x2e, 0x59, 0x64, 0x32, 0x73, 0xa3, 0x92, 0xa5, 0xb6, 0x51, 0x61, 0xab, 0xbd, 0x52, 0x3b, 0x81, + 0x3c, 0xc4, 0xbe, 0xc6, 0xbe, 0xc0, 0xde, 0xec, 0xee, 0xfd, 0xbe, 0xc2, 0xd6, 0x5e, 0xed, 0xe5, + 0x5e, 0xee, 0x2b, 0x6c, 0x9d, 0xee, 0x96, 0x64, 0x19, 0x03, 0x33, 0x77, 0xea, 0x73, 0xbe, 0x3e, + 0xdd, 0xea, 0x3e, 0xdf, 0x77, 0x8e, 0x6c, 0x58, 0xa1, 0x97, 0xd4, 0x1d, 0x73, 0x16, 0xee, 0x8e, + 0x42, 0xc6, 0x19, 0x29, 0x26, 0xe3, 0xf7, 0xdf, 0x6c, 0x3e, 0xea, 0x33, 0xd6, 0x1f, 0xd0, 0x3d, + 0xe1, 0xea, 0x8e, 0x7b, 0x7b, 0x74, 0x38, 0xe2, 0x57, 0x12, 0x59, 0xfd, 0x53, 0x1e, 0xd6, 0xda, + 0x21, 0x73, 0x69, 0x14, 0x1d, 0x38, 0xdc, 0x3d, 0x37, 0xe9, 0x1f, 0xc7, 0x34, 0xe2, 0xe4, 0x39, + 0xac, 0xb0, 0x81, 0x67, 0x47, 0xdc, 0xe1, 0xd4, 0x0e, 0x19, 0xe3, 0x95, 0xb9, 0xad, 0xb9, 0x9d, + 0x92, 0x59, 0x62, 0x03, 0xaf, 0x83, 0x46, 0x93, 0x31, 0x4e, 0x5e, 0x01, 0x41, 0x94, 0xe3, 0xba, + 0xb6, 0x1f, 0x8c, 0xc6, 0xdc, 0x3e, 0x77, 0xa2, 0xf3, 0x4a, 0x4e, 0x20, 0x57, 0xd9, 0xc0, 0xab, + 0xb9, 0xae, 0x81, 0xf6, 0x63, 0x27, 0x3a, 0x27, 0x55, 0x28, 0x23, 0xb8, 0x8b, 0xcb, 0xd8, 0xc1, + 0x78, 0x58, 0x99, 0xdf, 0x9a, 0xdb, 0x59, 0x30, 0x8b, 0x6c, 0xe0, 0x89, 0xa5, 0x9b, 0xe3, 0x21, + 0x79, 0x08, 0xcb, 0xee, 0xb9, 0xe3, 0x07, 0xb6, 0xef, 0x55, 0x16, 0x84, 0x7b, 0x49, 0x8c, 0x0d, + 0x8f, 0x3c, 0x80, 0xa5, 0x1e, 0x0b, 0x2f, 0xd0, 0xb3, 0x28, 0x3c, 0x79, 0x1c, 0x1a, 0x1e, 0xc6, + 0x95, 0x31, 0x07, 0xfb, 0xb6, 0xe7, 0x70, 0xa7, 0x92, 0x17, 0xeb, 0x17, 0x85, 0xf1, 0x64, 0xbf, + 0xe1, 0x70, 0x87, 0xec, 0x80, 0xd6, 0x1f, 0xb0, 0xae, 0x33, 0xb0, 0xe9, 0xa5, 0xcf, 0xe5, 0x0b, + 0x2d, 0x09, 0xd8, 0x8a, 0xb4, 0xeb, 0x97, 0x3e, 0x17, 0xaf, 0xf4, 0x0c, 0xca, 0x94, 0x9f, 0xdb, + 0xdc, 0x1f, 0xd2, 0x88, 0x3b, 0xc3, 0x51, 0x65, 0x59, 0x2c, 0x56, 0xa2, 0xfc, 0xdc, 0x8a, 0x6d, + 0x64, 0x13, 0x96, 0x5d, 0xe6, 0x07, 0x5d, 0x27, 0xa2, 0x95, 0xc2, 0xd6, 0xdc, 0x4e, 0xc1, 0x4c, + 0xc6, 0xe4, 0x4b, 0x20, 0xe3, 0x91, 0x87, 0xc7, 0x36, 0xa4, 0xe1, 0xc5, 0x80, 0xda, 0x3c, 0xa4, + 0xb4, 0x02, 0x5b, 0x73, 0x3b, 0x65, 0x53, 0x93, 0x9e, 0x53, 0xe1, 0xb0, 0x42, 0x4a, 0xc9, 0x53, + 0x28, 0x06, 0xcc, 0x76, 0xd9, 0x38, 0xe0, 0x34, 0x8c, 0x2a, 0x45, 0xb1, 0x18, 0x04, 0xac, 0xae, + 0x2c, 0x84, 0xc0, 0x42, 0x2f, 0x64, 0xc3, 0x4a, 0x49, 0x2c, 0x23, 0x9e, 0xc9, 0xf7, 0x90, 0xf3, + 0xba, 0x95, 0xf2, 0xd6, 0xfc, 0x4e, 0x71, 0x7f, 0x67, 0x77, 0xe2, 0xae, 0x77, 0x67, 0x5c, 0xe5, + 0x6e, 0xa3, 0xab, 0x07, 0x3c, 0xbc, 0x32, 0x73, 0x5e, 0x97, 0xf4, 0x80, 0xb8, 0x2c, 0xe0, 0xa1, + 0xe3, 0xf2, 0xc8, 0xee, 0x5e, 0x71, 0xea, 0x32, 0x8f, 0x56, 0x56, 0x44, 0xa4, 0xef, 0xee, 0x8c, + 0x54, 0x8f, 0xa7, 0x1e, 0xa8, 0x99, 0x32, 0xf0, 0x3d, 0x77, 0xda, 0x4e, 0xfe, 0x0f, 0x4a, 0x68, + 0xa1, 0xb6, 0xcb, 0x82, 0x9e, 0xdf, 0xaf, 0xac, 0x6e, 0xcd, 0xed, 0x14, 0xf7, 0x2b, 0x99, 0x15, + 0x2c, 0x04, 0xd4, 0x85, 0xdf, 0x2c, 0xf2, 0x74, 0xb0, 0xf9, 0x2d, 0x2c, 0xa9, 0x3d, 0x13, 0x0d, + 0xe6, 0x2f, 0xe8, 0x95, 0xc8, 0xbd, 0x82, 0x89, 0x8f, 0x64, 0x1d, 0x16, 0xdf, 0x3b, 0x83, 0x31, + 0x15, 0x59, 0x56, 0x30, 0xe5, 0xe0, 0xc7, 0xdc, 0xf7, 0x73, 0x9b, 0x0d, 0xd8, 0x98, 0xbd, 0xc1, + 0xdf, 0x12, 0xa5, 0xfa, 0x97, 0x25, 0x58, 0xcf, 0xbe, 0x7b, 0x34, 0x62, 0x41, 0x44, 0x91, 0x11, + 0x01, 0xfd, 0x30, 0x83, 0x11, 0x01, 0xfd, 0x90, 0x61, 0x04, 0xa2, 0x66, 0x33, 0x22, 0xa0, 0x1f, + 0x32, 0x8c, 0xf8, 0x0a, 0xd6, 0x10, 0x3c, 0x60, 0x6e, 0x26, 0x31, 0xe7, 0x05, 0x5a, 0x0b, 0xe8, + 0x87, 0x13, 0xf4, 0x24, 0xa9, 0x59, 0x85, 0x32, 0xc2, 0x53, 0x02, 0x49, 0x86, 0x14, 0x03, 0xfa, + 0x21, 0x21, 0xd0, 0x4b, 0xb8, 0xe7, 0x06, 0xdc, 0xbe, 0xa0, 0xae, 0xeb, 0x5c, 0x88, 0xc5, 0x69, + 0x24, 0xf8, 0x52, 0x36, 0x57, 0xdd, 0x80, 0xbf, 0x11, 0xf6, 0x63, 0x61, 0x26, 0xbb, 0xb0, 0x86, + 0xd8, 0x11, 0x8b, 0xa8, 0xef, 0xb1, 0x20, 0x46, 0xe7, 0x05, 0x1a, 0xc3, 0xb4, 0x95, 0x47, 0xe1, + 0xf7, 0xe1, 0x7e, 0x06, 0x3f, 0x72, 0x3c, 0xcf, 0x0f, 0xfa, 0x91, 0x60, 0x52, 0xd9, 0x5c, 0x9b, + 0x98, 0xd1, 0x56, 0x2e, 0x3c, 0x35, 0x9c, 0x33, 0xa4, 0x43, 0xdb, 0x19, 0xf8, 0xfd, 0x20, 0x12, + 0x7c, 0x2a, 0x9b, 0x25, 0x37, 0xe0, 0xa7, 0x74, 0x58, 0x13, 0x36, 0xf2, 0x02, 0x70, 0x73, 0xb6, + 0x13, 0xfa, 0xfc, 0x7c, 0x48, 0xb9, 0xef, 0x46, 0x82, 0x56, 0x65, 0x13, 0x27, 0xd7, 0x52, 0x2b, + 0xd9, 0x06, 0x9c, 0x68, 0x77, 0xfd, 0xc0, 0x09, 0x7d, 0x1a, 0x29, 0x5a, 0x15, 0xdd, 0x80, 0x1f, + 0x28, 0x13, 0x79, 0x04, 0x05, 0x84, 0x44, 0x9c, 0x8e, 0x24, 0x9f, 0xca, 0xe6, 0xb2, 0x1b, 0xf0, + 0x0e, 0x8e, 0xc5, 0x2b, 0x8f, 0x87, 0xe3, 0x81, 0xc3, 0xfd, 0xf7, 0xd4, 0xee, 0x3b, 0x91, 0x3d, + 0x8e, 0xa8, 0x27, 0xc8, 0xb5, 0x60, 0xde, 0x4b, 0x5d, 0x47, 0x4e, 0x74, 0x16, 0x51, 0x8f, 0xe8, + 0x50, 0x08, 0x55, 0x02, 0x44, 0x8a, 0x70, 0x2f, 0x66, 0xd1, 0xc4, 0x0a, 0x9d, 0x20, 0x72, 0x5c, + 0xee, 0xb3, 0x20, 0x4e, 0x18, 0x33, 0x9d, 0x49, 0xbe, 0x86, 0x45, 0x1a, 0x86, 0x2c, 0xac, 0xac, + 0x6c, 0xcd, 0xed, 0xac, 0xec, 0x6f, 0x66, 0x42, 0xe8, 0xea, 0x59, 0x47, 0x84, 0x29, 0x81, 0xe4, + 0x02, 0xd6, 0x43, 0xea, 0x78, 0xf6, 0x87, 0xd0, 0xe7, 0xd4, 0x76, 0x3c, 0x2f, 0xa4, 0x11, 0xee, + 0x61, 0x55, 0xec, 0xe1, 0x87, 0x5b, 0xa8, 0x2a, 0xd7, 0xdc, 0x35, 0xa9, 0xe3, 0xfd, 0x84, 0x93, + 0x6b, 0xf1, 0x5c, 0x49, 0x56, 0x12, 0x5e, 0x73, 0xa0, 0xea, 0xf6, 0x06, 0xe3, 0xe8, 0x1c, 0xb5, + 0x55, 0x93, 0xaa, 0x2b, 0xc6, 0x86, 0x47, 0x3e, 0x87, 0xd5, 0x88, 0xb3, 0x90, 0x7a, 0x76, 0x82, + 0xb8, 0x27, 0x10, 0x65, 0x69, 0x3e, 0x54, 0xb8, 0x47, 0x50, 0x18, 0x85, 0xec, 0x3d, 0x0d, 0x11, + 0x41, 0xa4, 0x24, 0x4a, 0x83, 0xe1, 0x6d, 0x3a, 0xf0, 0xe0, 0x86, 0xed, 0xcc, 0xa0, 0xe6, 0xd7, + 0x93, 0xd4, 0x2c, 0x4e, 0x9d, 0x95, 0x11, 0xf4, 0x58, 0x12, 0x6a, 0x92, 0xb6, 0xff, 0xc9, 0xc1, + 0xc6, 0x11, 0xe5, 0x62, 0x3b, 0xc8, 0xc6, 0x71, 0x94, 0x10, 0x77, 0xc6, 0x2b, 0xcc, 0xcd, 0x7a, + 0x85, 0x1d, 0xd0, 0xd0, 0xe0, 0x07, 0xfd, 0x14, 0x98, 0x13, 0xc0, 0x15, 0x65, 0x8f, 0x91, 0x55, + 0x28, 0x0f, 0x9c, 0x88, 0xa7, 0x30, 0x55, 0xc9, 0xd0, 0x18, 0x63, 0x5e, 0xc3, 0xc6, 0x88, 0x06, + 0x48, 0x02, 0x9b, 0x33, 0x85, 0x0c, 0x98, 0x47, 0x23, 0xc5, 0xda, 0x35, 0xe5, 0xb5, 0x98, 0x98, + 0xd1, 0x44, 0x17, 0xf9, 0x0e, 0x2a, 0xd7, 0x26, 0x8d, 0x42, 0xd6, 0x0f, 0x9d, 0xa1, 0x2a, 0x7a, + 0xf7, 0xb3, 0xd3, 0xda, 0xd2, 0x89, 0x55, 0x2b, 0xde, 0xbb, 0x5c, 0x24, 0x2f, 0xab, 0x96, 0x32, + 0xca, 0xe8, 0x2f, 0xe4, 0x41, 0x20, 0x28, 0x0e, 0xba, 0x94, 0x79, 0xbf, 0x38, 0x5a, 0xe6, 0x32, + 0x97, 0xb3, 0x97, 0x59, 0xfd, 0x5b, 0x0e, 0x8a, 0x13, 0xd2, 0x8d, 0x51, 0x3d, 0x3f, 0x72, 0xba, + 0x03, 0x6a, 0x63, 0x18, 0xa7, 0x4f, 0xc5, 0xf1, 0x96, 0xcd, 0x15, 0x65, 0xee, 0x48, 0x2b, 0xee, + 0x31, 0x05, 0x3a, 0xee, 0x85, 0x38, 0xdc, 0xb2, 0x59, 0x4a, 0x60, 0x8e, 0x7b, 0x21, 0xca, 0x6f, + 0x20, 0x30, 0x43, 0x3a, 0x64, 0xe1, 0x95, 0x38, 0xda, 0xb2, 0x59, 0x92, 0xc6, 0x53, 0x61, 0xc3, + 0x12, 0xab, 0x40, 0x21, 0xe5, 0xe3, 0x30, 0x90, 0x65, 0x7f, 0x41, 0x96, 0x58, 0xe9, 0x31, 0x85, + 0x43, 0xd4, 0xfe, 0x23, 0xd8, 0xe6, 0x97, 0x42, 0xdc, 0xf0, 0x50, 0xfb, 0x34, 0xa0, 0x21, 0x4a, + 0xb8, 0x4c, 0x2b, 0x2c, 0xcf, 0x8e, 0x4b, 0xc5, 0xe9, 0x96, 0xcc, 0xc7, 0xfc, 0x12, 0xb5, 0xce, + 0x62, 0x47, 0x0a, 0x25, 0xb9, 0x49, 0xc5, 0xfb, 0x92, 0x1a, 0x7c, 0x3a, 0x2b, 0x90, 0xeb, 0x0c, + 0x06, 0x2a, 0x8a, 0xec, 0x3c, 0x1e, 0x4e, 0x47, 0xa9, 0x3b, 0x83, 0x81, 0x08, 0x51, 0xfd, 0x3d, + 0x94, 0x33, 0x29, 0x8c, 0x85, 0x28, 0x60, 0x81, 0x4b, 0x15, 0x03, 0xe4, 0x80, 0x54, 0x60, 0xa9, + 0xeb, 0x0c, 0x1c, 0xb4, 0xcb, 0x02, 0x15, 0x0f, 0xab, 0x1f, 0xa1, 0x90, 0x44, 0x23, 0x3f, 0xc0, + 0x12, 0x96, 0x5e, 0x7a, 0x29, 0x6b, 0x51, 0x71, 0xff, 0xe9, 0x74, 0x81, 0x8d, 0x45, 0xa9, 0x2e, + 0x61, 0x66, 0x8c, 0x27, 0xfb, 0xb0, 0x28, 0x15, 0x32, 0x27, 0x04, 0xe5, 0xf1, 0x4d, 0x13, 0x51, + 0x36, 0x4d, 0x09, 0xad, 0xfe, 0x3d, 0x07, 0xe4, 0x7a, 0x4c, 0xec, 0x50, 0xf8, 0xd5, 0x28, 0x7e, + 0x03, 0xf1, 0x9c, 0x74, 0x2d, 0xb9, 0x89, 0xae, 0x65, 0x05, 0x72, 0x9c, 0x89, 0xfb, 0x2c, 0x98, + 0x39, 0xce, 0x10, 0x93, 0xdc, 0x5b, 0xc9, 0x14, 0xcf, 0x28, 0x07, 0x7d, 0x27, 0x52, 0xb9, 0x8e, + 0x8f, 0x69, 0xa5, 0xce, 0x4f, 0x54, 0x6a, 0xb4, 0x8a, 0x32, 0xa8, 0x9a, 0x38, 0x39, 0x20, 0x1b, + 0x90, 0x67, 0x63, 0x3e, 0x1a, 0x73, 0x91, 0xb4, 0x25, 0x53, 0x8d, 0x50, 0xdf, 0x12, 0xa9, 0x2f, + 0x48, 0x7d, 0xeb, 0x2b, 0x81, 0x7f, 0x04, 0x05, 0x74, 0x8d, 0x42, 0xdf, 0x95, 0x4d, 0x5a, 0xc1, + 0x44, 0x6c, 0x1b, 0xc7, 0xe4, 0xb3, 0xb8, 0xb1, 0xf6, 0x59, 0x20, 0x3a, 0x42, 0x55, 0x4f, 0xca, + 0x89, 0x15, 0x5b, 0xc2, 0x19, 0xbd, 0x72, 0xe9, 0x7a, 0xaf, 0x5c, 0xfd, 0xf3, 0x3c, 0xac, 0x4e, + 0x1d, 0x2c, 0x79, 0x02, 0x70, 0xad, 0x9f, 0x28, 0x44, 0x49, 0x33, 0xb1, 0x0e, 0x8b, 0x1e, 0x1d, + 0xf1, 0x73, 0xc5, 0x14, 0x39, 0xc0, 0x73, 0x1c, 0xb9, 0x4a, 0x72, 0x72, 0x23, 0x37, 0x3e, 0xb3, + 0x85, 0xf4, 0xcc, 0xd4, 0xfb, 0xba, 0x2c, 0xe2, 0xea, 0x28, 0xf1, 0x7d, 0xeb, 0x2c, 0xe2, 0xb8, + 0x22, 0xba, 0x42, 0xda, 0x1b, 0x07, 0x9e, 0x52, 0x09, 0x3c, 0x01, 0x53, 0x18, 0x30, 0x36, 0x1b, + 0xa9, 0x7a, 0x9e, 0x63, 0x23, 0xdc, 0x81, 0xe4, 0xea, 0xf2, 0xd6, 0x3c, 0x9e, 0xbe, 0x18, 0xe0, + 0x39, 0x2b, 0x76, 0x16, 0xe4, 0x39, 0xcb, 0x11, 0x36, 0xb3, 0xf2, 0xc9, 0x8e, 0xfc, 0x8f, 0x71, + 0xcf, 0x0b, 0xd2, 0xd4, 0xf1, 0x3f, 0x0a, 0x09, 0x50, 0x00, 0xd6, 0xeb, 0x45, 0x94, 0xab, 0xf3, + 0x2c, 0x49, 0x63, 0x4b, 0xd8, 0x30, 0xca, 0x24, 0xad, 0xe5, 0x59, 0x42, 0x98, 0x12, 0xfa, 0x1b, + 0xec, 0xbe, 0x65, 0xa3, 0x57, 0x29, 0x8b, 0xbc, 0xbf, 0x9f, 0x49, 0xdf, 0xb8, 0x0b, 0x34, 0x13, + 0x18, 0x79, 0x95, 0x2d, 0xc0, 0x59, 0xbc, 0xc9, 0x86, 0x93, 0xb5, 0xb7, 0x7a, 0x09, 0xcb, 0x71, + 0x08, 0x64, 0xa2, 0x2a, 0xbe, 0x2a, 0xbf, 0xe3, 0x21, 0x1e, 0x02, 0x32, 0x9f, 0x86, 0x2a, 0xc9, + 0xd5, 0x28, 0x4d, 0xd8, 0xf9, 0xc9, 0x84, 0xfd, 0x55, 0xc9, 0x5e, 0xfd, 0xd7, 0x02, 0x6c, 0xde, + 0xdc, 0x51, 0xe0, 0x27, 0x90, 0x12, 0x20, 0x95, 0x2b, 0x79, 0xa9, 0x34, 0xe4, 0x3e, 0xe4, 0xc3, + 0xc1, 0xc8, 0xe6, 0x97, 0xaa, 0xd3, 0x5c, 0x0c, 0x07, 0x23, 0xeb, 0x32, 0x61, 0xa6, 0xd4, 0x50, + 0xc9, 0xcc, 0x6d, 0x28, 0xa9, 0xd3, 0x95, 0xbb, 0x94, 0x1b, 0x52, 0x27, 0xfe, 0x56, 0xec, 0x55, + 0xa5, 0xcf, 0x80, 0xf6, 0x26, 0xd3, 0xe7, 0x84, 0xf6, 0xb2, 0x4c, 0xca, 0x67, 0x99, 0xb4, 0x0d, + 0xa5, 0x34, 0xb3, 0xa8, 0xa7, 0x4a, 0x4b, 0x31, 0xc9, 0x2d, 0xea, 0xa5, 0xb7, 0xb0, 0x7c, 0xf7, + 0x2d, 0x20, 0xf9, 0xdc, 0x90, 0x3a, 0x69, 0xf7, 0xa3, 0xbe, 0xb4, 0xca, 0xd2, 0xaa, 0xfa, 0x88, + 0x29, 0x0a, 0xc1, 0x34, 0x85, 0x9e, 0xc3, 0xc2, 0x80, 0xf5, 0xb1, 0x11, 0x44, 0x99, 0xd3, 0x32, + 0x2b, 0x9e, 0xb0, 0xbe, 0x29, 0xbc, 0xe4, 0x18, 0x56, 0x27, 0x88, 0x2e, 0xa4, 0x5c, 0x36, 0x7b, + 0x4f, 0x67, 0x74, 0x6a, 0x48, 0x7b, 0x84, 0x08, 0x69, 0x4c, 0x05, 0x42, 0x4a, 0xf2, 0xb7, 0x00, + 0x13, 0xf5, 0x60, 0x45, 0x64, 0xe7, 0x46, 0x36, 0x3b, 0x63, 0xf9, 0x36, 0x0b, 0x6e, 0xa2, 0xe4, + 0xbb, 0xb0, 0x46, 0x7b, 0x3d, 0xea, 0x26, 0x6d, 0xa9, 0x14, 0xa4, 0x55, 0xf1, 0xc6, 0xf7, 0x12, + 0xd7, 0x51, 0xac, 0x4c, 0xdf, 0xc0, 0x7a, 0x8a, 0x1f, 0xd1, 0xd0, 0xa5, 0x01, 0xc7, 0xca, 0xab, + 0xc9, 0x4e, 0x3c, 0xf1, 0xb5, 0x13, 0x57, 0xf5, 0x9f, 0x73, 0x30, 0x7f, 0xc2, 0xfa, 0xb7, 0x67, + 0x34, 0x67, 0x23, 0x6c, 0xbe, 0xb1, 0x28, 0x60, 0x76, 0x89, 0x51, 0x92, 0xbb, 0xf3, 0x13, 0xb9, + 0xbb, 0x0d, 0xa5, 0xe4, 0x3b, 0xa4, 0x4b, 0xc3, 0xf8, 0x53, 0xa4, 0xab, 0xbe, 0x43, 0xba, 0x34, + 0x9c, 0xcc, 0xd6, 0xc5, 0x4c, 0xb6, 0x3e, 0x84, 0x65, 0x7e, 0x69, 0xfb, 0x81, 0x47, 0x2f, 0xd5, + 0xc7, 0xc6, 0x12, 0xbf, 0x34, 0x70, 0x88, 0xb7, 0x29, 0xc3, 0x8a, 0x69, 0x52, 0xdc, 0x0b, 0xc2, + 0x22, 0x66, 0xae, 0xc3, 0xa2, 0x9c, 0x26, 0x3f, 0x22, 0xe4, 0xa0, 0xfa, 0xdf, 0x79, 0x20, 0xd7, + 0xaf, 0x46, 0xe9, 0xe4, 0x5c, 0xa2, 0x93, 0x52, 0xdb, 0x24, 0x59, 0x51, 0xdb, 0x9e, 0x41, 0x39, + 0xa4, 0x43, 0xc7, 0x0f, 0xb0, 0x21, 0x42, 0x22, 0x4a, 0x49, 0x2d, 0x25, 0xc6, 0xa3, 0x29, 0x29, + 0x5d, 0xc8, 0x4a, 0x69, 0xaa, 0x82, 0x8b, 0xb7, 0xa9, 0x60, 0xfe, 0x6e, 0x15, 0x5c, 0x9a, 0xa1, + 0x82, 0xb3, 0x95, 0x77, 0x4a, 0x1b, 0x0b, 0xd7, 0xb4, 0xf1, 0x10, 0x96, 0xe2, 0x2e, 0x0c, 0x44, + 0x06, 0x7f, 0x79, 0x47, 0x06, 0xef, 0xaa, 0xf6, 0x4c, 0x7e, 0x1d, 0xc4, 0x93, 0xd3, 0xd2, 0x53, + 0x9c, 0x2c, 0x3d, 0xd9, 0xea, 0x51, 0x9a, 0xae, 0x1e, 0x09, 0xbf, 0xcb, 0x77, 0xf3, 0x7b, 0xf3, + 0x47, 0x28, 0x4d, 0x2e, 0xfd, 0x5b, 0x3e, 0xd2, 0x5f, 0xfe, 0x63, 0x19, 0x96, 0xe3, 0x78, 0xe4, + 0x21, 0xdc, 0x37, 0x5b, 0xa7, 0xb6, 0x6e, 0x9a, 0x2d, 0xd3, 0x3e, 0x6b, 0x76, 0xda, 0x7a, 0xdd, + 0x38, 0x34, 0xf4, 0x86, 0xf6, 0x09, 0xd9, 0x00, 0x92, 0xba, 0x9a, 0x2d, 0xf9, 0xa0, 0xcd, 0x91, + 0x0a, 0xac, 0xa7, 0xf6, 0xd6, 0x99, 0x65, 0xb7, 0x0e, 0xed, 0xa3, 0x5a, 0x47, 0xcb, 0x91, 0xc7, + 0x50, 0x49, 0x3d, 0x1d, 0xab, 0x56, 0x7f, 0x63, 0xb7, 0xde, 0xea, 0xe6, 0xe1, 0x49, 0xeb, 0x27, + 0x6d, 0x9e, 0x3c, 0x81, 0x87, 0xd3, 0xde, 0xb3, 0x66, 0x43, 0xb9, 0x17, 0xc8, 0x73, 0xd8, 0x4a, + 0xdd, 0xa7, 0xb5, 0x77, 0x76, 0xbd, 0xd5, 0xd0, 0xed, 0x8e, 0xf1, 0x8b, 0x6e, 0xeb, 0xef, 0xea, + 0xba, 0xde, 0xd0, 0x1b, 0xda, 0x22, 0xd9, 0x81, 0xe7, 0x29, 0xaa, 0xde, 0x6a, 0x5a, 0x66, 0xad, + 0x6e, 0xd9, 0xb5, 0x46, 0xc3, 0xd4, 0x3b, 0x1d, 0xbb, 0xde, 0x3a, 0x39, 0x31, 0x3a, 0x46, 0xab, + 0xa9, 0xe5, 0xc9, 0x16, 0x3c, 0x4e, 0x91, 0xfa, 0x3b, 0xbd, 0x7e, 0x66, 0x19, 0xad, 0xa6, 0x6d, + 0xea, 0x6f, 0x75, 0xd3, 0xd2, 0x1b, 0xda, 0x12, 0xa9, 0xc2, 0xa7, 0xd7, 0x5e, 0xa4, 0xde, 0x3a, + 0x6b, 0x5a, 0xba, 0xd9, 0xb1, 0x3b, 0x96, 0xde, 0xd6, 0x96, 0xb3, 0xbb, 0x9a, 0xc6, 0xbc, 0xd1, + 0xeb, 0xf5, 0xda, 0x1b, 0xad, 0x70, 0x3b, 0xea, 0xc0, 0x68, 0xd6, 0xcc, 0x9f, 0x35, 0x20, 0xdb, + 0xf0, 0xe4, 0x66, 0xd4, 0xa9, 0x7e, 0xaa, 0x15, 0xc9, 0x33, 0x78, 0x7a, 0x33, 0xa4, 0x66, 0x1a, + 0xd6, 0xb1, 0x56, 0x22, 0x9f, 0xc1, 0xf6, 0xcd, 0xa0, 0x76, 0xad, 0xd1, 0x30, 0x9a, 0x47, 0x5a, + 0x99, 0x7c, 0x0e, 0xd5, 0x5b, 0x60, 0xad, 0x8e, 0x6e, 0x34, 0x5a, 0x4d, 0x6d, 0x85, 0x6c, 0xc2, + 0x46, 0x8a, 0x33, 0x9a, 0x6f, 0x6b, 0x27, 0x46, 0xc3, 0xfe, 0xc3, 0xd9, 0x69, 0x5b, 0x5b, 0xcd, + 0xde, 0x68, 0xec, 0x6b, 0xb5, 0xf1, 0x6a, 0x34, 0x6d, 0xb6, 0xb7, 0x63, 0xd5, 0x2c, 0xa3, 0xae, + 0xdd, 0xcb, 0x5e, 0x55, 0xec, 0x3d, 0xf8, 0xd9, 0xd2, 0xe5, 0xc5, 0x5a, 0x35, 0xd3, 0xea, 0xd8, + 0xfa, 0xa1, 0x46, 0xc8, 0x17, 0xf0, 0xd9, 0x24, 0xd2, 0x32, 0x8d, 0x66, 0xc7, 0xa8, 0xa7, 0x11, + 0x8d, 0xa3, 0x66, 0xcd, 0x3a, 0x33, 0x75, 0x6d, 0x6d, 0x3a, 0xe8, 0x34, 0xb4, 0x7e, 0x5c, 0x33, + 0x9a, 0xb6, 0xd1, 0xd0, 0xd6, 0xb3, 0xa7, 0x74, 0x1d, 0xd9, 0x6c, 0x35, 0xeb, 0xba, 0x76, 0xff, + 0xae, 0xb5, 0x8f, 0x6a, 0x1d, 0xfb, 0xc4, 0x38, 0x35, 0x2c, 0x6d, 0x83, 0xbc, 0x80, 0x67, 0xb7, + 0x41, 0x0f, 0x6a, 0x27, 0x35, 0x8c, 0xf9, 0x80, 0xec, 0xc1, 0xab, 0xdb, 0x81, 0x56, 0xfd, 0x78, + 0x22, 0x72, 0x85, 0xbc, 0x82, 0x17, 0xb7, 0x1e, 0x80, 0x8e, 0x3c, 0x11, 0x84, 0xd0, 0x1e, 0xde, + 0xb4, 0x0d, 0xeb, 0x9d, 0x08, 0x99, 0x10, 0x6e, 0x33, 0xcb, 0x00, 0xb9, 0x68, 0xa3, 0x66, 0xd5, + 0x6c, 0xab, 0xd5, 0xb2, 0x0f, 0x8c, 0x23, 0xed, 0x51, 0x36, 0x23, 0xcf, 0x9a, 0x9d, 0xb3, 0x76, + 0xbb, 0x85, 0xe4, 0xb0, 0x0f, 0x5b, 0xe6, 0x1b, 0x3c, 0xc6, 0xc7, 0x59, 0x81, 0x88, 0x37, 0x64, + 0x9e, 0xb4, 0xb5, 0x27, 0x2f, 0xff, 0x3d, 0x0f, 0xe5, 0xcc, 0xef, 0x2f, 0xe4, 0x53, 0xd8, 0x94, + 0x4c, 0x43, 0xca, 0xcd, 0x90, 0x94, 0x47, 0xf0, 0x60, 0xca, 0x3f, 0xa1, 0x2b, 0xaf, 0xe0, 0xc5, + 0x94, 0x33, 0xc9, 0xd6, 0xf8, 0xa5, 0x62, 0xc6, 0xe5, 0x7e, 0x15, 0x58, 0x11, 0x6f, 0x1e, 0x93, + 0xe6, 0x4e, 0x30, 0xf2, 0x6f, 0x81, 0xbc, 0x84, 0xcf, 0xef, 0x44, 0x4a, 0x1a, 0x2e, 0x92, 0x2f, + 0x61, 0xe7, 0x4e, 0x6c, 0xcc, 0xc6, 0x3c, 0xf9, 0x0a, 0xbe, 0xb8, 0x1b, 0x1d, 0x93, 0x72, 0x09, + 0xc9, 0x7b, 0xfd, 0x24, 0xaf, 0x5d, 0xcf, 0x32, 0x0a, 0xc6, 0x14, 0x4e, 0xa5, 0xa1, 0x7d, 0x6a, + 0x74, 0x4e, 0xf1, 0xce, 0xb5, 0x02, 0x2a, 0xef, 0x14, 0xe8, 0x50, 0xaf, 0xed, 0x77, 0xea, 0xb5, + 0x93, 0x9a, 0xa9, 0x01, 0x0a, 0xfa, 0x94, 0xdb, 0x6a, 0x75, 0x5e, 0xef, 0x6b, 0xc5, 0xfd, 0xbf, + 0xce, 0xc1, 0x6a, 0x7c, 0xc3, 0x1d, 0x1a, 0xbe, 0xc7, 0xee, 0xe9, 0x0c, 0x4a, 0x93, 0xbf, 0x99, + 0x91, 0xad, 0xbb, 0x7e, 0xf9, 0xde, 0xdc, 0xbe, 0xf3, 0x07, 0xb7, 0xea, 0x27, 0xa4, 0x05, 0x2b, + 0xd9, 0x9f, 0xa0, 0xc8, 0xc6, 0xae, 0xfc, 0xef, 0x65, 0x37, 0xfe, 0xef, 0x65, 0x57, 0x1f, 0x8e, + 0xf8, 0xd5, 0xe6, 0xb3, 0x4c, 0xb8, 0xd9, 0xbf, 0x5b, 0x55, 0x3f, 0x39, 0xf8, 0xdd, 0x2f, 0xff, + 0xdf, 0xf7, 0xf9, 0xf9, 0xb8, 0xbb, 0xeb, 0xb2, 0xe1, 0xde, 0xd7, 0x97, 0x6d, 0x36, 0xb8, 0xea, + 0xb3, 0xe0, 0x98, 0x86, 0x43, 0xfa, 0x71, 0xef, 0xe3, 0x05, 0x7d, 0x3f, 0xfc, 0x2a, 0x60, 0x1e, + 0xdd, 0x13, 0xfd, 0xee, 0x5e, 0x38, 0x0e, 0xf0, 0x23, 0x75, 0x2f, 0x8e, 0xdd, 0xcd, 0x8b, 0x65, + 0x5f, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x18, 0x99, 0x3b, 0xfd, 0x1f, 0x1a, 0x00, 0x00, } diff --git a/state/runtime/executor/executor_grpc.pb.go b/state/runtime/executor/executor_grpc.pb.go index 29b51509db..e09e87b91a 100644 --- a/state/runtime/executor/executor_grpc.pb.go +++ b/state/runtime/executor/executor_grpc.pb.go @@ -1,17 +1,17 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 +// - protoc v3.12.4 // source: executor.proto package executor import ( context "context" + empty "github.com/golang/protobuf/ptypes/empty" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" ) // This is a compile-time assertion to ensure that this generated file @@ -30,7 +30,7 @@ const ( type ExecutorServiceClient interface { // / Processes a batch ProcessBatch(ctx context.Context, in *ProcessBatchRequest, opts ...grpc.CallOption) (*ProcessBatchResponse, error) - GetFlushStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error) + GetFlushStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error) } type executorServiceClient struct { @@ -50,7 +50,7 @@ func (c *executorServiceClient) ProcessBatch(ctx context.Context, in *ProcessBat return out, nil } -func (c *executorServiceClient) GetFlushStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error) { +func (c *executorServiceClient) GetFlushStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error) { out := new(GetFlushStatusResponse) err := c.cc.Invoke(ctx, ExecutorService_GetFlushStatus_FullMethodName, in, out, opts...) if err != nil { @@ -65,7 +65,7 @@ func (c *executorServiceClient) GetFlushStatus(ctx context.Context, in *emptypb. type ExecutorServiceServer interface { // / Processes a batch ProcessBatch(context.Context, *ProcessBatchRequest) (*ProcessBatchResponse, error) - GetFlushStatus(context.Context, *emptypb.Empty) (*GetFlushStatusResponse, error) + GetFlushStatus(context.Context, *empty.Empty) (*GetFlushStatusResponse, error) mustEmbedUnimplementedExecutorServiceServer() } @@ -76,7 +76,7 @@ type UnimplementedExecutorServiceServer struct { func (UnimplementedExecutorServiceServer) ProcessBatch(context.Context, *ProcessBatchRequest) (*ProcessBatchResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ProcessBatch not implemented") } -func (UnimplementedExecutorServiceServer) GetFlushStatus(context.Context, *emptypb.Empty) (*GetFlushStatusResponse, error) { +func (UnimplementedExecutorServiceServer) GetFlushStatus(context.Context, *empty.Empty) (*GetFlushStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFlushStatus not implemented") } func (UnimplementedExecutorServiceServer) mustEmbedUnimplementedExecutorServiceServer() {} @@ -111,7 +111,7 @@ func _ExecutorService_ProcessBatch_Handler(srv interface{}, ctx context.Context, } func _ExecutorService_GetFlushStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -123,7 +123,7 @@ func _ExecutorService_GetFlushStatus_Handler(srv interface{}, ctx context.Contex FullMethod: ExecutorService_GetFlushStatus_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExecutorServiceServer).GetFlushStatus(ctx, req.(*emptypb.Empty)) + return srv.(ExecutorServiceServer).GetFlushStatus(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } diff --git a/state/runtime/instrumentation/intrumentation_test.go b/state/runtime/instrumentation/intrumentation_test.go index d5ea1056fd..b6506667da 100644 --- a/state/runtime/instrumentation/intrumentation_test.go +++ b/state/runtime/instrumentation/intrumentation_test.go @@ -8,12 +8,12 @@ import ( "os" "testing" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" - "github.com/0xPolygonHermez/zkevm-node/state/tree" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation" + "github.com/0xPolygon/cdk-validium-node/state/tree" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" ) diff --git a/state/runtime/instrumentation/js/goja.go b/state/runtime/instrumentation/js/goja.go index b3ed95318d..eeffb54d10 100644 --- a/state/runtime/instrumentation/js/goja.go +++ b/state/runtime/instrumentation/js/goja.go @@ -22,9 +22,9 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - jsassets "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/js/internal/tracers" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" + jsassets "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/js/internal/tracers" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/tracers" "github.com/dop251/goja" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/state/runtime/instrumentation/tracers/native/4byte.go b/state/runtime/instrumentation/tracers/native/4byte.go index 524f26f7fc..259b8db0e2 100644 --- a/state/runtime/instrumentation/tracers/native/4byte.go +++ b/state/runtime/instrumentation/tracers/native/4byte.go @@ -22,8 +22,8 @@ import ( "strconv" "sync/atomic" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/common" ) diff --git a/state/runtime/instrumentation/tracers/native/call.go b/state/runtime/instrumentation/tracers/native/call.go index 2120f385a2..0f8732fc4c 100644 --- a/state/runtime/instrumentation/tracers/native/call.go +++ b/state/runtime/instrumentation/tracers/native/call.go @@ -22,8 +22,8 @@ import ( "math/big" "sync/atomic" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/state/runtime/instrumentation/tracers/native/call_flat.go b/state/runtime/instrumentation/tracers/native/call_flat.go index c91077f9de..943b817a2e 100644 --- a/state/runtime/instrumentation/tracers/native/call_flat.go +++ b/state/runtime/instrumentation/tracers/native/call_flat.go @@ -23,8 +23,8 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ) diff --git a/state/runtime/instrumentation/tracers/native/gen_callframe_json.go b/state/runtime/instrumentation/tracers/native/gen_callframe_json.go index b17cb22dd8..54e250fb14 100644 --- a/state/runtime/instrumentation/tracers/native/gen_callframe_json.go +++ b/state/runtime/instrumentation/tracers/native/gen_callframe_json.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" ) var _ = (*callFrameMarshaling)(nil) diff --git a/state/runtime/instrumentation/tracers/native/noop.go b/state/runtime/instrumentation/tracers/native/noop.go index fc692363fb..972b4799b2 100644 --- a/state/runtime/instrumentation/tracers/native/noop.go +++ b/state/runtime/instrumentation/tracers/native/noop.go @@ -20,8 +20,8 @@ import ( "encoding/json" "math/big" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/common" ) diff --git a/state/runtime/instrumentation/tracers/native/prestate.go b/state/runtime/instrumentation/tracers/native/prestate.go index 16d99a23d4..d397f25be0 100644 --- a/state/runtime/instrumentation/tracers/native/prestate.go +++ b/state/runtime/instrumentation/tracers/native/prestate.go @@ -22,8 +22,8 @@ import ( "math/big" "sync/atomic" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" diff --git a/state/runtime/instrumentation/tracers/tracers.go b/state/runtime/instrumentation/tracers/tracers.go index 897c9bbfa7..a1dd9fcae3 100644 --- a/state/runtime/instrumentation/tracers/tracers.go +++ b/state/runtime/instrumentation/tracers/tracers.go @@ -22,7 +22,7 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" "github.com/ethereum/go-ethereum/common" ) diff --git a/state/runtime/runtime.go b/state/runtime/runtime.go index b452d87181..cdfc2747cf 100644 --- a/state/runtime/runtime.go +++ b/state/runtime/runtime.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation" "github.com/ethereum/go-ethereum/common" ) diff --git a/state/state.go b/state/state.go index caeb538759..a53da13c42 100644 --- a/state/state.go +++ b/state/state.go @@ -5,10 +5,10 @@ import ( "math/big" "sync" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -139,7 +139,7 @@ func (s *State) FlushMerkleTree(ctx context.Context) error { if s.tree == nil { return ErrStateTreeNil } - return s.tree.Flush(ctx) + return s.tree.Flush(ctx, "") } // GetStoredFlushID returns the stored flush ID and Prover ID diff --git a/state/state_test.go b/state/state_test.go index d02ed66227..997043d25a 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -14,23 +14,23 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - mtDBclientpb "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" - state "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Counter" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/nileventstorage" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/merkletree/hashdb" + state "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/state/runtime" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Counter" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -67,7 +67,7 @@ var ( } forkID uint64 = 5 executorClient executor.ExecutorServiceClient - mtDBServiceClient mtDBclientpb.HashDBServiceClient + mtDBServiceClient hashdb.HashDBServiceClient executorClientConn, mtDBClientConn *grpc.ClientConn batchResources = state.BatchResources{ ZKCounters: state.ZKCounters{ @@ -726,7 +726,7 @@ func TestGenesis(t *testing.T) { } } - err = testState.GetTree().Flush(ctx) + err = testState.GetTree().Flush(ctx, "") require.NoError(t, err) } @@ -1525,7 +1525,7 @@ func TestGenesisNewLeafType(t *testing.T) { // err = testState.ProcessAndStoreClosedBatch(ctx, processCtx, common.Hex2Bytes(tv.BatchL2Data), dbTx) // nolint:ineffassign,staticcheck // // TODO: actually check for nil err in ProcessAndStoreClosedBatch return value, // // currently blocked by the issue about the mismatched tx hashes described here -// // https://github.com/0xPolygonHermez/zkevm-node/issues/1033 +// // https://github.com/0xPolygon/cdk-validium-node/issues/1033 // // require.NoError(t, err) // // TODO: currently the db tx is marked as invalid after the first error, once diff --git a/state/transaction.go b/state/transaction.go index e3d7a89956..550cb96214 100644 --- a/state/transaction.go +++ b/state/transaction.go @@ -9,16 +9,16 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/js" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers/native" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state/runtime" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/state/runtime/fakevm" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/js" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation/tracers/native" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" @@ -320,7 +320,7 @@ func (s *State) DebugTransaction(ctx context.Context, transactionHash common.Has return nil, fmt.Errorf("tx hash not found in executor response") } - // const path = "/Users/thiago/github.com/0xPolygonHermez/zkevm-node/dist/%v.json" + // const path = "/Users/thiago/github.com/0xPolygon/cdk-validium-node/dist/%v.json" // filePath := fmt.Sprintf(path, "EXECUTOR_processBatchResponse") // c, _ := json.MarshalIndent(processBatchResponse, "", " ") // os.WriteFile(filePath, c, 0644) @@ -758,6 +758,21 @@ func (s *State) internalProcessUnsignedTransaction(ctx context.Context, tx *type return nil, err } + stateRoot := l2BlockStateRoot + if l2BlockNumber != nil { + l2Block, err := s.GetL2BlockByNumber(ctx, *l2BlockNumber, dbTx) + if err != nil { + return nil, err + } + stateRoot = l2Block.Root() + } + + loadedNonce, err := s.tree.GetNonce(ctx, senderAddress, stateRoot.Bytes()) + if err != nil { + return nil, err + } + nonce := loadedNonce.Uint64() + // Get latest batch from the database to get globalExitRoot and Timestamp lastBatch := lastBatches[0] @@ -767,15 +782,9 @@ func (s *State) internalProcessUnsignedTransaction(ctx context.Context, tx *type previousBatch = lastBatches[1] } - stateRoot := l2BlockStateRoot timestamp := uint64(lastBatch.Timestamp.Unix()) - if l2BlockNumber != nil { - l2Block, err := s.GetL2BlockByNumber(ctx, *l2BlockNumber, dbTx) - if err != nil { - return nil, err - } - stateRoot = l2Block.Root() + if l2BlockNumber != nil { latestL2BlockNumber, err := s.PostgresStorage.GetLastL2BlockNumber(ctx, dbTx) if err != nil { return nil, err @@ -787,11 +796,6 @@ func (s *State) internalProcessUnsignedTransaction(ctx context.Context, tx *type } forkID := s.GetForkIDByBatchNumber(lastBatch.BatchNumber) - loadedNonce, err := s.tree.GetNonce(ctx, senderAddress, stateRoot.Bytes()) - if err != nil { - return nil, err - } - nonce := loadedNonce.Uint64() batchL2Data, err := EncodeUnsignedTransaction(*tx, s.cfg.ChainID, &nonce, forkID) if err != nil { diff --git a/state/types.go b/state/types.go index d3a7759e56..3d7f9f0230 100644 --- a/state/types.go +++ b/state/types.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" + "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/state/runtime/instrumentation" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/synchronizer/config.go b/synchronizer/config.go index 5142aaef7b..df8e30beff 100644 --- a/synchronizer/config.go +++ b/synchronizer/config.go @@ -1,7 +1,7 @@ package synchronizer import ( - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/cdk-validium-node/config/types" ) // Config represents the configuration of the synchronizer diff --git a/synchronizer/datacommittee.go b/synchronizer/datacommittee.go new file mode 100644 index 0000000000..131bc74772 --- /dev/null +++ b/synchronizer/datacommittee.go @@ -0,0 +1,127 @@ +package synchronizer + +import ( + "fmt" + "math/big" + "math/rand" + + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +const unexpectedHashTemplate = "missmatch on transaction data for batch num %d. Expected hash %s, actual hash: %s" + +func (s *ClientSynchronizer) loadCommittee() error { + committee, err := s.etherMan.GetCurrentDataCommittee() + if err != nil { + return err + } + selectedCommitteeMember := -1 + if committee != nil { + s.committeeMembers = committee.Members + if len(committee.Members) > 0 { + selectedCommitteeMember = rand.Intn(len(committee.Members)) //nolint:gosec + } + } + s.selectedCommitteeMember = selectedCommitteeMember + return nil +} + +func (s *ClientSynchronizer) getBatchL2Data(batchNum uint64, expectedTransactionsHash common.Hash) ([]byte, error) { + found := true + transactionsData, err := s.state.GetBatchL2DataByNumber(s.ctx, batchNum, nil) + if err != nil { + if err == state.ErrNotFound { + found = false + } else { + return nil, fmt.Errorf("failed to get batch data from state for batch num %d: %w", batchNum, err) + } + } + actualTransactionsHash := crypto.Keccak256Hash(transactionsData) + if !found || expectedTransactionsHash != actualTransactionsHash { + if found { + log.Warnf(unexpectedHashTemplate, batchNum, expectedTransactionsHash, actualTransactionsHash) + } + + if !s.isTrustedSequencer { + log.Info("trying to get data from trusted sequencer") + data, err := s.getDataFromTrustedSequencer(batchNum, expectedTransactionsHash) + if err != nil { + log.Error(err) + } else { + return data, nil + } + } + + log.Info("trying to get data from data committee node") + data, err := s.getDataFromCommittee(batchNum, expectedTransactionsHash) + if err != nil { + log.Error(err) + if s.isTrustedSequencer { + return nil, fmt.Errorf("data not found on the local DB nor on any data committee member") + } else { + return nil, fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member") + } + } + return data, nil + } + return transactionsData, nil +} + +func (s *ClientSynchronizer) getDataFromCommittee(batchNum uint64, expectedTransactionsHash common.Hash) ([]byte, error) { + intialMember := s.selectedCommitteeMember + found := false + for !found && intialMember != -1 { + member := s.committeeMembers[s.selectedCommitteeMember] + log.Infof("trying to get data from %s at %s", member.Addr.Hex(), member.URL) + c := s.dataCommitteeClientFactory.New(member.URL) + data, err := c.GetOffChainData(s.ctx, expectedTransactionsHash) + if err != nil { + log.Warnf( + "error getting data from DAC node %s at %s: %s", + member.Addr.Hex(), member.URL, err, + ) + s.selectedCommitteeMember = (s.selectedCommitteeMember + 1) % len(s.committeeMembers) + if s.selectedCommitteeMember == intialMember { + break + } + continue + } + actualTransactionsHash := crypto.Keccak256Hash(data) + if actualTransactionsHash != expectedTransactionsHash { + unexpectedHash := fmt.Errorf( + unexpectedHashTemplate, batchNum, expectedTransactionsHash, actualTransactionsHash, + ) + log.Warnf( + "error getting data from DAC node %s at %s: %s", + member.Addr.Hex(), member.URL, unexpectedHash, + ) + s.selectedCommitteeMember = (s.selectedCommitteeMember + 1) % len(s.committeeMembers) + if s.selectedCommitteeMember == intialMember { + break + } + continue + } + return data, nil + } + if err := s.loadCommittee(); err != nil { + return nil, fmt.Errorf("error loading data committee: %s", err) + } + return nil, fmt.Errorf("couldn't get the data from any committee member") +} + +func (s *ClientSynchronizer) getDataFromTrustedSequencer(batchNum uint64, expectedTransactionsHash common.Hash) ([]byte, error) { + b, err := s.zkEVMClient.BatchByNumber(s.ctx, big.NewInt(int64(batchNum))) + if err != nil { + return nil, fmt.Errorf("failed to get batch num %d from trusted sequencer: %w", batchNum, err) + } + actualTransactionsHash := crypto.Keccak256Hash(b.BatchL2Data) + if expectedTransactionsHash != actualTransactionsHash { + return nil, fmt.Errorf( + unexpectedHashTemplate, batchNum, expectedTransactionsHash, actualTransactionsHash, + ) + } + return b.BatchL2Data, nil +} diff --git a/synchronizer/datacommittee_test.go b/synchronizer/datacommittee_test.go new file mode 100644 index 0000000000..025433dc63 --- /dev/null +++ b/synchronizer/datacommittee_test.go @@ -0,0 +1,615 @@ +package synchronizer + +import ( + "context" + "errors" + "fmt" + "math/big" + "strconv" + "testing" + + "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/ethereum/go-ethereum/common" + ethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +var forkID uint64 = 5 + +func TestGetBatchL2DataWithoutCommittee(t *testing.T) { + m := mocks{ + State: newStateMock(t), + ZKEVMClient: newZkEVMClientMock(t), + Etherman: newEthermanMock(t), + } + + ctx := context.Background() + + trustedSync := ClientSynchronizer{ + isTrustedSequencer: true, + state: m.State, + zkEVMClient: m.ZKEVMClient, + etherMan: m.Etherman, + ctx: ctx, + selectedCommitteeMember: -1, + } + + permissionlessSync := ClientSynchronizer{ + isTrustedSequencer: false, + state: m.State, + zkEVMClient: m.ZKEVMClient, + etherMan: m.Etherman, + ctx: ctx, + selectedCommitteeMember: -1, + } + + const batchNum uint64 = 5 + batchNumBig := big.NewInt(int64(batchNum)) + dataFromDB := []byte("i poli tis Kerkyras einai omorfi") + errorHash := state.ZeroHash + unexpectedErrFromDB := errors.New("unexpected db") + errFromDBTemplate := "failed to get batch data from state for batch num " + strconv.Itoa(int(batchNum)) + ": %s" + + trustedResponse := &types.Batch{Transactions: []types.TransactionOrHash{ + {Tx: &types.Transaction{Nonce: 4}}, + {Tx: &types.Transaction{Nonce: 284}}, + }} + txs := []ethTypes.Transaction{} + effectivePercentages := []uint8{} + for _, transaction := range trustedResponse.Transactions { + tx := transaction.Tx.CoreTx() + txs = append(txs, *tx) + effectivePercentages = append(effectivePercentages, state.MaxEffectivePercentage) + } + dataFromTrusted, err := state.EncodeTransactions(txs, effectivePercentages, forkID) + require.NoError(t, err) + trustedResponse.BatchL2Data = dataFromTrusted + trustedResponseEmpty := &types.Batch{Transactions: []types.TransactionOrHash{}} + txs = []ethTypes.Transaction{} + dataFromTrustedEmpty, err := state.EncodeTransactions(txs, effectivePercentages, forkID) + require.NoError(t, err) + + unexpectedErrFromTrusted := errors.New("unexpected trusted") + + type testCase struct { + Name string + ExpectedResult []byte + ExpectedError error + Sync *ClientSynchronizer + SetupMocks func(m *mocks) + } + + testCases := []testCase{ + // Trusted sync cases + { + Name: "Trusted sync fail if unexpected error from DB", + ExpectedResult: nil, + ExpectedError: fmt.Errorf(errFromDBTemplate, unexpectedErrFromDB), + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, unexpectedErrFromDB). + Once() + }, + }, + { + Name: "Trusted sync fail if data not found on DB", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB nor on any data committee member"), + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + }, + }, + { + Name: "Trusted sync fail if hash missmatch on DB", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB nor on any data committee member"), + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + }, + }, + { + Name: "Trusted sync succeeds if hash match on DB", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + }, + }, + // Permissionless sync cases + { + Name: "Permissionless sync succeeds if hash match on DB", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + }, + }, + { + Name: "Permissionless sync fail if unexpected error from DB", + ExpectedResult: nil, + ExpectedError: fmt.Errorf(errFromDBTemplate, unexpectedErrFromDB), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, unexpectedErrFromDB). + Once() + }, + }, + { + Name: "Permissionless sync fail if hash missmatch on the DB and error from trusted", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member"), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, unexpectedErrFromTrusted). + Once() + }, + }, + { + Name: "Permissionless sync fail if hash missmatch on the DB and from trusted sequencer", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member"), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponse, nil). + Once() + }, + }, + { + Name: "Permissionless sync succeeds if hash missmatch on the DB and match from trusted", + ExpectedResult: dataFromTrusted, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponse, nil). + Once() + }, + }, + { + Name: "Permissionless sync fail if not found on the DB and error from trusted", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member"), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, unexpectedErrFromTrusted). + Once() + }, + }, + { + Name: "Permissionless sync fail fail if not found on the DB and hash missmatch trusted", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member"), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponse, nil). + Once() + }, + }, + { + Name: "Permissionless sync succeeds if not found on the DB and match from trusted", + ExpectedResult: dataFromTrusted, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponse, nil). + Once() + }, + }, + { + Name: "Permissionless sync succeeds if not found on the DB and match from trusted empty response", + ExpectedResult: dataFromTrustedEmpty, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponseEmpty, nil). + Once() + }, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.Name, func(t *testing.T) { + tc := testCase + tc.SetupMocks(&m) + + var expectedHash common.Hash + if tc.ExpectedError == nil { + expectedHash = crypto.Keccak256Hash(tc.ExpectedResult) + } else { + expectedHash = errorHash + } + + res, err := tc.Sync.getBatchL2Data(batchNum, expectedHash) + assert.Equal(t, tc.ExpectedResult, res) + if tc.ExpectedError != nil { + require.NotNil(t, err) + assert.Equal(t, tc.ExpectedError.Error(), err.Error()) + } + }) + } +} + +func TestGetBatchL2DataWithCommittee(t *testing.T) { + m := mocks{ + State: newStateMock(t), + ZKEVMClient: newZkEVMClientMock(t), + Etherman: newEthermanMock(t), + DataCommitteeClientFactory: newDataCommitteeClientFactoryMock(t), + } + + ctx := context.Background() + + committeeMembers := []etherman.DataCommitteeMember{ + { + URL: "0", + Addr: common.HexToAddress("0x0"), + }, + { + URL: "1", + Addr: common.HexToAddress("0x1"), + }, + { + URL: "2", + Addr: common.HexToAddress("0x2"), + }, + } + trustedSync := ClientSynchronizer{ + isTrustedSequencer: true, + state: m.State, + zkEVMClient: m.ZKEVMClient, + etherMan: m.Etherman, + ctx: ctx, + selectedCommitteeMember: 0, + committeeMembers: committeeMembers, + dataCommitteeClientFactory: m.DataCommitteeClientFactory, + } + + permissionlessSync := ClientSynchronizer{ + isTrustedSequencer: false, + state: m.State, + zkEVMClient: m.ZKEVMClient, + etherMan: m.Etherman, + ctx: ctx, + selectedCommitteeMember: 1, + committeeMembers: committeeMembers, + dataCommitteeClientFactory: m.DataCommitteeClientFactory, + } + + const batchNum uint64 = 5 + batchNumBig := big.NewInt(int64(batchNum)) + dataFromDB := []byte("i poli tis Kerkyras einai omorfi") + errorHash := state.ZeroHash + + trustedResponse := &types.Batch{Transactions: []types.TransactionOrHash{ + {Tx: &types.Transaction{Nonce: 4}}, + {Tx: &types.Transaction{Nonce: 284}}, + }} + txs := []ethTypes.Transaction{} + effectivePercentages := []uint8{} + for _, transaction := range trustedResponse.Transactions { + tx := transaction.Tx.CoreTx() + txs = append(txs, *tx) + effectivePercentages = append(effectivePercentages, state.MaxEffectivePercentage) + } + dataFromTrusted, err := state.EncodeTransactions(txs, effectivePercentages, forkID) + require.NoError(t, err) + trustedResponse.BatchL2Data = dataFromTrusted + + type testCase struct { + Name string + ExpectedResult []byte + ExpectedError error + Sync *ClientSynchronizer + SetupMocks func(m *mocks) + Retry bool + } + + testCases := []testCase{ + // Trusted sync cases + { + Name: "Trusted sync fail if all the members don't answer", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB nor on any data committee member"), + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + DAClientMock := newDataCommitteeClientMock(t) + m.DataCommitteeClientFactory. + On("New", "0"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, state.ZeroHash). + Return([]byte("not the correct data"), nil). + Once() + m.DataCommitteeClientFactory. + On("New", "1"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, state.ZeroHash). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", "2"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, state.ZeroHash). + Return([]byte("not the correct data"), nil). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + }, + }, + { + Name: "Trusted sync succeeds after 2nd committee member answers correctly", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + // Reset DAC + trustedSync.committeeMembers = committeeMembers + trustedSync.selectedCommitteeMember = 0 + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + DAClientMock := newDataCommitteeClientMock(t) + m.DataCommitteeClientFactory. + On("New", "0"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return([]byte("not the correct data"), nil). + Once() + m.DataCommitteeClientFactory. + On("New", "1"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", "2"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(dataFromDB, nil). + Once() + }, + }, + // Permissionless sync cases + { + Name: "Permissionless sync succeeds after 2nd committee member answers correctly", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, errors.New("not today")). + Once() + DAClientMock := newDataCommitteeClientMock(t) + m.DataCommitteeClientFactory. + On("New", "1"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return([]byte("not the correct data"), nil). + Once() + m.DataCommitteeClientFactory. + On("New", "2"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", "0"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(dataFromDB, nil). + Once() + }, + }, + { + Name: "Permissionless sync succeeds after updating DAC", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &permissionlessSync, + Retry: true, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, errors.New("not today")). + Once() + DAClientMock := newDataCommitteeClientMock(t) + m.DataCommitteeClientFactory. + On("New", "1"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return([]byte("not the correct data"), nil). + Once() + m.DataCommitteeClientFactory. + On("New", "2"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", "0"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(nil, errors.New("not today")). + Once() + const succesfullURL = "the time is now" + m.Etherman. + On("GetCurrentDataCommittee"). + Return(ðerman.DataCommittee{ + Members: []etherman.DataCommitteeMember{{ + URL: succesfullURL, + Addr: common.HexToAddress("0xff"), + }}, + }, nil). + Once() + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", succesfullURL). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(dataFromDB, nil). + Once() + }, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.Name, func(t *testing.T) { + tc := testCase + tc.SetupMocks(&m) + + var expectedHash common.Hash + if tc.ExpectedError == nil { + expectedHash = crypto.Keccak256Hash(tc.ExpectedResult) + } else { + expectedHash = errorHash + } + + res, err := tc.Sync.getBatchL2Data(batchNum, expectedHash) + if tc.Retry { + require.Error(t, err) + res, err = tc.Sync.getBatchL2Data(batchNum, expectedHash) + } + assert.Equal(t, tc.ExpectedResult, res) + if tc.ExpectedError != nil { + require.NotNil(t, err) + assert.Equal(t, tc.ExpectedError.Error(), err.Error()) + } + }) + } +} diff --git a/synchronizer/interfaces.go b/synchronizer/interfaces.go index e40c11193e..c94236e90c 100644 --- a/synchronizer/interfaces.go +++ b/synchronizer/interfaces.go @@ -4,11 +4,11 @@ import ( "context" "math/big" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -24,6 +24,7 @@ type ethermanInterface interface { VerifyGenBlockNumber(ctx context.Context, genBlockNumber uint64) (bool, error) GetForks(ctx context.Context, genBlockNumber uint64) ([]state.ForkIDInterval, error) GetLatestVerifiedBatchNum() (uint64, error) + GetCurrentDataCommittee() (*etherman.DataCommittee, error) } // stateInterface gathers the methods required to interact with the state. @@ -36,6 +37,7 @@ type stateInterface interface { GetPreviousBlock(ctx context.Context, offset uint64, dbTx pgx.Tx) (*state.Block, error) GetLastBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error) GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error) + GetBatchL2DataByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]byte, error) ResetTrustedState(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) error AddVirtualBatch(ctx context.Context, virtualBatch *state.VirtualBatch, dbTx pgx.Tx) error GetNextForcedBatches(ctx context.Context, nextForcedBatches int, dbTx pgx.Tx) ([]state.ForcedBatch, error) diff --git a/synchronizer/metrics/metrics.go b/synchronizer/metrics/metrics.go index 397832e1ab..240efc98f6 100644 --- a/synchronizer/metrics/metrics.go +++ b/synchronizer/metrics/metrics.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/cdk-validium-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/synchronizer/mock_datacommitteeclient.go b/synchronizer/mock_datacommitteeclient.go new file mode 100644 index 0000000000..8377c1b8af --- /dev/null +++ b/synchronizer/mock_datacommitteeclient.go @@ -0,0 +1,85 @@ +// Code generated by mockery v2.22.1. DO NOT EDIT. + +package synchronizer + +import ( + context "context" + + common "github.com/ethereum/go-ethereum/common" + + mock "github.com/stretchr/testify/mock" + + sequence "github.com/0xPolygon/cdk-data-availability/sequence" +) + +// dataCommitteeClientMock is an autogenerated mock type for the ClientInterface type +type dataCommitteeClientMock struct { + mock.Mock +} + +// GetOffChainData provides a mock function with given fields: ctx, hash +func (_m *dataCommitteeClientMock) GetOffChainData(ctx context.Context, hash common.Hash) ([]byte, error) { + ret := _m.Called(ctx, hash) + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, common.Hash) ([]byte, error)); ok { + return rf(ctx, hash) + } + if rf, ok := ret.Get(0).(func(context.Context, common.Hash) []byte); ok { + r0 = rf(ctx, hash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, common.Hash) error); ok { + r1 = rf(ctx, hash) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SignSequence provides a mock function with given fields: signedSequence +func (_m *dataCommitteeClientMock) SignSequence(signedSequence sequence.SignedSequence) ([]byte, error) { + ret := _m.Called(signedSequence) + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(sequence.SignedSequence) ([]byte, error)); ok { + return rf(signedSequence) + } + if rf, ok := ret.Get(0).(func(sequence.SignedSequence) []byte); ok { + r0 = rf(signedSequence) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(sequence.SignedSequence) error); ok { + r1 = rf(signedSequence) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type mockConstructorTestingTnewDataCommitteeClientMock interface { + mock.TestingT + Cleanup(func()) +} + +// 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) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/synchronizer/mock_datacommitteeclientfactory.go b/synchronizer/mock_datacommitteeclientfactory.go new file mode 100644 index 0000000000..167d0250ad --- /dev/null +++ b/synchronizer/mock_datacommitteeclientfactory.go @@ -0,0 +1,44 @@ +// Code generated by mockery v2.22.1. DO NOT EDIT. + +package synchronizer + +import ( + client "github.com/0xPolygon/cdk-data-availability/client" + mock "github.com/stretchr/testify/mock" +) + +// dataCommitteeClientFactoryMock is an autogenerated mock type for the ClientFactoryInterface type +type dataCommitteeClientFactoryMock struct { + mock.Mock +} + +// New provides a mock function with given fields: url +func (_m *dataCommitteeClientFactoryMock) New(url string) client.ClientInterface { + ret := _m.Called(url) + + var r0 client.ClientInterface + if rf, ok := ret.Get(0).(func(string) client.ClientInterface); ok { + r0 = rf(url) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(client.ClientInterface) + } + } + + return r0 +} + +type mockConstructorTestingTnewDataCommitteeClientFactoryMock interface { + mock.TestingT + Cleanup(func()) +} + +// 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) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/synchronizer/mock_etherman.go b/synchronizer/mock_etherman.go index 45b93cdca5..abc6bf3690 100644 --- a/synchronizer/mock_etherman.go +++ b/synchronizer/mock_etherman.go @@ -8,11 +8,11 @@ import ( common "github.com/ethereum/go-ethereum/common" - etherman "github.com/0xPolygonHermez/zkevm-node/etherman" + etherman "github.com/0xPolygon/cdk-validium-node/etherman" mock "github.com/stretchr/testify/mock" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/cdk-validium-node/state" types "github.com/ethereum/go-ethereum/core/types" ) @@ -48,6 +48,32 @@ func (_m *ethermanMock) EthBlockByNumber(ctx context.Context, blockNumber uint64 return r0, r1 } +// GetCurrentDataCommittee provides a mock function with given fields: +func (_m *ethermanMock) GetCurrentDataCommittee() (*etherman.DataCommittee, error) { + ret := _m.Called() + + var r0 *etherman.DataCommittee + var r1 error + if rf, ok := ret.Get(0).(func() (*etherman.DataCommittee, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() *etherman.DataCommittee); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*etherman.DataCommittee) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetForks provides a mock function with given fields: ctx, genBlockNumber func (_m *ethermanMock) GetForks(ctx context.Context, genBlockNumber uint64) ([]state.ForkIDInterval, error) { ret := _m.Called(ctx, genBlockNumber) diff --git a/synchronizer/mock_state.go b/synchronizer/mock_state.go index a65375c1d8..3c73194357 100644 --- a/synchronizer/mock_state.go +++ b/synchronizer/mock_state.go @@ -7,15 +7,15 @@ import ( common "github.com/ethereum/go-ethereum/common" - executor "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + executor "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" - metrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" + metrics "github.com/0xPolygon/cdk-validium-node/state/metrics" mock "github.com/stretchr/testify/mock" pgx "github.com/jackc/pgx/v4" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/cdk-validium-node/state" types "github.com/ethereum/go-ethereum/core/types" ) @@ -229,6 +229,32 @@ func (_m *stateMock) GetBatchByNumber(ctx context.Context, batchNumber uint64, d return r0, r1 } +// GetBatchL2DataByNumber provides a mock function with given fields: ctx, batchNumber, dbTx +func (_m *stateMock) GetBatchL2DataByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]byte, error) { + ret := _m.Called(ctx, batchNumber, dbTx) + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uint64, pgx.Tx) ([]byte, error)); ok { + return rf(ctx, batchNumber, dbTx) + } + if rf, ok := ret.Get(0).(func(context.Context, uint64, pgx.Tx) []byte); ok { + r0 = rf(ctx, batchNumber, dbTx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uint64, pgx.Tx) error); ok { + r1 = rf(ctx, batchNumber, dbTx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetForkIDByBatchNumber provides a mock function with given fields: batchNumber func (_m *stateMock) GetForkIDByBatchNumber(batchNumber uint64) uint64 { ret := _m.Called(batchNumber) @@ -711,12 +737,13 @@ func (_m *stateMock) UpdateForkIDIntervals(intervals []state.ForkIDInterval) { _m.Called(intervals) } -// 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_zkevmclient.go b/synchronizer/mock_zkevmclient.go index cc65d007a2..fa4d91b609 100644 --- a/synchronizer/mock_zkevmclient.go +++ b/synchronizer/mock_zkevmclient.go @@ -8,7 +8,7 @@ import ( mock "github.com/stretchr/testify/mock" - types "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + types "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" ) // zkEVMClientMock is an autogenerated mock type for the zkEVMClientInterface type diff --git a/synchronizer/synchronizer.go b/synchronizer/synchronizer.go index eb2d5d59e9..57ae57bc03 100644 --- a/synchronizer/synchronizer.go +++ b/synchronizer/synchronizer.go @@ -8,14 +8,15 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - stateMetrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/synchronizer/metrics" + "github.com/0xPolygon/cdk-data-availability/client" + "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + stateMetrics "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/synchronizer/metrics" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -57,7 +58,10 @@ type ClientSynchronizer struct { // later the value is checked to be the same (in function checkFlushID) proverID string // Previous value returned by state.GetStoredFlushID, is used for decide if write a log or not - previousExecutorFlushID uint64 + previousExecutorFlushID uint64 + committeeMembers []etherman.DataCommitteeMember + selectedCommitteeMember int + dataCommitteeClientFactory client.ClientFactoryInterface } // NewSynchronizer creates and initializes an instance of Synchronizer @@ -70,25 +74,30 @@ func NewSynchronizer( zkEVMClient zkEVMClientInterface, eventLog *event.EventLog, genesis state.Genesis, - cfg Config) (Synchronizer, error) { + cfg Config, + clientFactory client.ClientFactoryInterface, +) (Synchronizer, error) { ctx, cancel := context.WithCancel(context.Background()) metrics.Register() - return &ClientSynchronizer{ - isTrustedSequencer: isTrustedSequencer, - state: st, - etherMan: ethMan, - pool: pool, - ctx: ctx, - cancelCtx: cancel, - ethTxManager: ethTxManager, - zkEVMClient: zkEVMClient, - eventLog: eventLog, - genesis: genesis, - cfg: cfg, - proverID: "", - previousExecutorFlushID: 0, - }, nil + c := &ClientSynchronizer{ + isTrustedSequencer: isTrustedSequencer, + state: st, + etherMan: ethMan, + pool: pool, + ctx: ctx, + cancelCtx: cancel, + ethTxManager: ethTxManager, + zkEVMClient: zkEVMClient, + eventLog: eventLog, + genesis: genesis, + cfg: cfg, + proverID: "", + previousExecutorFlushID: 0, + dataCommitteeClientFactory: clientFactory, + } + err := c.loadCommittee() + return c, err } var waitDuration = time.Duration(0) @@ -782,6 +791,10 @@ func (s *ClientSynchronizer) processSequenceBatches(sequencedBatches []etherman. return nil } for _, sbatch := range sequencedBatches { + batchL2Data, err := s.getBatchL2Data(sbatch.BatchNumber, sbatch.TransactionsHash) + if err != nil { + return err + } virtualBatch := state.VirtualBatch{ BatchNumber: sbatch.BatchNumber, TxHash: sbatch.TxHash, @@ -794,7 +807,7 @@ func (s *ClientSynchronizer) processSequenceBatches(sequencedBatches []etherman. GlobalExitRoot: sbatch.GlobalExitRoot, Timestamp: time.Unix(int64(sbatch.Timestamp), 0), Coinbase: sbatch.Coinbase, - BatchL2Data: sbatch.Transactions, + BatchL2Data: batchL2Data, } // ForcedBatch must be processed if sbatch.MinForcedTimestamp > 0 { // If this is true means that the batch is forced @@ -821,9 +834,9 @@ func (s *ClientSynchronizer) processSequenceBatches(sequencedBatches []etherman. } if uint64(forcedBatches[0].ForcedAt.Unix()) != sbatch.MinForcedTimestamp || forcedBatches[0].GlobalExitRoot != sbatch.GlobalExitRoot || - common.Bytes2Hex(forcedBatches[0].RawTxsData) != common.Bytes2Hex(sbatch.Transactions) { + common.Bytes2Hex(forcedBatches[0].RawTxsData) != common.Bytes2Hex(batchL2Data) { log.Warnf("ForcedBatch stored: %+v. RawTxsData: %s", forcedBatches, common.Bytes2Hex(forcedBatches[0].RawTxsData)) - log.Warnf("ForcedBatch sequenced received: %+v. RawTxsData: %s", sbatch, common.Bytes2Hex(sbatch.Transactions)) + log.Warnf("ForcedBatch sequenced received: %+v. RawTxsData: %s", sbatch, common.Bytes2Hex(batchL2Data)) log.Errorf("error: forcedBatch received doesn't match with the next expected forcedBatch stored in db. Expected: %+v, Synced: %+v", forcedBatches, sbatch) rollbackErr := dbTx.Rollback(s.ctx) if rollbackErr != nil { @@ -1225,6 +1238,20 @@ func (s *ClientSynchronizer) processTrustedBatch(trustedBatch *types.Batch, dbTx log.Error("error getting currentBatches. Error: ", err) return nil, nil, err } + + if batches[0] != nil && (((trustedBatch.StateRoot == common.Hash{}) && (batches[0].StateRoot != common.Hash{})) || + len(batches[0].BatchL2Data) > len(trustedBatchL2Data)) { + log.Error("error: inconsistency in data received from trustedNode") + log.Infof("BatchNumber. stored: %d. synced: %d", batches[0].BatchNumber, uint64(trustedBatch.Number)) + log.Infof("GlobalExitRoot. stored: %s. synced: %s", batches[0].GlobalExitRoot.String(), trustedBatch.GlobalExitRoot.String()) + log.Infof("LocalExitRoot. stored: %s. synced: %s", batches[0].LocalExitRoot.String(), trustedBatch.LocalExitRoot.String()) + log.Infof("StateRoot. stored: %s. synced: %s", batches[0].StateRoot.String(), trustedBatch.StateRoot.String()) + log.Infof("Coinbase. stored: %s. synced: %s", batches[0].Coinbase.String(), trustedBatch.Coinbase.String()) + log.Infof("Timestamp. stored: %d. synced: %d", uint64(batches[0].Timestamp.Unix()), uint64(trustedBatch.Timestamp)) + log.Infof("BatchL2Data. stored: %s. synced: %s", common.Bytes2Hex(batches[0].BatchL2Data), common.Bytes2Hex(trustedBatchL2Data)) + return nil, nil, fmt.Errorf("error: inconsistency in data received from trustedNode") + } + if s.trustedState.lastStateRoot == nil && (batches[0] == nil || (batches[0].StateRoot == common.Hash{})) { log.Debug("Setting stateRoot of previous batch. StateRoot: ", batches[1].StateRoot) // Previous synchronization incomplete. Needs to reprocess all txs again @@ -1455,11 +1482,13 @@ func (s *ClientSynchronizer) processAndStoreTxs(trustedBatch *types.Batch, reque func (s *ClientSynchronizer) openBatch(trustedBatch *types.Batch, dbTx pgx.Tx) error { log.Debugf("Opening batch %d", trustedBatch.Number) + var batchL2Data []byte = trustedBatch.BatchL2Data processCtx := state.ProcessingContext{ BatchNumber: uint64(trustedBatch.Number), Coinbase: common.HexToAddress(trustedBatch.Coinbase.String()), Timestamp: time.Unix(int64(trustedBatch.Timestamp), 0), GlobalExitRoot: trustedBatch.GlobalExitRoot, + BatchL2Data: &batchL2Data, } if trustedBatch.ForcedBatchNumber != nil { fb := uint64(*trustedBatch.ForcedBatchNumber) diff --git a/synchronizer/synchronizer_test.go b/synchronizer/synchronizer_test.go index f93c6f2874..60185bb927 100644 --- a/synchronizer/synchronizer_test.go +++ b/synchronizer/synchronizer_test.go @@ -6,15 +6,16 @@ import ( "testing" "time" - cfgTypes "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + cfgTypes "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/etherman" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" "github.com/jackc/pgx/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -33,6 +34,7 @@ type mocks struct { DbTx *dbTxMock ZKEVMClient *zkEVMClientMock //EventLog *eventLogMock + DataCommitteeClientFactory *dataCommitteeClientFactoryMock } //func Test_Given_StartingSynchronizer_When_CallFirstTimeExecutor_Then_StoreProverID(t *testing.T) { @@ -43,7 +45,10 @@ type mocks struct { // this Check partially point 2: Use previous batch stored in memory to avoid getting from database func Test_Given_PermissionlessNode_When_SyncronizeAgainSameBatch_Then_UseTheOneInMemoryInstaeadOfGettingFromDb(t *testing.T) { genesis, cfg, m := setupGenericTest(t) - sync_interface, err := NewSynchronizer(false, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, nil, *genesis, *cfg) + m.Etherman. + On("GetCurrentDataCommittee"). + Return(ðerman.DataCommittee{}, nil) + sync_interface, err := NewSynchronizer(false, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, nil, *genesis, *cfg, nil) require.NoError(t, err) sync, ok := sync_interface.(*ClientSynchronizer) require.EqualValues(t, true, ok, "Can't convert to underlaying struct the interface of syncronizer") @@ -66,7 +71,10 @@ func Test_Given_PermissionlessNode_When_SyncronizeAgainSameBatch_Then_UseTheOneI // this Check partially point 2: Store last batch in memory (CurrentTrustedBatch) func Test_Given_PermissionlessNode_When_SyncronizeFirstTimeABatch_Then_StoreItInALocalVar(t *testing.T) { genesis, cfg, m := setupGenericTest(t) - sync_interface, err := NewSynchronizer(false, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, nil, *genesis, *cfg) + m.Etherman. + On("GetCurrentDataCommittee"). + Return(ðerman.DataCommittee{}, nil) + sync_interface, err := NewSynchronizer(false, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, nil, *genesis, *cfg, nil) require.NoError(t, err) sync, ok := sync_interface.(*ClientSynchronizer) require.EqualValues(t, true, ok, "Can't convert to underlaying struct the interface of syncronizer") @@ -98,8 +106,11 @@ func TestForcedBatch(t *testing.T) { DbTx: newDbTxMock(t), ZKEVMClient: newZkEVMClientMock(t), } + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil) - sync, err := NewSynchronizer(false, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, nil, genesis, cfg) + sync, err := NewSynchronizer(false, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, nil, genesis, cfg, m.DataCommitteeClientFactory) require.NoError(t, err) // state preparation @@ -166,13 +177,14 @@ func TestForcedBatch(t *testing.T) { Once() t := time.Now() + txs := []byte{} sequencedBatch := etherman.SequencedBatch{ BatchNumber: uint64(2), Coinbase: common.HexToAddress("0x222"), SequencerAddr: common.HexToAddress("0x00"), TxHash: common.HexToHash("0x333"), - PolygonZkEVMBatchData: polygonzkevm.PolygonZkEVMBatchData{ - Transactions: []byte{}, + CDKValidiumBatchData: cdkvalidium.CDKValidiumBatchData{ + TransactionsHash: crypto.Keccak256Hash(txs), GlobalExitRoot: [32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, Timestamp: uint64(t.Unix()), MinForcedTimestamp: 1000, //ForcedBatch @@ -184,7 +196,7 @@ func TestForcedBatch(t *testing.T) { ForcedBatchNumber: 1, Sequencer: sequencedBatch.Coinbase, GlobalExitRoot: sequencedBatch.GlobalExitRoot, - RawTxsData: sequencedBatch.Transactions, + RawTxsData: txs, ForcedAt: time.Unix(int64(sequencedBatch.MinForcedTimestamp), 0), }} @@ -237,12 +249,17 @@ func TestForcedBatch(t *testing.T) { Return(nil). Once() + m.State. + On("GetBatchL2DataByNumber", ctx, uint64(2), nil). + Return(txs, nil). + Once() + fb := []state.ForcedBatch{{ BlockNumber: lastBlock.BlockNumber, ForcedBatchNumber: 1, Sequencer: sequencedBatch.Coinbase, GlobalExitRoot: sequencedBatch.GlobalExitRoot, - RawTxsData: sequencedBatch.Transactions, + RawTxsData: []byte{}, ForcedAt: time.Unix(int64(sequencedBatch.MinForcedTimestamp), 0), }} @@ -257,7 +274,7 @@ func TestForcedBatch(t *testing.T) { Once() trustedBatch := &state.Batch{ - BatchL2Data: sequencedBatch.Transactions, + BatchL2Data: txs, GlobalExitRoot: sequencedBatch.GlobalExitRoot, Timestamp: time.Unix(int64(sequencedBatch.Timestamp), 0), Coinbase: sequencedBatch.Coinbase, @@ -342,8 +359,11 @@ func TestSequenceForcedBatch(t *testing.T) { DbTx: newDbTxMock(t), ZKEVMClient: newZkEVMClientMock(t), } + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil) - sync, err := NewSynchronizer(true, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, nil, genesis, cfg) + sync, err := NewSynchronizer(true, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, nil, genesis, cfg, m.DataCommitteeClientFactory) require.NoError(t, err) // state preparation @@ -413,7 +433,7 @@ func TestSequenceForcedBatch(t *testing.T) { BatchNumber: uint64(2), Coinbase: common.HexToAddress("0x222"), TxHash: common.HexToHash("0x333"), - PolygonZkEVMForcedBatchData: polygonzkevm.PolygonZkEVMForcedBatchData{ + CDKValidiumForcedBatchData: cdkvalidium.CDKValidiumForcedBatchData{ Transactions: []byte{}, GlobalExitRoot: [32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, MinForcedTimestamp: 1000, //ForcedBatch @@ -697,6 +717,7 @@ func expectedCallsForsyncTrustedState(t *testing.T, m *mocks, sync *ClientSynchr Coinbase: common.HexToAddress(batchInTrustedNode.Coinbase.String()), Timestamp: time.Unix(int64(batchInTrustedNode.Timestamp), 0), GlobalExitRoot: batchInTrustedNode.GlobalExitRoot, + BatchL2Data: (*[]byte)(&batchInTrustedNode.BatchL2Data), } m.State. On("OpenBatch", sync.ctx, processCtx, m.DbTx). diff --git a/test/Makefile b/test/Makefile index bd0702c2b5..a778877916 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,26 +1,29 @@ DOCKERCOMPOSE := docker-compose -f docker-compose.yml -DOCKERCOMPOSEAPPSEQ := zkevm-sequencer -DOCKERCOMPOSEAPPSEQSENDER := zkevm-sequence-sender -DOCKERCOMPOSEAPPL2GASP := zkevm-l2gaspricer -DOCKERCOMPOSEAPPAGG := zkevm-aggregator -DOCKERCOMPOSEAPPRPC := zkevm-json-rpc -DOCKERCOMPOSEAPPSYNC := zkevm-sync -DOCKERCOMPOSEAPPETHTXMANAGER := zkevm-eth-tx-manager -DOCKERCOMPOSESTATEDB := zkevm-state-db -DOCKERCOMPOSEPOOLDB := zkevm-pool-db -DOCKERCOMPOSEEVENTDB := zkevm-event-db -DOCKERCOMPOSENETWORK := zkevm-mock-l1-network -DOCKERCOMPOSEEXPLORERL1 := zkevm-explorer-l1 -DOCKERCOMPOSEEXPLORERL1DB := zkevm-explorer-l1-db -DOCKERCOMPOSEEXPLORERL2 := zkevm-explorer-l2 -DOCKERCOMPOSEEXPLORERL2DB := zkevm-explorer-l2-db -DOCKERCOMPOSEEXPLORERRPC := zkevm-explorer-json-rpc -DOCKERCOMPOSEZKPROVER := zkevm-prover -DOCKERCOMPOSEPERMISSIONLESSDB := zkevm-permissionless-db -DOCKERCOMPOSEPERMISSIONLESSNODE := zkevm-permissionless-node -DOCKERCOMPOSEPERMISSIONLESSZKPROVER := zkevm-permissionless-prover -DOCKERCOMPOSENODEAPPROVE := zkevm-approve -DOCKERCOMPOSEMETRICS := zkevm-metrics +DOCKERCOMPOSEAPPSEQ := cdk-validium-sequencer +DOCKERCOMPOSEAPPSEQSENDER := cdk-validium-sequence-sender +DOCKERCOMPOSEAPPL2GASP := cdk-validium-l2gaspricer +DOCKERCOMPOSEAPPAGG := cdk-validium-aggregator +DOCKERCOMPOSEAPPRPC := cdk-validium-json-rpc +DOCKERCOMPOSEAPPSYNC := cdk-validium-sync +DOCKERCOMPOSEAPPETHTXMANAGER := cdk-validium-eth-tx-manager +DOCKERCOMPOSESTATEDB := cdk-validium-state-db +DOCKERCOMPOSEPOOLDB := cdk-validium-pool-db +DOCKERCOMPOSEEVENTDB := cdk-validium-event-db +DOCKERCOMPOSENETWORK := cdk-validium-mock-l1-network +DOCKERCOMPOSEDAC := cdk-validium-data-availability +DOCKERCOMPOSESETUPDAC := cdk-validium-setup-committee +DOCKERCOMPOSEEXPLORERL1 := cdk-validium-explorer-l1 +DOCKERCOMPOSEEXPLORERL1DB := cdk-validium-explorer-l1-db +DOCKERCOMPOSEEXPLORERL2 := cdk-validium-explorer-l2 +DOCKERCOMPOSEEXPLORERL2DB := cdk-validium-explorer-l2-db +DOCKERCOMPOSEEXPLORERRPC := cdk-validium-explorer-json-rpc +DOCKERCOMPOSEZKPROVER := cdk-validium-prover +DOCKERCOMPOSEPERMISSIONLESSDB := cdk-validium-permissionless-db +DOCKERCOMPOSEPERMISSIONLESSNODE := cdk-validium-permissionless-node +DOCKERCOMPOSEPERMISSIONLESSNODEDAC := cdk-validium-permissionless-node-forced-DAC +DOCKERCOMPOSEPERMISSIONLESSZKPROVER := cdk-validium-permissionless-prover +DOCKERCOMPOSENODEAPPROVE := cdk-validium-approve +DOCKERCOMPOSEMETRICS := cdk-validium-metrics DOCKERCOMPOSEGRAFANA := grafana RUNSTATEDB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSESTATEDB) @@ -36,6 +39,8 @@ RUNETHTXMANAGER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPETHTXMANAGER) RUNGRAFANA := DOCKERGID=`stat -c '%g' /var/run/docker.sock` $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEGRAFANA) RUNL1NETWORK := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSENETWORK) +RUNDAC := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEDAC) +RUNSETUPDAC := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSESETUPDAC) RUNEXPLORERL1 := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL1) RUNEXPLORERL1DB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL1DB) RUNEXPLORERL2 := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL2) @@ -45,6 +50,7 @@ RUNZKPROVER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEZKPROVER) RUNPERMISSIONLESSDB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEPERMISSIONLESSDB) RUNPERMISSIONLESSNODE := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEPERMISSIONLESSNODE) +RUNPERMISSIONLESSNODEDAC := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEPERMISSIONLESSNODEDAC) RUNPERMISSIONLESSZKPROVER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEPERMISSIONLESSZKPROVER) RUNAPPROVE := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSENODEAPPROVE) @@ -75,8 +81,12 @@ STOPZKPROVER := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEZKPROVER) && $(DOCKERCOMPOS STOPPERMISSIONLESSDB := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEPERMISSIONLESSDB) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEPERMISSIONLESSDB) STOPPERMISSIONLESSNODE := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEPERMISSIONLESSNODE) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEPERMISSIONLESSNODE) +STOPPERMISSIONLESSNODEDAC := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEPERMISSIONLESSNODEDAC) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEPERMISSIONLESSNODEDAC) STOPPERMISSIONLESSZKPROVER := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEPERMISSIONLESSZKPROVER) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEPERMISSIONLESSZKPROVER) +RUNDACDB := docker-compose up -d cdk-validium-data-node-db +STOPDACDB := docker-compose stop cdk-validium-data-node-db && docker-compose rm -f cdk-validium-data-node-db + STOPAPPROVE := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSENODEAPPROVE) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSENODEAPPROVE) STOPMETRICS := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEMETRICS) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEMETRICS) @@ -220,6 +230,18 @@ test-e2e-group-11: stop ## Runs group 11 e2e tests checking race conditions docker logs $(DOCKERCOMPOSEZKPROVER) trap '$(STOP)' EXIT; MallocNanoZone=0 go test -count=1 -race -v -p 1 -timeout 2000s ../ci/e2e-group11/... + +.PHONY: test-e2e-group-cdk-validium-1 +test-e2e-group-cdk-validium-1: stop ## Runs cdk-validium-1 e2e tests checking race conditions + $(RUNSTATEDB) + $(RUNPOOLDB) + $(RUNEVENTDB) + sleep 5 + $(RUNZKPROVER) + docker ps -a + docker logs $(DOCKERCOMPOSEZKPROVER) + trap '$(STOP)' EXIT; MallocNanoZone=0 go test -count=1 -race -v -p 1 -timeout 2000s ../ci/e2e-group-cdk-validium-1/... + .PHONY: benchmark-sequencer-eth-transfers benchmark-sequencer-eth-transfers: stop $(RUNL1NETWORK) @@ -419,11 +441,24 @@ run-permissionless: run-node ## Runs the trusted and permissionless node $(RUNPERMISSIONLESSNODE) .PHONY: stop-permissionless -stop-permissionless: stop-node## Stops the permissionless node +stop-permissionless: stop-node## Stops the trusted and permissionless node $(STOPPERMISSIONLESSNODE) $(STOPPERMISSIONLESSZKPROVER) $(STOPPERMISSIONLESSDB) +.PHONY: run-permissionless-dac +run-permissionless-dac: ## Runs a permissionless node that is forced to sync through DAC + $(RUNPERMISSIONLESSDB) + sleep 1 + $(RUNPERMISSIONLESSZKPROVER) + $(RUNPERMISSIONLESSNODEDAC) + +.PHONY: stop-permissionless-dac +stop-permissionless-dac: ## Stops the permissionless node that is forced to sync through DAC + $(STOPPERMISSIONLESSNODEDAC) + $(STOPPERMISSIONLESSZKPROVER) + $(STOPPERMISSIONLESSDB) + .PHONY: run-approve-matic run-approve-matic: ## Runs approve in node container $(RUNAPPROVE) @@ -451,6 +486,30 @@ run: ## Runs a full node $(RUNAGGREGATOR) $(RUNJSONRPC) +.PHONY: run-validium +run-validium: ## Runs a full validium node + $(RUNSTATEDB) + $(RUNPOOLDB) + $(RUNEVENTDB) + $(RUNDACDB) + $(RUNL1NETWORK) + $(RUNDAC) + sleep 1 + $(RUNSETUPDAC) + sleep 2 + $(RUNZKPROVER) + $(RUNAPPROVE) + sleep 3 + $(RUNSYNC) + sleep 2 + $(RUNETHTXMANAGER) + $(RUNSEQUENCER) + $(RUNSEQUENCESENDER) + $(RUNL2GASPRICER) + $(RUNAGGREGATOR) + $(RUNJSONRPC) + $(MAKE) run-explorer + .PHONY: stop stop: ## Stops all services $(STOP) @@ -473,6 +532,15 @@ run-metrics: ## Runs the metrics container stop-metrics: ## Stops the metrics container $(STOPMETRICS) +.PHONY: run-dac-db +run-dac-db: ## Suns the DAC DB + $(RUNDACDB) + +.PHONY: stop-dac-db +stop-dac-db: ## Stops the DAC DB + $(STOPDACDB) + + .PHONY: init-network init-network: ## Initializes the network go run ./scripts/init_network/main.go . @@ -517,6 +585,8 @@ generate-mocks: ## Generates mocks for the tests, using mockery tool export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=poolInterface --dir=../synchronizer --output=../synchronizer --outpkg=synchronizer --structname=poolMock --filename=mock_pool.go export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=zkEVMClientInterface --dir=../synchronizer --output=../synchronizer --outpkg=synchronizer --structname=zkEVMClientMock --filename=mock_zkevmclient.go export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Tx --srcpkg=github.com/jackc/pgx/v4 --output=../synchronizer --outpkg=synchronizer --structname=dbTxMock --filename=mock_dbtx.go + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ClientFactoryInterface --srcpkg=github.com/0xPolygon/cdk-data-availability/client --output=../synchronizer --outpkg=synchronizer --structname=dataCommitteeClientFactoryMock --filename=mock_datacommitteeclientfactory.go + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ClientInterface --srcpkg=github.com/0xPolygon/cdk-data-availability/client --output=../synchronizer --outpkg=synchronizer --structname=dataCommitteeClientMock --filename=mock_datacommitteeclient.go export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=GasPricer --srcpkg=github.com/ethereum/go-ethereum --output=../etherman --outpkg=etherman --structname=etherscanMock --filename=mock_etherscan.go export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=GasPricer --srcpkg=github.com/ethereum/go-ethereum --output=../etherman --outpkg=etherman --structname=ethGasStationMock --filename=mock_ethgasstation.go @@ -552,4 +622,4 @@ compile-scs: ## Compiles smart contracts, configuration in test/contracts/index. help: ## Prints this help @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ | sort \ - | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' \ No newline at end of file diff --git a/test/benchmarks/sequencer/common/metrics/metrics.go b/test/benchmarks/sequencer/common/metrics/metrics.go index e45d8e631a..e75d87fded 100644 --- a/test/benchmarks/sequencer/common/metrics/metrics.go +++ b/test/benchmarks/sequencer/common/metrics/metrics.go @@ -6,12 +6,12 @@ import ( "os/exec" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - metricsLib "github.com/0xPolygonHermez/zkevm-node/metrics" - "github.com/0xPolygonHermez/zkevm-node/sequencer/metrics" - metricsState "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/log" + metricsLib "github.com/0xPolygon/cdk-validium-node/metrics" + "github.com/0xPolygon/cdk-validium-node/sequencer/metrics" + metricsState "github.com/0xPolygon/cdk-validium-node/state/metrics" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/test/testutils" ) const ( diff --git a/test/benchmarks/sequencer/common/params/variables.go b/test/benchmarks/sequencer/common/params/variables.go index 9b12cbb930..3b52cf696d 100644 --- a/test/benchmarks/sequencer/common/params/variables.go +++ b/test/benchmarks/sequencer/common/params/variables.go @@ -4,8 +4,8 @@ import ( "context" "strings" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" ) diff --git a/test/benchmarks/sequencer/common/setup/setup.go b/test/benchmarks/sequencer/common/setup/setup.go index 066514996b..def27b1b8e 100644 --- a/test/benchmarks/sequencer/common/setup/setup.go +++ b/test/benchmarks/sequencer/common/setup/setup.go @@ -6,14 +6,14 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/pool/pgpoolstorage" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/nileventstorage" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/pool/pgpoolstorage" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/require" diff --git a/test/benchmarks/sequencer/common/transactions/transactions.go b/test/benchmarks/sequencer/common/transactions/transactions.go index 0db33871f9..d48f531d4d 100644 --- a/test/benchmarks/sequencer/common/transactions/transactions.go +++ b/test/benchmarks/sequencer/common/transactions/transactions.go @@ -6,11 +6,11 @@ import ( "strconv" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/ethclient" ) diff --git a/test/benchmarks/sequencer/erc20-transfers/pool_processing_erc20_test.go b/test/benchmarks/sequencer/erc20-transfers/pool_processing_erc20_test.go index b6e2e871c6..ada25256cf 100644 --- a/test/benchmarks/sequencer/erc20-transfers/pool_processing_erc20_test.go +++ b/test/benchmarks/sequencer/erc20-transfers/pool_processing_erc20_test.go @@ -8,14 +8,14 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/metrics" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/setup" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/transactions" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/metrics" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/setup" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/transactions" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" diff --git a/test/benchmarks/sequencer/erc20-transfers/tx_sender.go b/test/benchmarks/sequencer/erc20-transfers/tx_sender.go index d0e3faa626..b620f73c3f 100644 --- a/test/benchmarks/sequencer/erc20-transfers/tx_sender.go +++ b/test/benchmarks/sequencer/erc20-transfers/tx_sender.go @@ -3,9 +3,9 @@ package erc20_transfers import ( "math/big" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ERC20" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/ethclient" ) diff --git a/test/benchmarks/sequencer/eth-transfers/pool_processing_eth_test.go b/test/benchmarks/sequencer/eth-transfers/pool_processing_eth_test.go index 215da9d979..0c2eb0daab 100644 --- a/test/benchmarks/sequencer/eth-transfers/pool_processing_eth_test.go +++ b/test/benchmarks/sequencer/eth-transfers/pool_processing_eth_test.go @@ -6,12 +6,12 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/metrics" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/setup" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/transactions" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/metrics" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/setup" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/transactions" "github.com/stretchr/testify/require" ) diff --git a/test/benchmarks/sequencer/eth-transfers/tx_sender.go b/test/benchmarks/sequencer/eth-transfers/tx_sender.go index 02ac3f6c8b..90aa365a30 100644 --- a/test/benchmarks/sequencer/eth-transfers/tx_sender.go +++ b/test/benchmarks/sequencer/eth-transfers/tx_sender.go @@ -5,10 +5,10 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ERC20" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" diff --git a/test/benchmarks/sequencer/scripts/common/environment/constants.go b/test/benchmarks/sequencer/scripts/common/environment/constants.go index 13a002519c..a7fa264cc1 100644 --- a/test/benchmarks/sequencer/scripts/common/environment/constants.go +++ b/test/benchmarks/sequencer/scripts/common/environment/constants.go @@ -3,8 +3,8 @@ package environment import ( "strconv" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/testutils" ) var ( diff --git a/test/benchmarks/sequencer/scripts/common/environment/init.go b/test/benchmarks/sequencer/scripts/common/environment/init.go index 3d13a28663..141d9c8de2 100644 --- a/test/benchmarks/sequencer/scripts/common/environment/init.go +++ b/test/benchmarks/sequencer/scripts/common/environment/init.go @@ -6,11 +6,11 @@ import ( "strconv" "strings" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool/pgpoolstorage" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool/pgpoolstorage" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" diff --git a/test/benchmarks/sequencer/scripts/common/results/print.go b/test/benchmarks/sequencer/scripts/common/results/print.go index abee515213..da757dd428 100644 --- a/test/benchmarks/sequencer/scripts/common/results/print.go +++ b/test/benchmarks/sequencer/scripts/common/results/print.go @@ -3,8 +3,8 @@ package results import ( "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" ) // Print prints the results of the benchmark diff --git a/test/benchmarks/sequencer/scripts/erc20-transfers/main.go b/test/benchmarks/sequencer/scripts/erc20-transfers/main.go index c05f549649..a177a69cb2 100644 --- a/test/benchmarks/sequencer/scripts/erc20-transfers/main.go +++ b/test/benchmarks/sequencer/scripts/erc20-transfers/main.go @@ -3,13 +3,13 @@ package main import ( "time" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/transactions" - erc20transfers "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/erc20-transfers" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/scripts/common/environment" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/scripts/common/results" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/transactions" + erc20transfers "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/erc20-transfers" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/scripts/common/environment" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/scripts/common/results" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ERC20" "github.com/ethereum/go-ethereum/common" ) diff --git a/test/benchmarks/sequencer/scripts/eth-transfers/main.go b/test/benchmarks/sequencer/scripts/eth-transfers/main.go index 9705a5a234..d9c4d537da 100644 --- a/test/benchmarks/sequencer/scripts/eth-transfers/main.go +++ b/test/benchmarks/sequencer/scripts/eth-transfers/main.go @@ -3,12 +3,12 @@ package main import ( "time" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/transactions" - ethtransfers "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/eth-transfers" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/scripts/common/environment" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/scripts/common/results" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/common/transactions" + ethtransfers "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/eth-transfers" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/scripts/common/environment" + "github.com/0xPolygon/cdk-validium-node/test/benchmarks/sequencer/scripts/common/results" ) func main() { diff --git a/test/config/debug.node.config.toml b/test/config/debug.node.config.toml index 1fb57cb65b..a9507b3396 100644 --- a/test/config/debug.node.config.toml +++ b/test/config/debug.node.config.toml @@ -69,15 +69,6 @@ MaxMemAligns = 236585 MaxArithmetics = 236585 MaxBinaries = 473170 MaxSteps = 7570538 -WeightBatchBytesSize = 1 -WeightCumulativeGasUsed = 1 -WeightKeccakHashes = 1 -WeightPoseidonHashes = 1 -WeightPoseidonPaddings = 1 -WeightMemAligns = 1 -WeightArithmetics = 1 -WeightBinaries = 1 -WeightSteps = 1 TxLifetimeCheckTimeout = "10m" MaxTxLifetime = "3h" [Sequencer.Finalizer] @@ -95,8 +86,6 @@ MaxTxLifetime = "3h" [Sequencer.DBManager] PoolRetrievalInterval = "500ms" L2ReorgRetrievalInterval = "5s" - [Sequencer.Worker] - ResourceCostMultiplier = 1000 [Sequencer.EffectiveGasPrice] MaxBreakEvenGasPriceDeviationPercentage = 10 L1GasPriceFactor = 0.25 @@ -108,8 +97,8 @@ MaxTxLifetime = "3h" WaitPeriodSendSequence = "15s" LastBatchVirtualizationTimeMaxWaitPeriod = "10s" MaxTxSizeForL1 = 131072 -SenderAddress = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" -PrivateKeys = [{Path = "./test/sequencer.keystore", Password = "testonly"}] +L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" +PrivateKey = {Path = "./test/sequencer.keystore", Password = "testonly"} [Aggregator] Host = "0.0.0.0" diff --git a/test/config/test.dac.docker.toml b/test/config/test.dac.docker.toml new file mode 100644 index 0000000000..7c4819fb4d --- /dev/null +++ b/test/config/test.dac.docker.toml @@ -0,0 +1,34 @@ +PrivateKey = {Path = "/pk/test-member.keystore", Password = "testonly"} + +[L1] +WsURL = "ws://cdk-validium-mock-l1-network:8546" +RpcURL = "http://cdk-validium-mock-l1-network:8545" +CDKValidiumAddress = "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82" +DataCommitteeAddress = "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" +Timeout = "3m" +RetryPeriod = "5s" + +[Log] +Environment = "development" # "production" or "development" +Level = "debug" +Outputs = ["stderr"] + +[DB] +User = "committee_user" +Password = "committee_password" +Name = "committee_db" +Host = "cdk-validium-data-node-db" +Port = "5432" +EnableLog = false +MaxConns = 200 + +[RPC] +Host = "0.0.0.0" +Port = 8444 +ReadTimeout = "60s" +WriteTimeout = "60s" +MaxRequestsPerIPAndSecond = 500 +SequencerNodeURI = "" +EnableL2SuggestedGasPricePolling = false + [RPC.WebSockets] + Enabled = false diff --git a/test/config/test.dac.member.keystore b/test/config/test.dac.member.keystore new file mode 100644 index 0000000000..36adf8bc3f --- /dev/null +++ b/test/config/test.dac.member.keystore @@ -0,0 +1 @@ +{"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 diff --git a/test/config/test.genesis.config.json b/test/config/test.genesis.config.json index e78f355783..bfdaddd89e 100644 --- a/test/config/test.genesis.config.json +++ b/test/config/test.genesis.config.json @@ -1,12 +1,13 @@ { "l1Config" : { "chainId": 1337, - "polygonZkEVMAddress": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788", + "cdkValidiumAddress": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", "maticTokenAddress": "0x5FbDB2315678afecb367f032d93F642f64180aa3", - "polygonZkEVMGlobalExitRootAddress": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" + "polygonZkEVMGlobalExitRootAddress": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "cdkDataCommitteeContract": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" }, "root": "0xd88680f1b151dd67518f9aca85161424c0cac61df2f5424a3ddc04ea25adecc7", - "genesisBlockNumber": 102, + "genesisBlockNumber": 80, "genesis": [ { "contractName": "PolygonZkEVMDeployer", diff --git a/test/config/test.node.config.toml b/test/config/test.node.config.toml index d5133f7b47..e97ba474a3 100644 --- a/test/config/test.node.config.toml +++ b/test/config/test.node.config.toml @@ -9,7 +9,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "cdk-validium-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -27,13 +27,13 @@ PollMinAllowedGasPriceInterval = "15s" User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "cdk-validium-pool-db" Port = "5432" EnableLog = false MaxConns = 200 [Etherman] -URL = "http://zkevm-mock-l1-network:8545" +URL = "http://cdk-validium-mock-l1-network:8545" MultiGasProvider = false [Etherscan] ApiKey = "" @@ -70,15 +70,6 @@ MaxMemAligns = 236585 MaxArithmetics = 236585 MaxBinaries = 473170 MaxSteps = 7570538 -WeightBatchBytesSize = 1 -WeightCumulativeGasUsed = 1 -WeightKeccakHashes = 1 -WeightPoseidonHashes = 1 -WeightPoseidonPaddings = 1 -WeightMemAligns = 1 -WeightArithmetics = 1 -WeightBinaries = 1 -WeightSteps = 1 TxLifetimeCheckTimeout = "10m" MaxTxLifetime = "3h" [Sequencer.Finalizer] @@ -96,8 +87,6 @@ MaxTxLifetime = "3h" [Sequencer.DBManager] PoolRetrievalInterval = "500ms" L2ReorgRetrievalInterval = "5s" - [Sequencer.Worker] - ResourceCostMultiplier = 1000 [Sequencer.EffectiveGasPrice] MaxBreakEvenGasPriceDeviationPercentage = 10 L1GasPriceFactor = 0.25 @@ -109,8 +98,8 @@ MaxTxLifetime = "3h" WaitPeriodSendSequence = "15s" LastBatchVirtualizationTimeMaxWaitPeriod = "10s" MaxTxSizeForL1 = 131072 -SenderAddress = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" -PrivateKeys = [{Path = "/pk/sequencer.keystore", Password = "testonly"}] +L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" +PrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"} [Aggregator] Host = "0.0.0.0" @@ -139,12 +128,21 @@ DefaultGasPriceWei = 1000000000 MaxGasPriceWei = 0 [MTClient] -URI = "zkevm-prover:50061" +URI = "cdk-validium-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "cdk-validium-prover:50071" MaxGRPCMessageSize = 100000000 +[DataAvailability] +PrivateKey = {Path = "/pk/test-member.keystore", Password = "testonly"} + [DataAvailability.L1] + RpcURL = "http://cdk-validium-mock-l1-network:8545" + DataCommitteeAddress = "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" + [DataAvailability.RPC] + Host = "cdk-validium-data-availability" + Port = 8444 + [Metrics] Host = "0.0.0.0" Port = 9091 @@ -158,7 +156,7 @@ ProfilingEnabled = true User = "event_user" Password = "event_password" Name = "event_db" - Host = "zkevm-event-db" + Host = "cdk-validium-event-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -167,7 +165,7 @@ ProfilingEnabled = true User = "prover_user" Password = "prover_pass" Name = "prover_db" -Host = "zkevm-state-db" +Host = "cdk-validium-state-db" Port = "5432" EnableLog = false -MaxConns = 200 +MaxConns = 200 \ No newline at end of file diff --git a/test/config/test.permissionless.prover.config.json b/test/config/test.permissionless.prover.config.json index 0f879c9c17..fd16b78c25 100644 --- a/test/config/test.permissionless.prover.config.json +++ b/test/config/test.permissionless.prover.config.json @@ -27,7 +27,7 @@ "runBlakeTest": false, "executeInParallel": true, - "useMainExecGenerated": false, + "useMainExecGenerated": true, "saveRequestToFile": false, "saveInputToFile": false, "saveDbReadsToFile": false, @@ -56,7 +56,7 @@ "aggregatorServerPort": 50081, "aggregatorClientPort": 50081, - "aggregatorClientHost": "zkevm-aggregator", + "aggregatorClientHost": "cdk-validium-aggregator", "mapConstPolsFile": false, "mapConstantsTreeFile": false, @@ -69,7 +69,7 @@ "outputPath": "output", - "databaseURL": "postgresql://prover_user:prover_pass@zkevm-permissionless-db:5432/prover_db", + "databaseURL": "postgresql://prover_user:prover_pass@cdk-validium-permissionless-db:5432/prover_db", "dbNodesTableName": "state.nodes", "dbProgramTableName": "state.program", "dbMultiWrite": true, @@ -81,9 +81,7 @@ "maxExecutorThreads": 20, "maxProverThreads": 8, "maxHashDBThreads": 8, - "ECRecoverPrecalc": true, "ECRecoverPrecalcNThreads": 16, - "dbMultiWriteSinglePosition": false + "stateManager": true } - diff --git a/test/config/test.prover.config.json b/test/config/test.prover.config.json index 86f511f0c2..192e518e23 100644 --- a/test/config/test.prover.config.json +++ b/test/config/test.prover.config.json @@ -27,7 +27,7 @@ "runBlakeTest": false, "executeInParallel": true, - "useMainExecGenerated": false, + "useMainExecGenerated": true, "saveRequestToFile": false, "saveInputToFile": false, "saveDbReadsToFile": false, @@ -56,7 +56,7 @@ "aggregatorServerPort": 50081, "aggregatorClientPort": 50081, - "aggregatorClientHost": "zkevm-aggregator", + "aggregatorClientHost": "cdk-validium-aggregator", "mapConstPolsFile": false, "mapConstantsTreeFile": false, @@ -69,7 +69,7 @@ "outputPath": "output", - "databaseURL": "postgresql://prover_user:prover_pass@zkevm-state-db:5432/prover_db", + "databaseURL": "postgresql://prover_user:prover_pass@cdk-validium-state-db:5432/prover_db", "dbNodesTableName": "state.nodes", "dbProgramTableName": "state.program", "dbMultiWrite": true, @@ -83,9 +83,7 @@ "maxExecutorThreads": 20, "maxProverThreads": 8, "maxHashDBThreads": 8, - "ECRecoverPrecalc": true, "ECRecoverPrecalcNThreads": 16, - "dbMultiWriteSinglePosition": false + "stateManager": true } - diff --git a/test/constants/effective_percentage.go b/test/constants/effective_percentage.go index d6d6278c2d..71784ca428 100644 --- a/test/constants/effective_percentage.go +++ b/test/constants/effective_percentage.go @@ -1,6 +1,6 @@ package constants -import "github.com/0xPolygonHermez/zkevm-node/state" +import "github.com/0xPolygon/cdk-validium-node/state" var ( EffectivePercentage = []uint8{state.MaxEffectivePercentage} diff --git a/test/dbutils/dbutils.go b/test/dbutils/dbutils.go index 2db5b20145..811282324d 100644 --- a/test/dbutils/dbutils.go +++ b/test/dbutils/dbutils.go @@ -3,9 +3,9 @@ package dbutils import ( "fmt" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/testutils" ) // InitOrResetState will initializes the State db running the migrations or diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 6c50ab1853..b246d30997 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.5" networks: default: - name: zkevm + name: cdk-validium services: grafana: @@ -13,8 +13,8 @@ services: - ./config/grafana/dashboard-dockers.json:/etc/grafana/provisioning/dashboards/dashboard-dockers.json:ro - ./config/grafana/dashboard-node.json:/etc/grafana/provisioning/dashboards/dashboard-node.json:ro environment: - - GF_SECURITY_ADMIN_USER=zkevm - - GF_SECURITY_ADMIN_PASSWORD=zkevm + - GF_SECURITY_ADMIN_USER=cdk-validium + - GF_SECURITY_ADMIN_PASSWORD=cdk-validium ports: - 3000:3000 depends_on: @@ -34,7 +34,7 @@ services: - POSTGRES_DB=grafana depends_on: - grafana-db - - zkevm-json-rpc + - cdk-validium-json-rpc grafana-db: container_name: grafana-db @@ -46,30 +46,30 @@ services: - POSTGRES_PASSWORD=password - POSTGRES_DB=grafana - zkevm-sequencer: - container_name: zkevm-sequencer - image: zkevm-node + cdk-validium-sequencer: + container_name: cdk-validium-sequencer + image: snapchain/cdk-validium-node ports: - 9092:9091 # needed if metrics enabled - 6060:6060 environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-state-db + - CDK_VALIDIUM_NODE_POOL_DB_HOST=cdk-validium-pool-db volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequencer" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequencer" - zkevm-sequence-sender: - container_name: zkevm-sequence-sender - image: zkevm-node + cdk-validium-sequence-sender: + container_name: cdk-validium-sequence-sender + image: snapchain/cdk-validium-node environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db - - ZKEVM_NODE_SEQUENCER_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-state-db + - CDK_VALIDIUM_NODE_POOL_DB_HOST=cdk-validium-pool-db + - CDK_VALIDIUM_NODE_SEQUENCER_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 volumes: - ./sequencer.keystore:/pk/sequencer.keystore - ./config/test.node.config.toml:/app/config.toml @@ -77,65 +77,63 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequence-sender" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequence-sender" - zkevm-json-rpc: - container_name: zkevm-json-rpc - image: zkevm-node + cdk-validium-json-rpc: + container_name: cdk-validium-json-rpc + image: snapchain/cdk-validium-node ports: - 8123:8123 - 8133:8133 # needed if WebSockets enabled - 9091:9091 # needed if metrics enabled environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-state-db + - CDK_VALIDIUM_NODE_POOL_DB_HOST=cdk-validium-pool-db volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc" - zkevm-aggregator: - container_name: zkevm-aggregator - image: zkevm-node + cdk-validium-aggregator: + container_name: cdk-validium-aggregator + image: snapchain/cdk-validium-node ports: - 50081:50081 - 9093:9091 # needed if metrics enabled environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_AGGREGATOR_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-state-db + - CDK_VALIDIUM_NODE_AGGREGATOR_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components aggregator" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components aggregator" - zkevm-sync: - container_name: zkevm-sync - image: zkevm-node - ports: - - 9095:9091 # needed if metrics enabled + cdk-validium-sync: + container_name: cdk-validium-sync + image: snapchain/cdk-validium-node environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-state-db volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components synchronizer" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components synchronizer" - zkevm-eth-tx-manager: - container_name: zkevm-eth-tx-manager - image: zkevm-node + cdk-validium-eth-tx-manager: + container_name: cdk-validium-eth-tx-manager + image: snapchain/cdk-validium-node ports: - 9094:9091 # needed if metrics enabled environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-state-db volumes: - ./sequencer.keystore:/pk/sequencer.keystore - ./aggregator.keystore:/pk/aggregator.keystore @@ -144,13 +142,13 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components eth-tx-manager" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components eth-tx-manager" - zkevm-l2gaspricer: - container_name: zkevm-l2gaspricer - image: zkevm-node + cdk-validium-l2gaspricer: + container_name: cdk-validium-l2gaspricer + image: snapchain/cdk-validium-node environment: - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - CDK_VALIDIUM_NODE_POOL_DB_HOST=cdk-validium-pool-db volumes: - ./test.keystore:/pk/keystore - ./config/test.node.config.toml:/app/config.toml @@ -158,10 +156,10 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components l2gaspricer" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components l2gaspricer" - zkevm-state-db: - container_name: zkevm-state-db + cdk-validium-state-db: + container_name: cdk-validium-state-db image: postgres deploy: resources: @@ -182,8 +180,8 @@ services: - "-N" - "500" - zkevm-pool-db: - container_name: zkevm-pool-db + cdk-validium-pool-db: + container_name: cdk-validium-pool-db image: postgres deploy: resources: @@ -202,8 +200,8 @@ services: - "-N" - "500" - zkevm-event-db: - container_name: zkevm-event-db + cdk-validium-event-db: + container_name: cdk-validium-event-db image: postgres deploy: resources: @@ -224,9 +222,9 @@ services: - "-N" - "500" - zkevm-explorer-l1: - container_name: zkevm-explorer-l1 - image: hermeznetwork/zkevm-explorer:latest + cdk-validium-explorer-l1: + container_name: cdk-validium-explorer-l1 + image: scmorgan/sc-hermez-zkevm-explorer:latest ports: - 4000:4000 environment: @@ -234,8 +232,8 @@ services: - SUBNETWORK=Local Ethereum - COIN=ETH - ETHEREUM_JSONRPC_VARIANT=geth - - ETHEREUM_JSONRPC_HTTP_URL=http://zkevm-mock-l1-network:8545 - - DATABASE_URL=postgres://l1_explorer_user:l1_explorer_password@zkevm-explorer-l1-db:5432/l1_explorer_db + - ETHEREUM_JSONRPC_HTTP_URL=http://cdk-validium-mock-l1-network:8545 + - DATABASE_URL=postgres://l1_explorer_user:l1_explorer_password@cdk-validium-explorer-l1-db:5432/l1_explorer_db - ECTO_USE_SSL=false - MIX_ENV=prod command: @@ -243,8 +241,8 @@ services: - "-c" - "mix do ecto.create, ecto.migrate; mix phx.server" - zkevm-explorer-l1-db: - container_name: zkevm-explorer-l1-db + cdk-validium-explorer-l1-db: + container_name: cdk-validium-explorer-l1-db image: postgres ports: - 5436:5432 @@ -257,9 +255,9 @@ services: - "-N" - "500" - zkevm-explorer-l2: - container_name: zkevm-explorer-l2 - image: hermeznetwork/zkevm-explorer:latest + cdk-validium-explorer-l2: + container_name: cdk-validium-explorer-l2 + image: scmorgan/sc-hermez-zkevm-explorer:latest ports: - 4001:4000 environment: @@ -267,8 +265,8 @@ services: - SUBNETWORK=Polygon Hermez - COIN=ETH - ETHEREUM_JSONRPC_VARIANT=geth - - ETHEREUM_JSONRPC_HTTP_URL=http://zkevm-explorer-json-rpc:8124 - - DATABASE_URL=postgres://l2_explorer_user:l2_explorer_password@zkevm-explorer-l2-db:5432/l2_explorer_db + - ETHEREUM_JSONRPC_HTTP_URL=http://cdk-validium-explorer-json-rpc:8124 + - DATABASE_URL=postgres://l2_explorer_user:l2_explorer_password@cdk-validium-explorer-l2-db:5432/l2_explorer_db - ECTO_USE_SSL=false - MIX_ENV=prod - LOGO=/images/blockscout_logo.svg @@ -278,27 +276,27 @@ services: - "-c" - "mix do ecto.create, ecto.migrate; mix phx.server" - zkevm-explorer-json-rpc: - container_name: zkevm-explorer-json-rpc - image: zkevm-node + cdk-validium-explorer-json-rpc: + container_name: cdk-validium-explorer-json-rpc + image: snapchain/cdk-validium-node ports: - 8124:8124 - 8134:8134 # needed if WebSockets enabled environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db - - ZKEVM_NODE_RPC_PORT=8124 - - ZKEVM_NODE_RPC_WEBSOCKETS_PORT=8134 + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-state-db + - CDK_VALIDIUM_NODE_POOL_DB_HOST=cdk-validium-pool-db + - CDK_VALIDIUM_NODE_RPC_PORT=8124 + - CDK_VALIDIUM_NODE_RPC_WEBSOCKETS_PORT=8134 volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc --http.api eth,net,debug,zkevm,txpool,web3" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc --http.api eth,net,debug,zkevm,txpool,web3" - zkevm-explorer-l2-db: - container_name: zkevm-explorer-l2-db + cdk-validium-explorer-l2-db: + container_name: cdk-validium-explorer-l2-db image: postgres ports: - 5437:5432 @@ -308,12 +306,14 @@ services: - POSTGRES_DB=l2_explorer_db command: [ "postgres", "-N", "500" ] - zkevm-mock-l1-network: - container_name: zkevm-mock-l1-network - image: hermeznetwork/geth-zkevm-contracts:v2.0.0-RC1-fork.5-geth1.12.0 + cdk-validium-mock-l1-network: + container_name: cdk-validium-mock-l1-network + image: snapchain/geth-cdk-validium-contracts ports: - 8545:8545 - 8546:8546 + volumes: + - deploy-output:/deploymentOutput command: - "--http" - "--http.api" @@ -330,15 +330,40 @@ services: - "--ws.addr" - "0.0.0.0" - "--dev" + - "--dev.period" + - "1" - "--datadir" - "/geth_data" - "--syncmode" - "full" - "--rpc.allow-unprotected-txs" - zkevm-prover: - container_name: zkevm-prover - image: hermeznetwork/zkevm-prover:v2.0.1 + cdk-validium-data-availability: + container_name: cdk-validium-data-availability + restart: unless-stopped + depends_on: + cdk-validium-data-node-db: + condition: service_healthy + image: hermeznetwork/cdk-data-availability:v0.0.1 + deploy: + resources: + limits: + memory: 1G + reservations: + memory: 512M + ports: + - 8444:8444 + volumes: + - ./config/test.dac.docker.toml:/app/config.toml + - ./config/test.dac.member.keystore:/pk/test-member.keystore + command: + - "/bin/sh" + - "-c" + - "/app/cdk-data-availability run --cfg /app/config.toml" + + cdk-validium-prover: + container_name: cdk-validium-prover + image: hermeznetwork/zkevm-prover:v2.2.0 ports: # - 50051:50051 # Prover - 50052:50052 # Mock prover @@ -349,11 +374,22 @@ services: command: > zkProver -c /usr/src/app/config.json - zkevm-approve: - container_name: zkevm-approve - image: zkevm-node + zkprover-mock: + container_name: zkprover-mock + image: hermeznetwork/zkprover-mock:latest + ports: + - 43061:43061 # MT + - 43071:43071 # Executor + volumes: + - ./vectors/src:/app/testvectors + command: > + /app/zkprover-mock server --statedb-port 43061 --executor-port 43071 --test-vector-path /app/testvectors + + cdk-validium-approve: + container_name: cdk-validium-approve + image: snapchain/cdk-validium-node environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-state-db volumes: - ./sequencer.keystore:/pk/keystore - ./config/test.node.config.toml:/app/config.toml @@ -361,10 +397,23 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node approve --network custom --custom-network-file /app/genesis.json --key-store-path /pk/keystore --pw testonly --am 115792089237316195423570985008687907853269984665640564039457584007913129639935 -y --cfg /app/config.toml" + - "/app/cdk-validium-node approve --network custom --custom-network-file /app/genesis.json --key-store-path /pk/keystore --pw testonly --am 115792089237316195423570985008687907853269984665640564039457584007913129639935 -y --cfg /app/config.toml" - zkevm-permissionless-db: - container_name: zkevm-permissionless-db + cdk-validium-setup-committee: + container_name: cdk-validium-setup-committee + image: snapchain/cdk-validium-node + volumes: + - ./sequencer.keystore:/pk/keystore + - ./config/test.dac.member.keystore:/pk/test-member.keystore + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/cdk-validium-node setupCommittee --network custom --custom-network-file /app/genesis.json --key-store-path /pk/keystore --pw testonly -y --cfg /app/config.toml" + + cdk-validium-permissionless-db: + container_name: cdk-validium-permissionless-db image: postgres deploy: resources: @@ -385,36 +434,84 @@ services: - "-N" - "500" - zkevm-permissionless-node: - container_name: zkevm-permissionless-node - image: zkevm-node + cdk-validium-permissionless-node-forced-DAC: + container_name: cdk-validium-permissionless-node-forced-DAC + image: snapchain/cdk-validium-node ports: - 8125:8125 environment: - - ZKEVM_NODE_ISTRUSTEDSEQUENCER=false - - ZKEVM_NODE_STATEDB_USER=test_user - - ZKEVM_NODE_STATEDB_PASSWORD=test_password - - ZKEVM_NODE_STATEDB_NAME=state_db - - ZKEVM_NODE_STATEDB_HOST=zkevm-permissionless-db - - ZKEVM_NODE_POOL_DB_USER=test_user - - ZKEVM_NODE_POOL_DB_PASSWORD=test_password - - ZKEVM_NODE_POOL_DB_NAME=pool_db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-permissionless-db - - ZKEVM_NODE_RPC_PORT=8125 - - ZKEVM_NODE_RPC_SEQUENCERNODEURI=http://zkevm-json-rpc:8123 - - ZKEVM_NODE_MTCLIENT_URI=zkevm-permissionless-prover:50061 - - ZKEVM_NODE_EXECUTOR_URI=zkevm-permissionless-prover:50071 + - CDK_VALIDIUM_NODE_ISTRUSTEDSEQUENCER=false + - CDK_VALIDIUM_NODE_STATEDB_USER=test_user + - CDK_VALIDIUM_NODE_STATEDB_PASSWORD=test_password + - CDK_VALIDIUM_NODE_STATEDB_NAME=state_db + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-permissionless-db + - CDK_VALIDIUM_NODE_POOL_DB_USER=test_user + - CDK_VALIDIUM_NODE_POOL_DB_PASSWORD=test_password + - CDK_VALIDIUM_NODE_POOL_DB_NAME=pool_db + - CDK_VALIDIUM_NODE_POOL_DB_HOST=cdk-validium-permissionless-db + - CDK_VALIDIUM_NODE_RPC_PORT=8125 + - CDK_VALIDIUM_NODE_RPC_SEQUENCERNODEURI=http://cdk-validium-json-rpc:8123 + - CDK_VALIDIUM_NODE_SYNCHRONIZER_TRUSTEDSEQUENCERURL=http://you-cant-touch-this:8123 + - CDK_VALIDIUM_NODE_MTCLIENT_URI=cdk-validium-permissionless-prover:50061 + - CDK_VALIDIUM_NODE_EXECUTOR_URI=cdk-validium-permissionless-prover:50071 volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\"" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\"" - zkevm-permissionless-prover: - container_name: zkevm-permissionless-prover - image: hermeznetwork/zkevm-prover:v2.0.1 + cdk-validium-permissionless-node: + container_name: cdk-validium-permissionless-node + image: snapchain/cdk-validium-node + ports: + - 8125:8125 + environment: + - CDK_VALIDIUM_NODE_ISTRUSTEDSEQUENCER=false + - CDK_VALIDIUM_NODE_STATEDB_USER=test_user + - CDK_VALIDIUM_NODE_STATEDB_PASSWORD=test_password + - CDK_VALIDIUM_NODE_STATEDB_NAME=state_db + - CDK_VALIDIUM_NODE_STATEDB_HOST=cdk-validium-permissionless-db + - CDK_VALIDIUM_NODE_POOL_DB_USER=test_user + - CDK_VALIDIUM_NODE_POOL_DB_PASSWORD=test_password + - CDK_VALIDIUM_NODE_POOL_DB_NAME=pool_db + - CDK_VALIDIUM_NODE_POOL_DB_HOST=cdk-validium-permissionless-db + - CDK_VALIDIUM_NODE_RPC_PORT=8125 + - CDK_VALIDIUM_NODE_RPC_SEQUENCERNODEURI=http://cdk-validium-json-rpc:8123 + - CDK_VALIDIUM_NODE_MTCLIENT_URI=cdk-validium-permissionless-prover:50061 + - CDK_VALIDIUM_NODE_EXECUTOR_URI=cdk-validium-permissionless-prover:50071 + volumes: + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/cdk-validium-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\"" + + cdk-validium-data-node-db: + container_name: cdk-validium-data-node-db + restart: unless-stopped + image: postgres + healthcheck: + test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] + interval: 10s + timeout: 5s + retries: 5 + ports: + - 5444:5432 + environment: + - POSTGRES_USER=committee_user + - POSTGRES_PASSWORD=committee_password + - POSTGRES_DB=committee_db + command: + - "postgres" + - "-N" + - "500" + + cdk-validium-permissionless-prover: + container_name: cdk-validium-permissionless-prover + image: hermeznetwork/zkevm-prover:v2.2.0-RC4 ports: # - 50058:50058 # Prover - 50059:50052 # Mock prover @@ -425,9 +522,9 @@ services: command: > zkProver -c /usr/src/app/config.json - zkevm-metrics: + cdk-validium-metrics: image: prom/prometheus:v2.39.1 - container_name: zkevm-metrics + container_name: cdk-validium-metrics restart: unless-stopped ports: - 9090:9090 @@ -437,16 +534,19 @@ services: volumes: - ../config/metrics/prometheus:/etc/prometheus - zkevm-sh: + cdk-validium-sh: container_name: zkevm-sh - image: zkevm-node + image: snapchain/cdk-validium-node stdin_open: true tty: true environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - CDK_VALIDIUM_NODE_STATEDB_HOST=supernets-state-db + - CDK_VALIDIUM_NODE_POOL_DB_HOST=supernets-pool-db volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" + +volumes: + deploy-output: \ No newline at end of file diff --git a/test/e2e/datacommittee_test.go b/test/e2e/datacommittee_test.go new file mode 100644 index 0000000000..a4cc53e648 --- /dev/null +++ b/test/e2e/datacommittee_test.go @@ -0,0 +1,270 @@ +package e2e + +import ( + "context" + "crypto/ecdsa" + "encoding/json" + "fmt" + "math/big" + "os" + "os/exec" + "sort" + "strconv" + "strings" + "testing" + "time" + + "github.com/0xPolygon/cdk-data-availability/config" + cTypes "github.com/0xPolygon/cdk-validium-node/config/types" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkdatacommittee" + "github.com/0xPolygon/cdk-validium-node/jsonrpc" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/ethereum/go-ethereum" + eTypes "github.com/ethereum/go-ethereum/core/types" + + "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestDataCommittee(t *testing.T) { + const ( + nSignatures = 4 + mMembers = 5 + ksFile = "/tmp/pkey" + cfgFile = "/tmp/dacnodeconfigfile.json" + ksPass = "pass" + dacNodeContainer = "hermeznetwork/cdk-data-availability:v0.0.1" + ) + + // Setup + var err error + if testing.Short() { + t.Skip() + } + ctx := context.Background() + defer func() { + require.NoError(t, operations.Teardown()) + }() + err = operations.Teardown() + require.NoError(t, err) + opsCfg := operations.GetDefaultOperationsConfig() + opsCfg.State.MaxCumulativeGasUsed = 80000000000 + opsman, err := operations.NewManager(ctx, opsCfg) + require.NoError(t, err) + defer func() { + require.NoError(t, opsman.StopDACDB()) + }() + err = opsman.Setup() + require.NoError(t, err) + require.NoError(t, opsman.StartDACDB()) + time.Sleep(5 * time.Second) + authL2, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL2ChainID) + require.NoError(t, err) + authL1, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) + require.NoError(t, err) + clientL2, err := ethclient.Dial(operations.DefaultL2NetworkURL) + require.NoError(t, err) + clientL1, err := ethclient.Dial(operations.DefaultL1NetworkURL) + require.NoError(t, err) + dacSC, err := cdkdatacommittee.NewCdkdatacommittee( + common.HexToAddress(operations.DefaultL1DataCommitteeContract), + clientL1, + ) + require.NoError(t, err) + + // Register committe with N / M signatures + membs := members{} + addrsBytes := []byte{} + urls := []string{} + for i := 0; i < mMembers; i++ { + pk, err := crypto.GenerateKey() + require.NoError(t, err) + membs = append(membs, member{ + addr: crypto.PubkeyToAddress(pk.PublicKey), + pk: pk, + url: fmt.Sprintf("http://cdk-data-availability-%d:420%d", i, i), + i: i, + }) + } + sort.Sort(membs) + for _, m := range membs { + addrsBytes = append(addrsBytes, m.addr.Bytes()...) + urls = append(urls, m.url) + } + tx, err := dacSC.SetupCommittee(authL1, big.NewInt(nSignatures), urls, addrsBytes) + if err != nil { + for _, m := range membs { + fmt.Println(m.addr) + } + } + require.NoError(t, err) + err = operations.WaitTxToBeMined(ctx, clientL1, tx, operations.DefaultTimeoutTxToBeMined) + require.NoError(t, err) + + // Spin up M DAC nodes + dacNodeConfig := config.Config{ + L1: config.L1Config{ + RpcURL: "http://cdk-validium-mock-l1-network:8545", + WsURL: "ws://cdk-validium-mock-l1-network:8546", + CDKValidiumAddress: operations.DefaultL1CDKValidiumSmartContract, + DataCommitteeAddress: operations.DefaultL1DataCommitteeContract, + }, + PrivateKey: cTypes.KeystoreFileConfig{ + Path: ksFile, + Password: ksPass, + }, + DB: db.Config{ + Name: "committee_db", + User: "committee_user", + Password: "committee_password", + Host: "cdk-validium-data-node-db", + Port: "5432", + EnableLog: false, + MaxConns: 10, + }, + RPC: jsonrpc.Config{ + Host: "0.0.0.0", + EnableL2SuggestedGasPricePolling: false, + MaxRequestsPerIPAndSecond: 100, + }, + } + defer func() { + // Remove tmp files + assert.NoError(t, + exec.Command("rm", cfgFile).Run(), + ) + assert.NoError(t, + exec.Command("rmdir", ksFile+"_").Run(), + ) + assert.NoError(t, + exec.Command("rm", ksFile).Run(), + ) + // Stop DAC nodes + for i := 0; i < mMembers; i++ { + assert.NoError(t, exec.Command( + "docker", "kill", "cdk-data-availability-"+strconv.Itoa(i), + ).Run()) + assert.NoError(t, exec.Command( + "docker", "rm", "cdk-data-availability-"+strconv.Itoa(i), + ).Run()) + } + // Stop permissionless node + require.NoError(t, opsman.StopPermissionlessNodeForcedToSYncThroughDAC()) + }() + // Start permissionless node + require.NoError(t, opsman.StartPermissionlessNodeForcedToSYncThroughDAC()) + // Star DAC nodes + for _, m := range membs { + // Set correct port + port := 4200 + m.i + dacNodeConfig.RPC.Port = port + // Write config file + file, err := json.MarshalIndent(dacNodeConfig, "", " ") + require.NoError(t, err) + err = os.WriteFile(cfgFile, file, 0644) + require.NoError(t, err) + // Write private key keystore file + require.NoError(t, createKeyStore(m.pk, ksFile, ksPass)) + // Run DAC node + cmd := exec.Command( + "docker", "run", "-d", + "--name", "cdk-data-availability-"+strconv.Itoa(m.i), + "-v", cfgFile+":/app/config.json", + "-v", ksFile+":"+ksFile, + "--network", "cdk-validium", + dacNodeContainer, + "/bin/sh", "-c", + "/app/cdk-data-availability run --cfg /app/config.json", + ) + out, err := cmd.CombinedOutput() + require.NoError(t, err, string(out)) + log.Infof("DAC node %d started", m.i) + time.Sleep(time.Second * 5) + } + + // Send txs + nTxs := 10 + amount := big.NewInt(10000) + toAddress := common.HexToAddress("0x70997970C51812dc3A010C7d01b50e0d17dc79C8") + _, err = clientL2.BalanceAt(ctx, authL2.From, nil) + require.NoError(t, err) + _, err = clientL2.PendingNonceAt(ctx, authL2.From) + require.NoError(t, err) + + gasLimit, err := clientL2.EstimateGas(ctx, ethereum.CallMsg{From: authL2.From, To: &toAddress, Value: amount}) + require.NoError(t, err) + + gasPrice, err := clientL2.SuggestGasPrice(ctx) + require.NoError(t, err) + + nonce, err := clientL2.PendingNonceAt(ctx, authL2.From) + require.NoError(t, err) + + txs := make([]*eTypes.Transaction, 0, nTxs) + for i := 0; i < nTxs; i++ { + tx := eTypes.NewTransaction(nonce+uint64(i), toAddress, amount, gasLimit, gasPrice, nil) + log.Infof("generating tx %d / %d: %s", i+1, nTxs, tx.Hash().Hex()) + txs = append(txs, tx) + } + + // Wait for verification + _, err = operations.ApplyL2Txs(ctx, txs, authL2, clientL2, operations.VerifiedConfirmationLevel) + require.NoError(t, err) + + // Assert that he permissionless node is fully synced (through the DAC) + time.Sleep(30 * time.Second) // Give some time for the permissionless node to get synced + clientL2Permissionless, err := ethclient.Dial(operations.PermissionlessL2NetworkURL) + require.NoError(t, err) + expectedBlock, err := clientL2.BlockByNumber(ctx, nil) + require.NoError(t, err) + actualBlock, err := clientL2Permissionless.BlockByNumber(ctx, nil) + require.NoError(t, err) + // je, err := expectedBlock.Header().MarshalJSON() + // require.NoError(t, err) + // log.Info(string(je)) + // ja, err := actualBlock.Header().MarshalJSON() + // require.NoError(t, err) + // log.Info(string(ja)) + // require.Equal(t, string(je), string(ja)) + require.Equal(t, expectedBlock.Root().Hex(), actualBlock.Root().Hex()) +} + +type member struct { + addr common.Address + pk *ecdsa.PrivateKey + url string + i int +} +type members []member + +func (s members) Len() int { return len(s) } +func (s members) Less(i, j int) bool { + return strings.ToUpper(s[i].addr.Hex()) < strings.ToUpper(s[j].addr.Hex()) +} +func (s members) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +func createKeyStore(pk *ecdsa.PrivateKey, outputDir, password string) error { + ks := keystore.NewKeyStore(outputDir+"_", keystore.StandardScryptN, keystore.StandardScryptP) + _, err := ks.ImportECDSA(pk, password) + if err != nil { + return err + } + fileNameB, err := exec.Command("ls", outputDir+"_/").CombinedOutput() + fileName := strings.TrimSuffix(string(fileNameB), "\n") + if err != nil { + fmt.Println(fileName) + return err + } + out, err := exec.Command("mv", outputDir+"_/"+fileName, outputDir).CombinedOutput() + if err != nil { + fmt.Println(string(out)) + return err + } + return nil +} diff --git a/test/e2e/debug_calltracer_test.go b/test/e2e/debug_calltracer_test.go index aa86441140..d6ffbb5cf8 100644 --- a/test/e2e/debug_calltracer_test.go +++ b/test/e2e/debug_calltracer_test.go @@ -8,11 +8,11 @@ import ( "strings" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" ethTypes "github.com/ethereum/go-ethereum/core/types" diff --git a/test/e2e/debug_shared.go b/test/e2e/debug_shared.go index d93da37765..08fe02ba61 100644 --- a/test/e2e/debug_shared.go +++ b/test/e2e/debug_shared.go @@ -9,27 +9,27 @@ import ( "strings" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/BridgeA" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/BridgeB" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/BridgeC" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/BridgeD" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Called" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Caller" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ChainCallLevel1" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ChainCallLevel2" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ChainCallLevel3" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ChainCallLevel4" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Counter" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Creates" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Depth" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/EmitLog" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Memory" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/OpCallAux" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Revert2" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/BridgeA" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/BridgeB" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/BridgeC" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/BridgeD" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Called" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Caller" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ChainCallLevel1" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ChainCallLevel2" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ChainCallLevel3" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ChainCallLevel4" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Counter" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Creates" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Depth" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/EmitLog" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Memory" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/OpCallAux" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Revert2" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" @@ -555,7 +555,7 @@ func saveTraceResultToFile(t *testing.T, name, network string, signedTx *ethType if skip { return } - const path = "/Users/thiago/github.com/0xPolygonHermez/zkevm-node/dist/%v.json" + const path = "/Users/thiago/github.com/0xPolygon/cdk-validium-node/dist/%v.json" sanitizedFileName := strings.ReplaceAll(name+"_"+network, " ", "_") filePath := fmt.Sprintf(path, sanitizedFileName) b, _ := signedTx.MarshalBinary() diff --git a/test/e2e/debug_test.go b/test/e2e/debug_test.go index 4eed0ab18e..a1f591d531 100644 --- a/test/e2e/debug_test.go +++ b/test/e2e/debug_test.go @@ -8,11 +8,11 @@ import ( "strings" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/ethtransfer_test.go b/test/e2e/ethtransfer_test.go index f30f49c18b..e2eb15c9fd 100644 --- a/test/e2e/ethtransfer_test.go +++ b/test/e2e/ethtransfer_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -21,7 +21,7 @@ func TestEthTransfer(t *testing.T) { } ctx := context.Background() - //defer func() { require.NoError(t, operations.Teardown()) }() + defer func() { require.NoError(t, operations.Teardown()) }() err := operations.Teardown() require.NoError(t, err) @@ -38,6 +38,7 @@ func TestEthTransfer(t *testing.T) { // Load eth client client, err := ethclient.Dial(operations.DefaultL2NetworkURL) require.NoError(t, err) + // Send txs nTxs := 10 amount := big.NewInt(10000) diff --git a/test/e2e/forced_batches_test.go b/test/e2e/forced_batches_test.go index 88808db20c..a0d10a5b29 100644 --- a/test/e2e/forced_batches_test.go +++ b/test/e2e/forced_batches_test.go @@ -7,12 +7,12 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmglobalexitroot" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/polygonzkevmglobalexitroot" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -120,13 +120,12 @@ func sendForcedBatch(t *testing.T, txs []byte, opsman *operations.Manager) (*sta require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvmAddr := common.HexToAddress(operations.DefaultL1CDKValidiumSmartContract) + zkEvm, err := cdkvalidium.NewCdkvalidium(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) require.NoError(t, err) - log.Info("Using address: ", auth.From) num, err := zkEvm.LastForceBatch(&bind.CallOpts{Pending: false}) diff --git a/test/e2e/forced_batches_vector_test.go b/test/e2e/forced_batches_vector_test.go index 05b0eab7f3..1510c3d7f5 100644 --- a/test/e2e/forced_batches_vector_test.go +++ b/test/e2e/forced_batches_vector_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/vectors" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -144,8 +144,8 @@ func sendForcedBatchForVector(t *testing.T, txs []byte, opsman *operations.Manag require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvmAddr := common.HexToAddress(operations.DefaultL1CDKValidiumSmartContract) + zkEvm, err := cdkvalidium.NewCdkvalidium(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) diff --git a/test/e2e/gasless_test.go b/test/e2e/gasless_test.go new file mode 100644 index 0000000000..18112b67d1 --- /dev/null +++ b/test/e2e/gasless_test.go @@ -0,0 +1,92 @@ +package e2e + +import ( + "context" + "math/big" + "os/exec" + "testing" + "time" + + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/ethereum/go-ethereum" + "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/crypto" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/stretchr/testify/require" +) + +func TestEthTransferGasless(t *testing.T) { + if testing.Short() { + t.Skip() + } + // Edit config + const path = "../../test/config/test.node.config.toml" + require.NoError(t, + exec.Command("sed", "-i", "s/DefaultMinGasPriceAllowed = 1000000000/DefaultMinGasPriceAllowed = 0/g", path).Run(), + ) + require.NoError(t, + exec.Command("sed", "-i", "s/EnableL2SuggestedGasPricePolling = true/EnableL2SuggestedGasPricePolling = false/g", path).Run(), + ) + // Undo edit config + defer func() { + require.NoError(t, + exec.Command("sed", "-i", "s/DefaultMinGasPriceAllowed = 0/DefaultMinGasPriceAllowed = 1000000000/g", path).Run(), + ) + require.NoError(t, + exec.Command("sed", "-i", "s/EnableL2SuggestedGasPricePolling = false/EnableL2SuggestedGasPricePolling = true/g", path).Run(), + ) + }() + + ctx := context.Background() + defer func() { require.NoError(t, operations.Teardown()) }() + + err := operations.Teardown() + require.NoError(t, err) + opsCfg := operations.GetDefaultOperationsConfig() + opsCfg.State.MaxCumulativeGasUsed = 80000000000 + opsman, err := operations.NewManager(ctx, opsCfg) + require.NoError(t, err) + err = opsman.Setup() + require.NoError(t, err) + time.Sleep(5 * time.Second) + // Load account with balance on local genesis + pk, err := crypto.GenerateKey() + require.NoError(t, err) + auth, err := bind.NewKeyedTransactorWithChainID(pk, big.NewInt(0).SetUint64(operations.DefaultL2ChainID)) + require.NoError(t, err) + // Load eth client + client, err := ethclient.Dial(operations.DefaultL2NetworkURL) + require.NoError(t, err) + // Send txs + nTxs := 10 + amount := big.NewInt(0) + toAddress := common.HexToAddress("0x70997970C51812dc3A010C7d01b50e0d17dc79C8") + senderBalance, err := client.BalanceAt(ctx, auth.From, nil) + require.NoError(t, err) + senderNonce, err := client.PendingNonceAt(ctx, auth.From) + require.NoError(t, err) + + log.Infof("Receiver Addr: %v", toAddress.String()) + log.Infof("Sender Addr: %v", auth.From.String()) + log.Infof("Sender Balance: %v", senderBalance.String()) + log.Infof("Sender Nonce: %v", senderNonce) + + gasLimit, err := client.EstimateGas(ctx, ethereum.CallMsg{From: auth.From, To: &toAddress, Value: amount}) + require.NoError(t, err) + + gasPrice := big.NewInt(0) + nonce, err := client.PendingNonceAt(ctx, auth.From) + require.NoError(t, err) + + txs := make([]*types.Transaction, 0, nTxs) + for i := 0; i < nTxs; i++ { + tx := types.NewTransaction(nonce+uint64(i), toAddress, amount, gasLimit, gasPrice, nil) + txs = append(txs, tx) + } + + _, err = operations.ApplyL2Txs(ctx, txs, auth, client, operations.VerifiedConfirmationLevel) + require.NoError(t, err) +} diff --git a/test/e2e/jsonrpc1_test.go b/test/e2e/jsonrpc1_test.go index a75b03a345..13981e1186 100644 --- a/test/e2e/jsonrpc1_test.go +++ b/test/e2e/jsonrpc1_test.go @@ -7,14 +7,14 @@ import ( "reflect" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Double" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/EmitLog" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/pool" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Double" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/EmitLog" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/jsonrpc2_test.go b/test/e2e/jsonrpc2_test.go index 69b83ee3ef..96cb03907f 100644 --- a/test/e2e/jsonrpc2_test.go +++ b/test/e2e/jsonrpc2_test.go @@ -9,14 +9,14 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Revert" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Revert2" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Storage" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Revert" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Revert2" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Storage" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/permissionlessrpc_test.go b/test/e2e/permissionlessrpc_test.go index c984bf69de..e73d0abca2 100644 --- a/test/e2e/permissionlessrpc_test.go +++ b/test/e2e/permissionlessrpc_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/e2e/pool_test.go b/test/e2e/pool_test.go index ded7a5d0d5..133bb9e142 100644 --- a/test/e2e/pool_test.go +++ b/test/e2e/pool_test.go @@ -5,8 +5,8 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/e2e/preEIP155_test.go b/test/e2e/preEIP155_test.go index 57ce1a536f..a5f17b8f6a 100644 --- a/test/e2e/preEIP155_test.go +++ b/test/e2e/preEIP155_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/e2e/sc_test.go b/test/e2e/sc_test.go index c2f7b4d5c5..1d130ed6ac 100644 --- a/test/e2e/sc_test.go +++ b/test/e2e/sc_test.go @@ -5,12 +5,12 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Counter" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/EmitLog2" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/FailureTest" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Read" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Counter" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/EmitLog2" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/FailureTest" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Read" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/shared.go b/test/e2e/shared.go index 9e464d7dd1..b7673b9cda 100644 --- a/test/e2e/shared.go +++ b/test/e2e/shared.go @@ -6,9 +6,9 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/state_test.go b/test/e2e/state_test.go index 38dabedb34..3c1a19d4c1 100644 --- a/test/e2e/state_test.go +++ b/test/e2e/state_test.go @@ -7,10 +7,10 @@ import ( "strconv" "testing" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/test/vectors" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" @@ -43,7 +43,7 @@ func TestStateTransition(t *testing.T) { SenderAddress: testCase.SequencerAddress, LastBatchVirtualizationTimeMaxWaitPeriod: "5s", WaitPeriodSendSequence: "5s", - MaxTxSizeForL1: 131072, + MaxBatchesForL1: 1, PrivateKey: testCase.SequencerPrivateKey, }, } diff --git a/test/e2e/uniswap_test.go b/test/e2e/uniswap_test.go index 73e69c4b6c..e79724749a 100644 --- a/test/e2e/uniswap_test.go +++ b/test/e2e/uniswap_test.go @@ -5,10 +5,10 @@ import ( "flag" "testing" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/assert" @@ -42,7 +42,7 @@ func TestUniswap(t *testing.T) { SenderAddress: "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D", LastBatchVirtualizationTimeMaxWaitPeriod: "5s", WaitPeriodSendSequence: "5s", - MaxTxSizeForL1: 131072, + MaxBatchesForL1: 1, PrivateKey: "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e", }, } diff --git a/test/operations/manager.go b/test/operations/manager.go index e61d7c714a..fb5a3cf3b4 100644 --- a/test/operations/manager.go +++ b/test/operations/manager.go @@ -10,16 +10,16 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/event" + "github.com/0xPolygon/cdk-validium-node/event/nileventstorage" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/test/dbutils" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" @@ -32,14 +32,15 @@ const ( // Public shared const ( - DefaultSequencerAddress = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" - DefaultSequencerPrivateKey = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" - DefaultSequencerBalance = 400000 - DefaultMaxCumulativeGasUsed = 800000 - DefaultL1ZkEVMSmartContract = "0x610178dA211FEF7D417bC0e6FeD39F05609AD788" - DefaultL1NetworkURL = "http://localhost:8545" - DefaultL1NetworkWebSocketURL = "ws://localhost:8546" - DefaultL1ChainID uint64 = 1337 + DefaultSequencerAddress = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" + DefaultSequencerPrivateKey = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" + DefaultSequencerBalance = 400000 + DefaultMaxCumulativeGasUsed = 800000 + DefaultL1CDKValidiumSmartContract = "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82" + DefaultL1DataCommitteeContract = "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" + DefaultL1NetworkURL = "http://localhost:8545" + DefaultL1NetworkWebSocketURL = "ws://localhost:8546" + DefaultL1ChainID uint64 = 1337 DefaultL2NetworkURL = "http://localhost:8123" PermissionlessL2NetworkURL = "http://localhost:8125" @@ -50,7 +51,7 @@ const ( DefaultWaitPeriodSendSequence = "15s" DefaultLastBatchVirtualizationTimeMaxWaitPeriod = "10s" - DefaultMaxTxSizeForL1 uint64 = 131072 + MaxBatchesForL1 uint64 = 1 ) var ( @@ -67,7 +68,7 @@ var ( type SequenceSenderConfig struct { WaitPeriodSendSequence string LastBatchVirtualizationTimeMaxWaitPeriod string - MaxTxSizeForL1 uint64 + MaxBatchesForL1 uint64 SenderAddress string PrivateKey string } @@ -216,6 +217,13 @@ func ApplyL2Txs(ctx context.Context, txs []*types.Transaction, auth *bind.Transa } } waitToBeMined := confirmationLevel != PoolConfirmationLevel + var initialNonce uint64 + if waitToBeMined { + initialNonce, err = client.NonceAt(ctx, auth.From, nil) + if err != nil { + return nil, err + } + } sentTxs, err := applyTxs(ctx, txs, auth, client, waitToBeMined) if err != nil { return nil, err @@ -225,7 +233,7 @@ func ApplyL2Txs(ctx context.Context, txs []*types.Transaction, auth *bind.Transa } l2BlockNumbers := make([]*big.Int, 0, len(sentTxs)) - for _, tx := range sentTxs { + for i, tx := range sentTxs { // check transaction nonce against transaction reported L2 block number receipt, err := client.TransactionReceipt(ctx, tx.Hash()) if err != nil { @@ -234,7 +242,7 @@ func ApplyL2Txs(ctx context.Context, txs []*types.Transaction, auth *bind.Transa // get L2 block number l2BlockNumbers = append(l2BlockNumbers, receipt.BlockNumber) - expectedNonce := receipt.BlockNumber.Uint64() - 1 + 8 //nolint:gomnd + expectedNonce := initialNonce + uint64(i) if tx.Nonce() != expectedNonce { return nil, fmt.Errorf("mismatching nonce for tx %v: want %d, got %d\n", tx.Hash(), expectedNonce, tx.Nonce()) } @@ -494,6 +502,26 @@ func (m *Manager) StartTrustedAndPermissionlessNode() error { return StartComponent("permissionless", nodeUpCondition) } +// StartDACDB starts the data availability node DB +func (m *Manager) StartDACDB() error { + return StartComponent("dac-db", func() (bool, error) { return true, nil }) +} + +// StopDACDB stops the data availability node DB +func (m *Manager) StopDACDB() error { + return StopComponent("dac-db") +} + +// StartPermissionlessNodeForcedToSYncThroughDAC starts a permissionless node that is froced to sync through the DAC +func (m *Manager) StartPermissionlessNodeForcedToSYncThroughDAC() error { + return StartComponent("permissionless-dac", func() (bool, error) { return true, nil }) +} + +// StopPermissionlessNodeForcedToSYncThroughDAC stops the permissionless node that is froced to sync through the DAC +func (m *Manager) StopPermissionlessNodeForcedToSYncThroughDAC() error { + return StopComponent("permissionless-dac") +} + // ApproveMatic runs the approving matic command func ApproveMatic() error { return StartComponent("approve-matic") @@ -569,7 +597,7 @@ func GetDefaultOperationsConfig() *Config { SequenceSender: &SequenceSenderConfig{ WaitPeriodSendSequence: DefaultWaitPeriodSendSequence, LastBatchVirtualizationTimeMaxWaitPeriod: DefaultWaitPeriodSendSequence, - MaxTxSizeForL1: DefaultMaxTxSizeForL1, + MaxBatchesForL1: MaxBatchesForL1, SenderAddress: DefaultSequencerAddress, PrivateKey: DefaultSequencerPrivateKey}, } diff --git a/test/operations/wait.go b/test/operations/wait.go index 45fa56d0c4..baca58213a 100644 --- a/test/operations/wait.go +++ b/test/operations/wait.go @@ -13,10 +13,10 @@ import ( "os/signal" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" diff --git a/test/scripts/batchsender/main.go b/test/scripts/batchsender/main.go index 6cf3717052..d2ddf2a933 100644 --- a/test/scripts/batchsender/main.go +++ b/test/scripts/batchsender/main.go @@ -9,11 +9,11 @@ import ( "strconv" "time" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/etherman" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/config" + "github.com/0xPolygon/cdk-validium-node/etherman" + ethmanTypes "github.com/0xPolygon/cdk-validium-node/etherman/types" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" @@ -180,7 +180,7 @@ func sendBatches(cliCtx *cli.Context) error { } // send to L1 - to, data, err := ethMan.BuildSequenceBatchesTxData(auth.From, seqs) + to, data, err := ethMan.BuildSequenceBatchesTxData(auth.From, seqs, auth.From, nil) if err != nil { return err } @@ -286,7 +286,7 @@ func sendBatches(cliCtx *cli.Context) error { switch vLog.Topics[0] { case etherman.SequencedBatchesSigHash(): if vLog.TxHash == tx.Hash() { // ignore other txs happening on L1 - sb, err := ethMan.ZkEVM.ParseSequenceBatches(vLog) + sb, err := ethMan.CDKValidium.ParseSequenceBatches(vLog) if err != nil { return err } @@ -299,7 +299,7 @@ func sendBatches(cliCtx *cli.Context) error { } } case etherman.TrustedVerifyBatchesSigHash(): - vb, err := ethMan.ZkEVM.ParseVerifyBatchesTrustedAggregator(vLog) + vb, err := ethMan.CDKValidium.ParseVerifyBatchesTrustedAggregator(vLog) if err != nil { return err } diff --git a/test/scripts/check_trace/main.go b/test/scripts/check_trace/main.go index c0be521652..b6b19209f6 100644 --- a/test/scripts/check_trace/main.go +++ b/test/scripts/check_trace/main.go @@ -6,7 +6,7 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" + "github.com/0xPolygon/cdk-validium-node/jsonrpc/client" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" ) diff --git a/test/scripts/cmd/compilesc.go b/test/scripts/cmd/compilesc.go index 61afffe54b..c8c13c1405 100644 --- a/test/scripts/cmd/compilesc.go +++ b/test/scripts/cmd/compilesc.go @@ -1,7 +1,7 @@ package main import ( - "github.com/0xPolygonHermez/zkevm-node/test/scripts/cmd/compilesc" + "github.com/0xPolygon/cdk-validium-node/test/scripts/cmd/compilesc" "github.com/urfave/cli/v2" ) diff --git a/test/scripts/cmd/compilesc/manager.go b/test/scripts/cmd/compilesc/manager.go index f5a276b787..5f67cc03af 100644 --- a/test/scripts/cmd/compilesc/manager.go +++ b/test/scripts/cmd/compilesc/manager.go @@ -11,7 +11,7 @@ import ( "runtime" "strings" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "golang.org/x/sync/errgroup" "gopkg.in/yaml.v2" ) diff --git a/test/scripts/cmd/dependencies.go b/test/scripts/cmd/dependencies.go index 9ea7471008..d8e1440e55 100644 --- a/test/scripts/cmd/dependencies.go +++ b/test/scripts/cmd/dependencies.go @@ -1,7 +1,7 @@ package main import ( - "github.com/0xPolygonHermez/zkevm-node/test/scripts/cmd/dependencies" + "github.com/0xPolygon/cdk-validium-node/test/scripts/cmd/dependencies" "github.com/urfave/cli/v2" ) diff --git a/test/scripts/cmd/dependencies/files.go b/test/scripts/cmd/dependencies/files.go index 294df64523..ae07d30f38 100644 --- a/test/scripts/cmd/dependencies/files.go +++ b/test/scripts/cmd/dependencies/files.go @@ -7,7 +7,7 @@ import ( "runtime" "strings" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/spf13/afero" ) diff --git a/test/scripts/cmd/dependencies/files_test.go b/test/scripts/cmd/dependencies/files_test.go index cb05339957..bed5208b86 100644 --- a/test/scripts/cmd/dependencies/files_test.go +++ b/test/scripts/cmd/dependencies/files_test.go @@ -3,7 +3,7 @@ package dependencies import ( "testing" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) diff --git a/test/scripts/cmd/dependencies/github.go b/test/scripts/cmd/dependencies/github.go index 0dc98ef0b5..ff116a3d89 100644 --- a/test/scripts/cmd/dependencies/github.go +++ b/test/scripts/cmd/dependencies/github.go @@ -4,7 +4,7 @@ import ( "os" "path/filepath" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/go-git/go-billy/v5" "github.com/go-git/go-billy/v5/helper/chroot" "github.com/go-git/go-git/v5" diff --git a/test/scripts/cmd/dependencies/images.go b/test/scripts/cmd/dependencies/images.go index d1bf64cfd5..20f6ee007d 100644 --- a/test/scripts/cmd/dependencies/images.go +++ b/test/scripts/cmd/dependencies/images.go @@ -9,7 +9,7 @@ import ( "os/exec" "strings" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/spf13/afero" "gopkg.in/yaml.v3" ) diff --git a/test/scripts/cmd/dependencies/images_test.go b/test/scripts/cmd/dependencies/images_test.go index 71e42a03b9..07dcf38498 100644 --- a/test/scripts/cmd/dependencies/images_test.go +++ b/test/scripts/cmd/dependencies/images_test.go @@ -3,8 +3,8 @@ package dependencies import ( "testing" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/testutils" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) diff --git a/test/scripts/cmd/dependencies/protobuffers.go b/test/scripts/cmd/dependencies/protobuffers.go index 6c98794dd7..6a33a1d2da 100644 --- a/test/scripts/cmd/dependencies/protobuffers.go +++ b/test/scripts/cmd/dependencies/protobuffers.go @@ -4,7 +4,7 @@ import ( "os" "os/exec" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/spf13/afero" ) diff --git a/test/scripts/cmd/dependencies/testvectors.go b/test/scripts/cmd/dependencies/testvectors.go index 9acbcab11c..9ae279b023 100644 --- a/test/scripts/cmd/dependencies/testvectors.go +++ b/test/scripts/cmd/dependencies/testvectors.go @@ -3,7 +3,7 @@ package dependencies import ( "os" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/spf13/afero" ) diff --git a/test/scripts/cmd/main.go b/test/scripts/cmd/main.go index 4e5477d45e..692132b4f4 100644 --- a/test/scripts/cmd/main.go +++ b/test/scripts/cmd/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" "github.com/urfave/cli/v2" ) diff --git a/test/scripts/deploy_sc/main.go b/test/scripts/deploy_sc/main.go index 7cf5c404a9..67e211a03e 100644 --- a/test/scripts/deploy_sc/main.go +++ b/test/scripts/deploy_sc/main.go @@ -6,14 +6,14 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Counter" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/EmitLog" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Storage" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Counter" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/EmitLog" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/Storage" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/scripts/init_network/main.go b/test/scripts/init_network/main.go index 97de6e4d2e..8fc8709d57 100644 --- a/test/scripts/init_network/main.go +++ b/test/scripts/init_network/main.go @@ -5,7 +5,7 @@ package main // "log" // "time" -// NW "github.com/0xPolygonHermez/zkevm-node/tools/network" +// NW "github.com/0xPolygon/cdk-validium-node/tools/network" // ) // func main() { diff --git a/test/scripts/postgres/run.sh b/test/scripts/postgres/run.sh index f0dcb1b95e..2fed228097 100644 --- a/test/scripts/postgres/run.sh +++ b/test/scripts/postgres/run.sh @@ -17,11 +17,11 @@ main(){ echo "${script_contents}" > "${script_file_path}" - docker cp "${script_file_path}" zkevm-state-db:"${script_file_path}" - docker exec zkevm-state-db bash -c "chmod a+x ${script_file_path} && psql ${DBNAME} ${DBUSER} -v ON_ERROR_STOP=ON --single-transaction -f ${script_file_path}" + docker cp "${script_file_path}" cdk-validium-state-db:"${script_file_path}" + docker exec cdk-validium-state-db bash -c "chmod a+x ${script_file_path} && psql ${DBNAME} ${DBUSER} -v ON_ERROR_STOP=ON --single-transaction -f ${script_file_path}" echo "Done" done } -main "${@}" +main "${@}" \ No newline at end of file diff --git a/test/scripts/sendForcedBatch/main.go b/test/scripts/sendForcedBatch/main.go index 1cb2f1ac35..40c8165474 100644 --- a/test/scripts/sendForcedBatch/main.go +++ b/test/scripts/sendForcedBatch/main.go @@ -4,9 +4,9 @@ import ( "os" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -78,7 +78,7 @@ func sendForcedBatches(cliCtx *cli.Context) error { } // Create smc client poeAddr := common.HexToAddress(cliCtx.String(flagSmcAddrName)) - poe, err := polygonzkevm.NewPolygonzkevm(poeAddr, ethClient) + poe, err := cdkvalidium.NewCdkvalidium(poeAddr, ethClient) if err != nil { return err } diff --git a/test/scripts/send_transfers/main.go b/test/scripts/send_transfers/main.go index 136252b275..df35b4b12b 100644 --- a/test/scripts/send_transfers/main.go +++ b/test/scripts/send_transfers/main.go @@ -5,9 +5,9 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/scripts/sequenceForcedBatch/main.go b/test/scripts/sequenceForcedBatch/main.go index ad4af0c6e6..16f3451cce 100644 --- a/test/scripts/sequenceForcedBatch/main.go +++ b/test/scripts/sequenceForcedBatch/main.go @@ -4,10 +4,10 @@ import ( "os" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -99,7 +99,7 @@ func sendForcedBatches(cliCtx *cli.Context) error { } // Create smc client poeAddr := common.HexToAddress(cliCtx.String(flagSmcAddrName)) - poe, err := polygonzkevm.NewPolygonzkevm(poeAddr, ethClient) + poe, err := cdkvalidium.NewCdkvalidium(poeAddr, ethClient) if err != nil { return err } @@ -130,7 +130,7 @@ func sendForcedBatches(cliCtx *cli.Context) error { log.Error("error decoding txs. Error: ", err) return err } - fbData := []polygonzkevm.PolygonZkEVMForcedBatchData{{ + fbData := []cdkvalidium.CDKValidiumForcedBatchData{{ Transactions: transactions, GlobalExitRoot: common.HexToHash(cliCtx.String(flagGerName)), MinForcedTimestamp: cliCtx.Uint64(flagTimestampName), diff --git a/test/scripts/txsender/main.go b/test/scripts/txsender/main.go index fabb61ce26..5d7ec97b77 100644 --- a/test/scripts/txsender/main.go +++ b/test/scripts/txsender/main.go @@ -6,8 +6,8 @@ import ( "os" "strconv" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/scripts/uniswap/main.go b/test/scripts/uniswap/main.go index fe740d532a..72aa88a6ef 100644 --- a/test/scripts/uniswap/main.go +++ b/test/scripts/uniswap/main.go @@ -7,15 +7,15 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/log" - ERC20 "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - WETH "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/WETH" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/uniswap/v2/core/UniswapV2Factory" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/uniswap/v2/core/UniswapV2Pair" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/uniswap/v2/interface/UniswapInterfaceMulticall" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/uniswap/v2/periphery/UniswapV2Router02" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/log" + ERC20 "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/ERC20" + WETH "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/WETH" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/uniswap/v2/core/UniswapV2Factory" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/uniswap/v2/core/UniswapV2Pair" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/uniswap/v2/interface/UniswapInterfaceMulticall" + "github.com/0xPolygon/cdk-validium-node/test/contracts/bin/uniswap/v2/periphery/UniswapV2Router02" + "github.com/0xPolygon/cdk-validium-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/testutils/utils.go b/test/testutils/utils.go index 21a321f865..4c7fe00c7d 100644 --- a/test/testutils/utils.go +++ b/test/testutils/utils.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/cdk-validium-node/log" ioprometheusclient "github.com/prometheus/client_model/go" "github.com/prometheus/common/expfmt" "github.com/spf13/afero" diff --git a/test/vectors/types.go b/test/vectors/types.go index 38f87f1401..790ec62c30 100644 --- a/test/vectors/types.go +++ b/test/vectors/types.go @@ -4,8 +4,8 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/hex" ) type argBigInt struct { diff --git a/test/vectors/vectors_v2.go b/test/vectors/vectors_v2.go index 80638894f9..8e7f0a9389 100644 --- a/test/vectors/vectors_v2.go +++ b/test/vectors/vectors_v2.go @@ -1,8 +1,8 @@ package vectors import ( - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/state" ) // StateTransitionTestCaseV2 holds the metadata needed to run a state transition test @@ -71,7 +71,7 @@ func GenerateGenesisActions(genesis []GenesisEntity) []*state.GenesisAction { } genesisActions = append(genesisActions, action) } - + if genesisEntity.IsSmartContract && len(genesisEntity.Storage) > 0 { for storageKey, storageValue := range genesisEntity.Storage { action := &state.GenesisAction{ diff --git a/tools/executor/main.go b/tools/executor/main.go index 8f28ae12f1..25d699a1f1 100644 --- a/tools/executor/main.go +++ b/tools/executor/main.go @@ -9,11 +9,11 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/cdk-validium-node/db" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/state/runtime/executor" + "github.com/0xPolygon/cdk-validium-node/test/testutils" ) const ( diff --git a/tools/executor/prover.config.json b/tools/executor/prover.config.json index 2cbea82fce..4d8c5a2d13 100644 --- a/tools/executor/prover.config.json +++ b/tools/executor/prover.config.json @@ -21,7 +21,7 @@ "runStarkTest": false, "executeInParallel" : false, - "useMainExecGenerated" : false, + "useMainExecGenerated" : true, "proverServerPort": 50051, "proverServerMockPort": 50052, diff --git a/tools/genesis/genesisparser/genesisparser.go b/tools/genesis/genesisparser/genesisparser.go index 27a037ebe0..b4af62b1dd 100644 --- a/tools/genesis/genesisparser/genesisparser.go +++ b/tools/genesis/genesisparser/genesisparser.go @@ -1,8 +1,8 @@ package genesisparser import ( - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/cdk-validium-node/merkletree" + "github.com/0xPolygon/cdk-validium-node/state" ) // GenesisAccountTest struct diff --git a/tools/network/network.go b/tools/network/network.go index 7bda076adc..45b267614e 100644 --- a/tools/network/network.go +++ b/tools/network/network.go @@ -7,14 +7,14 @@ package network // "strings" // "time" -// "github.com/0xPolygonHermez/zkevm-node/config" -// "github.com/0xPolygonHermez/zkevm-node/encoding" -// "github.com/0xPolygonHermez/zkevm-node/etherman" -// "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/bridge" -// "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/matic" -// "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/proofofefficiency" -// "github.com/0xPolygonHermez/zkevm-node/log" -// "github.com/0xPolygonHermez/zkevm-node/test/operations" +// "github.com/0xPolygon/cdk-validium-node/config" +// "github.com/0xPolygon/cdk-validium-node/encoding" +// "github.com/0xPolygon/cdk-validium-node/etherman" +// "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/bridge" +// "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/matic" +// "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/proofofefficiency" +// "github.com/0xPolygon/cdk-validium-node/log" +// "github.com/0xPolygon/cdk-validium-node/test/operations" // "github.com/ethereum/go-ethereum/accounts/abi/bind" // "github.com/ethereum/go-ethereum/common" // "github.com/ethereum/go-ethereum/core/types" diff --git a/tools/rlp/main.go b/tools/rlp/main.go index a952afe793..c720162795 100644 --- a/tools/rlp/main.go +++ b/tools/rlp/main.go @@ -7,12 +7,12 @@ import ( "strconv" "strings" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" + "github.com/0xPolygon/cdk-validium-node/encoding" + "github.com/0xPolygon/cdk-validium-node/etherman/smartcontracts/cdkvalidium" + "github.com/0xPolygon/cdk-validium-node/hex" + "github.com/0xPolygon/cdk-validium-node/log" + "github.com/0xPolygon/cdk-validium-node/state" + "github.com/0xPolygon/cdk-validium-node/test/constants" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -238,7 +238,7 @@ func decodeFullCallDataToTxs(txsData []byte, forkID uint64) ([]types.Transaction // Extract coded txs. // Load contract ABI - abi, err := abi.JSON(strings.NewReader(polygonzkevm.PolygonzkevmABI)) + abi, err := abi.JSON(strings.NewReader(cdkvalidium.CdkvalidiumABI)) if err != nil { log.Fatal("error reading smart contract abi: ", err) } diff --git a/version.go b/version.go index 2dbd8a0cf5..8b8407c019 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ -package zkevm +package cdkvalidiumnode import ( "fmt"