diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 3503210b2..790194780 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -39,10 +39,6 @@ jobs: - name: Upload Artifact to AWS S3 run: | aws s3 cp ${{ env.ARTIFACT_NAME }} s3://${{ secrets.AWS_S3_BUCKET }} - - - name: Set Artifact Retention - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - run: | aws s3api put-object-tagging \ --bucket ${{ secrets.AWS_S3_BUCKET }} \ --key "${{ env.ARTIFACT_NAME }}" \ @@ -53,18 +49,14 @@ jobs: timeout-minutes: 30 strategy: matrix: - module: [ infrastructure/tools/keystore-generator, p2p/integrationtest/real-bidder, p2p/integrationtest/provider, bridge/standard/bridge-v1, external/geth, oracle, p2p] + module: [ external/geth ] steps: - - name: Set Snapshot Flag - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - run: echo "FLAGS=--snapshot" >> ${GITHUB_ENV} - - name: Checkout Code uses: actions/checkout@v4 with: submodules: recursive - fetch-depth: 1 + fetch-depth: 0 - name: Setup Cache uses: actions/cache@v4 @@ -86,7 +78,7 @@ jobs: uses: goreleaser/goreleaser-action@v5 with: version: latest - args: release --config=./${{ matrix.module }}/.goreleaser.yml --clean ${{ env.FLAGS }} + args: release --config=./${{ matrix.module }}/.goreleaser.yml --clean --snapshot env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -99,19 +91,13 @@ jobs: - name: Upload Artifacts to AWS S3 run: | - aws s3 cp ./dist/ s3://${{ secrets.AWS_S3_BUCKET }} \ - --recursive \ - --exclude "*" \ - --include "*.gz" \ - --include "*.txt" \ - - - name: Set Artifacts Retention - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - run: | - ls -1 ./dist | grep '\.gz\|\.txt$' | while read -r file; do - echo "Tagging uploaded file $file for auto delete" - aws s3api put-object-tagging \ - --bucket ${{ secrets.AWS_S3_BUCKET }} \ - --key "$file" \ - --tagging 'TagSet=[{Key=AutoDelete,Value=true}]' - done + find /tmp/dist -type f \( -name "*.gz" -o -name "*.txt" \) \ + -exec sh -c ' + file=$(basename "${1}") + echo "Uploading ${file} to S3..." + aws s3 cp "${1}" s3://${{ secrets.AWS_S3_BUCKET }}/ && + aws s3api put-object-tagging \ + --bucket ${{ secrets.AWS_S3_BUCKET }} \ + --key "${file}" \ + --tagging "TagSet=[{Key=AutoDelete,Value=true}]" + ' _ {} \; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa42f7891..897851f29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,35 +81,51 @@ jobs: check-latest: true cache-dependency-path: go.work.sum - - name: Determine Workspace Modules + - name: Determine Modules run: | - echo $(go list -f '{{.Dir}}' -m) - echo "GO_LINT_DIRS=$(go list -f '{{.Dir}}/...' -m | grep -v '/external/geth' | tr '\n' ' ')" >> ${GITHUB_ENV} + WORKSPACE_MODULES=$(go list -f '{{.Dir}}' -m) + + ADDITIONAL_MODULES=( + "${GITHUB_WORKSPACE}/external/geth" + ) + + ALL_MODULES=$(printf "%s\n" "${WORKSPACE_MODULES}" "${ADDITIONAL_MODULES[@]}") + + echo "GO_MODULES<> ${GITHUB_ENV} + echo "${ALL_MODULES}" >> ${GITHUB_ENV} + echo "EOF" >> ${GITHUB_ENV} + echo "GO_LINT_MODULES=$(printf "%s " $(echo "${ALL_MODULES}" | sed 's|$|/...|' | grep -v '/external/geth'))" >> ${GITHUB_ENV} - name: Run Gofmt - run: go list -f '{{.Dir}}' -m | xargs gofmt -d -e -l + run: | + GOFMT_OUTPUT=$(echo ${GO_MODULES} | tr ' ' '\n' | xargs gofmt -d -e -l) + if [ -n "${GOFMT_OUTPUT}" ]; then + echo "The following files are not formatted correctly:" + echo "${GOFMT_OUTPUT}" + exit 1 + fi - name: Run Tidy & Workspace Sync run: | - go list -f '{{.Dir}}' -m | xargs -L1 go mod tidy -C + echo ${GO_MODULES} | tr ' ' '\n' | xargs -L1 go mod tidy -C go work sync git checkout ${{ github.event.pull_request.head.ref }} git diff --name-only --exit-code . || (echo "Golang modules/workspace not in sync with go.mod/go.sum/go.work/go.work.sum files" && exit 1) git reset --hard HEAD - name: Run Lint - uses: golangci/golangci-lint-action@v4 + uses: golangci/golangci-lint-action@v6 with: - version: v1.57.2 - args: --timeout 15m --verbose ${{ env.GO_LINT_DIRS }} - skip-cache: true # TODO(mrekucci): remove when the following issue is solved https://github.com/golangci/golangci-lint-action/issues/135#issuecomment-2039548548 + version: v1.59 + args: --timeout 15m --verbose ${{ env.GO_LINT_MODULES }} - name: Run Build - run: go list -f '{{.Dir}}/...' -m | xargs go build + run: echo ${GO_MODULES} | tr ' ' '\n' | xargs -I {} sh -c 'go build -C {} -v ./...' + env: + GOWORK: off - # TODO(mrekucci): Re-enable /external/geth module when tests are passing. - name: Run Test - run: go list -f '{{.Dir}}/...' -m | grep -v '/external/geth' | xargs go test -short -race + run: echo ${GO_MODULES} | tr ' ' '\n' | grep -v '/external/geth' | xargs -I {} sh -c 'go test -short -race {}/...' - name: Setup Protobuf uses: bufbuild/buf-setup-action@v1.31.0 diff --git a/.github/workflows/infrastructure.yml b/.github/workflows/infrastructure.yml index 782be420a..0473975d0 100644 --- a/.github/workflows/infrastructure.yml +++ b/.github/workflows/infrastructure.yml @@ -11,6 +11,7 @@ on: - devnet - testnet - stressnet + - manual-test default: 'devnet' all_targets: description: 'All Arch & Os Targets' diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 0cdc1b94f..6098f2233 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -43,12 +43,6 @@ jobs: check-latest: true cache-dependency-path: go.work.sum -# TODO(mrekucci): Re-enable when the repo is finalized. -# - name: GHCR Docker Login -# run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin -# - name: Setup Docker Buildx -# uses: docker/setup-buildx-action@v3 - - name: Release uses: goreleaser/goreleaser-action@v5 with: diff --git a/.gitmodules b/.gitmodules index 3b08ceaa4..e0c908e22 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,7 @@ [submodule "external/geth"] path = external/geth url = git@github.com:primev/mev-commit-geth.git + branch = archive-node-support [submodule "contracts/lib/openzeppelin-contracts-upgradeable"] path = contracts/lib/openzeppelin-contracts-upgradeable url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable diff --git a/bridge/hyperlane/Makefile b/bridge/hyperlane/Makefile deleted file mode 100644 index a3f81c4d3..000000000 --- a/bridge/hyperlane/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -up-dev: - @if [ ! -f .env ]; then echo "Error: .env file not found. Please populate the .env file before running this command."; exit 1; fi - AGENT_BASE_IMAGE=shaspitz/hyperlane-agent-mac:6985064 SETTLEMENT_RPC_URL=http://172.29.0.98:8545 PUBLIC_SETTLEMENT_RPC_URL=nil docker compose --profile bridge up -d --build - -up-prod: - @if [ ! -f .env ]; then echo "Error: .env file not found. Please populate the .env file before running this command."; exit 1; fi - AGENT_BASE_IMAGE=gcr.io/abacus-labs-dev/hyperlane-agent@sha256:854f92966eac6b49e5132e152cc58168ecdddc76c2d390e657b81bdaf1396af0 SETTLEMENT_RPC_URL=http://172.29.0.98:8545 PUBLIC_SETTLEMENT_RPC_URL=nil docker compose --profile bridge up -d --build - -down: - AGENT_BASE_IMAGE=nil SETTLEMENT_RPC_URL=nil PUBLIC_SETTLEMENT_RPC_URL=nil docker compose --profile bridge down - -up-emulator: - AGENT_BASE_IMAGE=nil PUBLIC_SETTLEMENT_RPC_URL=nil SETTLEMENT_RPC_URL=http://sl-bootnode:8545 docker compose --profile 1-emulators up -d --build - -up-2emulator: - AGENT_BASE_IMAGE=nil PUBLIC_SETTLEMENT_RPC_URL=nil SETTLEMENT_RPC_URL=http://sl-bootnode:8545 docker compose --profile 2-emulators up -d --build - -up-3emulator: - AGENT_BASE_IMAGE=nil PUBLIC_SETTLEMENT_RPC_URL=nil SETTLEMENT_RPC_URL=http://sl-bootnode:8545 docker compose --profile 3-emulators up -d --build - -up-4emulator: - AGENT_BASE_IMAGE=nil PUBLIC_SETTLEMENT_RPC_URL=nil SETTLEMENT_RPC_URL=http://sl-bootnode:8545 docker compose --profile 4-emulators up -d --build - -up-5emulator: - AGENT_BASE_IMAGE=nil PUBLIC_SETTLEMENT_RPC_URL=nil SETTLEMENT_RPC_URL=http://sl-bootnode:8545 docker compose --profile 5-emulators up -d --build - -down-emulator: - AGENT_BASE_IMAGE=nil PUBLIC_SETTLEMENT_RPC_URL=nil SETTLEMENT_RPC_URL=nil docker compose --profile 5-emulators down - -clean-dbs: - @read -p "WARNING: This command will wipe all persistent disk data relevant to the containers. Press enter to continue or Ctrl+C to cancel." _ - -docker compose --profile bridge down --rmi all --volumes - -docker compose --profile bridge rm -fv - docker image prune -f - -print-warp-deploy: - @echo "Printing hyperlane warp deployment artifact" - docker run --rm -v hyperlane_hyperlane-deploy-artifacts:/data alpine cat /data/warp-deployment.json \ No newline at end of file diff --git a/bridge/hyperlane/README.md b/bridge/hyperlane/README.md deleted file mode 100644 index dd360349b..000000000 --- a/bridge/hyperlane/README.md +++ /dev/null @@ -1,114 +0,0 @@ -# Hyperlane Warp Route Bridge - -This directory houses a [hyperlane warp route](https://docs.hyperlane.xyz/docs/protocol/warp-routes) between Sepolia and the mev-commit chain, with two validators attesting to mev-commit chain state, and a message relayer. - -## Bridge CLI - -The bridge cli is built out as a shell script that interacts with bridging contracts on both L1 and the mev-commit chain. The cli must first be initialized with relevant contract addresses, chain IDs, and RPC endpoints. The cli user can then bridge in either direction accordingly, to any destination account. `cli.sh` requires both [foundry](https://book.getfoundry.sh/getting-started/installation) and `jq` to be installed on the host. - -We encourage anyone using the bridge cli to understand the underlying shell script they're executing. It's essentially a simple wrapper around some foundry commands that invoke bridging txes. - -### Quickstart - -To use the `cli.sh` in bridging ether to or from the mev-commit chain, first make the script executable: - -```bash -chmod +x cli.sh -``` - -Optionally, move the script to a folder in your `PATH` similar to: - -```bash -sudo mv cli.sh /usr/local/bin/bridge-cli -``` - -Next we'll initialize bridge client parameters. Note all following commands display confirmation prompts. Use [primev docs](https://docs.primev.xyz/mev-commit-chain) to obtain relevant arguments. Router arguments are addresses of deployed hyperlane router contracts for each chain. Executing this command will save a `.bridge_config` json in the working directory: - -```bash -bridge-cli init -``` - -Once initialized, bridge ether to the mev-commit chain with - -```bash -bridge-cli bridge-to-mev-commit -``` - -Remember to bridge enough ether such that fees to bridge back to L1 can be paid! Bridge ether back to L1 with - -```bash -bridge-cli bridge-to-l1 -``` - -Note support for keystore and hardware wallets will be added later. - -## Versions - -Agents are built from https://github.com/primev/hyperlane-monorepo, using the rust/build.sh script from that repo. Docker images for the agents are optimized for amd64 architecture, and may need to be compiled on a powerful machine. - -Hyperlane contracts and CLI are built from custom fork of their monorepo https://github.com/primev/hyperlane-monorepo. - -## Contract deployer - -Address: `0x82b941824b43F33e417be1E92273A3020a0D760c` - -Note if the relayer is emitting errors related to unexpected contract routing, try redeploying the hyperlane contracts using a new key pair. It's likely the current deployments are clashing with previous deployments on Sepolia. - -To properly set a new hyperlane deployer: -* Generate a new key pair (ex: `cast wallet new`) -* Send or [mine](https://sepolia-faucet.pk910.de/) some Sepolia ETH to `Address` -* replace `Address` above for book keeping -* replace `CONTRACT_DEPLOYER_PRIVATE_KEY` in `.env` -* allocate funds to `Address` in the allocs field of `genesis.json` - -Note the deployer of [primev contracts](https://github.com/primev/contracts) can be a separate account. - -## Validator Accounts (same keys as POA signers) - -### Node1 - -Address: `0xd9cd8E5DE6d55f796D980B818D350C0746C25b97` - -### Node2 - -Address: `0x788EBABe5c3dD422Ef92Ca6714A69e2eabcE1Ee4` - -## Relayer - -Address: `0x0DCaa27B9E4Db92F820189345792f8eC5Ef148F6` - -## User emulators - -There are 5 emulator services that simulate EOA's bridging to/from the mev-commit chain. Use the Makefile to start them. - -Note all these accounts must be funded with Sepolia ether and enough mev-commit chain ether to pay for gas. - -Emulator 1 Address: `0x04F713A0b687c84D4F66aCd1423712Af6F852B78` -Emulator 2 Address: `0x4E2D04c65C399Eb27B3E3ADA06110BCd47b5a506` -Emulator 3 Address: `0x7AEe7AD6b2EAd96532D84D20358Db0e697f060Cd` -Emulator 4 Address: `0x765235CDda5FC6a620Fea2208A333a97CEDA2E1d` -Emulator 5 Address: `0x163c7bD4C3B815B06503D8E8B5906519C319EA6f` - -## Starter .env file -To get a standard starter .env file from primev internal development, [click here.](https://www.notion.so/Private-keys-and-env-for-settlement-layer-245a4f3f4fe040a7b72a6be91131d9c2?pvs=4). Note this repo is being actively developed and required .env variables may change. - -Environment variables that must be specified in the .env file or as command line arguments: - -``` -HYPERLANE_DEPLOYER_PRIVATE_KEY=0xpk1 -NODE1_PRIVATE_KEY=0xpk2 -NODE2_PRIVATE_KEY=0xpk3 -RELAYER_PRIVATE_KEY=0xpk4 -NEXT_PUBLIC_WALLET_CONNECT_ID=0xcId -AGENT_BASE_IMAGE=image -SETTLEMENT_RPC_URL=https://url -PUBLIC_SETTLEMENT_RPC_URL=https://url -SEPOLIA_RPC_URL=https://url -DD_API_KEY=432 -DD_APP_KEY=808 -EMULATOR1_PRIVATE_KEY=0xpk5 -EMULATOR2_PRIVATE_KEY=0xpk6 -EMULATOR3_PRIVATE_KEY=0xpk7 -EMULATOR4_PRIVATE_KEY=0xpk8 -EMULATOR5_PRIVATE_KEY=0xpk9 -``` diff --git a/bridge/hyperlane/cli.sh b/bridge/hyperlane/cli.sh deleted file mode 100755 index 5d2da26c2..000000000 --- a/bridge/hyperlane/cli.sh +++ /dev/null @@ -1,332 +0,0 @@ -#!/bin/bash -set -ex - -config_file=".bridge_config" - -show_usage() { - echo "Usage: $0 [command] [arguments] [options]" - echo "" - echo "Commands:" - echo " bridge-to-mev-commit " - echo " Bridge tokens to mev-commit chain. Requires the amount to bridge, destination account, and private key." - echo " Example: $0 bridge-to-mev-commit 100 0x123... 0xABC..." - echo "" - echo " bridge-to-l1 " - echo " Bridge tokens to L1. Requires the amount to bridge, destination account, and private key." - echo " Example: $0 bridge-to-l1 100 0x456... 0xDEF..." - echo "" - echo " init " - echo " Initialize configuration with specified hyperlane router addresses, chain IDs, and URLs." - echo " Example: $0 init 0xc20B3C7852FA81f36130313220890eA7Ea5F5B0e 0x4b2DC8A5C4da51f821390AbD2B6fe8122BC6fA97 11155111 17864 https://ethereum-sepolia.publicnode.com http://localhost:8545" - echo "" - echo "Options:" - echo " -y, --yes Automatically answer 'yes' to all prompts" - echo " Example: $0 bridge-to-mev-commit 100 0x123... 0xABC... -y" - echo "" - echo "Note: This script requires foundry and jq to be installed." -} - - -bridge_confirmation() { - if [ "$skip_confirmation" = false ]; then - local source_chain_name=$1 - local dest_chain_name=$2 - local source_chain_id=$3 - local dest_chain_id=$4 - local source_url=$5 - local dest_url=$6 - local source_router=$7 - local dest_router=$8 - local amount=$9 - local dest_address=${10} # Arguments after $9 must be accessed with braces - - echo "You are about to bridge..." - echo "From $source_chain_name (ID: $source_chain_id, URL: $source_url, Router: $source_router)" - echo "To $dest_chain_name (ID: $dest_chain_id, URL: $dest_url, Router: $dest_router)" - echo "Amount to bridge: $amount wei" - echo "Destination address: $dest_address" - read -p "Are you sure you want to proceed with the bridging operation? (y/n): " answer - if [ "$answer" != "y" ]; then - echo "Operation cancelled." - exit 1 - fi - fi -} - -check_config_loaded() { - local config_vars=("l1_router" "mev_commit_chain_router" "l1_chain_id" "mev_commit_chain_id" "l1_url" "mev_commit_url") - - for var in "${config_vars[@]}"; do - if [ -z "${!var}" ]; then - echo "Error: Configuration for '$var' not loaded." - echo "Please run the init command to set up the necessary configuration." - exit 1 - fi - done -} - -# TODO: Support more secure forms of private key management: https://book.getfoundry.sh/tutorials/best-practices#private-key-management -bridge_transfer() { - local source_chain_name=$1 - local dest_chain_name=$2 - local source_chain_id=$3 - local dest_chain_id=$4 - local source_url=$5 - local dest_url=$6 - local source_router=$7 - local dest_router=$8 - local amount=$9 - local dest_address=${10} - local private_key=${11} - - check_config_loaded - - if ! [[ $amount =~ ^[0-9]+$ ]]; then - echo "Error: Amount of wei is not a valid number." - return 1 - fi - - bridge_confirmation \ - "$source_chain_name" \ - "$dest_chain_name" \ - "$source_chain_id" \ - "$dest_chain_id" \ - "$source_url" \ - "$dest_url" \ - "$source_router" \ - "$dest_router" \ - "$amount" \ - "$dest_address" - - echo "Bridging to $dest_chain_name..." - echo "Amount: $amount" - echo "Destination Address: $dest_address" - echo "Using $source_chain_name Router: $source_router" - echo "Using $dest_chain_name Router: $dest_router" - echo "$source_chain_name Chain ID: $source_chain_id" - echo "$dest_chain_name Chain ID: $dest_chain_id" - echo "$source_chain_name URL: $source_url" - echo "$dest_chain_name URL: $dest_url" - - local dest_address_clean=${dest_address#0x} # Remove prefix - local padded_dest_address="0x000000000000000000000000$dest_address_clean" - - local gas_payment_hex=$(cast call --rpc-url $source_url $source_router "quoteGasPayment(uint32)" $dest_chain_id) - local gas_payment_hex_clean=${gas_payment_hex#0x} # Remove prefix - local gas_payment_dec=$((16#$gas_payment_hex_clean)) - local total_amount_dec=$(($amount + $gas_payment_dec)) - - dest_account_init_balance=$(cast balance --rpc-url $dest_url $dest_address) - - src_address=$(cast wallet address $private_key) - src_account_init_balance=$(cast balance --rpc-url $source_url $src_address) - - # TODO: Tune transaction parameters and/or allow for user to inject custom config with sourced env vars. - # See https://book.getfoundry.sh/reference/cli/cast/send - cast send \ - --rpc-url $source_url \ - --private-key $private_key \ - $source_router "transferRemote(uint32,bytes32,uint256)" \ - $dest_chain_id \ - $padded_dest_address \ - $amount \ - --value $total_amount_dec"wei" - # --nonce 366 - - # After tx is submitted to src chain, a simple FSM ensues. Bridge invocation follows: - # - # [PENDING] -- Timeout --> [EXPIRED] - # | - # | tx committed to source chain - # | - # [COMMITTED] -- Timeout --> [FAILURE] - # | - # | balance incremented (tx committed to dest chain) - # v - # [SUCCESS] - # - # Pending: tx has been submitted to source chain, but is still pending (src balance not decremented) - # Expired: 30 minute timeout has been reached while source chain tx is still pending - # Committed: tx has been committed to source chain, 30 minute timeout is NOT reached - # Failure: tx has been committed to source chain, 30 minute timeout has elapsed - # Success: destination balance incremented, bridge invocation complete - - # Iterate until source balance changes. Timeout after 30 minutes. - max_retries=180 - sleep_time=10 - retry_count=0 - # TODO: Use transaction receipt instead of balance polling - while [ "$(cast balance --rpc-url "$source_url" "$src_address")" = "$src_account_init_balance" ] - do - echo "$((retry_count * 10)) seconds passed since bridge invocation. Waiting for source balance to change..." - sleep $sleep_time - retry_count=$((retry_count + 1)) - if [ "$retry_count" -ge "$max_retries" ]; then - echo "Maximum retries reached. 30 minutes have passed and source balance has not changed." - echo "EXPIRED" - # TODO: If expired, cancel tx here - return 0 - fi - done - - # Iterate until destination balance changes. Timeout after 30 minutes. - max_retries=180 - sleep_time=10 - retry_count=0 - while [ "$(cast balance --rpc-url "$dest_url" "$dest_address")" = "$dest_account_init_balance" ] - do - echo "$((retry_count * 10)) seconds passed since bridge invocation. Waiting for destination balance to change..." - sleep $sleep_time - retry_count=$((retry_count + 1)) - if [ "$retry_count" -ge "$max_retries" ]; then - echo "Maximum retries reached. 30 minutes have passed and destination balance has not changed." - echo "FAILURE" - return 0 - fi - done - - echo "Source and destination balances have changed. Bridge operation successful." - echo "If in production, confirm destination balance was not incremented by irrelevant transaction." - echo "SUCCESS" - return 0 -} - -bridge_to_mev_commit() { - bridge_transfer \ - "L1" \ - "mev-commit chain" \ - "$l1_chain_id" \ - "$mev_commit_chain_id" \ - "$l1_url" \ - "$mev_commit_url" \ - "$l1_router" \ - "$mev_commit_chain_router" \ - "$1" \ - "$2" \ - "$3" -} - -bridge_to_l1() { - bridge_transfer \ - "mev-commit chain" \ - "L1" \ - "$mev_commit_chain_id" \ - "$l1_chain_id" \ - "$mev_commit_url" \ - "$l1_url" \ - "$mev_commit_chain_router" \ - "$l1_router" \ - "$1" \ - "$2" \ - "$3" -} - -# Function to initialize and save configuration -init_config() { - local l1_router=$1 - local mev_commit_chain_router=$2 - local l1_chain_id=$3 - local mev_commit_chain_id=$4 - local l1_url=$5 - local mev_commit_url=$6 - - # Confirmation prompt - if [ "$skip_confirmation" = false ]; then - echo "You are about to initialize the configuration with the following settings:" - echo "L1 Router: $l1_router" - echo "mev-commit chain Router: $mev_commit_chain_router" - echo "L1 Chain ID: $l1_chain_id" - echo "mev-commit chain ID: $mev_commit_chain_id" - echo "L1 URL: $l1_url" - echo "MEV-Commit URL: $mev_commit_url" - read -p "Are you sure you want to proceed? (y/n): " answer - if [ "$answer" != "y" ]; then - echo "Operation cancelled." - exit 1 - fi - fi - - # Create JSON config file - jq -n \ - --arg l1_router "$l1_router" \ - --arg mev_commit_chain_router "$mev_commit_chain_router" \ - --arg l1_chain_id "$l1_chain_id" \ - --arg mev_commit_chain_id "$mev_commit_chain_id" \ - --arg l1_url "$l1_url" \ - --arg mev_commit_url "$mev_commit_url" \ - '{l1_router: $l1_router, mev_commit_chain_router: $mev_commit_chain_router, l1_chain_id: $l1_chain_id, mev_commit_chain_id: $mev_commit_chain_id, l1_url: $l1_url, mev_commit_url: $mev_commit_url}' \ - > "$config_file" - - echo "Configuration initialized and saved." -} - -# Loads configuration from JSON -load_config() { - if [ -f "$config_file" ]; then - l1_router=$(jq -r '.l1_router' "$config_file") - mev_commit_chain_router=$(jq -r '.mev_commit_chain_router' "$config_file") - l1_chain_id=$(jq -r '.l1_chain_id' "$config_file") - mev_commit_chain_id=$(jq -r '.mev_commit_chain_id' "$config_file") - l1_url=$(jq -r '.l1_url' "$config_file") - mev_commit_url=$(jq -r '.mev_commit_url' "$config_file") - else - echo "Error: Configuration file not found. Please run the init command first." - exit 1 - fi -} - -# Check for help command before loading config -if [[ "$1" == "-h" || "$1" == "--help" ]]; then - show_usage - exit 0 -fi - -# If first arg is not "init", load configuration. -if [[ "$1" != "init" ]]; then - load_config -fi - -# Check if last argument is --yes or -y, set flag accordingly -skip_confirmation=false -if [[ "${@: -1}" == "--yes" || "${@: -1}" == "-y" ]]; then - skip_confirmation=true - set -- "${@:1:$#-1}" # Remove the last argument -fi - -command=$1 -shift # Shift to get the next set of parameters after the command - -case "$command" in - init) - if [ $# -ne 6 ]; then - echo "Error: Incorrect number of arguments for init command." - show_usage - exit 1 - fi - init_config "$1" "$2" "$3" "$4" "$5" "$6" - ;; - bridge-to-mev-commit) - if [ $# -ne 3 ]; then - echo "Error: Incorrect number of arguments for bridging to mev-commit chain." - show_usage - exit 1 - fi - bridge_to_mev_commit "$1" "$2" "$3" - ;; - bridge-to-l1) - if [ $# -ne 3 ]; then - echo "Error: Incorrect number of arguments for bridging to L1." - show_usage - exit 1 - fi - bridge_to_l1 "$1" "$2" "$3" - ;; - -h|--help) - show_usage - ;; - *) - echo "Unknown command: $command" - show_usage - exit 1 - ;; -esac diff --git a/bridge/hyperlane/docker-compose.yml b/bridge/hyperlane/docker-compose.yml deleted file mode 100644 index ba86ed11c..000000000 --- a/bridge/hyperlane/docker-compose.yml +++ /dev/null @@ -1,256 +0,0 @@ -version: '3' -services: - hyperlane-deployer: - build: - context: ./hyperlane-deployer - dockerfile: Dockerfile - healthcheck: - test: ["CMD-SHELL", "test -f /hyperlane-monorepo/artifacts/done-warp-route || exit 1"] - interval: 5s - retries: 100 - environment: - - HYPERLANE_DEPLOYER_PRIVATE_KEY=${HYPERLANE_DEPLOYER_PRIVATE_KEY} - - SEPOLIA_RPC_URL=${SEPOLIA_RPC_URL} - networks: - primev_net: - ipv4_address: '172.29.0.50' - volumes: - - hyperlane-deploy-artifacts:/hyperlane-monorepo/artifacts - profiles: - - bridge - - hyperlane-validator1: - build: - context: ./hyperlane-validator - dockerfile: Dockerfile - args: - # Image can be built for arm64 with https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/build.sh - - AGENT_BASE_IMAGE=${AGENT_BASE_IMAGE} - - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} - # Reuse geth private key for validator - command: ./validator --validator.key ${NODE1_PRIVATE_KEY} --chains.mevcommitsettlement.signer.key ${NODE1_PRIVATE_KEY} --checkpointSyncer.path /val1-sigs - # TODO: evaluate why container needs to run as root - user: "0:0" - depends_on: - hyperlane-deployer: - condition: service_healthy - networks: - primev_net: - ipv4_address: '172.29.0.75' - volumes: - - hyperlane-deploy-artifacts:/deploy-artifacts - - hyperlane-validator1-sigs:/val1-sigs - - hyperlane-validator1-db:/val-db - profiles: - - bridge - - hyperlane-validator2: - build: - context: ./hyperlane-validator - dockerfile: Dockerfile - args: - - AGENT_BASE_IMAGE=${AGENT_BASE_IMAGE} - - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} - # Reuse geth private key for validator - command: ./validator --validator.key ${NODE2_PRIVATE_KEY} --chains.mevcommitsettlement.signer.key ${NODE2_PRIVATE_KEY} --checkpointSyncer.path /val2-sigs - # TODO: evaluate why container needs to run as root - user: "0:0" - depends_on: - hyperlane-deployer: - condition: service_healthy - networks: - primev_net: - ipv4_address: '172.29.0.76' - volumes: - - hyperlane-deploy-artifacts:/deploy-artifacts - - hyperlane-validator2-sigs:/val2-sigs - - hyperlane-validator2-db:/val-db - profiles: - - bridge - - hyperlane-relayer: - build: - context: ./hyperlane-relayer - dockerfile: Dockerfile - args: - - AGENT_BASE_IMAGE=${AGENT_BASE_IMAGE} - user: "0:0" - depends_on: - hyperlane-deployer: - condition: service_healthy - environment: - - RELAYER_PRIVATE_KEY=${RELAYER_PRIVATE_KEY} - - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} - - SEPOLIA_RPC_URL=${SEPOLIA_RPC_URL} - networks: - primev_net: - ipv4_address: '172.29.0.77' - volumes: - - hyperlane-deploy-artifacts:/deploy-artifacts - - hyperlane-validator1-sigs:/val1-sigs - - hyperlane-validator2-sigs:/val2-sigs - - hyperlane-relayer-db:/relayer-db - profiles: - - bridge - - # frontend: - # build: - # context: ./frontend - # dockerfile: Dockerfile - # args: - # - NEXT_PUBLIC_WALLET_CONNECT_ID=${NEXT_PUBLIC_WALLET_CONNECT_ID} - # depends_on: - # hyperlane-deployer: - # condition: service_healthy - # environment: - # - NEXT_PUBLIC_WALLET_CONNECT_ID=${NEXT_PUBLIC_WALLET_CONNECT_ID} - # - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} - # - PUBLIC_SETTLEMENT_RPC_URL=${PUBLIC_SETTLEMENT_RPC_URL} - # networks: - # primev_net: - # ipv4_address: '172.29.0.90' - # ports: - # - 80:3000 - # volumes: - # - hyperlane-deploy-artifacts:/deploy-artifacts - # profiles: - # - bridge - - emulator1: - build: - context: ../ - dockerfile: hyperlane/user-emulator/Dockerfile - environment: - - DD_API_KEY=${DD_API_KEY} - - DD_APP_KEY=${DD_APP_KEY} - - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} - - SEPOLIA_RPC_URL=${SEPOLIA_RPC_URL} - - EMULATOR_PRIVATE_KEY=${EMULATOR1_PRIVATE_KEY} - - EMULATOR_ADDRESS=0x04F713A0b687c84D4F66aCd1423712Af6F852B78 - volumes: - - hyperlane-deploy-artifacts:/deploy-artifacts - networks: - primev_net: - ipv4_address: '172.29.0.171' - profiles: - - 1-emulators - - 2-emulators - - 3-emulators - - 4-emulators - - 5-emulators - - emulator2: - build: - context: ../ - dockerfile: hyperlane/user-emulator/Dockerfile - environment: - - DD_API_KEY=${DD_API_KEY} - - DD_APP_KEY=${DD_APP_KEY} - - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} - - SEPOLIA_RPC_URL=${SEPOLIA_RPC_URL} - - EMULATOR_PRIVATE_KEY=${EMULATOR2_PRIVATE_KEY} - - EMULATOR_ADDRESS=0x4E2D04c65C399Eb27B3E3ADA06110BCd47b5a506 - volumes: - - hyperlane-deploy-artifacts:/deploy-artifacts - networks: - primev_net: - ipv4_address: '172.29.0.172' - profiles: - - 2-emulators - - 3-emulators - - 4-emulators - - 5-emulators - - emulator3: - build: - context: ../ - dockerfile: hyperlane/user-emulator/Dockerfile - environment: - - DD_API_KEY=${DD_API_KEY} - - DD_APP_KEY=${DD_APP_KEY} - - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} - - SEPOLIA_RPC_URL=${SEPOLIA_RPC_URL} - - EMULATOR_PRIVATE_KEY=${EMULATOR3_PRIVATE_KEY} - - EMULATOR_ADDRESS=0x7AEe7AD6b2EAd96532D84D20358Db0e697f060Cd - volumes: - - hyperlane-deploy-artifacts:/deploy-artifacts - networks: - primev_net: - ipv4_address: '172.29.0.173' - profiles: - - 3-emulators - - 4-emulators - - 5-emulators - - emulator4: - build: - context: ../ - dockerfile: hyperlane/user-emulator/Dockerfile - environment: - - DD_API_KEY=${DD_API_KEY} - - DD_APP_KEY=${DD_APP_KEY} - - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} - - SEPOLIA_RPC_URL=${SEPOLIA_RPC_URL} - - EMULATOR_PRIVATE_KEY=${EMULATOR4_PRIVATE_KEY} - - EMULATOR_ADDRESS=0x765235CDda5FC6a620Fea2208A333a97CEDA2E1d - volumes: - - hyperlane-deploy-artifacts:/deploy-artifacts - networks: - primev_net: - ipv4_address: '172.29.0.174' - profiles: - - 4-emulators - - 5-emulators - - emulator5: - build: - context: ../ - dockerfile: hyperlane/user-emulator/Dockerfile - environment: - - DD_API_KEY=${DD_API_KEY} - - DD_APP_KEY=${DD_APP_KEY} - - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} - - SEPOLIA_RPC_URL=${SEPOLIA_RPC_URL} - - EMULATOR_PRIVATE_KEY=${EMULATOR5_PRIVATE_KEY} - - EMULATOR_ADDRESS=0x163c7bD4C3B815B06503D8E8B5906519C319EA6f - volumes: - - hyperlane-deploy-artifacts:/deploy-artifacts - networks: - primev_net: - ipv4_address: '172.29.0.175' - profiles: - - 5-emulators - - datadog-agent: - image: datadog/agent:latest - container_name: datadog-agent - environment: - - DD_API_KEY=${DD_API_KEY} - - DD_TAGS=env:relayer-test - - DD_SITE=datadoghq.com - - DD_LOGS_ENABLED=true - - DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true - - DD_CONTAINER_EXCLUDE=image:datadog/agent:* - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - - /proc/:/host/proc/:ro - - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro - depends_on: - - hyperlane-relayer - networks: - primev_net: - ipv4_address: '172.29.4.118' - profiles: - - dd_agent - -networks: - primev_net: - external: true - -volumes: - hyperlane-deploy-artifacts: - hyperlane-validator1-sigs: - hyperlane-validator2-sigs: - hyperlane-validator1-db: - hyperlane-validator2-db: - hyperlane-relayer-db: diff --git a/bridge/hyperlane/frontend/Dockerfile b/bridge/hyperlane/frontend/Dockerfile deleted file mode 100644 index 722557e6b..000000000 --- a/bridge/hyperlane/frontend/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM alpine:latest - -RUN apk add --no-cache git yarn jq - -RUN git clone https://github.com/primev/hyperlane-ui.git -WORKDIR /hyperlane-ui -RUN git checkout ff1586ed9cad6eeddba2cebc5f9b7828c74f25d1 - -RUN yarn - -ARG NEXT_PUBLIC_WALLET_CONNECT_ID - -RUN yarn build - -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/bridge/hyperlane/frontend/entrypoint.sh b/bridge/hyperlane/frontend/entrypoint.sh deleted file mode 100644 index aca3fc9a4..000000000 --- a/bridge/hyperlane/frontend/entrypoint.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -exu - -# Update src tokens.ts file with hypNativeAddress value from deploy config -ARTIFACT_PATH="/deploy-artifacts/warp-ui-token-config.json" -SRC_TOKENS_PATH="/hyperlane-ui/src/consts/tokens.ts" -HYP_NATIVE_ADDR=$(jq -r '.hypNativeAddress' $ARTIFACT_PATH) -sed -i "/hypNativeAddress/c\ hypNativeAddress: \"$HYP_NATIVE_ADDR\"," $SRC_TOKENS_PATH - -# Check if PUBLIC_SETTLEMENT_RPC_URL is set and non-empty, otherwise use SETTLEMENT_RPC_URL -if [ -n "${PUBLIC_SETTLEMENT_RPC_URL+x}" ] && [ -n "$PUBLIC_SETTLEMENT_RPC_URL" ]; then - RPC_URL="$PUBLIC_SETTLEMENT_RPC_URL" -else - RPC_URL="$SETTLEMENT_RPC_URL" -fi -# Update src chains.ts file with L2 node url depending on dev vs prod -SRC_CHAINS_PATH="/hyperlane-ui/src/consts/chains.ts" -sed -i "s|http: 'http://[^']*'|http: '$RPC_URL'|g" "$SRC_CHAINS_PATH" - -exec yarn dev diff --git a/bridge/hyperlane/hyperlane-deployer/Dockerfile b/bridge/hyperlane/hyperlane-deployer/Dockerfile deleted file mode 100644 index a9c039c0a..000000000 --- a/bridge/hyperlane/hyperlane-deployer/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM alpine:latest - -RUN apk update && apk add --no-cache git yarn expect - -WORKDIR / - -RUN git clone https://github.com/primev/hyperlane-monorepo.git -WORKDIR /hyperlane-monorepo -# Hyperlane 3.5 release w/ merged primev changes -# https://github.com/primev/hyperlane-monorepo/commit/1c8cdc9e57389024274242d28e032a2de535c2c7 -RUN git checkout 1c8cdc9e57389024274242d28e032a2de535c2c7 - -RUN yarn install -RUN yarn build - -RUN ln -s /hyperlane-monorepo/typescript/cli/dist/cli.js /usr/local/bin/hyperlane -RUN chmod +x /usr/local/bin/hyperlane - -COPY chain-config.yml /chain-config.yml -COPY multisig-ism.yml /multisig-ism.yml -COPY warp-tokens.yml /warp-tokens.yml - -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT [ "/entrypoint.sh" ] - diff --git a/bridge/hyperlane/hyperlane-deployer/chain-config.yml b/bridge/hyperlane/hyperlane-deployer/chain-config.yml deleted file mode 100644 index bcd3c4a54..000000000 --- a/bridge/hyperlane/hyperlane-deployer/chain-config.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -mevcommitsettlement: - chainId: 17864 - domainId: 17864 - name: mevcommitsettlement - protocol: ethereum - rpcUrls: - # This RPC URL is specific to a local geth POA setup - - http: http://172.29.0.98:8545 - pagination: - maxBlockRange: 1000 - maxBlockAge: 1000 - minBlockNumber: 1000 - retry: - maxRequests: 5 - baseRetryMs: 1000 - isTestnet: true - # blockExplorers: # Array: List of BlockExplorer configs - # # Required fields: - # - name: My Chain Explorer # String: Human-readable name for the explorer - # url: https://mychain.com/explorer # String: Base URL for the explorer - # apiUrl: https://mychain.com/api # String: Base URL for the explorer API - # # Optional fields: - # apiKey: myapikey # String: API key for the explorer (optional) - # family: etherscan # ExplorerFamily: See ExplorerFamily for valid values - nativeToken: - name: cETH # String - symbol: cETH # String - decimals: 18 # Number - displayName: MEV Commit Settlement - displayNameShort: MEV Commit Settlement - logoURI: https://mychain.com/logo.png - blocks: - confirmations: 12 # Number: Blocks to wait before considering a transaction confirmed - reorgPeriod: 100 # Number: Blocks before a transaction has a near-zero chance of reverting - estimateBlockTime: 1 - - # Partial override sepolia config for custom rpc - sepolia: - rpcUrls: - - http: https://ethereum-sepolia.publicnode.com diff --git a/bridge/hyperlane/hyperlane-deployer/entrypoint.sh b/bridge/hyperlane/hyperlane-deployer/entrypoint.sh deleted file mode 100644 index 11960f1cd..000000000 --- a/bridge/hyperlane/hyperlane-deployer/entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -set -exu - -# Sleep to ensure chain is up -sleep 10 - -# Replace default rpc url in chain config with env var -sed -i "s|https://ethereum-sepolia.publicnode.com|${SEPOLIA_RPC_URL}|g" /chain-config.yml - -if test -f /hyperlane-monorepo/artifacts/done; then - echo "Deploy artifacts already exist. Skipping deployment." -else - echo "Deploying core contracts" - # Define the expect script inline - /usr/bin/expect < /.dogrc <&1) - end_time=$(date +%s.%N) - elapsed_time=$(echo "$end_time - $start_time" | bc) - - if echo "$output" | grep -q "SUCCESS"; then - echo "Bridged $AMOUNT ether to Chain $CHAIN_ID successfully." - dog --config /.dogrc metric post bridging.success $elapsed_time --tags="account_addr:$EMULATOR_ADDRESS,to_chain_id:$CHAIN_ID" - elif echo "$output" | grep -q "FAILURE"; then - echo "Failed to bridge $AMOUNT ether to Chain $CHAIN_ID." - dog --config /.dogrc metric post bridging.failure $elapsed_time --tags="account_addr:$EMULATOR_ADDRESS,to_chain_id:$CHAIN_ID" - elif echo "$output" | grep -q "EXPIRED"; then - echo "Failed to bridge $AMOUNT ether to Chain $CHAIN_ID, source transaction is stuck pending." - dog --config /.dogrc metric post bridging.expired $elapsed_time --tags="account_addr:$EMULATOR_ADDRESS,to_chain_id:$CHAIN_ID" - else - echo "Unknown bridge result: $output" - exit 1 - fi - echo "Elapsed time: $elapsed_time" - echo "Metric posted at: $(date)" -} - -while true; do - # Generate a random amount between 0 and 1,000,000,000,000 wei - RANDOM_AMOUNT=$(( RANDOM % 1000000000001 )) - - bridge_and_post_metric "bridge-to-mev-commit" $MEV_COMMIT_CHAIN_ID $RANDOM_AMOUNT - bridge_and_post_metric "bridge-to-l1" $SEPOLIA_CHAIN_ID $RANDOM_AMOUNT - sleep 10 -done diff --git a/bridge/standard/bridge-v1/go.mod b/bridge/standard/bridge-v1/go.mod index 0706b7bbe..d3fac2f70 100644 --- a/bridge/standard/bridge-v1/go.mod +++ b/bridge/standard/bridge-v1/go.mod @@ -7,16 +7,18 @@ require ( github.com/ethereum/go-ethereum v1.13.14 github.com/primev/mev-commit/contracts-abi v0.0.1 github.com/urfave/cli/v2 v2.27.1 - golang.org/x/crypto v0.23.0 + golang.org/x/crypto v0.25.0 ) require ( github.com/BurntSushi/toml v1.3.2 // indirect - github.com/DataDog/zstd v1.5.2 // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect @@ -26,27 +28,23 @@ require ( github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/go-sysconf v0.3.13 // indirect github.com/tklauser/numcpus v0.7.0 // indirect github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/tools v0.21.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/tools v0.23.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/bridge/standard/bridge-v1/go.sum b/bridge/standard/bridge-v1/go.sum index 6a3bd4be1..6d6469162 100644 --- a/bridge/standard/bridge-v1/go.sum +++ b/bridge/standard/bridge-v1/go.sum @@ -2,8 +2,8 @@ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8 github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/DataDog/datadog-api-client-go v1.16.0 h1:5jOZv1m98criCvYTa3qpW8Hzv301nbZX3K9yJtwGyWY= github.com/DataDog/datadog-api-client-go v1.16.0/go.mod h1:PgrP2ABuJWL3Auw2iEkemAJ/r72ghG4DQQmb5sgnKW4= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= @@ -20,16 +20,18 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOF github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= @@ -62,8 +64,8 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= +github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= @@ -73,13 +75,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -101,8 +98,8 @@ github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -115,8 +112,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= @@ -124,6 +121,8 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -134,14 +133,14 @@ github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQ github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -166,58 +165,29 @@ github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/contracts-abi/abi/BidderRegistry.abi b/contracts-abi/abi/BidderRegistry.abi index d3f05bedd..8c0702f76 100644 --- a/contracts-abi/abi/BidderRegistry.abi +++ b/contracts-abi/abi/BidderRegistry.abi @@ -173,20 +173,7 @@ }, { "type": "function", - "name": "feeRecipient", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "feeRecipientAmount", + "name": "getAccumulatedProtocolFee", "inputs": [], "outputs": [ { @@ -221,19 +208,6 @@ ], "stateMutability": "view" }, - { - "type": "function", - "name": "getFeeRecipientAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "getProviderAmount", @@ -258,7 +232,7 @@ "name": "initialize", "inputs": [ { - "name": "_feeRecipient", + "name": "_protocolFeeRecipient", "type": "address", "internalType": "address" }, @@ -281,6 +255,11 @@ "name": "_blocksPerWindow", "type": "uint256", "internalType": "uint256" + }, + { + "name": "_feePayoutPeriodBlocks", + "type": "uint256", + "internalType": "uint256" } ], "outputs": [], @@ -310,6 +289,13 @@ ], "stateMutability": "view" }, + { + "type": "function", + "name": "manuallyWithdrawProtocolFee", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "maxBidPerBlock", @@ -403,11 +389,26 @@ }, { "type": "function", - "name": "protocolFeeAmount", + "name": "protocolFeeTracker", "inputs": [], "outputs": [ { - "name": "", + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "accumulatedAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastPayoutBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "payoutPeriodBlocks", "type": "uint256", "internalType": "uint256" } @@ -481,6 +482,19 @@ "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "setNewFeePayoutPeriodBlocks", + "inputs": [ + { + "name": "newFeePayoutPeriodBlocks", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "setNewFeePercent", @@ -496,10 +510,10 @@ }, { "type": "function", - "name": "setNewFeeRecipient", + "name": "setNewProtocolFeeRecipient", "inputs": [ { - "name": "newFeeRecipient", + "name": "newProtocolFeeRecipient", "type": "address", "internalType": "address" } @@ -611,13 +625,6 @@ "outputs": [], "stateMutability": "nonpayable" }, - { - "type": "function", - "name": "withdrawFeeRecipientAmount", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, { "type": "function", "name": "withdrawFromWindows", @@ -631,19 +638,6 @@ "outputs": [], "stateMutability": "nonpayable" }, - { - "type": "function", - "name": "withdrawProtocolFee", - "inputs": [ - { - "name": "treasuryAddress", - "type": "address", - "internalType": "address payable" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, { "type": "function", "name": "withdrawProviderAmount", @@ -707,6 +701,38 @@ ], "anonymous": false }, + { + "type": "event", + "name": "FeePayoutPeriodBlocksUpdated", + "inputs": [ + { + "name": "newFeePayoutPeriodBlocks", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeTransfer", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, { "type": "event", "name": "FundsRetrieved", @@ -826,6 +852,19 @@ ], "anonymous": false }, + { + "type": "event", + "name": "ProtocolFeeRecipientUpdated", + "inputs": [ + { + "name": "newProtocolFeeRecipient", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, { "type": "event", "name": "Upgraded", diff --git a/contracts-abi/abi/PreConfCommitmentStore.abi b/contracts-abi/abi/PreConfCommitmentStore.abi index d3ec2ee46..f36ba4793 100644 --- a/contracts-abi/abi/PreConfCommitmentStore.abi +++ b/contracts-abi/abi/PreConfCommitmentStore.abi @@ -191,7 +191,7 @@ "internalType": "uint64" }, { - "name": "commiter", + "name": "committer", "type": "address", "internalType": "address" }, @@ -274,7 +274,7 @@ "internalType": "bool" }, { - "name": "commiter", + "name": "committer", "type": "address", "internalType": "address" }, @@ -387,7 +387,7 @@ "internalType": "uint64" }, { - "name": "commiter", + "name": "committer", "type": "address", "internalType": "address" }, @@ -476,7 +476,7 @@ "internalType": "uint64" }, { - "name": "commiter", + "name": "committer", "type": "address", "internalType": "address" }, @@ -554,7 +554,7 @@ "internalType": "bool" }, { - "name": "commiter", + "name": "committer", "type": "address", "internalType": "address" }, @@ -593,7 +593,7 @@ "internalType": "bool" }, { - "name": "commiter", + "name": "committer", "type": "address", "internalType": "address" }, @@ -717,7 +717,7 @@ "internalType": "address" }, { - "name": "_oracle", + "name": "_oracleContract", "type": "address", "internalType": "address" }, @@ -847,7 +847,7 @@ }, { "type": "function", - "name": "oracle", + "name": "oracleContract", "inputs": [], "outputs": [ { @@ -987,10 +987,10 @@ }, { "type": "function", - "name": "updateOracle", + "name": "updateOracleContract", "inputs": [ { - "name": "newOracle", + "name": "newOracleContract", "type": "address", "internalType": "address" } @@ -1152,7 +1152,7 @@ "internalType": "bytes32" }, { - "name": "commiterAddress", + "name": "committerAddress", "type": "address", "internalType": "address" } @@ -1176,7 +1176,7 @@ "internalType": "address" }, { - "name": "commiter", + "name": "committer", "type": "address", "indexed": false, "internalType": "address" @@ -1267,7 +1267,7 @@ "internalType": "bytes32" }, { - "name": "commiter", + "name": "committer", "type": "address", "indexed": false, "internalType": "address" diff --git a/contracts-abi/abi/ProviderRegistry.abi b/contracts-abi/abi/ProviderRegistry.abi index d9893b0c0..1a4fe5d76 100644 --- a/contracts-abi/abi/ProviderRegistry.abi +++ b/contracts-abi/abi/ProviderRegistry.abi @@ -58,51 +58,6 @@ "outputs": [], "stateMutability": "nonpayable" }, - { - "type": "function", - "name": "bidderAmount", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "checkStake", - "inputs": [ - { - "name": "provider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "depositFunds", - "inputs": [], - "outputs": [], - "stateMutability": "payable" - }, { "type": "function", "name": "eoaToBlsPubkey", @@ -137,33 +92,39 @@ }, { "type": "function", - "name": "feeRecipient", + "name": "getAccumulatedProtocolFee", "inputs": [], "outputs": [ { "name": "", - "type": "address", - "internalType": "address" + "type": "uint256", + "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", - "name": "feeRecipientAmount", - "inputs": [], + "name": "getBLSKey", + "inputs": [ + { + "name": "provider", + "type": "address", + "internalType": "address" + } + ], "outputs": [ { "name": "", - "type": "uint256", - "internalType": "uint256" + "type": "bytes", + "internalType": "bytes" } ], "stateMutability": "view" }, { "type": "function", - "name": "getBLSKey", + "name": "getProviderStake", "inputs": [ { "name": "provider", @@ -174,8 +135,8 @@ "outputs": [ { "name": "", - "type": "bytes", - "internalType": "bytes" + "type": "uint256", + "internalType": "uint256" } ], "stateMutability": "view" @@ -190,7 +151,7 @@ "internalType": "uint256" }, { - "name": "_feeRecipient", + "name": "_protocolFeeRecipient", "type": "address", "internalType": "address" }, @@ -203,11 +164,41 @@ "name": "_owner", "type": "address", "internalType": "address" + }, + { + "name": "_withdrawalDelay", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_protocolFeePayoutPeriodBlocks", + "type": "uint256", + "internalType": "uint256" } ], "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "isProviderValid", + "inputs": [ + { + "name": "provider", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "view" + }, + { + "type": "function", + "name": "manuallyWithdrawProtocolFee", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "minStake", @@ -260,6 +251,34 @@ ], "stateMutability": "view" }, + { + "type": "function", + "name": "protocolFeeTracker", + "inputs": [], + "outputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "accumulatedAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastPayoutBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "payoutPeriodBlocks", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "providerRegistered", @@ -331,6 +350,19 @@ "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "setFeePayoutPeriodBlocks", + "inputs": [ + { + "name": "_feePayoutPeriodBlocks", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "setNewFeePercent", @@ -346,7 +378,7 @@ }, { "type": "function", - "name": "setNewFeeRecipient", + "name": "setNewProtocolFeeRecipient", "inputs": [ { "name": "newFeeRecipient", @@ -370,6 +402,19 @@ "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "setWithdrawalDelay", + "inputs": [ + { + "name": "_withdrawalDelay", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "slash", @@ -398,6 +443,13 @@ "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "stake", + "inputs": [], + "outputs": [], + "stateMutability": "payable" + }, { "type": "function", "name": "transferOwnership", @@ -411,6 +463,13 @@ "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "unstake", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "upgradeToAndCall", @@ -431,36 +490,74 @@ }, { "type": "function", - "name": "withdrawBidderAmount", + "name": "withdraw", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawalDelay", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "withdrawalRequests", "inputs": [ { - "name": "bidder", + "name": "", "type": "address", "internalType": "address" } ], - "outputs": [], - "stateMutability": "nonpayable" + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" }, { - "type": "function", - "name": "withdrawFeeRecipientAmount", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" + "type": "event", + "name": "FeePayoutPeriodBlocksUpdated", + "inputs": [ + { + "name": "newFeePayoutPeriodBlocks", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false }, { - "type": "function", - "name": "withdrawStakedAmount", + "type": "event", + "name": "FeeTransfer", "inputs": [ { - "name": "provider", + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "recipient", "type": "address", - "internalType": "address payable" + "indexed": true, + "internalType": "address" } ], - "outputs": [], - "stateMutability": "nonpayable" + "anonymous": false }, { "type": "event", @@ -551,6 +648,19 @@ ], "anonymous": false }, + { + "type": "event", + "name": "ProtocolFeeRecipientUpdated", + "inputs": [ + { + "name": "newProtocolFeeRecipient", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, { "type": "event", "name": "ProviderRegistered", @@ -576,6 +686,25 @@ ], "anonymous": false }, + { + "type": "event", + "name": "Unstake", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "timestamp", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, { "type": "event", "name": "Upgraded", @@ -589,6 +718,38 @@ ], "anonymous": false }, + { + "type": "event", + "name": "Withdraw", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WithdrawalDelayUpdated", + "inputs": [ + { + "name": "newWithdrawalDelay", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, { "type": "error", "name": "AddressEmptyCode", diff --git a/contracts-abi/abi/ValidatorOptInRouter.abi b/contracts-abi/abi/ValidatorOptInRouter.abi new file mode 100644 index 000000000..3ccdb6c0f --- /dev/null +++ b/contracts-abi/abi/ValidatorOptInRouter.abi @@ -0,0 +1,398 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "UPGRADE_INTERFACE_VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "acceptOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "areValidatorsOptedIn", + "inputs": [ + { + "name": "valBLSPubKeys", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [ + { + "name": "", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "_validatorRegistry", + "type": "address", + "internalType": "address" + }, + { + "name": "_mevCommitAVS", + "type": "address", + "internalType": "address" + }, + { + "name": "_owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mevCommitAVS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IMevCommitAVS" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingOwner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proxiableUUID", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMevCommitAVS", + "inputs": [ + { + "name": "_mevCommitAVS", + "type": "address", + "internalType": "contract IMevCommitAVS" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setValidatorRegistryV1", + "inputs": [ + { + "name": "_validatorRegistry", + "type": "address", + "internalType": "contract IValidatorRegistryV1" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "validatorRegistryV1", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IValidatorRegistryV1" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MevCommitAVSSet", + "inputs": [ + { + "name": "oldContract", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newContract", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferStarted", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ValidatorRegistryV1Set", + "inputs": [ + { + "name": "oldContract", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newContract", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967InvalidImplementation", + "inputs": [ + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967NonPayable", + "inputs": [] + }, + { + "type": "error", + "name": "FailedInnerCall", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidFallback", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidReceive", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "OwnableInvalidOwner", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OwnableUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "UUPSUnauthorizedCallContext", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnsupportedProxiableUUID", + "inputs": [ + { + "name": "slot", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } +] diff --git a/contracts-abi/clients/BidderRegistry/BidderRegistry.go b/contracts-abi/clients/BidderRegistry/BidderRegistry.go index 5ec2d60a8..f0db31c69 100644 --- a/contracts-abi/clients/BidderRegistry/BidderRegistry.go +++ b/contracts-abi/clients/BidderRegistry/BidderRegistry.go @@ -31,7 +31,7 @@ var ( // BidderregistryMetaData contains all meta data concerning the Bidderregistry contract. var BidderregistryMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"PERCENT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PRECISION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bidPayment\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidAmt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumIBidderRegistry.State\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bidderRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blockTrackerContract\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBlockTracker\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blocksPerWindow\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositForWindow\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"depositForWindows\",\"inputs\":[{\"name\":\"windows\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"feePercent\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeRecipient\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeRecipientAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposit\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFeeRecipientAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProviderAmount\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_feeRecipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePercent\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_blockTracker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_blocksPerWindow\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lockedFunds\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxBidPerBlock\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"openBid\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"preConfirmationsContract\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"protocolFeeAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerAmount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"retrieveFunds\",\"inputs\":[{\"name\":\"windowToSettle\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePercent\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeeRecipient\",\"inputs\":[{\"name\":\"newFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPreconfirmationsContract\",\"inputs\":[{\"name\":\"contractAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unlockFunds\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"usedFunds\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawBidderAmountFromWindow\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawFeeRecipientAmount\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawFromWindows\",\"inputs\":[{\"name\":\"windows\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawProtocolFee\",\"inputs\":[{\"name\":\"treasuryAddress\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawProviderAmount\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"BidderRegistered\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"depositedAmount\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"windowNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BidderWithdrawal\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsRetrieved\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsRewarded\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"PERCENT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PRECISION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bidPayment\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidAmt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumIBidderRegistry.State\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bidderRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blockTrackerContract\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBlockTracker\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blocksPerWindow\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositForWindow\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"depositForWindows\",\"inputs\":[{\"name\":\"windows\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"feePercent\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedProtocolFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposit\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProviderAmount\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_protocolFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePercent\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_blockTracker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_blocksPerWindow\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_feePayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lockedFunds\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyWithdrawProtocolFee\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"maxBidPerBlock\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"openBid\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"preConfirmationsContract\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"protocolFeeTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerAmount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"retrieveFunds\",\"inputs\":[{\"name\":\"windowToSettle\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePayoutPeriodBlocks\",\"inputs\":[{\"name\":\"newFeePayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePercent\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewProtocolFeeRecipient\",\"inputs\":[{\"name\":\"newProtocolFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPreconfirmationsContract\",\"inputs\":[{\"name\":\"contractAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unlockFunds\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"usedFunds\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawBidderAmountFromWindow\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawFromWindows\",\"inputs\":[{\"name\":\"windows\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawProviderAmount\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"BidderRegistered\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"depositedAmount\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"windowNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BidderWithdrawal\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeePayoutPeriodBlocksUpdated\",\"inputs\":[{\"name\":\"newFeePayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsRetrieved\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsRewarded\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProtocolFeeRecipientUpdated\",\"inputs\":[{\"name\":\"newProtocolFeeRecipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", } // BidderregistryABI is the input ABI used to generate the binding from. @@ -447,43 +447,12 @@ func (_Bidderregistry *BidderregistryCallerSession) FeePercent() (uint16, error) return _Bidderregistry.Contract.FeePercent(&_Bidderregistry.CallOpts) } -// FeeRecipient is a free data retrieval call binding the contract method 0x46904840. +// GetAccumulatedProtocolFee is a free data retrieval call binding the contract method 0x2dde2218. // -// Solidity: function feeRecipient() view returns(address) -func (_Bidderregistry *BidderregistryCaller) FeeRecipient(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function getAccumulatedProtocolFee() view returns(uint256) +func (_Bidderregistry *BidderregistryCaller) GetAccumulatedProtocolFee(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _Bidderregistry.contract.Call(opts, &out, "feeRecipient") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// FeeRecipient is a free data retrieval call binding the contract method 0x46904840. -// -// Solidity: function feeRecipient() view returns(address) -func (_Bidderregistry *BidderregistrySession) FeeRecipient() (common.Address, error) { - return _Bidderregistry.Contract.FeeRecipient(&_Bidderregistry.CallOpts) -} - -// FeeRecipient is a free data retrieval call binding the contract method 0x46904840. -// -// Solidity: function feeRecipient() view returns(address) -func (_Bidderregistry *BidderregistryCallerSession) FeeRecipient() (common.Address, error) { - return _Bidderregistry.Contract.FeeRecipient(&_Bidderregistry.CallOpts) -} - -// FeeRecipientAmount is a free data retrieval call binding the contract method 0xe0ae4ebd. -// -// Solidity: function feeRecipientAmount() view returns(uint256) -func (_Bidderregistry *BidderregistryCaller) FeeRecipientAmount(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Bidderregistry.contract.Call(opts, &out, "feeRecipientAmount") + err := _Bidderregistry.contract.Call(opts, &out, "getAccumulatedProtocolFee") if err != nil { return *new(*big.Int), err @@ -495,18 +464,18 @@ func (_Bidderregistry *BidderregistryCaller) FeeRecipientAmount(opts *bind.CallO } -// FeeRecipientAmount is a free data retrieval call binding the contract method 0xe0ae4ebd. +// GetAccumulatedProtocolFee is a free data retrieval call binding the contract method 0x2dde2218. // -// Solidity: function feeRecipientAmount() view returns(uint256) -func (_Bidderregistry *BidderregistrySession) FeeRecipientAmount() (*big.Int, error) { - return _Bidderregistry.Contract.FeeRecipientAmount(&_Bidderregistry.CallOpts) +// Solidity: function getAccumulatedProtocolFee() view returns(uint256) +func (_Bidderregistry *BidderregistrySession) GetAccumulatedProtocolFee() (*big.Int, error) { + return _Bidderregistry.Contract.GetAccumulatedProtocolFee(&_Bidderregistry.CallOpts) } -// FeeRecipientAmount is a free data retrieval call binding the contract method 0xe0ae4ebd. +// GetAccumulatedProtocolFee is a free data retrieval call binding the contract method 0x2dde2218. // -// Solidity: function feeRecipientAmount() view returns(uint256) -func (_Bidderregistry *BidderregistryCallerSession) FeeRecipientAmount() (*big.Int, error) { - return _Bidderregistry.Contract.FeeRecipientAmount(&_Bidderregistry.CallOpts) +// Solidity: function getAccumulatedProtocolFee() view returns(uint256) +func (_Bidderregistry *BidderregistryCallerSession) GetAccumulatedProtocolFee() (*big.Int, error) { + return _Bidderregistry.Contract.GetAccumulatedProtocolFee(&_Bidderregistry.CallOpts) } // GetDeposit is a free data retrieval call binding the contract method 0x2726b506. @@ -540,37 +509,6 @@ func (_Bidderregistry *BidderregistryCallerSession) GetDeposit(bidder common.Add return _Bidderregistry.Contract.GetDeposit(&_Bidderregistry.CallOpts, bidder, window) } -// GetFeeRecipientAmount is a free data retrieval call binding the contract method 0xc286f373. -// -// Solidity: function getFeeRecipientAmount() view returns(uint256) -func (_Bidderregistry *BidderregistryCaller) GetFeeRecipientAmount(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Bidderregistry.contract.Call(opts, &out, "getFeeRecipientAmount") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetFeeRecipientAmount is a free data retrieval call binding the contract method 0xc286f373. -// -// Solidity: function getFeeRecipientAmount() view returns(uint256) -func (_Bidderregistry *BidderregistrySession) GetFeeRecipientAmount() (*big.Int, error) { - return _Bidderregistry.Contract.GetFeeRecipientAmount(&_Bidderregistry.CallOpts) -} - -// GetFeeRecipientAmount is a free data retrieval call binding the contract method 0xc286f373. -// -// Solidity: function getFeeRecipientAmount() view returns(uint256) -func (_Bidderregistry *BidderregistryCallerSession) GetFeeRecipientAmount() (*big.Int, error) { - return _Bidderregistry.Contract.GetFeeRecipientAmount(&_Bidderregistry.CallOpts) -} - // GetProviderAmount is a free data retrieval call binding the contract method 0x0ebe2555. // // Solidity: function getProviderAmount(address provider) view returns(uint256) @@ -757,35 +695,59 @@ func (_Bidderregistry *BidderregistryCallerSession) PreConfirmationsContract() ( return _Bidderregistry.Contract.PreConfirmationsContract(&_Bidderregistry.CallOpts) } -// ProtocolFeeAmount is a free data retrieval call binding the contract method 0x8ec9c93b. +// ProtocolFeeTracker is a free data retrieval call binding the contract method 0x291af92c. // -// Solidity: function protocolFeeAmount() view returns(uint256) -func (_Bidderregistry *BidderregistryCaller) ProtocolFeeAmount(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +func (_Bidderregistry *BidderregistryCaller) ProtocolFeeTracker(opts *bind.CallOpts) (struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int +}, error) { var out []interface{} - err := _Bidderregistry.contract.Call(opts, &out, "protocolFeeAmount") + err := _Bidderregistry.contract.Call(opts, &out, "protocolFeeTracker") + outstruct := new(struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int + }) if err != nil { - return *new(*big.Int), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.AccumulatedAmount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.LastPayoutBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.PayoutPeriodBlocks = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - return out0, err + return *outstruct, err } -// ProtocolFeeAmount is a free data retrieval call binding the contract method 0x8ec9c93b. +// ProtocolFeeTracker is a free data retrieval call binding the contract method 0x291af92c. // -// Solidity: function protocolFeeAmount() view returns(uint256) -func (_Bidderregistry *BidderregistrySession) ProtocolFeeAmount() (*big.Int, error) { - return _Bidderregistry.Contract.ProtocolFeeAmount(&_Bidderregistry.CallOpts) +// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +func (_Bidderregistry *BidderregistrySession) ProtocolFeeTracker() (struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int +}, error) { + return _Bidderregistry.Contract.ProtocolFeeTracker(&_Bidderregistry.CallOpts) } -// ProtocolFeeAmount is a free data retrieval call binding the contract method 0x8ec9c93b. +// ProtocolFeeTracker is a free data retrieval call binding the contract method 0x291af92c. // -// Solidity: function protocolFeeAmount() view returns(uint256) -func (_Bidderregistry *BidderregistryCallerSession) ProtocolFeeAmount() (*big.Int, error) { - return _Bidderregistry.Contract.ProtocolFeeAmount(&_Bidderregistry.CallOpts) +// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +func (_Bidderregistry *BidderregistryCallerSession) ProtocolFeeTracker() (struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int +}, error) { + return _Bidderregistry.Contract.ProtocolFeeTracker(&_Bidderregistry.CallOpts) } // ProviderAmount is a free data retrieval call binding the contract method 0x180d02cb. @@ -944,25 +906,46 @@ func (_Bidderregistry *BidderregistryTransactorSession) DepositForWindows(window return _Bidderregistry.Contract.DepositForWindows(&_Bidderregistry.TransactOpts, windows) } -// Initialize is a paid mutator transaction binding the contract method 0x987cb9ae. +// Initialize is a paid mutator transaction binding the contract method 0x83efe8aa. +// +// Solidity: function initialize(address _protocolFeeRecipient, uint16 _feePercent, address _owner, address _blockTracker, uint256 _blocksPerWindow, uint256 _feePayoutPeriodBlocks) returns() +func (_Bidderregistry *BidderregistryTransactor) Initialize(opts *bind.TransactOpts, _protocolFeeRecipient common.Address, _feePercent uint16, _owner common.Address, _blockTracker common.Address, _blocksPerWindow *big.Int, _feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Bidderregistry.contract.Transact(opts, "initialize", _protocolFeeRecipient, _feePercent, _owner, _blockTracker, _blocksPerWindow, _feePayoutPeriodBlocks) +} + +// Initialize is a paid mutator transaction binding the contract method 0x83efe8aa. +// +// Solidity: function initialize(address _protocolFeeRecipient, uint16 _feePercent, address _owner, address _blockTracker, uint256 _blocksPerWindow, uint256 _feePayoutPeriodBlocks) returns() +func (_Bidderregistry *BidderregistrySession) Initialize(_protocolFeeRecipient common.Address, _feePercent uint16, _owner common.Address, _blockTracker common.Address, _blocksPerWindow *big.Int, _feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Bidderregistry.Contract.Initialize(&_Bidderregistry.TransactOpts, _protocolFeeRecipient, _feePercent, _owner, _blockTracker, _blocksPerWindow, _feePayoutPeriodBlocks) +} + +// Initialize is a paid mutator transaction binding the contract method 0x83efe8aa. // -// Solidity: function initialize(address _feeRecipient, uint16 _feePercent, address _owner, address _blockTracker, uint256 _blocksPerWindow) returns() -func (_Bidderregistry *BidderregistryTransactor) Initialize(opts *bind.TransactOpts, _feeRecipient common.Address, _feePercent uint16, _owner common.Address, _blockTracker common.Address, _blocksPerWindow *big.Int) (*types.Transaction, error) { - return _Bidderregistry.contract.Transact(opts, "initialize", _feeRecipient, _feePercent, _owner, _blockTracker, _blocksPerWindow) +// Solidity: function initialize(address _protocolFeeRecipient, uint16 _feePercent, address _owner, address _blockTracker, uint256 _blocksPerWindow, uint256 _feePayoutPeriodBlocks) returns() +func (_Bidderregistry *BidderregistryTransactorSession) Initialize(_protocolFeeRecipient common.Address, _feePercent uint16, _owner common.Address, _blockTracker common.Address, _blocksPerWindow *big.Int, _feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Bidderregistry.Contract.Initialize(&_Bidderregistry.TransactOpts, _protocolFeeRecipient, _feePercent, _owner, _blockTracker, _blocksPerWindow, _feePayoutPeriodBlocks) } -// Initialize is a paid mutator transaction binding the contract method 0x987cb9ae. +// ManuallyWithdrawProtocolFee is a paid mutator transaction binding the contract method 0xdbf63530. // -// Solidity: function initialize(address _feeRecipient, uint16 _feePercent, address _owner, address _blockTracker, uint256 _blocksPerWindow) returns() -func (_Bidderregistry *BidderregistrySession) Initialize(_feeRecipient common.Address, _feePercent uint16, _owner common.Address, _blockTracker common.Address, _blocksPerWindow *big.Int) (*types.Transaction, error) { - return _Bidderregistry.Contract.Initialize(&_Bidderregistry.TransactOpts, _feeRecipient, _feePercent, _owner, _blockTracker, _blocksPerWindow) +// Solidity: function manuallyWithdrawProtocolFee() returns() +func (_Bidderregistry *BidderregistryTransactor) ManuallyWithdrawProtocolFee(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Bidderregistry.contract.Transact(opts, "manuallyWithdrawProtocolFee") } -// Initialize is a paid mutator transaction binding the contract method 0x987cb9ae. +// ManuallyWithdrawProtocolFee is a paid mutator transaction binding the contract method 0xdbf63530. // -// Solidity: function initialize(address _feeRecipient, uint16 _feePercent, address _owner, address _blockTracker, uint256 _blocksPerWindow) returns() -func (_Bidderregistry *BidderregistryTransactorSession) Initialize(_feeRecipient common.Address, _feePercent uint16, _owner common.Address, _blockTracker common.Address, _blocksPerWindow *big.Int) (*types.Transaction, error) { - return _Bidderregistry.Contract.Initialize(&_Bidderregistry.TransactOpts, _feeRecipient, _feePercent, _owner, _blockTracker, _blocksPerWindow) +// Solidity: function manuallyWithdrawProtocolFee() returns() +func (_Bidderregistry *BidderregistrySession) ManuallyWithdrawProtocolFee() (*types.Transaction, error) { + return _Bidderregistry.Contract.ManuallyWithdrawProtocolFee(&_Bidderregistry.TransactOpts) +} + +// ManuallyWithdrawProtocolFee is a paid mutator transaction binding the contract method 0xdbf63530. +// +// Solidity: function manuallyWithdrawProtocolFee() returns() +func (_Bidderregistry *BidderregistryTransactorSession) ManuallyWithdrawProtocolFee() (*types.Transaction, error) { + return _Bidderregistry.Contract.ManuallyWithdrawProtocolFee(&_Bidderregistry.TransactOpts) } // OpenBid is a paid mutator transaction binding the contract method 0x2a241d75. @@ -1028,6 +1011,27 @@ func (_Bidderregistry *BidderregistryTransactorSession) RetrieveFunds(windowToSe return _Bidderregistry.Contract.RetrieveFunds(&_Bidderregistry.TransactOpts, windowToSettle, commitmentDigest, provider, residualBidPercentAfterDecay) } +// SetNewFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xe29136c0. +// +// Solidity: function setNewFeePayoutPeriodBlocks(uint256 newFeePayoutPeriodBlocks) returns() +func (_Bidderregistry *BidderregistryTransactor) SetNewFeePayoutPeriodBlocks(opts *bind.TransactOpts, newFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Bidderregistry.contract.Transact(opts, "setNewFeePayoutPeriodBlocks", newFeePayoutPeriodBlocks) +} + +// SetNewFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xe29136c0. +// +// Solidity: function setNewFeePayoutPeriodBlocks(uint256 newFeePayoutPeriodBlocks) returns() +func (_Bidderregistry *BidderregistrySession) SetNewFeePayoutPeriodBlocks(newFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Bidderregistry.Contract.SetNewFeePayoutPeriodBlocks(&_Bidderregistry.TransactOpts, newFeePayoutPeriodBlocks) +} + +// SetNewFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xe29136c0. +// +// Solidity: function setNewFeePayoutPeriodBlocks(uint256 newFeePayoutPeriodBlocks) returns() +func (_Bidderregistry *BidderregistryTransactorSession) SetNewFeePayoutPeriodBlocks(newFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Bidderregistry.Contract.SetNewFeePayoutPeriodBlocks(&_Bidderregistry.TransactOpts, newFeePayoutPeriodBlocks) +} + // SetNewFeePercent is a paid mutator transaction binding the contract method 0xfb22febf. // // Solidity: function setNewFeePercent(uint16 newFeePercent) returns() @@ -1049,25 +1053,25 @@ func (_Bidderregistry *BidderregistryTransactorSession) SetNewFeePercent(newFeeP return _Bidderregistry.Contract.SetNewFeePercent(&_Bidderregistry.TransactOpts, newFeePercent) } -// SetNewFeeRecipient is a paid mutator transaction binding the contract method 0xa26652ea. +// SetNewProtocolFeeRecipient is a paid mutator transaction binding the contract method 0x184ac28e. // -// Solidity: function setNewFeeRecipient(address newFeeRecipient) returns() -func (_Bidderregistry *BidderregistryTransactor) SetNewFeeRecipient(opts *bind.TransactOpts, newFeeRecipient common.Address) (*types.Transaction, error) { - return _Bidderregistry.contract.Transact(opts, "setNewFeeRecipient", newFeeRecipient) +// Solidity: function setNewProtocolFeeRecipient(address newProtocolFeeRecipient) returns() +func (_Bidderregistry *BidderregistryTransactor) SetNewProtocolFeeRecipient(opts *bind.TransactOpts, newProtocolFeeRecipient common.Address) (*types.Transaction, error) { + return _Bidderregistry.contract.Transact(opts, "setNewProtocolFeeRecipient", newProtocolFeeRecipient) } -// SetNewFeeRecipient is a paid mutator transaction binding the contract method 0xa26652ea. +// SetNewProtocolFeeRecipient is a paid mutator transaction binding the contract method 0x184ac28e. // -// Solidity: function setNewFeeRecipient(address newFeeRecipient) returns() -func (_Bidderregistry *BidderregistrySession) SetNewFeeRecipient(newFeeRecipient common.Address) (*types.Transaction, error) { - return _Bidderregistry.Contract.SetNewFeeRecipient(&_Bidderregistry.TransactOpts, newFeeRecipient) +// Solidity: function setNewProtocolFeeRecipient(address newProtocolFeeRecipient) returns() +func (_Bidderregistry *BidderregistrySession) SetNewProtocolFeeRecipient(newProtocolFeeRecipient common.Address) (*types.Transaction, error) { + return _Bidderregistry.Contract.SetNewProtocolFeeRecipient(&_Bidderregistry.TransactOpts, newProtocolFeeRecipient) } -// SetNewFeeRecipient is a paid mutator transaction binding the contract method 0xa26652ea. +// SetNewProtocolFeeRecipient is a paid mutator transaction binding the contract method 0x184ac28e. // -// Solidity: function setNewFeeRecipient(address newFeeRecipient) returns() -func (_Bidderregistry *BidderregistryTransactorSession) SetNewFeeRecipient(newFeeRecipient common.Address) (*types.Transaction, error) { - return _Bidderregistry.Contract.SetNewFeeRecipient(&_Bidderregistry.TransactOpts, newFeeRecipient) +// Solidity: function setNewProtocolFeeRecipient(address newProtocolFeeRecipient) returns() +func (_Bidderregistry *BidderregistryTransactorSession) SetNewProtocolFeeRecipient(newProtocolFeeRecipient common.Address) (*types.Transaction, error) { + return _Bidderregistry.Contract.SetNewProtocolFeeRecipient(&_Bidderregistry.TransactOpts, newProtocolFeeRecipient) } // SetPreconfirmationsContract is a paid mutator transaction binding the contract method 0xf6c7e476. @@ -1175,27 +1179,6 @@ func (_Bidderregistry *BidderregistryTransactorSession) WithdrawBidderAmountFrom return _Bidderregistry.Contract.WithdrawBidderAmountFromWindow(&_Bidderregistry.TransactOpts, bidder, window) } -// WithdrawFeeRecipientAmount is a paid mutator transaction binding the contract method 0x7e5713d8. -// -// Solidity: function withdrawFeeRecipientAmount() returns() -func (_Bidderregistry *BidderregistryTransactor) WithdrawFeeRecipientAmount(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Bidderregistry.contract.Transact(opts, "withdrawFeeRecipientAmount") -} - -// WithdrawFeeRecipientAmount is a paid mutator transaction binding the contract method 0x7e5713d8. -// -// Solidity: function withdrawFeeRecipientAmount() returns() -func (_Bidderregistry *BidderregistrySession) WithdrawFeeRecipientAmount() (*types.Transaction, error) { - return _Bidderregistry.Contract.WithdrawFeeRecipientAmount(&_Bidderregistry.TransactOpts) -} - -// WithdrawFeeRecipientAmount is a paid mutator transaction binding the contract method 0x7e5713d8. -// -// Solidity: function withdrawFeeRecipientAmount() returns() -func (_Bidderregistry *BidderregistryTransactorSession) WithdrawFeeRecipientAmount() (*types.Transaction, error) { - return _Bidderregistry.Contract.WithdrawFeeRecipientAmount(&_Bidderregistry.TransactOpts) -} - // WithdrawFromWindows is a paid mutator transaction binding the contract method 0x6745206a. // // Solidity: function withdrawFromWindows(uint256[] windows) returns() @@ -1217,27 +1200,6 @@ func (_Bidderregistry *BidderregistryTransactorSession) WithdrawFromWindows(wind return _Bidderregistry.Contract.WithdrawFromWindows(&_Bidderregistry.TransactOpts, windows) } -// WithdrawProtocolFee is a paid mutator transaction binding the contract method 0x668fb6dc. -// -// Solidity: function withdrawProtocolFee(address treasuryAddress) returns() -func (_Bidderregistry *BidderregistryTransactor) WithdrawProtocolFee(opts *bind.TransactOpts, treasuryAddress common.Address) (*types.Transaction, error) { - return _Bidderregistry.contract.Transact(opts, "withdrawProtocolFee", treasuryAddress) -} - -// WithdrawProtocolFee is a paid mutator transaction binding the contract method 0x668fb6dc. -// -// Solidity: function withdrawProtocolFee(address treasuryAddress) returns() -func (_Bidderregistry *BidderregistrySession) WithdrawProtocolFee(treasuryAddress common.Address) (*types.Transaction, error) { - return _Bidderregistry.Contract.WithdrawProtocolFee(&_Bidderregistry.TransactOpts, treasuryAddress) -} - -// WithdrawProtocolFee is a paid mutator transaction binding the contract method 0x668fb6dc. -// -// Solidity: function withdrawProtocolFee(address treasuryAddress) returns() -func (_Bidderregistry *BidderregistryTransactorSession) WithdrawProtocolFee(treasuryAddress common.Address) (*types.Transaction, error) { - return _Bidderregistry.Contract.WithdrawProtocolFee(&_Bidderregistry.TransactOpts, treasuryAddress) -} - // WithdrawProviderAmount is a paid mutator transaction binding the contract method 0x9a2dd5ba. // // Solidity: function withdrawProviderAmount(address provider) returns() @@ -1625,6 +1587,295 @@ func (_Bidderregistry *BidderregistryFilterer) ParseBidderWithdrawal(log types.L return event, nil } +// BidderregistryFeePayoutPeriodBlocksUpdatedIterator is returned from FilterFeePayoutPeriodBlocksUpdated and is used to iterate over the raw logs and unpacked data for FeePayoutPeriodBlocksUpdated events raised by the Bidderregistry contract. +type BidderregistryFeePayoutPeriodBlocksUpdatedIterator struct { + Event *BidderregistryFeePayoutPeriodBlocksUpdated // 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 *BidderregistryFeePayoutPeriodBlocksUpdatedIterator) 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(BidderregistryFeePayoutPeriodBlocksUpdated) + 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(BidderregistryFeePayoutPeriodBlocksUpdated) + 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 *BidderregistryFeePayoutPeriodBlocksUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BidderregistryFeePayoutPeriodBlocksUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BidderregistryFeePayoutPeriodBlocksUpdated represents a FeePayoutPeriodBlocksUpdated event raised by the Bidderregistry contract. +type BidderregistryFeePayoutPeriodBlocksUpdated struct { + NewFeePayoutPeriodBlocks *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeePayoutPeriodBlocksUpdated is a free log retrieval operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. +// +// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) +func (_Bidderregistry *BidderregistryFilterer) FilterFeePayoutPeriodBlocksUpdated(opts *bind.FilterOpts, newFeePayoutPeriodBlocks []*big.Int) (*BidderregistryFeePayoutPeriodBlocksUpdatedIterator, error) { + + var newFeePayoutPeriodBlocksRule []interface{} + for _, newFeePayoutPeriodBlocksItem := range newFeePayoutPeriodBlocks { + newFeePayoutPeriodBlocksRule = append(newFeePayoutPeriodBlocksRule, newFeePayoutPeriodBlocksItem) + } + + logs, sub, err := _Bidderregistry.contract.FilterLogs(opts, "FeePayoutPeriodBlocksUpdated", newFeePayoutPeriodBlocksRule) + if err != nil { + return nil, err + } + return &BidderregistryFeePayoutPeriodBlocksUpdatedIterator{contract: _Bidderregistry.contract, event: "FeePayoutPeriodBlocksUpdated", logs: logs, sub: sub}, nil +} + +// WatchFeePayoutPeriodBlocksUpdated is a free log subscription operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. +// +// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) +func (_Bidderregistry *BidderregistryFilterer) WatchFeePayoutPeriodBlocksUpdated(opts *bind.WatchOpts, sink chan<- *BidderregistryFeePayoutPeriodBlocksUpdated, newFeePayoutPeriodBlocks []*big.Int) (event.Subscription, error) { + + var newFeePayoutPeriodBlocksRule []interface{} + for _, newFeePayoutPeriodBlocksItem := range newFeePayoutPeriodBlocks { + newFeePayoutPeriodBlocksRule = append(newFeePayoutPeriodBlocksRule, newFeePayoutPeriodBlocksItem) + } + + logs, sub, err := _Bidderregistry.contract.WatchLogs(opts, "FeePayoutPeriodBlocksUpdated", newFeePayoutPeriodBlocksRule) + 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(BidderregistryFeePayoutPeriodBlocksUpdated) + if err := _Bidderregistry.contract.UnpackLog(event, "FeePayoutPeriodBlocksUpdated", 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 +} + +// ParseFeePayoutPeriodBlocksUpdated is a log parse operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. +// +// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) +func (_Bidderregistry *BidderregistryFilterer) ParseFeePayoutPeriodBlocksUpdated(log types.Log) (*BidderregistryFeePayoutPeriodBlocksUpdated, error) { + event := new(BidderregistryFeePayoutPeriodBlocksUpdated) + if err := _Bidderregistry.contract.UnpackLog(event, "FeePayoutPeriodBlocksUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BidderregistryFeeTransferIterator is returned from FilterFeeTransfer and is used to iterate over the raw logs and unpacked data for FeeTransfer events raised by the Bidderregistry contract. +type BidderregistryFeeTransferIterator struct { + Event *BidderregistryFeeTransfer // 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 *BidderregistryFeeTransferIterator) 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(BidderregistryFeeTransfer) + 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(BidderregistryFeeTransfer) + 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 *BidderregistryFeeTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BidderregistryFeeTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BidderregistryFeeTransfer represents a FeeTransfer event raised by the Bidderregistry contract. +type BidderregistryFeeTransfer struct { + Amount *big.Int + Recipient common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeTransfer is a free log retrieval operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. +// +// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) +func (_Bidderregistry *BidderregistryFilterer) FilterFeeTransfer(opts *bind.FilterOpts, recipient []common.Address) (*BidderregistryFeeTransferIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _Bidderregistry.contract.FilterLogs(opts, "FeeTransfer", recipientRule) + if err != nil { + return nil, err + } + return &BidderregistryFeeTransferIterator{contract: _Bidderregistry.contract, event: "FeeTransfer", logs: logs, sub: sub}, nil +} + +// WatchFeeTransfer is a free log subscription operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. +// +// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) +func (_Bidderregistry *BidderregistryFilterer) WatchFeeTransfer(opts *bind.WatchOpts, sink chan<- *BidderregistryFeeTransfer, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _Bidderregistry.contract.WatchLogs(opts, "FeeTransfer", recipientRule) + 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(BidderregistryFeeTransfer) + if err := _Bidderregistry.contract.UnpackLog(event, "FeeTransfer", 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 +} + +// ParseFeeTransfer is a log parse operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. +// +// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) +func (_Bidderregistry *BidderregistryFilterer) ParseFeeTransfer(log types.Log) (*BidderregistryFeeTransfer, error) { + event := new(BidderregistryFeeTransfer) + if err := _Bidderregistry.contract.UnpackLog(event, "FeeTransfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // BidderregistryFundsRetrievedIterator is returned from FilterFundsRetrieved and is used to iterate over the raw logs and unpacked data for FundsRetrieved events raised by the Bidderregistry contract. type BidderregistryFundsRetrievedIterator struct { Event *BidderregistryFundsRetrieved // Event containing the contract specifics and raw log @@ -2392,6 +2643,150 @@ func (_Bidderregistry *BidderregistryFilterer) ParseOwnershipTransferred(log typ return event, nil } +// BidderregistryProtocolFeeRecipientUpdatedIterator is returned from FilterProtocolFeeRecipientUpdated and is used to iterate over the raw logs and unpacked data for ProtocolFeeRecipientUpdated events raised by the Bidderregistry contract. +type BidderregistryProtocolFeeRecipientUpdatedIterator struct { + Event *BidderregistryProtocolFeeRecipientUpdated // 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 *BidderregistryProtocolFeeRecipientUpdatedIterator) 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(BidderregistryProtocolFeeRecipientUpdated) + 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(BidderregistryProtocolFeeRecipientUpdated) + 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 *BidderregistryProtocolFeeRecipientUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BidderregistryProtocolFeeRecipientUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BidderregistryProtocolFeeRecipientUpdated represents a ProtocolFeeRecipientUpdated event raised by the Bidderregistry contract. +type BidderregistryProtocolFeeRecipientUpdated struct { + NewProtocolFeeRecipient common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProtocolFeeRecipientUpdated is a free log retrieval operation binding the contract event 0xc1b5345cce283376356748dc57f2dfa7120431d016fc7ca9ba641bc65f91411d. +// +// Solidity: event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient) +func (_Bidderregistry *BidderregistryFilterer) FilterProtocolFeeRecipientUpdated(opts *bind.FilterOpts, newProtocolFeeRecipient []common.Address) (*BidderregistryProtocolFeeRecipientUpdatedIterator, error) { + + var newProtocolFeeRecipientRule []interface{} + for _, newProtocolFeeRecipientItem := range newProtocolFeeRecipient { + newProtocolFeeRecipientRule = append(newProtocolFeeRecipientRule, newProtocolFeeRecipientItem) + } + + logs, sub, err := _Bidderregistry.contract.FilterLogs(opts, "ProtocolFeeRecipientUpdated", newProtocolFeeRecipientRule) + if err != nil { + return nil, err + } + return &BidderregistryProtocolFeeRecipientUpdatedIterator{contract: _Bidderregistry.contract, event: "ProtocolFeeRecipientUpdated", logs: logs, sub: sub}, nil +} + +// WatchProtocolFeeRecipientUpdated is a free log subscription operation binding the contract event 0xc1b5345cce283376356748dc57f2dfa7120431d016fc7ca9ba641bc65f91411d. +// +// Solidity: event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient) +func (_Bidderregistry *BidderregistryFilterer) WatchProtocolFeeRecipientUpdated(opts *bind.WatchOpts, sink chan<- *BidderregistryProtocolFeeRecipientUpdated, newProtocolFeeRecipient []common.Address) (event.Subscription, error) { + + var newProtocolFeeRecipientRule []interface{} + for _, newProtocolFeeRecipientItem := range newProtocolFeeRecipient { + newProtocolFeeRecipientRule = append(newProtocolFeeRecipientRule, newProtocolFeeRecipientItem) + } + + logs, sub, err := _Bidderregistry.contract.WatchLogs(opts, "ProtocolFeeRecipientUpdated", newProtocolFeeRecipientRule) + 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(BidderregistryProtocolFeeRecipientUpdated) + if err := _Bidderregistry.contract.UnpackLog(event, "ProtocolFeeRecipientUpdated", 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 +} + +// ParseProtocolFeeRecipientUpdated is a log parse operation binding the contract event 0xc1b5345cce283376356748dc57f2dfa7120431d016fc7ca9ba641bc65f91411d. +// +// Solidity: event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient) +func (_Bidderregistry *BidderregistryFilterer) ParseProtocolFeeRecipientUpdated(log types.Log) (*BidderregistryProtocolFeeRecipientUpdated, error) { + event := new(BidderregistryProtocolFeeRecipientUpdated) + if err := _Bidderregistry.contract.UnpackLog(event, "ProtocolFeeRecipientUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // BidderregistryUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Bidderregistry contract. type BidderregistryUpgradedIterator struct { Event *BidderregistryUpgraded // Event containing the contract specifics and raw log diff --git a/contracts-abi/clients/PreConfCommitmentStore/PreConfCommitmentStore.go b/contracts-abi/clients/PreConfCommitmentStore/PreConfCommitmentStore.go index f5bded759..4549e4399 100644 --- a/contracts-abi/clients/PreConfCommitmentStore/PreConfCommitmentStore.go +++ b/contracts-abi/clients/PreConfCommitmentStore/PreConfCommitmentStore.go @@ -46,7 +46,7 @@ type IPreConfCommitmentStoreCommitmentParams struct { // IPreConfCommitmentStoreEncrPreConfCommitment is an auto generated low-level Go binding around an user-defined struct. type IPreConfCommitmentStoreEncrPreConfCommitment struct { IsUsed bool - Commiter common.Address + Committer common.Address DispatchTimestamp uint64 CommitmentDigest [32]byte CommitmentSignature []byte @@ -60,7 +60,7 @@ type IPreConfCommitmentStorePreConfCommitment struct { DecayStartTimeStamp uint64 DecayEndTimeStamp uint64 DispatchTimestamp uint64 - Commiter common.Address + Committer common.Address Bid *big.Int BidHash [32]byte CommitmentHash [32]byte @@ -73,7 +73,7 @@ type IPreConfCommitmentStorePreConfCommitment struct { // PreconfcommitmentstoreMetaData contains all meta data concerning the Preconfcommitmentstore contract. var PreconfcommitmentstoreMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR_BID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR_PRECONF\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"EIP712_BID_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"EIP712_COMMITMENT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"HEXCHARS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bidderRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBidderRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blockTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBlockTracker\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blocksPerWindow\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"commitmentDispatchWindow\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"commitments\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"commiter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"commitmentsCount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"encryptedCommitments\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"commiter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBidHash\",\"inputs\":[{\"name\":\"_txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getCommitment\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.PreConfCommitment\",\"components\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"commiter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCommitmentIndex\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.PreConfCommitment\",\"components\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"commiter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getEncryptedCommitment\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.EncrPreConfCommitment\",\"components\":[{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"commiter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getEncryptedCommitmentIndex\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.EncrPreConfCommitment\",\"components\":[{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"commiter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getPreConfHash\",\"inputs\":[{\"name\":\"_txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_bidSignature\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_sharedSecretKey\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getTxnHashFromCommitment\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_providerRegistry\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_bidderRegistry\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_oracle\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_blockTracker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_commitmentDispatchWindow\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_blocksPerWindow\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initiateReward\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initiateSlash\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"openCommitment\",\"inputs\":[{\"name\":\"encryptedCommitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"oracle\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIProviderRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"storeEncryptedCommitment\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateBidderRegistry\",\"inputs\":[{\"name\":\"newBidderRegistry\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateCommitmentDispatchWindow\",\"inputs\":[{\"name\":\"newDispatchWindow\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOracle\",\"inputs\":[{\"name\":\"newOracle\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateProviderRegistry\",\"inputs\":[{\"name\":\"newProviderRegistry\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyBid\",\"inputs\":[{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"messageDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"recoveredAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"verifyPreConfCommitment\",\"inputs\":[{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.CommitmentParams\",\"components\":[{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"preConfHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commiterAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"pure\"},{\"type\":\"event\",\"name\":\"CommitmentStored\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"commiter\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"bid\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"txnHash\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"commitmentHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EncryptedCommitmentStored\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"commiter\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SignatureVerified\",\"inputs\":[{\"name\":\"signer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"txnHash\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"bid\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR_BID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR_PRECONF\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"EIP712_BID_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"EIP712_COMMITMENT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"HEXCHARS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bidderRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBidderRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blockTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBlockTracker\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blocksPerWindow\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"commitmentDispatchWindow\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"commitments\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"committer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"commitmentsCount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"encryptedCommitments\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"committer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBidHash\",\"inputs\":[{\"name\":\"_txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getCommitment\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.PreConfCommitment\",\"components\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"committer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCommitmentIndex\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.PreConfCommitment\",\"components\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"committer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getEncryptedCommitment\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.EncrPreConfCommitment\",\"components\":[{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"committer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getEncryptedCommitmentIndex\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.EncrPreConfCommitment\",\"components\":[{\"name\":\"isUsed\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"committer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getPreConfHash\",\"inputs\":[{\"name\":\"_txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_bidSignature\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_sharedSecretKey\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getTxnHashFromCommitment\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_providerRegistry\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_bidderRegistry\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_oracleContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_blockTracker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_commitmentDispatchWindow\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"_blocksPerWindow\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initiateReward\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initiateSlash\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"openCommitment\",\"inputs\":[{\"name\":\"encryptedCommitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"oracleContract\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIProviderRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"storeEncryptedCommitment\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateBidderRegistry\",\"inputs\":[{\"name\":\"newBidderRegistry\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateCommitmentDispatchWindow\",\"inputs\":[{\"name\":\"newDispatchWindow\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOracleContract\",\"inputs\":[{\"name\":\"newOracleContract\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateProviderRegistry\",\"inputs\":[{\"name\":\"newProviderRegistry\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyBid\",\"inputs\":[{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"messageDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"recoveredAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"verifyPreConfCommitment\",\"inputs\":[{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIPreConfCommitmentStore.CommitmentParams\",\"components\":[{\"name\":\"txnHash\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"bid\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"preConfHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"committerAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"pure\"},{\"type\":\"event\",\"name\":\"CommitmentStored\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"committer\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"bid\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"bidHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"decayStartTimeStamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"decayEndTimeStamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"txnHash\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"commitmentHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"bidSignature\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"sharedSecretKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EncryptedCommitmentStored\",\"inputs\":[{\"name\":\"commitmentIndex\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"committer\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"commitmentSignature\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"dispatchTimestamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SignatureVerified\",\"inputs\":[{\"name\":\"signer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"txnHash\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"revertingTxHashes\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"bid\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", } // PreconfcommitmentstoreABI is the input ABI used to generate the binding from. @@ -534,7 +534,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) CommitmentDi // Commitments is a free data retrieval call binding the contract method 0x839df945. // -// Solidity: function commitments(bytes32 ) view returns(address bidder, bool isUsed, uint64 blockNumber, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, uint64 dispatchTimestamp, address commiter, uint256 bid, bytes32 bidHash, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, bytes sharedSecretKey, string txnHash, string revertingTxHashes) +// Solidity: function commitments(bytes32 ) view returns(address bidder, bool isUsed, uint64 blockNumber, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, uint64 dispatchTimestamp, address committer, uint256 bid, bytes32 bidHash, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, bytes sharedSecretKey, string txnHash, string revertingTxHashes) func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) Commitments(opts *bind.CallOpts, arg0 [32]byte) (struct { Bidder common.Address IsUsed bool @@ -542,7 +542,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) Commitments(opts *b DecayStartTimeStamp uint64 DecayEndTimeStamp uint64 DispatchTimestamp uint64 - Commiter common.Address + Committer common.Address Bid *big.Int BidHash [32]byte CommitmentHash [32]byte @@ -562,7 +562,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) Commitments(opts *b DecayStartTimeStamp uint64 DecayEndTimeStamp uint64 DispatchTimestamp uint64 - Commiter common.Address + Committer common.Address Bid *big.Int BidHash [32]byte CommitmentHash [32]byte @@ -582,7 +582,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) Commitments(opts *b outstruct.DecayStartTimeStamp = *abi.ConvertType(out[3], new(uint64)).(*uint64) outstruct.DecayEndTimeStamp = *abi.ConvertType(out[4], new(uint64)).(*uint64) outstruct.DispatchTimestamp = *abi.ConvertType(out[5], new(uint64)).(*uint64) - outstruct.Commiter = *abi.ConvertType(out[6], new(common.Address)).(*common.Address) + outstruct.Committer = *abi.ConvertType(out[6], new(common.Address)).(*common.Address) outstruct.Bid = *abi.ConvertType(out[7], new(*big.Int)).(**big.Int) outstruct.BidHash = *abi.ConvertType(out[8], new([32]byte)).(*[32]byte) outstruct.CommitmentHash = *abi.ConvertType(out[9], new([32]byte)).(*[32]byte) @@ -598,7 +598,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) Commitments(opts *b // Commitments is a free data retrieval call binding the contract method 0x839df945. // -// Solidity: function commitments(bytes32 ) view returns(address bidder, bool isUsed, uint64 blockNumber, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, uint64 dispatchTimestamp, address commiter, uint256 bid, bytes32 bidHash, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, bytes sharedSecretKey, string txnHash, string revertingTxHashes) +// Solidity: function commitments(bytes32 ) view returns(address bidder, bool isUsed, uint64 blockNumber, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, uint64 dispatchTimestamp, address committer, uint256 bid, bytes32 bidHash, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, bytes sharedSecretKey, string txnHash, string revertingTxHashes) func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) Commitments(arg0 [32]byte) (struct { Bidder common.Address IsUsed bool @@ -606,7 +606,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) Commitments(arg0 [ DecayStartTimeStamp uint64 DecayEndTimeStamp uint64 DispatchTimestamp uint64 - Commiter common.Address + Committer common.Address Bid *big.Int BidHash [32]byte CommitmentHash [32]byte @@ -621,7 +621,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) Commitments(arg0 [ // Commitments is a free data retrieval call binding the contract method 0x839df945. // -// Solidity: function commitments(bytes32 ) view returns(address bidder, bool isUsed, uint64 blockNumber, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, uint64 dispatchTimestamp, address commiter, uint256 bid, bytes32 bidHash, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, bytes sharedSecretKey, string txnHash, string revertingTxHashes) +// Solidity: function commitments(bytes32 ) view returns(address bidder, bool isUsed, uint64 blockNumber, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, uint64 dispatchTimestamp, address committer, uint256 bid, bytes32 bidHash, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, bytes sharedSecretKey, string txnHash, string revertingTxHashes) func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) Commitments(arg0 [32]byte) (struct { Bidder common.Address IsUsed bool @@ -629,7 +629,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) Commitments( DecayStartTimeStamp uint64 DecayEndTimeStamp uint64 DispatchTimestamp uint64 - Commiter common.Address + Committer common.Address Bid *big.Int BidHash [32]byte CommitmentHash [32]byte @@ -675,10 +675,10 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) CommitmentsC // EncryptedCommitments is a free data retrieval call binding the contract method 0x566f998c. // -// Solidity: function encryptedCommitments(bytes32 ) view returns(bool isUsed, address commiter, uint64 dispatchTimestamp, bytes32 commitmentDigest, bytes commitmentSignature) +// Solidity: function encryptedCommitments(bytes32 ) view returns(bool isUsed, address committer, uint64 dispatchTimestamp, bytes32 commitmentDigest, bytes commitmentSignature) func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) EncryptedCommitments(opts *bind.CallOpts, arg0 [32]byte) (struct { IsUsed bool - Commiter common.Address + Committer common.Address DispatchTimestamp uint64 CommitmentDigest [32]byte CommitmentSignature []byte @@ -688,7 +688,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) EncryptedCommitment outstruct := new(struct { IsUsed bool - Commiter common.Address + Committer common.Address DispatchTimestamp uint64 CommitmentDigest [32]byte CommitmentSignature []byte @@ -698,7 +698,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) EncryptedCommitment } outstruct.IsUsed = *abi.ConvertType(out[0], new(bool)).(*bool) - outstruct.Commiter = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + outstruct.Committer = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) outstruct.DispatchTimestamp = *abi.ConvertType(out[2], new(uint64)).(*uint64) outstruct.CommitmentDigest = *abi.ConvertType(out[3], new([32]byte)).(*[32]byte) outstruct.CommitmentSignature = *abi.ConvertType(out[4], new([]byte)).(*[]byte) @@ -709,10 +709,10 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) EncryptedCommitment // EncryptedCommitments is a free data retrieval call binding the contract method 0x566f998c. // -// Solidity: function encryptedCommitments(bytes32 ) view returns(bool isUsed, address commiter, uint64 dispatchTimestamp, bytes32 commitmentDigest, bytes commitmentSignature) +// Solidity: function encryptedCommitments(bytes32 ) view returns(bool isUsed, address committer, uint64 dispatchTimestamp, bytes32 commitmentDigest, bytes commitmentSignature) func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) EncryptedCommitments(arg0 [32]byte) (struct { IsUsed bool - Commiter common.Address + Committer common.Address DispatchTimestamp uint64 CommitmentDigest [32]byte CommitmentSignature []byte @@ -722,10 +722,10 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) EncryptedCommitmen // EncryptedCommitments is a free data retrieval call binding the contract method 0x566f998c. // -// Solidity: function encryptedCommitments(bytes32 ) view returns(bool isUsed, address commiter, uint64 dispatchTimestamp, bytes32 commitmentDigest, bytes commitmentSignature) +// Solidity: function encryptedCommitments(bytes32 ) view returns(bool isUsed, address committer, uint64 dispatchTimestamp, bytes32 commitmentDigest, bytes commitmentSignature) func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) EncryptedCommitments(arg0 [32]byte) (struct { IsUsed bool - Commiter common.Address + Committer common.Address DispatchTimestamp uint64 CommitmentDigest [32]byte CommitmentSignature []byte @@ -950,12 +950,12 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) GetTxnHashFr return _Preconfcommitmentstore.Contract.GetTxnHashFromCommitment(&_Preconfcommitmentstore.CallOpts, commitmentIndex) } -// Oracle is a free data retrieval call binding the contract method 0x7dc0d1d0. +// OracleContract is a free data retrieval call binding the contract method 0xbece7532. // -// Solidity: function oracle() view returns(address) -func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) Oracle(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function oracleContract() view returns(address) +func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) OracleContract(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _Preconfcommitmentstore.contract.Call(opts, &out, "oracle") + err := _Preconfcommitmentstore.contract.Call(opts, &out, "oracleContract") if err != nil { return *new(common.Address), err @@ -967,18 +967,18 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) Oracle(opts *bind.C } -// Oracle is a free data retrieval call binding the contract method 0x7dc0d1d0. +// OracleContract is a free data retrieval call binding the contract method 0xbece7532. // -// Solidity: function oracle() view returns(address) -func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) Oracle() (common.Address, error) { - return _Preconfcommitmentstore.Contract.Oracle(&_Preconfcommitmentstore.CallOpts) +// Solidity: function oracleContract() view returns(address) +func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) OracleContract() (common.Address, error) { + return _Preconfcommitmentstore.Contract.OracleContract(&_Preconfcommitmentstore.CallOpts) } -// Oracle is a free data retrieval call binding the contract method 0x7dc0d1d0. +// OracleContract is a free data retrieval call binding the contract method 0xbece7532. // -// Solidity: function oracle() view returns(address) -func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) Oracle() (common.Address, error) { - return _Preconfcommitmentstore.Contract.Oracle(&_Preconfcommitmentstore.CallOpts) +// Solidity: function oracleContract() view returns(address) +func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) OracleContract() (common.Address, error) { + return _Preconfcommitmentstore.Contract.OracleContract(&_Preconfcommitmentstore.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. @@ -1152,24 +1152,24 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) VerifyBid(bi // VerifyPreConfCommitment is a free data retrieval call binding the contract method 0xe93bbf26. // -// Solidity: function verifyPreConfCommitment((string,string,uint256,uint64,uint64,uint64,bytes32,bytes,bytes,bytes) params) pure returns(bytes32 preConfHash, address commiterAddress) +// Solidity: function verifyPreConfCommitment((string,string,uint256,uint64,uint64,uint64,bytes32,bytes,bytes,bytes) params) pure returns(bytes32 preConfHash, address committerAddress) func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) VerifyPreConfCommitment(opts *bind.CallOpts, params IPreConfCommitmentStoreCommitmentParams) (struct { - PreConfHash [32]byte - CommiterAddress common.Address + PreConfHash [32]byte + CommitterAddress common.Address }, error) { var out []interface{} err := _Preconfcommitmentstore.contract.Call(opts, &out, "verifyPreConfCommitment", params) outstruct := new(struct { - PreConfHash [32]byte - CommiterAddress common.Address + PreConfHash [32]byte + CommitterAddress common.Address }) if err != nil { return *outstruct, err } outstruct.PreConfHash = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - outstruct.CommiterAddress = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + outstruct.CommitterAddress = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) return *outstruct, err @@ -1177,20 +1177,20 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreCaller) VerifyPreConfCommit // VerifyPreConfCommitment is a free data retrieval call binding the contract method 0xe93bbf26. // -// Solidity: function verifyPreConfCommitment((string,string,uint256,uint64,uint64,uint64,bytes32,bytes,bytes,bytes) params) pure returns(bytes32 preConfHash, address commiterAddress) +// Solidity: function verifyPreConfCommitment((string,string,uint256,uint64,uint64,uint64,bytes32,bytes,bytes,bytes) params) pure returns(bytes32 preConfHash, address committerAddress) func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) VerifyPreConfCommitment(params IPreConfCommitmentStoreCommitmentParams) (struct { - PreConfHash [32]byte - CommiterAddress common.Address + PreConfHash [32]byte + CommitterAddress common.Address }, error) { return _Preconfcommitmentstore.Contract.VerifyPreConfCommitment(&_Preconfcommitmentstore.CallOpts, params) } // VerifyPreConfCommitment is a free data retrieval call binding the contract method 0xe93bbf26. // -// Solidity: function verifyPreConfCommitment((string,string,uint256,uint64,uint64,uint64,bytes32,bytes,bytes,bytes) params) pure returns(bytes32 preConfHash, address commiterAddress) +// Solidity: function verifyPreConfCommitment((string,string,uint256,uint64,uint64,uint64,bytes32,bytes,bytes,bytes) params) pure returns(bytes32 preConfHash, address committerAddress) func (_Preconfcommitmentstore *PreconfcommitmentstoreCallerSession) VerifyPreConfCommitment(params IPreConfCommitmentStoreCommitmentParams) (struct { - PreConfHash [32]byte - CommiterAddress common.Address + PreConfHash [32]byte + CommitterAddress common.Address }, error) { return _Preconfcommitmentstore.Contract.VerifyPreConfCommitment(&_Preconfcommitmentstore.CallOpts, params) } @@ -1218,23 +1218,23 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactorSession) AcceptOw // Initialize is a paid mutator transaction binding the contract method 0xd8d0cbc1. // -// Solidity: function initialize(address _providerRegistry, address _bidderRegistry, address _oracle, address _owner, address _blockTracker, uint64 _commitmentDispatchWindow, uint256 _blocksPerWindow) returns() -func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactor) Initialize(opts *bind.TransactOpts, _providerRegistry common.Address, _bidderRegistry common.Address, _oracle common.Address, _owner common.Address, _blockTracker common.Address, _commitmentDispatchWindow uint64, _blocksPerWindow *big.Int) (*types.Transaction, error) { - return _Preconfcommitmentstore.contract.Transact(opts, "initialize", _providerRegistry, _bidderRegistry, _oracle, _owner, _blockTracker, _commitmentDispatchWindow, _blocksPerWindow) +// Solidity: function initialize(address _providerRegistry, address _bidderRegistry, address _oracleContract, address _owner, address _blockTracker, uint64 _commitmentDispatchWindow, uint256 _blocksPerWindow) returns() +func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactor) Initialize(opts *bind.TransactOpts, _providerRegistry common.Address, _bidderRegistry common.Address, _oracleContract common.Address, _owner common.Address, _blockTracker common.Address, _commitmentDispatchWindow uint64, _blocksPerWindow *big.Int) (*types.Transaction, error) { + return _Preconfcommitmentstore.contract.Transact(opts, "initialize", _providerRegistry, _bidderRegistry, _oracleContract, _owner, _blockTracker, _commitmentDispatchWindow, _blocksPerWindow) } // Initialize is a paid mutator transaction binding the contract method 0xd8d0cbc1. // -// Solidity: function initialize(address _providerRegistry, address _bidderRegistry, address _oracle, address _owner, address _blockTracker, uint64 _commitmentDispatchWindow, uint256 _blocksPerWindow) returns() -func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) Initialize(_providerRegistry common.Address, _bidderRegistry common.Address, _oracle common.Address, _owner common.Address, _blockTracker common.Address, _commitmentDispatchWindow uint64, _blocksPerWindow *big.Int) (*types.Transaction, error) { - return _Preconfcommitmentstore.Contract.Initialize(&_Preconfcommitmentstore.TransactOpts, _providerRegistry, _bidderRegistry, _oracle, _owner, _blockTracker, _commitmentDispatchWindow, _blocksPerWindow) +// Solidity: function initialize(address _providerRegistry, address _bidderRegistry, address _oracleContract, address _owner, address _blockTracker, uint64 _commitmentDispatchWindow, uint256 _blocksPerWindow) returns() +func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) Initialize(_providerRegistry common.Address, _bidderRegistry common.Address, _oracleContract common.Address, _owner common.Address, _blockTracker common.Address, _commitmentDispatchWindow uint64, _blocksPerWindow *big.Int) (*types.Transaction, error) { + return _Preconfcommitmentstore.Contract.Initialize(&_Preconfcommitmentstore.TransactOpts, _providerRegistry, _bidderRegistry, _oracleContract, _owner, _blockTracker, _commitmentDispatchWindow, _blocksPerWindow) } // Initialize is a paid mutator transaction binding the contract method 0xd8d0cbc1. // -// Solidity: function initialize(address _providerRegistry, address _bidderRegistry, address _oracle, address _owner, address _blockTracker, uint64 _commitmentDispatchWindow, uint256 _blocksPerWindow) returns() -func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactorSession) Initialize(_providerRegistry common.Address, _bidderRegistry common.Address, _oracle common.Address, _owner common.Address, _blockTracker common.Address, _commitmentDispatchWindow uint64, _blocksPerWindow *big.Int) (*types.Transaction, error) { - return _Preconfcommitmentstore.Contract.Initialize(&_Preconfcommitmentstore.TransactOpts, _providerRegistry, _bidderRegistry, _oracle, _owner, _blockTracker, _commitmentDispatchWindow, _blocksPerWindow) +// Solidity: function initialize(address _providerRegistry, address _bidderRegistry, address _oracleContract, address _owner, address _blockTracker, uint64 _commitmentDispatchWindow, uint256 _blocksPerWindow) returns() +func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactorSession) Initialize(_providerRegistry common.Address, _bidderRegistry common.Address, _oracleContract common.Address, _owner common.Address, _blockTracker common.Address, _commitmentDispatchWindow uint64, _blocksPerWindow *big.Int) (*types.Transaction, error) { + return _Preconfcommitmentstore.Contract.Initialize(&_Preconfcommitmentstore.TransactOpts, _providerRegistry, _bidderRegistry, _oracleContract, _owner, _blockTracker, _commitmentDispatchWindow, _blocksPerWindow) } // InitiateReward is a paid mutator transaction binding the contract method 0x03faf979. @@ -1405,25 +1405,25 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactorSession) UpdateCo return _Preconfcommitmentstore.Contract.UpdateCommitmentDispatchWindow(&_Preconfcommitmentstore.TransactOpts, newDispatchWindow) } -// UpdateOracle is a paid mutator transaction binding the contract method 0x1cb44dfc. +// UpdateOracleContract is a paid mutator transaction binding the contract method 0xd3bab58f. // -// Solidity: function updateOracle(address newOracle) returns() -func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactor) UpdateOracle(opts *bind.TransactOpts, newOracle common.Address) (*types.Transaction, error) { - return _Preconfcommitmentstore.contract.Transact(opts, "updateOracle", newOracle) +// Solidity: function updateOracleContract(address newOracleContract) returns() +func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactor) UpdateOracleContract(opts *bind.TransactOpts, newOracleContract common.Address) (*types.Transaction, error) { + return _Preconfcommitmentstore.contract.Transact(opts, "updateOracleContract", newOracleContract) } -// UpdateOracle is a paid mutator transaction binding the contract method 0x1cb44dfc. +// UpdateOracleContract is a paid mutator transaction binding the contract method 0xd3bab58f. // -// Solidity: function updateOracle(address newOracle) returns() -func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) UpdateOracle(newOracle common.Address) (*types.Transaction, error) { - return _Preconfcommitmentstore.Contract.UpdateOracle(&_Preconfcommitmentstore.TransactOpts, newOracle) +// Solidity: function updateOracleContract(address newOracleContract) returns() +func (_Preconfcommitmentstore *PreconfcommitmentstoreSession) UpdateOracleContract(newOracleContract common.Address) (*types.Transaction, error) { + return _Preconfcommitmentstore.Contract.UpdateOracleContract(&_Preconfcommitmentstore.TransactOpts, newOracleContract) } -// UpdateOracle is a paid mutator transaction binding the contract method 0x1cb44dfc. +// UpdateOracleContract is a paid mutator transaction binding the contract method 0xd3bab58f. // -// Solidity: function updateOracle(address newOracle) returns() -func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactorSession) UpdateOracle(newOracle common.Address) (*types.Transaction, error) { - return _Preconfcommitmentstore.Contract.UpdateOracle(&_Preconfcommitmentstore.TransactOpts, newOracle) +// Solidity: function updateOracleContract(address newOracleContract) returns() +func (_Preconfcommitmentstore *PreconfcommitmentstoreTransactorSession) UpdateOracleContract(newOracleContract common.Address) (*types.Transaction, error) { + return _Preconfcommitmentstore.Contract.UpdateOracleContract(&_Preconfcommitmentstore.TransactOpts, newOracleContract) } // UpdateProviderRegistry is a paid mutator transaction binding the contract method 0x92d2e3e7. @@ -1581,7 +1581,7 @@ func (it *PreconfcommitmentstoreCommitmentStoredIterator) Close() error { type PreconfcommitmentstoreCommitmentStored struct { CommitmentIndex [32]byte Bidder common.Address - Commiter common.Address + Committer common.Address Bid *big.Int BlockNumber uint64 BidHash [32]byte @@ -1599,7 +1599,7 @@ type PreconfcommitmentstoreCommitmentStored struct { // FilterCommitmentStored is a free log retrieval operation binding the contract event 0xe44dd4d002deb2c79cf08ce285a9d80c69753f31ca65c8e49f0a60d27ed9fea3. // -// Solidity: event CommitmentStored(bytes32 indexed commitmentIndex, address bidder, address commiter, uint256 bid, uint64 blockNumber, bytes32 bidHash, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, string txnHash, string revertingTxHashes, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, uint64 dispatchTimestamp, bytes sharedSecretKey) +// Solidity: event CommitmentStored(bytes32 indexed commitmentIndex, address bidder, address committer, uint256 bid, uint64 blockNumber, bytes32 bidHash, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, string txnHash, string revertingTxHashes, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, uint64 dispatchTimestamp, bytes sharedSecretKey) func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) FilterCommitmentStored(opts *bind.FilterOpts, commitmentIndex [][32]byte) (*PreconfcommitmentstoreCommitmentStoredIterator, error) { var commitmentIndexRule []interface{} @@ -1616,7 +1616,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) FilterCommitmentS // WatchCommitmentStored is a free log subscription operation binding the contract event 0xe44dd4d002deb2c79cf08ce285a9d80c69753f31ca65c8e49f0a60d27ed9fea3. // -// Solidity: event CommitmentStored(bytes32 indexed commitmentIndex, address bidder, address commiter, uint256 bid, uint64 blockNumber, bytes32 bidHash, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, string txnHash, string revertingTxHashes, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, uint64 dispatchTimestamp, bytes sharedSecretKey) +// Solidity: event CommitmentStored(bytes32 indexed commitmentIndex, address bidder, address committer, uint256 bid, uint64 blockNumber, bytes32 bidHash, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, string txnHash, string revertingTxHashes, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, uint64 dispatchTimestamp, bytes sharedSecretKey) func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) WatchCommitmentStored(opts *bind.WatchOpts, sink chan<- *PreconfcommitmentstoreCommitmentStored, commitmentIndex [][32]byte) (event.Subscription, error) { var commitmentIndexRule []interface{} @@ -1658,7 +1658,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) WatchCommitmentSt // ParseCommitmentStored is a log parse operation binding the contract event 0xe44dd4d002deb2c79cf08ce285a9d80c69753f31ca65c8e49f0a60d27ed9fea3. // -// Solidity: event CommitmentStored(bytes32 indexed commitmentIndex, address bidder, address commiter, uint256 bid, uint64 blockNumber, bytes32 bidHash, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, string txnHash, string revertingTxHashes, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, uint64 dispatchTimestamp, bytes sharedSecretKey) +// Solidity: event CommitmentStored(bytes32 indexed commitmentIndex, address bidder, address committer, uint256 bid, uint64 blockNumber, bytes32 bidHash, uint64 decayStartTimeStamp, uint64 decayEndTimeStamp, string txnHash, string revertingTxHashes, bytes32 commitmentHash, bytes bidSignature, bytes commitmentSignature, uint64 dispatchTimestamp, bytes sharedSecretKey) func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) ParseCommitmentStored(log types.Log) (*PreconfcommitmentstoreCommitmentStored, error) { event := new(PreconfcommitmentstoreCommitmentStored) if err := _Preconfcommitmentstore.contract.UnpackLog(event, "CommitmentStored", log); err != nil { @@ -1738,7 +1738,7 @@ func (it *PreconfcommitmentstoreEncryptedCommitmentStoredIterator) Close() error // PreconfcommitmentstoreEncryptedCommitmentStored represents a EncryptedCommitmentStored event raised by the Preconfcommitmentstore contract. type PreconfcommitmentstoreEncryptedCommitmentStored struct { CommitmentIndex [32]byte - Commiter common.Address + Committer common.Address CommitmentDigest [32]byte CommitmentSignature []byte DispatchTimestamp uint64 @@ -1747,7 +1747,7 @@ type PreconfcommitmentstoreEncryptedCommitmentStored struct { // FilterEncryptedCommitmentStored is a free log retrieval operation binding the contract event 0x3b9ebc34b9c72a41ddaf26db939c901a27a144dfbebbe80c3b105a7684a617f2. // -// Solidity: event EncryptedCommitmentStored(bytes32 indexed commitmentIndex, address commiter, bytes32 commitmentDigest, bytes commitmentSignature, uint64 dispatchTimestamp) +// Solidity: event EncryptedCommitmentStored(bytes32 indexed commitmentIndex, address committer, bytes32 commitmentDigest, bytes commitmentSignature, uint64 dispatchTimestamp) func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) FilterEncryptedCommitmentStored(opts *bind.FilterOpts, commitmentIndex [][32]byte) (*PreconfcommitmentstoreEncryptedCommitmentStoredIterator, error) { var commitmentIndexRule []interface{} @@ -1764,7 +1764,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) FilterEncryptedCo // WatchEncryptedCommitmentStored is a free log subscription operation binding the contract event 0x3b9ebc34b9c72a41ddaf26db939c901a27a144dfbebbe80c3b105a7684a617f2. // -// Solidity: event EncryptedCommitmentStored(bytes32 indexed commitmentIndex, address commiter, bytes32 commitmentDigest, bytes commitmentSignature, uint64 dispatchTimestamp) +// Solidity: event EncryptedCommitmentStored(bytes32 indexed commitmentIndex, address committer, bytes32 commitmentDigest, bytes commitmentSignature, uint64 dispatchTimestamp) func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) WatchEncryptedCommitmentStored(opts *bind.WatchOpts, sink chan<- *PreconfcommitmentstoreEncryptedCommitmentStored, commitmentIndex [][32]byte) (event.Subscription, error) { var commitmentIndexRule []interface{} @@ -1806,7 +1806,7 @@ func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) WatchEncryptedCom // ParseEncryptedCommitmentStored is a log parse operation binding the contract event 0x3b9ebc34b9c72a41ddaf26db939c901a27a144dfbebbe80c3b105a7684a617f2. // -// Solidity: event EncryptedCommitmentStored(bytes32 indexed commitmentIndex, address commiter, bytes32 commitmentDigest, bytes commitmentSignature, uint64 dispatchTimestamp) +// Solidity: event EncryptedCommitmentStored(bytes32 indexed commitmentIndex, address committer, bytes32 commitmentDigest, bytes commitmentSignature, uint64 dispatchTimestamp) func (_Preconfcommitmentstore *PreconfcommitmentstoreFilterer) ParseEncryptedCommitmentStored(log types.Log) (*PreconfcommitmentstoreEncryptedCommitmentStored, error) { event := new(PreconfcommitmentstoreEncryptedCommitmentStored) if err := _Preconfcommitmentstore.contract.UnpackLog(event, "EncryptedCommitmentStored", log); err != nil { diff --git a/contracts-abi/clients/ProviderRegistry/ProviderRegistry.go b/contracts-abi/clients/ProviderRegistry/ProviderRegistry.go index 7d45d827f..c2f1a4653 100644 --- a/contracts-abi/clients/ProviderRegistry/ProviderRegistry.go +++ b/contracts-abi/clients/ProviderRegistry/ProviderRegistry.go @@ -31,7 +31,7 @@ var ( // ProviderregistryMetaData contains all meta data concerning the Providerregistry contract. var ProviderregistryMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"PERCENT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PRECISION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bidderAmount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkStake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"eoaToBlsPubkey\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feePercent\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeRecipient\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeRecipientAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBLSKey\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_feeRecipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePercent\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"preConfirmationsContract\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerStakes\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerAndStake\",\"inputs\":[{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePercent\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeeRecipient\",\"inputs\":[{\"name\":\"newFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPreconfirmationsContract\",\"inputs\":[{\"name\":\"contractAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"amt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"withdrawBidderAmount\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawFeeRecipientAmount\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawStakedAmount\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"FundsDeposited\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsSlashed\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProviderRegistered\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"stakedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"PERCENT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PRECISION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eoaToBlsPubkey\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feePercent\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedProtocolFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBLSKey\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProviderStake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_protocolFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePercent\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_withdrawalDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_protocolFeePayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isProviderValid\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyWithdrawProtocolFee\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"preConfirmationsContract\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"protocolFeeTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerStakes\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerAndStake\",\"inputs\":[{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeePayoutPeriodBlocks\",\"inputs\":[{\"name\":\"_feePayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePercent\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewProtocolFeeRecipient\",\"inputs\":[{\"name\":\"newFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPreconfirmationsContract\",\"inputs\":[{\"name\":\"contractAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setWithdrawalDelay\",\"inputs\":[{\"name\":\"_withdrawalDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"amt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawalDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalRequests\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"FeePayoutPeriodBlocksUpdated\",\"inputs\":[{\"name\":\"newFeePayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsDeposited\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsSlashed\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProtocolFeeRecipientUpdated\",\"inputs\":[{\"name\":\"newProtocolFeeRecipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProviderRegistered\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"stakedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unstake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdraw\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalDelayUpdated\",\"inputs\":[{\"name\":\"newWithdrawalDelay\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", } // ProviderregistryABI is the input ABI used to generate the binding from. @@ -273,68 +273,6 @@ func (_Providerregistry *ProviderregistryCallerSession) UPGRADEINTERFACEVERSION( return _Providerregistry.Contract.UPGRADEINTERFACEVERSION(&_Providerregistry.CallOpts) } -// BidderAmount is a free data retrieval call binding the contract method 0x218a5e67. -// -// Solidity: function bidderAmount(address ) view returns(uint256) -func (_Providerregistry *ProviderregistryCaller) BidderAmount(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var out []interface{} - err := _Providerregistry.contract.Call(opts, &out, "bidderAmount", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// BidderAmount is a free data retrieval call binding the contract method 0x218a5e67. -// -// Solidity: function bidderAmount(address ) view returns(uint256) -func (_Providerregistry *ProviderregistrySession) BidderAmount(arg0 common.Address) (*big.Int, error) { - return _Providerregistry.Contract.BidderAmount(&_Providerregistry.CallOpts, arg0) -} - -// BidderAmount is a free data retrieval call binding the contract method 0x218a5e67. -// -// Solidity: function bidderAmount(address ) view returns(uint256) -func (_Providerregistry *ProviderregistryCallerSession) BidderAmount(arg0 common.Address) (*big.Int, error) { - return _Providerregistry.Contract.BidderAmount(&_Providerregistry.CallOpts, arg0) -} - -// CheckStake is a free data retrieval call binding the contract method 0x90d96d76. -// -// Solidity: function checkStake(address provider) view returns(uint256) -func (_Providerregistry *ProviderregistryCaller) CheckStake(opts *bind.CallOpts, provider common.Address) (*big.Int, error) { - var out []interface{} - err := _Providerregistry.contract.Call(opts, &out, "checkStake", provider) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CheckStake is a free data retrieval call binding the contract method 0x90d96d76. -// -// Solidity: function checkStake(address provider) view returns(uint256) -func (_Providerregistry *ProviderregistrySession) CheckStake(provider common.Address) (*big.Int, error) { - return _Providerregistry.Contract.CheckStake(&_Providerregistry.CallOpts, provider) -} - -// CheckStake is a free data retrieval call binding the contract method 0x90d96d76. -// -// Solidity: function checkStake(address provider) view returns(uint256) -func (_Providerregistry *ProviderregistryCallerSession) CheckStake(provider common.Address) (*big.Int, error) { - return _Providerregistry.Contract.CheckStake(&_Providerregistry.CallOpts, provider) -} - // EoaToBlsPubkey is a free data retrieval call binding the contract method 0x73b76962. // // Solidity: function eoaToBlsPubkey(address ) view returns(bytes) @@ -397,97 +335,126 @@ func (_Providerregistry *ProviderregistryCallerSession) FeePercent() (uint16, er return _Providerregistry.Contract.FeePercent(&_Providerregistry.CallOpts) } -// FeeRecipient is a free data retrieval call binding the contract method 0x46904840. +// GetAccumulatedProtocolFee is a free data retrieval call binding the contract method 0x2dde2218. // -// Solidity: function feeRecipient() view returns(address) -func (_Providerregistry *ProviderregistryCaller) FeeRecipient(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function getAccumulatedProtocolFee() view returns(uint256) +func (_Providerregistry *ProviderregistryCaller) GetAccumulatedProtocolFee(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _Providerregistry.contract.Call(opts, &out, "feeRecipient") + err := _Providerregistry.contract.Call(opts, &out, "getAccumulatedProtocolFee") if err != nil { - return *new(common.Address), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// FeeRecipient is a free data retrieval call binding the contract method 0x46904840. +// GetAccumulatedProtocolFee is a free data retrieval call binding the contract method 0x2dde2218. // -// Solidity: function feeRecipient() view returns(address) -func (_Providerregistry *ProviderregistrySession) FeeRecipient() (common.Address, error) { - return _Providerregistry.Contract.FeeRecipient(&_Providerregistry.CallOpts) +// Solidity: function getAccumulatedProtocolFee() view returns(uint256) +func (_Providerregistry *ProviderregistrySession) GetAccumulatedProtocolFee() (*big.Int, error) { + return _Providerregistry.Contract.GetAccumulatedProtocolFee(&_Providerregistry.CallOpts) } -// FeeRecipient is a free data retrieval call binding the contract method 0x46904840. +// GetAccumulatedProtocolFee is a free data retrieval call binding the contract method 0x2dde2218. // -// Solidity: function feeRecipient() view returns(address) -func (_Providerregistry *ProviderregistryCallerSession) FeeRecipient() (common.Address, error) { - return _Providerregistry.Contract.FeeRecipient(&_Providerregistry.CallOpts) +// Solidity: function getAccumulatedProtocolFee() view returns(uint256) +func (_Providerregistry *ProviderregistryCallerSession) GetAccumulatedProtocolFee() (*big.Int, error) { + return _Providerregistry.Contract.GetAccumulatedProtocolFee(&_Providerregistry.CallOpts) } -// FeeRecipientAmount is a free data retrieval call binding the contract method 0xe0ae4ebd. +// GetBLSKey is a free data retrieval call binding the contract method 0xb50c522e. // -// Solidity: function feeRecipientAmount() view returns(uint256) -func (_Providerregistry *ProviderregistryCaller) FeeRecipientAmount(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function getBLSKey(address provider) view returns(bytes) +func (_Providerregistry *ProviderregistryCaller) GetBLSKey(opts *bind.CallOpts, provider common.Address) ([]byte, error) { var out []interface{} - err := _Providerregistry.contract.Call(opts, &out, "feeRecipientAmount") + err := _Providerregistry.contract.Call(opts, &out, "getBLSKey", provider) if err != nil { - return *new(*big.Int), err + return *new([]byte), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) return out0, err } -// FeeRecipientAmount is a free data retrieval call binding the contract method 0xe0ae4ebd. +// GetBLSKey is a free data retrieval call binding the contract method 0xb50c522e. // -// Solidity: function feeRecipientAmount() view returns(uint256) -func (_Providerregistry *ProviderregistrySession) FeeRecipientAmount() (*big.Int, error) { - return _Providerregistry.Contract.FeeRecipientAmount(&_Providerregistry.CallOpts) +// Solidity: function getBLSKey(address provider) view returns(bytes) +func (_Providerregistry *ProviderregistrySession) GetBLSKey(provider common.Address) ([]byte, error) { + return _Providerregistry.Contract.GetBLSKey(&_Providerregistry.CallOpts, provider) } -// FeeRecipientAmount is a free data retrieval call binding the contract method 0xe0ae4ebd. +// GetBLSKey is a free data retrieval call binding the contract method 0xb50c522e. // -// Solidity: function feeRecipientAmount() view returns(uint256) -func (_Providerregistry *ProviderregistryCallerSession) FeeRecipientAmount() (*big.Int, error) { - return _Providerregistry.Contract.FeeRecipientAmount(&_Providerregistry.CallOpts) +// Solidity: function getBLSKey(address provider) view returns(bytes) +func (_Providerregistry *ProviderregistryCallerSession) GetBLSKey(provider common.Address) ([]byte, error) { + return _Providerregistry.Contract.GetBLSKey(&_Providerregistry.CallOpts, provider) } -// GetBLSKey is a free data retrieval call binding the contract method 0xb50c522e. +// GetProviderStake is a free data retrieval call binding the contract method 0xbfebc370. // -// Solidity: function getBLSKey(address provider) view returns(bytes) -func (_Providerregistry *ProviderregistryCaller) GetBLSKey(opts *bind.CallOpts, provider common.Address) ([]byte, error) { +// Solidity: function getProviderStake(address provider) view returns(uint256) +func (_Providerregistry *ProviderregistryCaller) GetProviderStake(opts *bind.CallOpts, provider common.Address) (*big.Int, error) { var out []interface{} - err := _Providerregistry.contract.Call(opts, &out, "getBLSKey", provider) + err := _Providerregistry.contract.Call(opts, &out, "getProviderStake", provider) if err != nil { - return *new([]byte), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// GetBLSKey is a free data retrieval call binding the contract method 0xb50c522e. +// GetProviderStake is a free data retrieval call binding the contract method 0xbfebc370. // -// Solidity: function getBLSKey(address provider) view returns(bytes) -func (_Providerregistry *ProviderregistrySession) GetBLSKey(provider common.Address) ([]byte, error) { - return _Providerregistry.Contract.GetBLSKey(&_Providerregistry.CallOpts, provider) +// Solidity: function getProviderStake(address provider) view returns(uint256) +func (_Providerregistry *ProviderregistrySession) GetProviderStake(provider common.Address) (*big.Int, error) { + return _Providerregistry.Contract.GetProviderStake(&_Providerregistry.CallOpts, provider) } -// GetBLSKey is a free data retrieval call binding the contract method 0xb50c522e. +// GetProviderStake is a free data retrieval call binding the contract method 0xbfebc370. // -// Solidity: function getBLSKey(address provider) view returns(bytes) -func (_Providerregistry *ProviderregistryCallerSession) GetBLSKey(provider common.Address) ([]byte, error) { - return _Providerregistry.Contract.GetBLSKey(&_Providerregistry.CallOpts, provider) +// Solidity: function getProviderStake(address provider) view returns(uint256) +func (_Providerregistry *ProviderregistryCallerSession) GetProviderStake(provider common.Address) (*big.Int, error) { + return _Providerregistry.Contract.GetProviderStake(&_Providerregistry.CallOpts, provider) +} + +// IsProviderValid is a free data retrieval call binding the contract method 0xb066d50d. +// +// Solidity: function isProviderValid(address provider) view returns() +func (_Providerregistry *ProviderregistryCaller) IsProviderValid(opts *bind.CallOpts, provider common.Address) error { + var out []interface{} + err := _Providerregistry.contract.Call(opts, &out, "isProviderValid", provider) + + if err != nil { + return err + } + + return err + +} + +// IsProviderValid is a free data retrieval call binding the contract method 0xb066d50d. +// +// Solidity: function isProviderValid(address provider) view returns() +func (_Providerregistry *ProviderregistrySession) IsProviderValid(provider common.Address) error { + return _Providerregistry.Contract.IsProviderValid(&_Providerregistry.CallOpts, provider) +} + +// IsProviderValid is a free data retrieval call binding the contract method 0xb066d50d. +// +// Solidity: function isProviderValid(address provider) view returns() +func (_Providerregistry *ProviderregistryCallerSession) IsProviderValid(provider common.Address) error { + return _Providerregistry.Contract.IsProviderValid(&_Providerregistry.CallOpts, provider) } // MinStake is a free data retrieval call binding the contract method 0x375b3c0a. @@ -614,6 +581,61 @@ func (_Providerregistry *ProviderregistryCallerSession) PreConfirmationsContract return _Providerregistry.Contract.PreConfirmationsContract(&_Providerregistry.CallOpts) } +// ProtocolFeeTracker is a free data retrieval call binding the contract method 0x291af92c. +// +// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +func (_Providerregistry *ProviderregistryCaller) ProtocolFeeTracker(opts *bind.CallOpts) (struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int +}, error) { + var out []interface{} + err := _Providerregistry.contract.Call(opts, &out, "protocolFeeTracker") + + outstruct := new(struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.AccumulatedAmount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.LastPayoutBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.PayoutPeriodBlocks = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// ProtocolFeeTracker is a free data retrieval call binding the contract method 0x291af92c. +// +// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +func (_Providerregistry *ProviderregistrySession) ProtocolFeeTracker() (struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int +}, error) { + return _Providerregistry.Contract.ProtocolFeeTracker(&_Providerregistry.CallOpts) +} + +// ProtocolFeeTracker is a free data retrieval call binding the contract method 0x291af92c. +// +// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +func (_Providerregistry *ProviderregistryCallerSession) ProtocolFeeTracker() (struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int +}, error) { + return _Providerregistry.Contract.ProtocolFeeTracker(&_Providerregistry.CallOpts) +} + // ProviderRegistered is a free data retrieval call binding the contract method 0xab255b41. // // Solidity: function providerRegistered(address ) view returns(bool) @@ -707,6 +729,68 @@ func (_Providerregistry *ProviderregistryCallerSession) ProxiableUUID() ([32]byt return _Providerregistry.Contract.ProxiableUUID(&_Providerregistry.CallOpts) } +// WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961. +// +// Solidity: function withdrawalDelay() view returns(uint256) +func (_Providerregistry *ProviderregistryCaller) WithdrawalDelay(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Providerregistry.contract.Call(opts, &out, "withdrawalDelay") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961. +// +// Solidity: function withdrawalDelay() view returns(uint256) +func (_Providerregistry *ProviderregistrySession) WithdrawalDelay() (*big.Int, error) { + return _Providerregistry.Contract.WithdrawalDelay(&_Providerregistry.CallOpts) +} + +// WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961. +// +// Solidity: function withdrawalDelay() view returns(uint256) +func (_Providerregistry *ProviderregistryCallerSession) WithdrawalDelay() (*big.Int, error) { + return _Providerregistry.Contract.WithdrawalDelay(&_Providerregistry.CallOpts) +} + +// WithdrawalRequests is a free data retrieval call binding the contract method 0x27b380f3. +// +// Solidity: function withdrawalRequests(address ) view returns(uint256) +func (_Providerregistry *ProviderregistryCaller) WithdrawalRequests(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _Providerregistry.contract.Call(opts, &out, "withdrawalRequests", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// WithdrawalRequests is a free data retrieval call binding the contract method 0x27b380f3. +// +// Solidity: function withdrawalRequests(address ) view returns(uint256) +func (_Providerregistry *ProviderregistrySession) WithdrawalRequests(arg0 common.Address) (*big.Int, error) { + return _Providerregistry.Contract.WithdrawalRequests(&_Providerregistry.CallOpts, arg0) +} + +// WithdrawalRequests is a free data retrieval call binding the contract method 0x27b380f3. +// +// Solidity: function withdrawalRequests(address ) view returns(uint256) +func (_Providerregistry *ProviderregistryCallerSession) WithdrawalRequests(arg0 common.Address) (*big.Int, error) { + return _Providerregistry.Contract.WithdrawalRequests(&_Providerregistry.CallOpts, arg0) +} + // AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. // // Solidity: function acceptOwnership() returns() @@ -728,46 +812,46 @@ func (_Providerregistry *ProviderregistryTransactorSession) AcceptOwnership() (* return _Providerregistry.Contract.AcceptOwnership(&_Providerregistry.TransactOpts) } -// DepositFunds is a paid mutator transaction binding the contract method 0xe2c41dbc. +// Initialize is a paid mutator transaction binding the contract method 0xc8387461. // -// Solidity: function depositFunds() payable returns() -func (_Providerregistry *ProviderregistryTransactor) DepositFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Providerregistry.contract.Transact(opts, "depositFunds") +// Solidity: function initialize(uint256 _minStake, address _protocolFeeRecipient, uint16 _feePercent, address _owner, uint256 _withdrawalDelay, uint256 _protocolFeePayoutPeriodBlocks) returns() +func (_Providerregistry *ProviderregistryTransactor) Initialize(opts *bind.TransactOpts, _minStake *big.Int, _protocolFeeRecipient common.Address, _feePercent uint16, _owner common.Address, _withdrawalDelay *big.Int, _protocolFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "initialize", _minStake, _protocolFeeRecipient, _feePercent, _owner, _withdrawalDelay, _protocolFeePayoutPeriodBlocks) } -// DepositFunds is a paid mutator transaction binding the contract method 0xe2c41dbc. +// Initialize is a paid mutator transaction binding the contract method 0xc8387461. // -// Solidity: function depositFunds() payable returns() -func (_Providerregistry *ProviderregistrySession) DepositFunds() (*types.Transaction, error) { - return _Providerregistry.Contract.DepositFunds(&_Providerregistry.TransactOpts) +// Solidity: function initialize(uint256 _minStake, address _protocolFeeRecipient, uint16 _feePercent, address _owner, uint256 _withdrawalDelay, uint256 _protocolFeePayoutPeriodBlocks) returns() +func (_Providerregistry *ProviderregistrySession) Initialize(_minStake *big.Int, _protocolFeeRecipient common.Address, _feePercent uint16, _owner common.Address, _withdrawalDelay *big.Int, _protocolFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.Initialize(&_Providerregistry.TransactOpts, _minStake, _protocolFeeRecipient, _feePercent, _owner, _withdrawalDelay, _protocolFeePayoutPeriodBlocks) } -// DepositFunds is a paid mutator transaction binding the contract method 0xe2c41dbc. +// Initialize is a paid mutator transaction binding the contract method 0xc8387461. // -// Solidity: function depositFunds() payable returns() -func (_Providerregistry *ProviderregistryTransactorSession) DepositFunds() (*types.Transaction, error) { - return _Providerregistry.Contract.DepositFunds(&_Providerregistry.TransactOpts) +// Solidity: function initialize(uint256 _minStake, address _protocolFeeRecipient, uint16 _feePercent, address _owner, uint256 _withdrawalDelay, uint256 _protocolFeePayoutPeriodBlocks) returns() +func (_Providerregistry *ProviderregistryTransactorSession) Initialize(_minStake *big.Int, _protocolFeeRecipient common.Address, _feePercent uint16, _owner common.Address, _withdrawalDelay *big.Int, _protocolFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.Initialize(&_Providerregistry.TransactOpts, _minStake, _protocolFeeRecipient, _feePercent, _owner, _withdrawalDelay, _protocolFeePayoutPeriodBlocks) } -// Initialize is a paid mutator transaction binding the contract method 0x66953e62. +// ManuallyWithdrawProtocolFee is a paid mutator transaction binding the contract method 0xdbf63530. // -// Solidity: function initialize(uint256 _minStake, address _feeRecipient, uint16 _feePercent, address _owner) returns() -func (_Providerregistry *ProviderregistryTransactor) Initialize(opts *bind.TransactOpts, _minStake *big.Int, _feeRecipient common.Address, _feePercent uint16, _owner common.Address) (*types.Transaction, error) { - return _Providerregistry.contract.Transact(opts, "initialize", _minStake, _feeRecipient, _feePercent, _owner) +// Solidity: function manuallyWithdrawProtocolFee() returns() +func (_Providerregistry *ProviderregistryTransactor) ManuallyWithdrawProtocolFee(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "manuallyWithdrawProtocolFee") } -// Initialize is a paid mutator transaction binding the contract method 0x66953e62. +// ManuallyWithdrawProtocolFee is a paid mutator transaction binding the contract method 0xdbf63530. // -// Solidity: function initialize(uint256 _minStake, address _feeRecipient, uint16 _feePercent, address _owner) returns() -func (_Providerregistry *ProviderregistrySession) Initialize(_minStake *big.Int, _feeRecipient common.Address, _feePercent uint16, _owner common.Address) (*types.Transaction, error) { - return _Providerregistry.Contract.Initialize(&_Providerregistry.TransactOpts, _minStake, _feeRecipient, _feePercent, _owner) +// Solidity: function manuallyWithdrawProtocolFee() returns() +func (_Providerregistry *ProviderregistrySession) ManuallyWithdrawProtocolFee() (*types.Transaction, error) { + return _Providerregistry.Contract.ManuallyWithdrawProtocolFee(&_Providerregistry.TransactOpts) } -// Initialize is a paid mutator transaction binding the contract method 0x66953e62. +// ManuallyWithdrawProtocolFee is a paid mutator transaction binding the contract method 0xdbf63530. // -// Solidity: function initialize(uint256 _minStake, address _feeRecipient, uint16 _feePercent, address _owner) returns() -func (_Providerregistry *ProviderregistryTransactorSession) Initialize(_minStake *big.Int, _feeRecipient common.Address, _feePercent uint16, _owner common.Address) (*types.Transaction, error) { - return _Providerregistry.Contract.Initialize(&_Providerregistry.TransactOpts, _minStake, _feeRecipient, _feePercent, _owner) +// Solidity: function manuallyWithdrawProtocolFee() returns() +func (_Providerregistry *ProviderregistryTransactorSession) ManuallyWithdrawProtocolFee() (*types.Transaction, error) { + return _Providerregistry.Contract.ManuallyWithdrawProtocolFee(&_Providerregistry.TransactOpts) } // RegisterAndStake is a paid mutator transaction binding the contract method 0x8e3d03f6. @@ -812,6 +896,27 @@ func (_Providerregistry *ProviderregistryTransactorSession) RenounceOwnership() return _Providerregistry.Contract.RenounceOwnership(&_Providerregistry.TransactOpts) } +// SetFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0x7cbf9f6e. +// +// Solidity: function setFeePayoutPeriodBlocks(uint256 _feePayoutPeriodBlocks) returns() +func (_Providerregistry *ProviderregistryTransactor) SetFeePayoutPeriodBlocks(opts *bind.TransactOpts, _feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "setFeePayoutPeriodBlocks", _feePayoutPeriodBlocks) +} + +// SetFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0x7cbf9f6e. +// +// Solidity: function setFeePayoutPeriodBlocks(uint256 _feePayoutPeriodBlocks) returns() +func (_Providerregistry *ProviderregistrySession) SetFeePayoutPeriodBlocks(_feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.SetFeePayoutPeriodBlocks(&_Providerregistry.TransactOpts, _feePayoutPeriodBlocks) +} + +// SetFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0x7cbf9f6e. +// +// Solidity: function setFeePayoutPeriodBlocks(uint256 _feePayoutPeriodBlocks) returns() +func (_Providerregistry *ProviderregistryTransactorSession) SetFeePayoutPeriodBlocks(_feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.SetFeePayoutPeriodBlocks(&_Providerregistry.TransactOpts, _feePayoutPeriodBlocks) +} + // SetNewFeePercent is a paid mutator transaction binding the contract method 0xfb22febf. // // Solidity: function setNewFeePercent(uint16 newFeePercent) returns() @@ -833,25 +938,25 @@ func (_Providerregistry *ProviderregistryTransactorSession) SetNewFeePercent(new return _Providerregistry.Contract.SetNewFeePercent(&_Providerregistry.TransactOpts, newFeePercent) } -// SetNewFeeRecipient is a paid mutator transaction binding the contract method 0xa26652ea. +// SetNewProtocolFeeRecipient is a paid mutator transaction binding the contract method 0x184ac28e. // -// Solidity: function setNewFeeRecipient(address newFeeRecipient) returns() -func (_Providerregistry *ProviderregistryTransactor) SetNewFeeRecipient(opts *bind.TransactOpts, newFeeRecipient common.Address) (*types.Transaction, error) { - return _Providerregistry.contract.Transact(opts, "setNewFeeRecipient", newFeeRecipient) +// Solidity: function setNewProtocolFeeRecipient(address newFeeRecipient) returns() +func (_Providerregistry *ProviderregistryTransactor) SetNewProtocolFeeRecipient(opts *bind.TransactOpts, newFeeRecipient common.Address) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "setNewProtocolFeeRecipient", newFeeRecipient) } -// SetNewFeeRecipient is a paid mutator transaction binding the contract method 0xa26652ea. +// SetNewProtocolFeeRecipient is a paid mutator transaction binding the contract method 0x184ac28e. // -// Solidity: function setNewFeeRecipient(address newFeeRecipient) returns() -func (_Providerregistry *ProviderregistrySession) SetNewFeeRecipient(newFeeRecipient common.Address) (*types.Transaction, error) { - return _Providerregistry.Contract.SetNewFeeRecipient(&_Providerregistry.TransactOpts, newFeeRecipient) +// Solidity: function setNewProtocolFeeRecipient(address newFeeRecipient) returns() +func (_Providerregistry *ProviderregistrySession) SetNewProtocolFeeRecipient(newFeeRecipient common.Address) (*types.Transaction, error) { + return _Providerregistry.Contract.SetNewProtocolFeeRecipient(&_Providerregistry.TransactOpts, newFeeRecipient) } -// SetNewFeeRecipient is a paid mutator transaction binding the contract method 0xa26652ea. +// SetNewProtocolFeeRecipient is a paid mutator transaction binding the contract method 0x184ac28e. // -// Solidity: function setNewFeeRecipient(address newFeeRecipient) returns() -func (_Providerregistry *ProviderregistryTransactorSession) SetNewFeeRecipient(newFeeRecipient common.Address) (*types.Transaction, error) { - return _Providerregistry.Contract.SetNewFeeRecipient(&_Providerregistry.TransactOpts, newFeeRecipient) +// Solidity: function setNewProtocolFeeRecipient(address newFeeRecipient) returns() +func (_Providerregistry *ProviderregistryTransactorSession) SetNewProtocolFeeRecipient(newFeeRecipient common.Address) (*types.Transaction, error) { + return _Providerregistry.Contract.SetNewProtocolFeeRecipient(&_Providerregistry.TransactOpts, newFeeRecipient) } // SetPreconfirmationsContract is a paid mutator transaction binding the contract method 0xf6c7e476. @@ -875,6 +980,27 @@ func (_Providerregistry *ProviderregistryTransactorSession) SetPreconfirmationsC return _Providerregistry.Contract.SetPreconfirmationsContract(&_Providerregistry.TransactOpts, contractAddress) } +// SetWithdrawalDelay is a paid mutator transaction binding the contract method 0xd2c13da5. +// +// Solidity: function setWithdrawalDelay(uint256 _withdrawalDelay) returns() +func (_Providerregistry *ProviderregistryTransactor) SetWithdrawalDelay(opts *bind.TransactOpts, _withdrawalDelay *big.Int) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "setWithdrawalDelay", _withdrawalDelay) +} + +// SetWithdrawalDelay is a paid mutator transaction binding the contract method 0xd2c13da5. +// +// Solidity: function setWithdrawalDelay(uint256 _withdrawalDelay) returns() +func (_Providerregistry *ProviderregistrySession) SetWithdrawalDelay(_withdrawalDelay *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.SetWithdrawalDelay(&_Providerregistry.TransactOpts, _withdrawalDelay) +} + +// SetWithdrawalDelay is a paid mutator transaction binding the contract method 0xd2c13da5. +// +// Solidity: function setWithdrawalDelay(uint256 _withdrawalDelay) returns() +func (_Providerregistry *ProviderregistryTransactorSession) SetWithdrawalDelay(_withdrawalDelay *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.SetWithdrawalDelay(&_Providerregistry.TransactOpts, _withdrawalDelay) +} + // Slash is a paid mutator transaction binding the contract method 0x8b6e1f8d. // // Solidity: function slash(uint256 amt, address provider, address bidder, uint256 residualBidPercentAfterDecay) returns() @@ -896,6 +1022,27 @@ func (_Providerregistry *ProviderregistryTransactorSession) Slash(amt *big.Int, return _Providerregistry.Contract.Slash(&_Providerregistry.TransactOpts, amt, provider, bidder, residualBidPercentAfterDecay) } +// Stake is a paid mutator transaction binding the contract method 0x3a4b66f1. +// +// Solidity: function stake() payable returns() +func (_Providerregistry *ProviderregistryTransactor) Stake(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "stake") +} + +// Stake is a paid mutator transaction binding the contract method 0x3a4b66f1. +// +// Solidity: function stake() payable returns() +func (_Providerregistry *ProviderregistrySession) Stake() (*types.Transaction, error) { + return _Providerregistry.Contract.Stake(&_Providerregistry.TransactOpts) +} + +// Stake is a paid mutator transaction binding the contract method 0x3a4b66f1. +// +// Solidity: function stake() payable returns() +func (_Providerregistry *ProviderregistryTransactorSession) Stake() (*types.Transaction, error) { + return _Providerregistry.Contract.Stake(&_Providerregistry.TransactOpts) +} + // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address newOwner) returns() @@ -917,6 +1064,27 @@ func (_Providerregistry *ProviderregistryTransactorSession) TransferOwnership(ne return _Providerregistry.Contract.TransferOwnership(&_Providerregistry.TransactOpts, newOwner) } +// Unstake is a paid mutator transaction binding the contract method 0x2def6620. +// +// Solidity: function unstake() returns() +func (_Providerregistry *ProviderregistryTransactor) Unstake(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "unstake") +} + +// Unstake is a paid mutator transaction binding the contract method 0x2def6620. +// +// Solidity: function unstake() returns() +func (_Providerregistry *ProviderregistrySession) Unstake() (*types.Transaction, error) { + return _Providerregistry.Contract.Unstake(&_Providerregistry.TransactOpts) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2def6620. +// +// Solidity: function unstake() returns() +func (_Providerregistry *ProviderregistryTransactorSession) Unstake() (*types.Transaction, error) { + return _Providerregistry.Contract.Unstake(&_Providerregistry.TransactOpts) +} + // UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. // // Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() @@ -938,67 +1106,25 @@ func (_Providerregistry *ProviderregistryTransactorSession) UpgradeToAndCall(new return _Providerregistry.Contract.UpgradeToAndCall(&_Providerregistry.TransactOpts, newImplementation, data) } -// WithdrawBidderAmount is a paid mutator transaction binding the contract method 0x292ae408. -// -// Solidity: function withdrawBidderAmount(address bidder) returns() -func (_Providerregistry *ProviderregistryTransactor) WithdrawBidderAmount(opts *bind.TransactOpts, bidder common.Address) (*types.Transaction, error) { - return _Providerregistry.contract.Transact(opts, "withdrawBidderAmount", bidder) -} - -// WithdrawBidderAmount is a paid mutator transaction binding the contract method 0x292ae408. -// -// Solidity: function withdrawBidderAmount(address bidder) returns() -func (_Providerregistry *ProviderregistrySession) WithdrawBidderAmount(bidder common.Address) (*types.Transaction, error) { - return _Providerregistry.Contract.WithdrawBidderAmount(&_Providerregistry.TransactOpts, bidder) -} - -// WithdrawBidderAmount is a paid mutator transaction binding the contract method 0x292ae408. -// -// Solidity: function withdrawBidderAmount(address bidder) returns() -func (_Providerregistry *ProviderregistryTransactorSession) WithdrawBidderAmount(bidder common.Address) (*types.Transaction, error) { - return _Providerregistry.Contract.WithdrawBidderAmount(&_Providerregistry.TransactOpts, bidder) -} - -// WithdrawFeeRecipientAmount is a paid mutator transaction binding the contract method 0x7e5713d8. -// -// Solidity: function withdrawFeeRecipientAmount() returns() -func (_Providerregistry *ProviderregistryTransactor) WithdrawFeeRecipientAmount(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Providerregistry.contract.Transact(opts, "withdrawFeeRecipientAmount") -} - -// WithdrawFeeRecipientAmount is a paid mutator transaction binding the contract method 0x7e5713d8. -// -// Solidity: function withdrawFeeRecipientAmount() returns() -func (_Providerregistry *ProviderregistrySession) WithdrawFeeRecipientAmount() (*types.Transaction, error) { - return _Providerregistry.Contract.WithdrawFeeRecipientAmount(&_Providerregistry.TransactOpts) -} - -// WithdrawFeeRecipientAmount is a paid mutator transaction binding the contract method 0x7e5713d8. -// -// Solidity: function withdrawFeeRecipientAmount() returns() -func (_Providerregistry *ProviderregistryTransactorSession) WithdrawFeeRecipientAmount() (*types.Transaction, error) { - return _Providerregistry.Contract.WithdrawFeeRecipientAmount(&_Providerregistry.TransactOpts) -} - -// WithdrawStakedAmount is a paid mutator transaction binding the contract method 0xf31f3da0. +// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b. // -// Solidity: function withdrawStakedAmount(address provider) returns() -func (_Providerregistry *ProviderregistryTransactor) WithdrawStakedAmount(opts *bind.TransactOpts, provider common.Address) (*types.Transaction, error) { - return _Providerregistry.contract.Transact(opts, "withdrawStakedAmount", provider) +// Solidity: function withdraw() returns() +func (_Providerregistry *ProviderregistryTransactor) Withdraw(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "withdraw") } -// WithdrawStakedAmount is a paid mutator transaction binding the contract method 0xf31f3da0. +// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b. // -// Solidity: function withdrawStakedAmount(address provider) returns() -func (_Providerregistry *ProviderregistrySession) WithdrawStakedAmount(provider common.Address) (*types.Transaction, error) { - return _Providerregistry.Contract.WithdrawStakedAmount(&_Providerregistry.TransactOpts, provider) +// Solidity: function withdraw() returns() +func (_Providerregistry *ProviderregistrySession) Withdraw() (*types.Transaction, error) { + return _Providerregistry.Contract.Withdraw(&_Providerregistry.TransactOpts) } -// WithdrawStakedAmount is a paid mutator transaction binding the contract method 0xf31f3da0. +// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b. // -// Solidity: function withdrawStakedAmount(address provider) returns() -func (_Providerregistry *ProviderregistryTransactorSession) WithdrawStakedAmount(provider common.Address) (*types.Transaction, error) { - return _Providerregistry.Contract.WithdrawStakedAmount(&_Providerregistry.TransactOpts, provider) +// Solidity: function withdraw() returns() +func (_Providerregistry *ProviderregistryTransactorSession) Withdraw() (*types.Transaction, error) { + return _Providerregistry.Contract.Withdraw(&_Providerregistry.TransactOpts) } // Fallback is a paid mutator transaction binding the contract fallback function. @@ -1043,9 +1169,9 @@ func (_Providerregistry *ProviderregistryTransactorSession) Receive() (*types.Tr return _Providerregistry.Contract.Receive(&_Providerregistry.TransactOpts) } -// ProviderregistryFundsDepositedIterator is returned from FilterFundsDeposited and is used to iterate over the raw logs and unpacked data for FundsDeposited events raised by the Providerregistry contract. -type ProviderregistryFundsDepositedIterator struct { - Event *ProviderregistryFundsDeposited // Event containing the contract specifics and raw log +// ProviderregistryFeePayoutPeriodBlocksUpdatedIterator is returned from FilterFeePayoutPeriodBlocksUpdated and is used to iterate over the raw logs and unpacked data for FeePayoutPeriodBlocksUpdated events raised by the Providerregistry contract. +type ProviderregistryFeePayoutPeriodBlocksUpdatedIterator struct { + Event *ProviderregistryFeePayoutPeriodBlocksUpdated // 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 @@ -1059,7 +1185,7 @@ type ProviderregistryFundsDepositedIterator struct { // 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 *ProviderregistryFundsDepositedIterator) Next() bool { +func (it *ProviderregistryFeePayoutPeriodBlocksUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1068,7 +1194,7 @@ func (it *ProviderregistryFundsDepositedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ProviderregistryFundsDeposited) + it.Event = new(ProviderregistryFeePayoutPeriodBlocksUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1083,7 +1209,7 @@ func (it *ProviderregistryFundsDepositedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ProviderregistryFundsDeposited) + it.Event = new(ProviderregistryFeePayoutPeriodBlocksUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1099,52 +1225,51 @@ func (it *ProviderregistryFundsDepositedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ProviderregistryFundsDepositedIterator) Error() error { +func (it *ProviderregistryFeePayoutPeriodBlocksUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ProviderregistryFundsDepositedIterator) Close() error { +func (it *ProviderregistryFeePayoutPeriodBlocksUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ProviderregistryFundsDeposited represents a FundsDeposited event raised by the Providerregistry contract. -type ProviderregistryFundsDeposited struct { - Provider common.Address - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos +// ProviderregistryFeePayoutPeriodBlocksUpdated represents a FeePayoutPeriodBlocksUpdated event raised by the Providerregistry contract. +type ProviderregistryFeePayoutPeriodBlocksUpdated struct { + NewFeePayoutPeriodBlocks *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterFundsDeposited is a free log retrieval operation binding the contract event 0x543ba50a5eec5e6178218e364b1d0f396157b3c8fa278522c2cb7fd99407d474. +// FilterFeePayoutPeriodBlocksUpdated is a free log retrieval operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. // -// Solidity: event FundsDeposited(address indexed provider, uint256 amount) -func (_Providerregistry *ProviderregistryFilterer) FilterFundsDeposited(opts *bind.FilterOpts, provider []common.Address) (*ProviderregistryFundsDepositedIterator, error) { +// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) +func (_Providerregistry *ProviderregistryFilterer) FilterFeePayoutPeriodBlocksUpdated(opts *bind.FilterOpts, newFeePayoutPeriodBlocks []*big.Int) (*ProviderregistryFeePayoutPeriodBlocksUpdatedIterator, error) { - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) + var newFeePayoutPeriodBlocksRule []interface{} + for _, newFeePayoutPeriodBlocksItem := range newFeePayoutPeriodBlocks { + newFeePayoutPeriodBlocksRule = append(newFeePayoutPeriodBlocksRule, newFeePayoutPeriodBlocksItem) } - logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "FundsDeposited", providerRule) + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "FeePayoutPeriodBlocksUpdated", newFeePayoutPeriodBlocksRule) if err != nil { return nil, err } - return &ProviderregistryFundsDepositedIterator{contract: _Providerregistry.contract, event: "FundsDeposited", logs: logs, sub: sub}, nil + return &ProviderregistryFeePayoutPeriodBlocksUpdatedIterator{contract: _Providerregistry.contract, event: "FeePayoutPeriodBlocksUpdated", logs: logs, sub: sub}, nil } -// WatchFundsDeposited is a free log subscription operation binding the contract event 0x543ba50a5eec5e6178218e364b1d0f396157b3c8fa278522c2cb7fd99407d474. +// WatchFeePayoutPeriodBlocksUpdated is a free log subscription operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. // -// Solidity: event FundsDeposited(address indexed provider, uint256 amount) -func (_Providerregistry *ProviderregistryFilterer) WatchFundsDeposited(opts *bind.WatchOpts, sink chan<- *ProviderregistryFundsDeposited, provider []common.Address) (event.Subscription, error) { +// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) +func (_Providerregistry *ProviderregistryFilterer) WatchFeePayoutPeriodBlocksUpdated(opts *bind.WatchOpts, sink chan<- *ProviderregistryFeePayoutPeriodBlocksUpdated, newFeePayoutPeriodBlocks []*big.Int) (event.Subscription, error) { - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) + var newFeePayoutPeriodBlocksRule []interface{} + for _, newFeePayoutPeriodBlocksItem := range newFeePayoutPeriodBlocks { + newFeePayoutPeriodBlocksRule = append(newFeePayoutPeriodBlocksRule, newFeePayoutPeriodBlocksItem) } - logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "FundsDeposited", providerRule) + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "FeePayoutPeriodBlocksUpdated", newFeePayoutPeriodBlocksRule) if err != nil { return nil, err } @@ -1154,8 +1279,8 @@ func (_Providerregistry *ProviderregistryFilterer) WatchFundsDeposited(opts *bin select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ProviderregistryFundsDeposited) - if err := _Providerregistry.contract.UnpackLog(event, "FundsDeposited", log); err != nil { + event := new(ProviderregistryFeePayoutPeriodBlocksUpdated) + if err := _Providerregistry.contract.UnpackLog(event, "FeePayoutPeriodBlocksUpdated", log); err != nil { return err } event.Raw = log @@ -1176,21 +1301,21 @@ func (_Providerregistry *ProviderregistryFilterer) WatchFundsDeposited(opts *bin }), nil } -// ParseFundsDeposited is a log parse operation binding the contract event 0x543ba50a5eec5e6178218e364b1d0f396157b3c8fa278522c2cb7fd99407d474. +// ParseFeePayoutPeriodBlocksUpdated is a log parse operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. // -// Solidity: event FundsDeposited(address indexed provider, uint256 amount) -func (_Providerregistry *ProviderregistryFilterer) ParseFundsDeposited(log types.Log) (*ProviderregistryFundsDeposited, error) { - event := new(ProviderregistryFundsDeposited) - if err := _Providerregistry.contract.UnpackLog(event, "FundsDeposited", log); err != nil { +// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) +func (_Providerregistry *ProviderregistryFilterer) ParseFeePayoutPeriodBlocksUpdated(log types.Log) (*ProviderregistryFeePayoutPeriodBlocksUpdated, error) { + event := new(ProviderregistryFeePayoutPeriodBlocksUpdated) + if err := _Providerregistry.contract.UnpackLog(event, "FeePayoutPeriodBlocksUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ProviderregistryFundsSlashedIterator is returned from FilterFundsSlashed and is used to iterate over the raw logs and unpacked data for FundsSlashed events raised by the Providerregistry contract. -type ProviderregistryFundsSlashedIterator struct { - Event *ProviderregistryFundsSlashed // Event containing the contract specifics and raw log +// ProviderregistryFeeTransferIterator is returned from FilterFeeTransfer and is used to iterate over the raw logs and unpacked data for FeeTransfer events raised by the Providerregistry contract. +type ProviderregistryFeeTransferIterator struct { + Event *ProviderregistryFeeTransfer // 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 @@ -1204,7 +1329,7 @@ type ProviderregistryFundsSlashedIterator struct { // 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 *ProviderregistryFundsSlashedIterator) Next() bool { +func (it *ProviderregistryFeeTransferIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1213,7 +1338,7 @@ func (it *ProviderregistryFundsSlashedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ProviderregistryFundsSlashed) + it.Event = new(ProviderregistryFeeTransfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1228,7 +1353,7 @@ func (it *ProviderregistryFundsSlashedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ProviderregistryFundsSlashed) + it.Event = new(ProviderregistryFeeTransfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1244,52 +1369,197 @@ func (it *ProviderregistryFundsSlashedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ProviderregistryFundsSlashedIterator) Error() error { +func (it *ProviderregistryFeeTransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ProviderregistryFundsSlashedIterator) Close() error { +func (it *ProviderregistryFeeTransferIterator) Close() error { it.sub.Unsubscribe() return nil } -// ProviderregistryFundsSlashed represents a FundsSlashed event raised by the Providerregistry contract. -type ProviderregistryFundsSlashed struct { - Provider common.Address - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos +// ProviderregistryFeeTransfer represents a FeeTransfer event raised by the Providerregistry contract. +type ProviderregistryFeeTransfer struct { + Amount *big.Int + Recipient common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterFundsSlashed is a free log retrieval operation binding the contract event 0x4a00481d3f7b0802643df0bdfb9bfc491a24ffca3eb1becc9fe8b525e0427a74. +// FilterFeeTransfer is a free log retrieval operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. // -// Solidity: event FundsSlashed(address indexed provider, uint256 amount) -func (_Providerregistry *ProviderregistryFilterer) FilterFundsSlashed(opts *bind.FilterOpts, provider []common.Address) (*ProviderregistryFundsSlashedIterator, error) { +// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) +func (_Providerregistry *ProviderregistryFilterer) FilterFeeTransfer(opts *bind.FilterOpts, recipient []common.Address) (*ProviderregistryFeeTransferIterator, error) { - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) } - logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "FundsSlashed", providerRule) + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "FeeTransfer", recipientRule) if err != nil { return nil, err } - return &ProviderregistryFundsSlashedIterator{contract: _Providerregistry.contract, event: "FundsSlashed", logs: logs, sub: sub}, nil + return &ProviderregistryFeeTransferIterator{contract: _Providerregistry.contract, event: "FeeTransfer", logs: logs, sub: sub}, nil } -// WatchFundsSlashed is a free log subscription operation binding the contract event 0x4a00481d3f7b0802643df0bdfb9bfc491a24ffca3eb1becc9fe8b525e0427a74. +// WatchFeeTransfer is a free log subscription operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. // -// Solidity: event FundsSlashed(address indexed provider, uint256 amount) -func (_Providerregistry *ProviderregistryFilterer) WatchFundsSlashed(opts *bind.WatchOpts, sink chan<- *ProviderregistryFundsSlashed, provider []common.Address) (event.Subscription, error) { +// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) +func (_Providerregistry *ProviderregistryFilterer) WatchFeeTransfer(opts *bind.WatchOpts, sink chan<- *ProviderregistryFeeTransfer, recipient []common.Address) (event.Subscription, error) { - var providerRule []interface{} + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "FeeTransfer", recipientRule) + 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(ProviderregistryFeeTransfer) + if err := _Providerregistry.contract.UnpackLog(event, "FeeTransfer", 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 +} + +// ParseFeeTransfer is a log parse operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. +// +// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) +func (_Providerregistry *ProviderregistryFilterer) ParseFeeTransfer(log types.Log) (*ProviderregistryFeeTransfer, error) { + event := new(ProviderregistryFeeTransfer) + if err := _Providerregistry.contract.UnpackLog(event, "FeeTransfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProviderregistryFundsDepositedIterator is returned from FilterFundsDeposited and is used to iterate over the raw logs and unpacked data for FundsDeposited events raised by the Providerregistry contract. +type ProviderregistryFundsDepositedIterator struct { + Event *ProviderregistryFundsDeposited // 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 *ProviderregistryFundsDepositedIterator) 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(ProviderregistryFundsDeposited) + 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(ProviderregistryFundsDeposited) + 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 *ProviderregistryFundsDepositedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProviderregistryFundsDepositedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProviderregistryFundsDeposited represents a FundsDeposited event raised by the Providerregistry contract. +type ProviderregistryFundsDeposited struct { + Provider common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFundsDeposited is a free log retrieval operation binding the contract event 0x543ba50a5eec5e6178218e364b1d0f396157b3c8fa278522c2cb7fd99407d474. +// +// Solidity: event FundsDeposited(address indexed provider, uint256 amount) +func (_Providerregistry *ProviderregistryFilterer) FilterFundsDeposited(opts *bind.FilterOpts, provider []common.Address) (*ProviderregistryFundsDepositedIterator, error) { + + var providerRule []interface{} for _, providerItem := range provider { providerRule = append(providerRule, providerItem) } - logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "FundsSlashed", providerRule) + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "FundsDeposited", providerRule) + if err != nil { + return nil, err + } + return &ProviderregistryFundsDepositedIterator{contract: _Providerregistry.contract, event: "FundsDeposited", logs: logs, sub: sub}, nil +} + +// WatchFundsDeposited is a free log subscription operation binding the contract event 0x543ba50a5eec5e6178218e364b1d0f396157b3c8fa278522c2cb7fd99407d474. +// +// Solidity: event FundsDeposited(address indexed provider, uint256 amount) +func (_Providerregistry *ProviderregistryFilterer) WatchFundsDeposited(opts *bind.WatchOpts, sink chan<- *ProviderregistryFundsDeposited, provider []common.Address) (event.Subscription, error) { + + var providerRule []interface{} + for _, providerItem := range provider { + providerRule = append(providerRule, providerItem) + } + + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "FundsDeposited", providerRule) if err != nil { return nil, err } @@ -1299,8 +1569,8 @@ func (_Providerregistry *ProviderregistryFilterer) WatchFundsSlashed(opts *bind. select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ProviderregistryFundsSlashed) - if err := _Providerregistry.contract.UnpackLog(event, "FundsSlashed", log); err != nil { + event := new(ProviderregistryFundsDeposited) + if err := _Providerregistry.contract.UnpackLog(event, "FundsDeposited", log); err != nil { return err } event.Raw = log @@ -1321,21 +1591,21 @@ func (_Providerregistry *ProviderregistryFilterer) WatchFundsSlashed(opts *bind. }), nil } -// ParseFundsSlashed is a log parse operation binding the contract event 0x4a00481d3f7b0802643df0bdfb9bfc491a24ffca3eb1becc9fe8b525e0427a74. +// ParseFundsDeposited is a log parse operation binding the contract event 0x543ba50a5eec5e6178218e364b1d0f396157b3c8fa278522c2cb7fd99407d474. // -// Solidity: event FundsSlashed(address indexed provider, uint256 amount) -func (_Providerregistry *ProviderregistryFilterer) ParseFundsSlashed(log types.Log) (*ProviderregistryFundsSlashed, error) { - event := new(ProviderregistryFundsSlashed) - if err := _Providerregistry.contract.UnpackLog(event, "FundsSlashed", log); err != nil { +// Solidity: event FundsDeposited(address indexed provider, uint256 amount) +func (_Providerregistry *ProviderregistryFilterer) ParseFundsDeposited(log types.Log) (*ProviderregistryFundsDeposited, error) { + event := new(ProviderregistryFundsDeposited) + if err := _Providerregistry.contract.UnpackLog(event, "FundsDeposited", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ProviderregistryInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Providerregistry contract. -type ProviderregistryInitializedIterator struct { - Event *ProviderregistryInitialized // Event containing the contract specifics and raw log +// ProviderregistryFundsSlashedIterator is returned from FilterFundsSlashed and is used to iterate over the raw logs and unpacked data for FundsSlashed events raised by the Providerregistry contract. +type ProviderregistryFundsSlashedIterator struct { + Event *ProviderregistryFundsSlashed // 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 @@ -1349,7 +1619,7 @@ type ProviderregistryInitializedIterator struct { // 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 *ProviderregistryInitializedIterator) Next() bool { +func (it *ProviderregistryFundsSlashedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1358,7 +1628,736 @@ func (it *ProviderregistryInitializedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ProviderregistryInitialized) + it.Event = new(ProviderregistryFundsSlashed) + 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(ProviderregistryFundsSlashed) + 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 *ProviderregistryFundsSlashedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProviderregistryFundsSlashedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProviderregistryFundsSlashed represents a FundsSlashed event raised by the Providerregistry contract. +type ProviderregistryFundsSlashed struct { + Provider common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFundsSlashed is a free log retrieval operation binding the contract event 0x4a00481d3f7b0802643df0bdfb9bfc491a24ffca3eb1becc9fe8b525e0427a74. +// +// Solidity: event FundsSlashed(address indexed provider, uint256 amount) +func (_Providerregistry *ProviderregistryFilterer) FilterFundsSlashed(opts *bind.FilterOpts, provider []common.Address) (*ProviderregistryFundsSlashedIterator, error) { + + var providerRule []interface{} + for _, providerItem := range provider { + providerRule = append(providerRule, providerItem) + } + + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "FundsSlashed", providerRule) + if err != nil { + return nil, err + } + return &ProviderregistryFundsSlashedIterator{contract: _Providerregistry.contract, event: "FundsSlashed", logs: logs, sub: sub}, nil +} + +// WatchFundsSlashed is a free log subscription operation binding the contract event 0x4a00481d3f7b0802643df0bdfb9bfc491a24ffca3eb1becc9fe8b525e0427a74. +// +// Solidity: event FundsSlashed(address indexed provider, uint256 amount) +func (_Providerregistry *ProviderregistryFilterer) WatchFundsSlashed(opts *bind.WatchOpts, sink chan<- *ProviderregistryFundsSlashed, provider []common.Address) (event.Subscription, error) { + + var providerRule []interface{} + for _, providerItem := range provider { + providerRule = append(providerRule, providerItem) + } + + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "FundsSlashed", providerRule) + 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(ProviderregistryFundsSlashed) + if err := _Providerregistry.contract.UnpackLog(event, "FundsSlashed", 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 +} + +// ParseFundsSlashed is a log parse operation binding the contract event 0x4a00481d3f7b0802643df0bdfb9bfc491a24ffca3eb1becc9fe8b525e0427a74. +// +// Solidity: event FundsSlashed(address indexed provider, uint256 amount) +func (_Providerregistry *ProviderregistryFilterer) ParseFundsSlashed(log types.Log) (*ProviderregistryFundsSlashed, error) { + event := new(ProviderregistryFundsSlashed) + if err := _Providerregistry.contract.UnpackLog(event, "FundsSlashed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProviderregistryInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Providerregistry contract. +type ProviderregistryInitializedIterator struct { + Event *ProviderregistryInitialized // 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 *ProviderregistryInitializedIterator) 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(ProviderregistryInitialized) + 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(ProviderregistryInitialized) + 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 *ProviderregistryInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProviderregistryInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProviderregistryInitialized represents a Initialized event raised by the Providerregistry contract. +type ProviderregistryInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Providerregistry *ProviderregistryFilterer) FilterInitialized(opts *bind.FilterOpts) (*ProviderregistryInitializedIterator, error) { + + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ProviderregistryInitializedIterator{contract: _Providerregistry.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Providerregistry *ProviderregistryFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ProviderregistryInitialized) (event.Subscription, error) { + + logs, sub, err := _Providerregistry.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(ProviderregistryInitialized) + if err := _Providerregistry.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Providerregistry *ProviderregistryFilterer) ParseInitialized(log types.Log) (*ProviderregistryInitialized, error) { + event := new(ProviderregistryInitialized) + if err := _Providerregistry.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProviderregistryOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the Providerregistry contract. +type ProviderregistryOwnershipTransferStartedIterator struct { + Event *ProviderregistryOwnershipTransferStarted // 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 *ProviderregistryOwnershipTransferStartedIterator) 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(ProviderregistryOwnershipTransferStarted) + 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(ProviderregistryOwnershipTransferStarted) + 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 *ProviderregistryOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProviderregistryOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProviderregistryOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the Providerregistry contract. +type ProviderregistryOwnershipTransferStarted struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_Providerregistry *ProviderregistryFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ProviderregistryOwnershipTransferStartedIterator, 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 := _Providerregistry.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ProviderregistryOwnershipTransferStartedIterator{contract: _Providerregistry.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_Providerregistry *ProviderregistryFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *ProviderregistryOwnershipTransferStarted, 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 := _Providerregistry.contract.WatchLogs(opts, "OwnershipTransferStarted", 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(ProviderregistryOwnershipTransferStarted) + if err := _Providerregistry.contract.UnpackLog(event, "OwnershipTransferStarted", 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 +} + +// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_Providerregistry *ProviderregistryFilterer) ParseOwnershipTransferStarted(log types.Log) (*ProviderregistryOwnershipTransferStarted, error) { + event := new(ProviderregistryOwnershipTransferStarted) + if err := _Providerregistry.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProviderregistryOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Providerregistry contract. +type ProviderregistryOwnershipTransferredIterator struct { + Event *ProviderregistryOwnershipTransferred // 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 *ProviderregistryOwnershipTransferredIterator) 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(ProviderregistryOwnershipTransferred) + 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(ProviderregistryOwnershipTransferred) + 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 *ProviderregistryOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProviderregistryOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProviderregistryOwnershipTransferred represents a OwnershipTransferred event raised by the Providerregistry contract. +type ProviderregistryOwnershipTransferred 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 (_Providerregistry *ProviderregistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ProviderregistryOwnershipTransferredIterator, 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 := _Providerregistry.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ProviderregistryOwnershipTransferredIterator{contract: _Providerregistry.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 (_Providerregistry *ProviderregistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ProviderregistryOwnershipTransferred, 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 := _Providerregistry.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(ProviderregistryOwnershipTransferred) + if err := _Providerregistry.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 (_Providerregistry *ProviderregistryFilterer) ParseOwnershipTransferred(log types.Log) (*ProviderregistryOwnershipTransferred, error) { + event := new(ProviderregistryOwnershipTransferred) + if err := _Providerregistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProviderregistryProtocolFeeRecipientUpdatedIterator is returned from FilterProtocolFeeRecipientUpdated and is used to iterate over the raw logs and unpacked data for ProtocolFeeRecipientUpdated events raised by the Providerregistry contract. +type ProviderregistryProtocolFeeRecipientUpdatedIterator struct { + Event *ProviderregistryProtocolFeeRecipientUpdated // 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 *ProviderregistryProtocolFeeRecipientUpdatedIterator) 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(ProviderregistryProtocolFeeRecipientUpdated) + 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(ProviderregistryProtocolFeeRecipientUpdated) + 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 *ProviderregistryProtocolFeeRecipientUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProviderregistryProtocolFeeRecipientUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProviderregistryProtocolFeeRecipientUpdated represents a ProtocolFeeRecipientUpdated event raised by the Providerregistry contract. +type ProviderregistryProtocolFeeRecipientUpdated struct { + NewProtocolFeeRecipient common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProtocolFeeRecipientUpdated is a free log retrieval operation binding the contract event 0xc1b5345cce283376356748dc57f2dfa7120431d016fc7ca9ba641bc65f91411d. +// +// Solidity: event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient) +func (_Providerregistry *ProviderregistryFilterer) FilterProtocolFeeRecipientUpdated(opts *bind.FilterOpts, newProtocolFeeRecipient []common.Address) (*ProviderregistryProtocolFeeRecipientUpdatedIterator, error) { + + var newProtocolFeeRecipientRule []interface{} + for _, newProtocolFeeRecipientItem := range newProtocolFeeRecipient { + newProtocolFeeRecipientRule = append(newProtocolFeeRecipientRule, newProtocolFeeRecipientItem) + } + + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "ProtocolFeeRecipientUpdated", newProtocolFeeRecipientRule) + if err != nil { + return nil, err + } + return &ProviderregistryProtocolFeeRecipientUpdatedIterator{contract: _Providerregistry.contract, event: "ProtocolFeeRecipientUpdated", logs: logs, sub: sub}, nil +} + +// WatchProtocolFeeRecipientUpdated is a free log subscription operation binding the contract event 0xc1b5345cce283376356748dc57f2dfa7120431d016fc7ca9ba641bc65f91411d. +// +// Solidity: event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient) +func (_Providerregistry *ProviderregistryFilterer) WatchProtocolFeeRecipientUpdated(opts *bind.WatchOpts, sink chan<- *ProviderregistryProtocolFeeRecipientUpdated, newProtocolFeeRecipient []common.Address) (event.Subscription, error) { + + var newProtocolFeeRecipientRule []interface{} + for _, newProtocolFeeRecipientItem := range newProtocolFeeRecipient { + newProtocolFeeRecipientRule = append(newProtocolFeeRecipientRule, newProtocolFeeRecipientItem) + } + + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "ProtocolFeeRecipientUpdated", newProtocolFeeRecipientRule) + 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(ProviderregistryProtocolFeeRecipientUpdated) + if err := _Providerregistry.contract.UnpackLog(event, "ProtocolFeeRecipientUpdated", 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 +} + +// ParseProtocolFeeRecipientUpdated is a log parse operation binding the contract event 0xc1b5345cce283376356748dc57f2dfa7120431d016fc7ca9ba641bc65f91411d. +// +// Solidity: event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient) +func (_Providerregistry *ProviderregistryFilterer) ParseProtocolFeeRecipientUpdated(log types.Log) (*ProviderregistryProtocolFeeRecipientUpdated, error) { + event := new(ProviderregistryProtocolFeeRecipientUpdated) + if err := _Providerregistry.contract.UnpackLog(event, "ProtocolFeeRecipientUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProviderregistryProviderRegisteredIterator is returned from FilterProviderRegistered and is used to iterate over the raw logs and unpacked data for ProviderRegistered events raised by the Providerregistry contract. +type ProviderregistryProviderRegisteredIterator struct { + Event *ProviderregistryProviderRegistered // 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 *ProviderregistryProviderRegisteredIterator) 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(ProviderregistryProviderRegistered) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1373,7 +2372,7 @@ func (it *ProviderregistryInitializedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ProviderregistryInitialized) + it.Event = new(ProviderregistryProviderRegistered) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1389,41 +2388,53 @@ func (it *ProviderregistryInitializedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ProviderregistryInitializedIterator) Error() error { +func (it *ProviderregistryProviderRegisteredIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ProviderregistryInitializedIterator) Close() error { +func (it *ProviderregistryProviderRegisteredIterator) Close() error { it.sub.Unsubscribe() return nil } -// ProviderregistryInitialized represents a Initialized event raised by the Providerregistry contract. -type ProviderregistryInitialized struct { - Version uint64 - Raw types.Log // Blockchain specific contextual infos +// ProviderregistryProviderRegistered represents a ProviderRegistered event raised by the Providerregistry contract. +type ProviderregistryProviderRegistered struct { + Provider common.Address + StakedAmount *big.Int + BlsPublicKey []byte + Raw types.Log // Blockchain specific contextual infos } -// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// FilterProviderRegistered is a free log retrieval operation binding the contract event 0x79fda11c69e0429d87cf53e6967d16c56a3d80a7e6e67dd03ccf7f20d6285fc0. // -// Solidity: event Initialized(uint64 version) -func (_Providerregistry *ProviderregistryFilterer) FilterInitialized(opts *bind.FilterOpts) (*ProviderregistryInitializedIterator, error) { +// Solidity: event ProviderRegistered(address indexed provider, uint256 stakedAmount, bytes blsPublicKey) +func (_Providerregistry *ProviderregistryFilterer) FilterProviderRegistered(opts *bind.FilterOpts, provider []common.Address) (*ProviderregistryProviderRegisteredIterator, error) { - logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "Initialized") + var providerRule []interface{} + for _, providerItem := range provider { + providerRule = append(providerRule, providerItem) + } + + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "ProviderRegistered", providerRule) if err != nil { return nil, err } - return &ProviderregistryInitializedIterator{contract: _Providerregistry.contract, event: "Initialized", logs: logs, sub: sub}, nil + return &ProviderregistryProviderRegisteredIterator{contract: _Providerregistry.contract, event: "ProviderRegistered", logs: logs, sub: sub}, nil } -// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// WatchProviderRegistered is a free log subscription operation binding the contract event 0x79fda11c69e0429d87cf53e6967d16c56a3d80a7e6e67dd03ccf7f20d6285fc0. // -// Solidity: event Initialized(uint64 version) -func (_Providerregistry *ProviderregistryFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ProviderregistryInitialized) (event.Subscription, error) { +// Solidity: event ProviderRegistered(address indexed provider, uint256 stakedAmount, bytes blsPublicKey) +func (_Providerregistry *ProviderregistryFilterer) WatchProviderRegistered(opts *bind.WatchOpts, sink chan<- *ProviderregistryProviderRegistered, provider []common.Address) (event.Subscription, error) { - logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "Initialized") + var providerRule []interface{} + for _, providerItem := range provider { + providerRule = append(providerRule, providerItem) + } + + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "ProviderRegistered", providerRule) if err != nil { return nil, err } @@ -1433,8 +2444,8 @@ func (_Providerregistry *ProviderregistryFilterer) WatchInitialized(opts *bind.W select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ProviderregistryInitialized) - if err := _Providerregistry.contract.UnpackLog(event, "Initialized", log); err != nil { + event := new(ProviderregistryProviderRegistered) + if err := _Providerregistry.contract.UnpackLog(event, "ProviderRegistered", log); err != nil { return err } event.Raw = log @@ -1455,21 +2466,21 @@ func (_Providerregistry *ProviderregistryFilterer) WatchInitialized(opts *bind.W }), nil } -// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// ParseProviderRegistered is a log parse operation binding the contract event 0x79fda11c69e0429d87cf53e6967d16c56a3d80a7e6e67dd03ccf7f20d6285fc0. // -// Solidity: event Initialized(uint64 version) -func (_Providerregistry *ProviderregistryFilterer) ParseInitialized(log types.Log) (*ProviderregistryInitialized, error) { - event := new(ProviderregistryInitialized) - if err := _Providerregistry.contract.UnpackLog(event, "Initialized", log); err != nil { +// Solidity: event ProviderRegistered(address indexed provider, uint256 stakedAmount, bytes blsPublicKey) +func (_Providerregistry *ProviderregistryFilterer) ParseProviderRegistered(log types.Log) (*ProviderregistryProviderRegistered, error) { + event := new(ProviderregistryProviderRegistered) + if err := _Providerregistry.contract.UnpackLog(event, "ProviderRegistered", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ProviderregistryOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the Providerregistry contract. -type ProviderregistryOwnershipTransferStartedIterator struct { - Event *ProviderregistryOwnershipTransferStarted // Event containing the contract specifics and raw log +// ProviderregistryUnstakeIterator is returned from FilterUnstake and is used to iterate over the raw logs and unpacked data for Unstake events raised by the Providerregistry contract. +type ProviderregistryUnstakeIterator struct { + Event *ProviderregistryUnstake // 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 @@ -1483,7 +2494,7 @@ type ProviderregistryOwnershipTransferStartedIterator struct { // 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 *ProviderregistryOwnershipTransferStartedIterator) Next() bool { +func (it *ProviderregistryUnstakeIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1492,7 +2503,7 @@ func (it *ProviderregistryOwnershipTransferStartedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ProviderregistryOwnershipTransferStarted) + it.Event = new(ProviderregistryUnstake) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1507,7 +2518,7 @@ func (it *ProviderregistryOwnershipTransferStartedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ProviderregistryOwnershipTransferStarted) + it.Event = new(ProviderregistryUnstake) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1523,60 +2534,52 @@ func (it *ProviderregistryOwnershipTransferStartedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ProviderregistryOwnershipTransferStartedIterator) Error() error { +func (it *ProviderregistryUnstakeIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ProviderregistryOwnershipTransferStartedIterator) Close() error { +func (it *ProviderregistryUnstakeIterator) Close() error { it.sub.Unsubscribe() return nil } -// ProviderregistryOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the Providerregistry contract. -type ProviderregistryOwnershipTransferStarted struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// ProviderregistryUnstake represents a Unstake event raised by the Providerregistry contract. +type ProviderregistryUnstake struct { + Provider common.Address + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// FilterUnstake is a free log retrieval operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. // -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_Providerregistry *ProviderregistryFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ProviderregistryOwnershipTransferStartedIterator, error) { +// Solidity: event Unstake(address indexed provider, uint256 timestamp) +func (_Providerregistry *ProviderregistryFilterer) FilterUnstake(opts *bind.FilterOpts, provider []common.Address) (*ProviderregistryUnstakeIterator, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + var providerRule []interface{} + for _, providerItem := range provider { + providerRule = append(providerRule, providerItem) } - logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "Unstake", providerRule) if err != nil { return nil, err } - return &ProviderregistryOwnershipTransferStartedIterator{contract: _Providerregistry.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil + return &ProviderregistryUnstakeIterator{contract: _Providerregistry.contract, event: "Unstake", logs: logs, sub: sub}, nil } -// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// WatchUnstake is a free log subscription operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. // -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_Providerregistry *ProviderregistryFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *ProviderregistryOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { +// Solidity: event Unstake(address indexed provider, uint256 timestamp) +func (_Providerregistry *ProviderregistryFilterer) WatchUnstake(opts *bind.WatchOpts, sink chan<- *ProviderregistryUnstake, provider []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) + var providerRule []interface{} + for _, providerItem := range provider { + providerRule = append(providerRule, providerItem) } - logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "Unstake", providerRule) if err != nil { return nil, err } @@ -1586,8 +2589,8 @@ func (_Providerregistry *ProviderregistryFilterer) WatchOwnershipTransferStarted select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ProviderregistryOwnershipTransferStarted) - if err := _Providerregistry.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + event := new(ProviderregistryUnstake) + if err := _Providerregistry.contract.UnpackLog(event, "Unstake", log); err != nil { return err } event.Raw = log @@ -1608,21 +2611,21 @@ func (_Providerregistry *ProviderregistryFilterer) WatchOwnershipTransferStarted }), nil } -// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// ParseUnstake is a log parse operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. // -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_Providerregistry *ProviderregistryFilterer) ParseOwnershipTransferStarted(log types.Log) (*ProviderregistryOwnershipTransferStarted, error) { - event := new(ProviderregistryOwnershipTransferStarted) - if err := _Providerregistry.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { +// Solidity: event Unstake(address indexed provider, uint256 timestamp) +func (_Providerregistry *ProviderregistryFilterer) ParseUnstake(log types.Log) (*ProviderregistryUnstake, error) { + event := new(ProviderregistryUnstake) + if err := _Providerregistry.contract.UnpackLog(event, "Unstake", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ProviderregistryOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Providerregistry contract. -type ProviderregistryOwnershipTransferredIterator struct { - Event *ProviderregistryOwnershipTransferred // Event containing the contract specifics and raw log +// ProviderregistryUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Providerregistry contract. +type ProviderregistryUpgradedIterator struct { + Event *ProviderregistryUpgraded // 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 @@ -1636,7 +2639,7 @@ type ProviderregistryOwnershipTransferredIterator struct { // 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 *ProviderregistryOwnershipTransferredIterator) Next() bool { +func (it *ProviderregistryUpgradedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1645,7 +2648,7 @@ func (it *ProviderregistryOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ProviderregistryOwnershipTransferred) + it.Event = new(ProviderregistryUpgraded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1660,7 +2663,7 @@ func (it *ProviderregistryOwnershipTransferredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ProviderregistryOwnershipTransferred) + it.Event = new(ProviderregistryUpgraded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1676,60 +2679,51 @@ func (it *ProviderregistryOwnershipTransferredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ProviderregistryOwnershipTransferredIterator) Error() error { +func (it *ProviderregistryUpgradedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ProviderregistryOwnershipTransferredIterator) Close() error { +func (it *ProviderregistryUpgradedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ProviderregistryOwnershipTransferred represents a OwnershipTransferred event raised by the Providerregistry contract. -type ProviderregistryOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// ProviderregistryUpgraded represents a Upgraded event raised by the Providerregistry contract. +type ProviderregistryUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Providerregistry *ProviderregistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ProviderregistryOwnershipTransferredIterator, error) { +// Solidity: event Upgraded(address indexed implementation) +func (_Providerregistry *ProviderregistryFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*ProviderregistryUpgradedIterator, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) } - logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "Upgraded", implementationRule) if err != nil { return nil, err } - return &ProviderregistryOwnershipTransferredIterator{contract: _Providerregistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &ProviderregistryUpgradedIterator{contract: _Providerregistry.contract, event: "Upgraded", logs: logs, sub: sub}, nil } -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Providerregistry *ProviderregistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ProviderregistryOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { +// Solidity: event Upgraded(address indexed implementation) +func (_Providerregistry *ProviderregistryFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *ProviderregistryUpgraded, implementation []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) + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) } - logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "Upgraded", implementationRule) if err != nil { return nil, err } @@ -1739,8 +2733,8 @@ func (_Providerregistry *ProviderregistryFilterer) WatchOwnershipTransferred(opt select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ProviderregistryOwnershipTransferred) - if err := _Providerregistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(ProviderregistryUpgraded) + if err := _Providerregistry.contract.UnpackLog(event, "Upgraded", log); err != nil { return err } event.Raw = log @@ -1761,21 +2755,21 @@ func (_Providerregistry *ProviderregistryFilterer) WatchOwnershipTransferred(opt }), nil } -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Providerregistry *ProviderregistryFilterer) ParseOwnershipTransferred(log types.Log) (*ProviderregistryOwnershipTransferred, error) { - event := new(ProviderregistryOwnershipTransferred) - if err := _Providerregistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +// Solidity: event Upgraded(address indexed implementation) +func (_Providerregistry *ProviderregistryFilterer) ParseUpgraded(log types.Log) (*ProviderregistryUpgraded, error) { + event := new(ProviderregistryUpgraded) + if err := _Providerregistry.contract.UnpackLog(event, "Upgraded", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ProviderregistryProviderRegisteredIterator is returned from FilterProviderRegistered and is used to iterate over the raw logs and unpacked data for ProviderRegistered events raised by the Providerregistry contract. -type ProviderregistryProviderRegisteredIterator struct { - Event *ProviderregistryProviderRegistered // Event containing the contract specifics and raw log +// ProviderregistryWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the Providerregistry contract. +type ProviderregistryWithdrawIterator struct { + Event *ProviderregistryWithdraw // 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 @@ -1789,7 +2783,7 @@ type ProviderregistryProviderRegisteredIterator struct { // 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 *ProviderregistryProviderRegisteredIterator) Next() bool { +func (it *ProviderregistryWithdrawIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1798,7 +2792,7 @@ func (it *ProviderregistryProviderRegisteredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ProviderregistryProviderRegistered) + it.Event = new(ProviderregistryWithdraw) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1813,7 +2807,7 @@ func (it *ProviderregistryProviderRegisteredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ProviderregistryProviderRegistered) + it.Event = new(ProviderregistryWithdraw) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1829,53 +2823,52 @@ func (it *ProviderregistryProviderRegisteredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ProviderregistryProviderRegisteredIterator) Error() error { +func (it *ProviderregistryWithdrawIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ProviderregistryProviderRegisteredIterator) Close() error { +func (it *ProviderregistryWithdrawIterator) Close() error { it.sub.Unsubscribe() return nil } -// ProviderregistryProviderRegistered represents a ProviderRegistered event raised by the Providerregistry contract. -type ProviderregistryProviderRegistered struct { - Provider common.Address - StakedAmount *big.Int - BlsPublicKey []byte - Raw types.Log // Blockchain specific contextual infos +// ProviderregistryWithdraw represents a Withdraw event raised by the Providerregistry contract. +type ProviderregistryWithdraw struct { + Provider common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterProviderRegistered is a free log retrieval operation binding the contract event 0x79fda11c69e0429d87cf53e6967d16c56a3d80a7e6e67dd03ccf7f20d6285fc0. +// FilterWithdraw is a free log retrieval operation binding the contract event 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364. // -// Solidity: event ProviderRegistered(address indexed provider, uint256 stakedAmount, bytes blsPublicKey) -func (_Providerregistry *ProviderregistryFilterer) FilterProviderRegistered(opts *bind.FilterOpts, provider []common.Address) (*ProviderregistryProviderRegisteredIterator, error) { +// Solidity: event Withdraw(address indexed provider, uint256 amount) +func (_Providerregistry *ProviderregistryFilterer) FilterWithdraw(opts *bind.FilterOpts, provider []common.Address) (*ProviderregistryWithdrawIterator, error) { var providerRule []interface{} for _, providerItem := range provider { providerRule = append(providerRule, providerItem) } - logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "ProviderRegistered", providerRule) + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "Withdraw", providerRule) if err != nil { return nil, err } - return &ProviderregistryProviderRegisteredIterator{contract: _Providerregistry.contract, event: "ProviderRegistered", logs: logs, sub: sub}, nil + return &ProviderregistryWithdrawIterator{contract: _Providerregistry.contract, event: "Withdraw", logs: logs, sub: sub}, nil } -// WatchProviderRegistered is a free log subscription operation binding the contract event 0x79fda11c69e0429d87cf53e6967d16c56a3d80a7e6e67dd03ccf7f20d6285fc0. +// WatchWithdraw is a free log subscription operation binding the contract event 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364. // -// Solidity: event ProviderRegistered(address indexed provider, uint256 stakedAmount, bytes blsPublicKey) -func (_Providerregistry *ProviderregistryFilterer) WatchProviderRegistered(opts *bind.WatchOpts, sink chan<- *ProviderregistryProviderRegistered, provider []common.Address) (event.Subscription, error) { +// Solidity: event Withdraw(address indexed provider, uint256 amount) +func (_Providerregistry *ProviderregistryFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *ProviderregistryWithdraw, provider []common.Address) (event.Subscription, error) { var providerRule []interface{} for _, providerItem := range provider { providerRule = append(providerRule, providerItem) } - logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "ProviderRegistered", providerRule) + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "Withdraw", providerRule) if err != nil { return nil, err } @@ -1885,8 +2878,8 @@ func (_Providerregistry *ProviderregistryFilterer) WatchProviderRegistered(opts select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ProviderregistryProviderRegistered) - if err := _Providerregistry.contract.UnpackLog(event, "ProviderRegistered", log); err != nil { + event := new(ProviderregistryWithdraw) + if err := _Providerregistry.contract.UnpackLog(event, "Withdraw", log); err != nil { return err } event.Raw = log @@ -1907,21 +2900,21 @@ func (_Providerregistry *ProviderregistryFilterer) WatchProviderRegistered(opts }), nil } -// ParseProviderRegistered is a log parse operation binding the contract event 0x79fda11c69e0429d87cf53e6967d16c56a3d80a7e6e67dd03ccf7f20d6285fc0. +// ParseWithdraw is a log parse operation binding the contract event 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364. // -// Solidity: event ProviderRegistered(address indexed provider, uint256 stakedAmount, bytes blsPublicKey) -func (_Providerregistry *ProviderregistryFilterer) ParseProviderRegistered(log types.Log) (*ProviderregistryProviderRegistered, error) { - event := new(ProviderregistryProviderRegistered) - if err := _Providerregistry.contract.UnpackLog(event, "ProviderRegistered", log); err != nil { +// Solidity: event Withdraw(address indexed provider, uint256 amount) +func (_Providerregistry *ProviderregistryFilterer) ParseWithdraw(log types.Log) (*ProviderregistryWithdraw, error) { + event := new(ProviderregistryWithdraw) + if err := _Providerregistry.contract.UnpackLog(event, "Withdraw", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ProviderregistryUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Providerregistry contract. -type ProviderregistryUpgradedIterator struct { - Event *ProviderregistryUpgraded // Event containing the contract specifics and raw log +// ProviderregistryWithdrawalDelayUpdatedIterator is returned from FilterWithdrawalDelayUpdated and is used to iterate over the raw logs and unpacked data for WithdrawalDelayUpdated events raised by the Providerregistry contract. +type ProviderregistryWithdrawalDelayUpdatedIterator struct { + Event *ProviderregistryWithdrawalDelayUpdated // 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 @@ -1935,7 +2928,7 @@ type ProviderregistryUpgradedIterator struct { // 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 *ProviderregistryUpgradedIterator) Next() bool { +func (it *ProviderregistryWithdrawalDelayUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1944,7 +2937,7 @@ func (it *ProviderregistryUpgradedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ProviderregistryUpgraded) + it.Event = new(ProviderregistryWithdrawalDelayUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1959,7 +2952,7 @@ func (it *ProviderregistryUpgradedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ProviderregistryUpgraded) + it.Event = new(ProviderregistryWithdrawalDelayUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1975,51 +2968,41 @@ func (it *ProviderregistryUpgradedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ProviderregistryUpgradedIterator) Error() error { +func (it *ProviderregistryWithdrawalDelayUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ProviderregistryUpgradedIterator) Close() error { +func (it *ProviderregistryWithdrawalDelayUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ProviderregistryUpgraded represents a Upgraded event raised by the Providerregistry contract. -type ProviderregistryUpgraded struct { - Implementation common.Address - Raw types.Log // Blockchain specific contextual infos +// ProviderregistryWithdrawalDelayUpdated represents a WithdrawalDelayUpdated event raised by the Providerregistry contract. +type ProviderregistryWithdrawalDelayUpdated struct { + NewWithdrawalDelay *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// FilterWithdrawalDelayUpdated is a free log retrieval operation binding the contract event 0xb34b8e54226bc5e8f4a9d846e344e0c42d09eeb1c79798df7ce7460c16071e2d. // -// Solidity: event Upgraded(address indexed implementation) -func (_Providerregistry *ProviderregistryFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*ProviderregistryUpgradedIterator, error) { - - var implementationRule []interface{} - for _, implementationItem := range implementation { - implementationRule = append(implementationRule, implementationItem) - } +// Solidity: event WithdrawalDelayUpdated(uint256 newWithdrawalDelay) +func (_Providerregistry *ProviderregistryFilterer) FilterWithdrawalDelayUpdated(opts *bind.FilterOpts) (*ProviderregistryWithdrawalDelayUpdatedIterator, error) { - logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "Upgraded", implementationRule) + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "WithdrawalDelayUpdated") if err != nil { return nil, err } - return &ProviderregistryUpgradedIterator{contract: _Providerregistry.contract, event: "Upgraded", logs: logs, sub: sub}, nil + return &ProviderregistryWithdrawalDelayUpdatedIterator{contract: _Providerregistry.contract, event: "WithdrawalDelayUpdated", logs: logs, sub: sub}, nil } -// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// WatchWithdrawalDelayUpdated is a free log subscription operation binding the contract event 0xb34b8e54226bc5e8f4a9d846e344e0c42d09eeb1c79798df7ce7460c16071e2d. // -// Solidity: event Upgraded(address indexed implementation) -func (_Providerregistry *ProviderregistryFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *ProviderregistryUpgraded, implementation []common.Address) (event.Subscription, error) { - - var implementationRule []interface{} - for _, implementationItem := range implementation { - implementationRule = append(implementationRule, implementationItem) - } +// Solidity: event WithdrawalDelayUpdated(uint256 newWithdrawalDelay) +func (_Providerregistry *ProviderregistryFilterer) WatchWithdrawalDelayUpdated(opts *bind.WatchOpts, sink chan<- *ProviderregistryWithdrawalDelayUpdated) (event.Subscription, error) { - logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "Upgraded", implementationRule) + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "WithdrawalDelayUpdated") if err != nil { return nil, err } @@ -2029,8 +3012,8 @@ func (_Providerregistry *ProviderregistryFilterer) WatchUpgraded(opts *bind.Watc select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ProviderregistryUpgraded) - if err := _Providerregistry.contract.UnpackLog(event, "Upgraded", log); err != nil { + event := new(ProviderregistryWithdrawalDelayUpdated) + if err := _Providerregistry.contract.UnpackLog(event, "WithdrawalDelayUpdated", log); err != nil { return err } event.Raw = log @@ -2051,12 +3034,12 @@ func (_Providerregistry *ProviderregistryFilterer) WatchUpgraded(opts *bind.Watc }), nil } -// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// ParseWithdrawalDelayUpdated is a log parse operation binding the contract event 0xb34b8e54226bc5e8f4a9d846e344e0c42d09eeb1c79798df7ce7460c16071e2d. // -// Solidity: event Upgraded(address indexed implementation) -func (_Providerregistry *ProviderregistryFilterer) ParseUpgraded(log types.Log) (*ProviderregistryUpgraded, error) { - event := new(ProviderregistryUpgraded) - if err := _Providerregistry.contract.UnpackLog(event, "Upgraded", log); err != nil { +// Solidity: event WithdrawalDelayUpdated(uint256 newWithdrawalDelay) +func (_Providerregistry *ProviderregistryFilterer) ParseWithdrawalDelayUpdated(log types.Log) (*ProviderregistryWithdrawalDelayUpdated, error) { + event := new(ProviderregistryWithdrawalDelayUpdated) + if err := _Providerregistry.contract.UnpackLog(event, "WithdrawalDelayUpdated", log); err != nil { return nil, err } event.Raw = log diff --git a/contracts-abi/clients/ValidatorOptInRouter/ValidatorOptInRouter.go b/contracts-abi/clients/ValidatorOptInRouter/ValidatorOptInRouter.go new file mode 100644 index 000000000..df96a54e2 --- /dev/null +++ b/contracts-abi/clients/ValidatorOptInRouter/ValidatorOptInRouter.go @@ -0,0 +1,1441 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package validatoroptinrouter + +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 +) + +// ValidatoroptinrouterMetaData contains all meta data concerning the Validatoroptinrouter contract. +var ValidatoroptinrouterMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"areValidatorsOptedIn\",\"inputs\":[{\"name\":\"valBLSPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_validatorRegistry\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_mevCommitAVS\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mevCommitAVS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIMevCommitAVS\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMevCommitAVS\",\"inputs\":[{\"name\":\"_mevCommitAVS\",\"type\":\"address\",\"internalType\":\"contractIMevCommitAVS\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setValidatorRegistryV1\",\"inputs\":[{\"name\":\"_validatorRegistry\",\"type\":\"address\",\"internalType\":\"contractIValidatorRegistryV1\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"validatorRegistryV1\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIValidatorRegistryV1\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MevCommitAVSSet\",\"inputs\":[{\"name\":\"oldContract\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newContract\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorRegistryV1Set\",\"inputs\":[{\"name\":\"oldContract\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newContract\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFallback\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReceive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", +} + +// ValidatoroptinrouterABI is the input ABI used to generate the binding from. +// Deprecated: Use ValidatoroptinrouterMetaData.ABI instead. +var ValidatoroptinrouterABI = ValidatoroptinrouterMetaData.ABI + +// Validatoroptinrouter is an auto generated Go binding around an Ethereum contract. +type Validatoroptinrouter struct { + ValidatoroptinrouterCaller // Read-only binding to the contract + ValidatoroptinrouterTransactor // Write-only binding to the contract + ValidatoroptinrouterFilterer // Log filterer for contract events +} + +// ValidatoroptinrouterCaller is an auto generated read-only Go binding around an Ethereum contract. +type ValidatoroptinrouterCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ValidatoroptinrouterTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ValidatoroptinrouterTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ValidatoroptinrouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ValidatoroptinrouterFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ValidatoroptinrouterSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ValidatoroptinrouterSession struct { + Contract *Validatoroptinrouter // 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 +} + +// ValidatoroptinrouterCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ValidatoroptinrouterCallerSession struct { + Contract *ValidatoroptinrouterCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ValidatoroptinrouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ValidatoroptinrouterTransactorSession struct { + Contract *ValidatoroptinrouterTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ValidatoroptinrouterRaw is an auto generated low-level Go binding around an Ethereum contract. +type ValidatoroptinrouterRaw struct { + Contract *Validatoroptinrouter // Generic contract binding to access the raw methods on +} + +// ValidatoroptinrouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ValidatoroptinrouterCallerRaw struct { + Contract *ValidatoroptinrouterCaller // Generic read-only contract binding to access the raw methods on +} + +// ValidatoroptinrouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ValidatoroptinrouterTransactorRaw struct { + Contract *ValidatoroptinrouterTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewValidatoroptinrouter creates a new instance of Validatoroptinrouter, bound to a specific deployed contract. +func NewValidatoroptinrouter(address common.Address, backend bind.ContractBackend) (*Validatoroptinrouter, error) { + contract, err := bindValidatoroptinrouter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Validatoroptinrouter{ValidatoroptinrouterCaller: ValidatoroptinrouterCaller{contract: contract}, ValidatoroptinrouterTransactor: ValidatoroptinrouterTransactor{contract: contract}, ValidatoroptinrouterFilterer: ValidatoroptinrouterFilterer{contract: contract}}, nil +} + +// NewValidatoroptinrouterCaller creates a new read-only instance of Validatoroptinrouter, bound to a specific deployed contract. +func NewValidatoroptinrouterCaller(address common.Address, caller bind.ContractCaller) (*ValidatoroptinrouterCaller, error) { + contract, err := bindValidatoroptinrouter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ValidatoroptinrouterCaller{contract: contract}, nil +} + +// NewValidatoroptinrouterTransactor creates a new write-only instance of Validatoroptinrouter, bound to a specific deployed contract. +func NewValidatoroptinrouterTransactor(address common.Address, transactor bind.ContractTransactor) (*ValidatoroptinrouterTransactor, error) { + contract, err := bindValidatoroptinrouter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ValidatoroptinrouterTransactor{contract: contract}, nil +} + +// NewValidatoroptinrouterFilterer creates a new log filterer instance of Validatoroptinrouter, bound to a specific deployed contract. +func NewValidatoroptinrouterFilterer(address common.Address, filterer bind.ContractFilterer) (*ValidatoroptinrouterFilterer, error) { + contract, err := bindValidatoroptinrouter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ValidatoroptinrouterFilterer{contract: contract}, nil +} + +// bindValidatoroptinrouter binds a generic wrapper to an already deployed contract. +func bindValidatoroptinrouter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ValidatoroptinrouterMetaData.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 (_Validatoroptinrouter *ValidatoroptinrouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Validatoroptinrouter.Contract.ValidatoroptinrouterCaller.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 (_Validatoroptinrouter *ValidatoroptinrouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.ValidatoroptinrouterTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Validatoroptinrouter *ValidatoroptinrouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.ValidatoroptinrouterTransactor.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 (_Validatoroptinrouter *ValidatoroptinrouterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Validatoroptinrouter.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 (_Validatoroptinrouter *ValidatoroptinrouterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.contract.Transact(opts, method, params...) +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Validatoroptinrouter *ValidatoroptinrouterCaller) UPGRADEINTERFACEVERSION(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Validatoroptinrouter.contract.Call(opts, &out, "UPGRADE_INTERFACE_VERSION") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Validatoroptinrouter *ValidatoroptinrouterSession) UPGRADEINTERFACEVERSION() (string, error) { + return _Validatoroptinrouter.Contract.UPGRADEINTERFACEVERSION(&_Validatoroptinrouter.CallOpts) +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Validatoroptinrouter *ValidatoroptinrouterCallerSession) UPGRADEINTERFACEVERSION() (string, error) { + return _Validatoroptinrouter.Contract.UPGRADEINTERFACEVERSION(&_Validatoroptinrouter.CallOpts) +} + +// AreValidatorsOptedIn is a free data retrieval call binding the contract method 0x5b88b173. +// +// Solidity: function areValidatorsOptedIn(bytes[] valBLSPubKeys) view returns(bool[]) +func (_Validatoroptinrouter *ValidatoroptinrouterCaller) AreValidatorsOptedIn(opts *bind.CallOpts, valBLSPubKeys [][]byte) ([]bool, error) { + var out []interface{} + err := _Validatoroptinrouter.contract.Call(opts, &out, "areValidatorsOptedIn", valBLSPubKeys) + + if err != nil { + return *new([]bool), err + } + + out0 := *abi.ConvertType(out[0], new([]bool)).(*[]bool) + + return out0, err + +} + +// AreValidatorsOptedIn is a free data retrieval call binding the contract method 0x5b88b173. +// +// Solidity: function areValidatorsOptedIn(bytes[] valBLSPubKeys) view returns(bool[]) +func (_Validatoroptinrouter *ValidatoroptinrouterSession) AreValidatorsOptedIn(valBLSPubKeys [][]byte) ([]bool, error) { + return _Validatoroptinrouter.Contract.AreValidatorsOptedIn(&_Validatoroptinrouter.CallOpts, valBLSPubKeys) +} + +// AreValidatorsOptedIn is a free data retrieval call binding the contract method 0x5b88b173. +// +// Solidity: function areValidatorsOptedIn(bytes[] valBLSPubKeys) view returns(bool[]) +func (_Validatoroptinrouter *ValidatoroptinrouterCallerSession) AreValidatorsOptedIn(valBLSPubKeys [][]byte) ([]bool, error) { + return _Validatoroptinrouter.Contract.AreValidatorsOptedIn(&_Validatoroptinrouter.CallOpts, valBLSPubKeys) +} + +// MevCommitAVS is a free data retrieval call binding the contract method 0x22a3d9d6. +// +// Solidity: function mevCommitAVS() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterCaller) MevCommitAVS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Validatoroptinrouter.contract.Call(opts, &out, "mevCommitAVS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// MevCommitAVS is a free data retrieval call binding the contract method 0x22a3d9d6. +// +// Solidity: function mevCommitAVS() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterSession) MevCommitAVS() (common.Address, error) { + return _Validatoroptinrouter.Contract.MevCommitAVS(&_Validatoroptinrouter.CallOpts) +} + +// MevCommitAVS is a free data retrieval call binding the contract method 0x22a3d9d6. +// +// Solidity: function mevCommitAVS() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterCallerSession) MevCommitAVS() (common.Address, error) { + return _Validatoroptinrouter.Contract.MevCommitAVS(&_Validatoroptinrouter.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Validatoroptinrouter.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 (_Validatoroptinrouter *ValidatoroptinrouterSession) Owner() (common.Address, error) { + return _Validatoroptinrouter.Contract.Owner(&_Validatoroptinrouter.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterCallerSession) Owner() (common.Address, error) { + return _Validatoroptinrouter.Contract.Owner(&_Validatoroptinrouter.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Validatoroptinrouter.contract.Call(opts, &out, "pendingOwner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterSession) PendingOwner() (common.Address, error) { + return _Validatoroptinrouter.Contract.PendingOwner(&_Validatoroptinrouter.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterCallerSession) PendingOwner() (common.Address, error) { + return _Validatoroptinrouter.Contract.PendingOwner(&_Validatoroptinrouter.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Validatoroptinrouter *ValidatoroptinrouterCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Validatoroptinrouter.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Validatoroptinrouter *ValidatoroptinrouterSession) ProxiableUUID() ([32]byte, error) { + return _Validatoroptinrouter.Contract.ProxiableUUID(&_Validatoroptinrouter.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Validatoroptinrouter *ValidatoroptinrouterCallerSession) ProxiableUUID() ([32]byte, error) { + return _Validatoroptinrouter.Contract.ProxiableUUID(&_Validatoroptinrouter.CallOpts) +} + +// ValidatorRegistryV1 is a free data retrieval call binding the contract method 0xa0c3cf38. +// +// Solidity: function validatorRegistryV1() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterCaller) ValidatorRegistryV1(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Validatoroptinrouter.contract.Call(opts, &out, "validatorRegistryV1") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ValidatorRegistryV1 is a free data retrieval call binding the contract method 0xa0c3cf38. +// +// Solidity: function validatorRegistryV1() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterSession) ValidatorRegistryV1() (common.Address, error) { + return _Validatoroptinrouter.Contract.ValidatorRegistryV1(&_Validatoroptinrouter.CallOpts) +} + +// ValidatorRegistryV1 is a free data retrieval call binding the contract method 0xa0c3cf38. +// +// Solidity: function validatorRegistryV1() view returns(address) +func (_Validatoroptinrouter *ValidatoroptinrouterCallerSession) ValidatorRegistryV1() (common.Address, error) { + return _Validatoroptinrouter.Contract.ValidatorRegistryV1(&_Validatoroptinrouter.CallOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Validatoroptinrouter.contract.Transact(opts, "acceptOwnership") +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_Validatoroptinrouter *ValidatoroptinrouterSession) AcceptOwnership() (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.AcceptOwnership(&_Validatoroptinrouter.TransactOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.AcceptOwnership(&_Validatoroptinrouter.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _validatorRegistry, address _mevCommitAVS, address _owner) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactor) Initialize(opts *bind.TransactOpts, _validatorRegistry common.Address, _mevCommitAVS common.Address, _owner common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.contract.Transact(opts, "initialize", _validatorRegistry, _mevCommitAVS, _owner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _validatorRegistry, address _mevCommitAVS, address _owner) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterSession) Initialize(_validatorRegistry common.Address, _mevCommitAVS common.Address, _owner common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.Initialize(&_Validatoroptinrouter.TransactOpts, _validatorRegistry, _mevCommitAVS, _owner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _validatorRegistry, address _mevCommitAVS, address _owner) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorSession) Initialize(_validatorRegistry common.Address, _mevCommitAVS common.Address, _owner common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.Initialize(&_Validatoroptinrouter.TransactOpts, _validatorRegistry, _mevCommitAVS, _owner) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Validatoroptinrouter.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Validatoroptinrouter *ValidatoroptinrouterSession) RenounceOwnership() (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.RenounceOwnership(&_Validatoroptinrouter.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.RenounceOwnership(&_Validatoroptinrouter.TransactOpts) +} + +// SetMevCommitAVS is a paid mutator transaction binding the contract method 0x18df7701. +// +// Solidity: function setMevCommitAVS(address _mevCommitAVS) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactor) SetMevCommitAVS(opts *bind.TransactOpts, _mevCommitAVS common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.contract.Transact(opts, "setMevCommitAVS", _mevCommitAVS) +} + +// SetMevCommitAVS is a paid mutator transaction binding the contract method 0x18df7701. +// +// Solidity: function setMevCommitAVS(address _mevCommitAVS) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterSession) SetMevCommitAVS(_mevCommitAVS common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.SetMevCommitAVS(&_Validatoroptinrouter.TransactOpts, _mevCommitAVS) +} + +// SetMevCommitAVS is a paid mutator transaction binding the contract method 0x18df7701. +// +// Solidity: function setMevCommitAVS(address _mevCommitAVS) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorSession) SetMevCommitAVS(_mevCommitAVS common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.SetMevCommitAVS(&_Validatoroptinrouter.TransactOpts, _mevCommitAVS) +} + +// SetValidatorRegistryV1 is a paid mutator transaction binding the contract method 0x5605282e. +// +// Solidity: function setValidatorRegistryV1(address _validatorRegistry) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactor) SetValidatorRegistryV1(opts *bind.TransactOpts, _validatorRegistry common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.contract.Transact(opts, "setValidatorRegistryV1", _validatorRegistry) +} + +// SetValidatorRegistryV1 is a paid mutator transaction binding the contract method 0x5605282e. +// +// Solidity: function setValidatorRegistryV1(address _validatorRegistry) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterSession) SetValidatorRegistryV1(_validatorRegistry common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.SetValidatorRegistryV1(&_Validatoroptinrouter.TransactOpts, _validatorRegistry) +} + +// SetValidatorRegistryV1 is a paid mutator transaction binding the contract method 0x5605282e. +// +// Solidity: function setValidatorRegistryV1(address _validatorRegistry) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorSession) SetValidatorRegistryV1(_validatorRegistry common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.SetValidatorRegistryV1(&_Validatoroptinrouter.TransactOpts, _validatorRegistry) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.TransferOwnership(&_Validatoroptinrouter.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.TransferOwnership(&_Validatoroptinrouter.TransactOpts, newOwner) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Validatoroptinrouter.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Validatoroptinrouter *ValidatoroptinrouterSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.UpgradeToAndCall(&_Validatoroptinrouter.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.UpgradeToAndCall(&_Validatoroptinrouter.TransactOpts, newImplementation, data) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _Validatoroptinrouter.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_Validatoroptinrouter *ValidatoroptinrouterSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.Fallback(&_Validatoroptinrouter.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.Fallback(&_Validatoroptinrouter.TransactOpts, calldata) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Validatoroptinrouter.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Validatoroptinrouter *ValidatoroptinrouterSession) Receive() (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.Receive(&_Validatoroptinrouter.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Validatoroptinrouter *ValidatoroptinrouterTransactorSession) Receive() (*types.Transaction, error) { + return _Validatoroptinrouter.Contract.Receive(&_Validatoroptinrouter.TransactOpts) +} + +// ValidatoroptinrouterInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterInitializedIterator struct { + Event *ValidatoroptinrouterInitialized // 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 *ValidatoroptinrouterInitializedIterator) 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(ValidatoroptinrouterInitialized) + 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(ValidatoroptinrouterInitialized) + 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 *ValidatoroptinrouterInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ValidatoroptinrouterInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ValidatoroptinrouterInitialized represents a Initialized event raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) FilterInitialized(opts *bind.FilterOpts) (*ValidatoroptinrouterInitializedIterator, error) { + + logs, sub, err := _Validatoroptinrouter.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ValidatoroptinrouterInitializedIterator{contract: _Validatoroptinrouter.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ValidatoroptinrouterInitialized) (event.Subscription, error) { + + logs, sub, err := _Validatoroptinrouter.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(ValidatoroptinrouterInitialized) + if err := _Validatoroptinrouter.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) ParseInitialized(log types.Log) (*ValidatoroptinrouterInitialized, error) { + event := new(ValidatoroptinrouterInitialized) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ValidatoroptinrouterMevCommitAVSSetIterator is returned from FilterMevCommitAVSSet and is used to iterate over the raw logs and unpacked data for MevCommitAVSSet events raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterMevCommitAVSSetIterator struct { + Event *ValidatoroptinrouterMevCommitAVSSet // 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 *ValidatoroptinrouterMevCommitAVSSetIterator) 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(ValidatoroptinrouterMevCommitAVSSet) + 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(ValidatoroptinrouterMevCommitAVSSet) + 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 *ValidatoroptinrouterMevCommitAVSSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ValidatoroptinrouterMevCommitAVSSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ValidatoroptinrouterMevCommitAVSSet represents a MevCommitAVSSet event raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterMevCommitAVSSet struct { + OldContract common.Address + NewContract common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMevCommitAVSSet is a free log retrieval operation binding the contract event 0x447ff28b7015145d149b3cd03a9f9e162a197e114c0559fcc47e6ce791f37676. +// +// Solidity: event MevCommitAVSSet(address oldContract, address newContract) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) FilterMevCommitAVSSet(opts *bind.FilterOpts) (*ValidatoroptinrouterMevCommitAVSSetIterator, error) { + + logs, sub, err := _Validatoroptinrouter.contract.FilterLogs(opts, "MevCommitAVSSet") + if err != nil { + return nil, err + } + return &ValidatoroptinrouterMevCommitAVSSetIterator{contract: _Validatoroptinrouter.contract, event: "MevCommitAVSSet", logs: logs, sub: sub}, nil +} + +// WatchMevCommitAVSSet is a free log subscription operation binding the contract event 0x447ff28b7015145d149b3cd03a9f9e162a197e114c0559fcc47e6ce791f37676. +// +// Solidity: event MevCommitAVSSet(address oldContract, address newContract) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) WatchMevCommitAVSSet(opts *bind.WatchOpts, sink chan<- *ValidatoroptinrouterMevCommitAVSSet) (event.Subscription, error) { + + logs, sub, err := _Validatoroptinrouter.contract.WatchLogs(opts, "MevCommitAVSSet") + 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(ValidatoroptinrouterMevCommitAVSSet) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "MevCommitAVSSet", 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 +} + +// ParseMevCommitAVSSet is a log parse operation binding the contract event 0x447ff28b7015145d149b3cd03a9f9e162a197e114c0559fcc47e6ce791f37676. +// +// Solidity: event MevCommitAVSSet(address oldContract, address newContract) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) ParseMevCommitAVSSet(log types.Log) (*ValidatoroptinrouterMevCommitAVSSet, error) { + event := new(ValidatoroptinrouterMevCommitAVSSet) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "MevCommitAVSSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ValidatoroptinrouterOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterOwnershipTransferStartedIterator struct { + Event *ValidatoroptinrouterOwnershipTransferStarted // 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 *ValidatoroptinrouterOwnershipTransferStartedIterator) 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(ValidatoroptinrouterOwnershipTransferStarted) + 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(ValidatoroptinrouterOwnershipTransferStarted) + 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 *ValidatoroptinrouterOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ValidatoroptinrouterOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ValidatoroptinrouterOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterOwnershipTransferStarted struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ValidatoroptinrouterOwnershipTransferStartedIterator, 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 := _Validatoroptinrouter.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ValidatoroptinrouterOwnershipTransferStartedIterator{contract: _Validatoroptinrouter.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *ValidatoroptinrouterOwnershipTransferStarted, 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 := _Validatoroptinrouter.contract.WatchLogs(opts, "OwnershipTransferStarted", 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(ValidatoroptinrouterOwnershipTransferStarted) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "OwnershipTransferStarted", 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 +} + +// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) ParseOwnershipTransferStarted(log types.Log) (*ValidatoroptinrouterOwnershipTransferStarted, error) { + event := new(ValidatoroptinrouterOwnershipTransferStarted) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ValidatoroptinrouterOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterOwnershipTransferredIterator struct { + Event *ValidatoroptinrouterOwnershipTransferred // 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 *ValidatoroptinrouterOwnershipTransferredIterator) 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(ValidatoroptinrouterOwnershipTransferred) + 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(ValidatoroptinrouterOwnershipTransferred) + 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 *ValidatoroptinrouterOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ValidatoroptinrouterOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ValidatoroptinrouterOwnershipTransferred represents a OwnershipTransferred event raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterOwnershipTransferred 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 (_Validatoroptinrouter *ValidatoroptinrouterFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ValidatoroptinrouterOwnershipTransferredIterator, 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 := _Validatoroptinrouter.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ValidatoroptinrouterOwnershipTransferredIterator{contract: _Validatoroptinrouter.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 (_Validatoroptinrouter *ValidatoroptinrouterFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ValidatoroptinrouterOwnershipTransferred, 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 := _Validatoroptinrouter.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(ValidatoroptinrouterOwnershipTransferred) + if err := _Validatoroptinrouter.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 (_Validatoroptinrouter *ValidatoroptinrouterFilterer) ParseOwnershipTransferred(log types.Log) (*ValidatoroptinrouterOwnershipTransferred, error) { + event := new(ValidatoroptinrouterOwnershipTransferred) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ValidatoroptinrouterUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterUpgradedIterator struct { + Event *ValidatoroptinrouterUpgraded // 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 *ValidatoroptinrouterUpgradedIterator) 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(ValidatoroptinrouterUpgraded) + 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(ValidatoroptinrouterUpgraded) + 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 *ValidatoroptinrouterUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ValidatoroptinrouterUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ValidatoroptinrouterUpgraded represents a Upgraded event raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*ValidatoroptinrouterUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _Validatoroptinrouter.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &ValidatoroptinrouterUpgradedIterator{contract: _Validatoroptinrouter.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *ValidatoroptinrouterUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _Validatoroptinrouter.contract.WatchLogs(opts, "Upgraded", implementationRule) + 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(ValidatoroptinrouterUpgraded) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "Upgraded", 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 +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) ParseUpgraded(log types.Log) (*ValidatoroptinrouterUpgraded, error) { + event := new(ValidatoroptinrouterUpgraded) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ValidatoroptinrouterValidatorRegistryV1SetIterator is returned from FilterValidatorRegistryV1Set and is used to iterate over the raw logs and unpacked data for ValidatorRegistryV1Set events raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterValidatorRegistryV1SetIterator struct { + Event *ValidatoroptinrouterValidatorRegistryV1Set // 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 *ValidatoroptinrouterValidatorRegistryV1SetIterator) 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(ValidatoroptinrouterValidatorRegistryV1Set) + 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(ValidatoroptinrouterValidatorRegistryV1Set) + 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 *ValidatoroptinrouterValidatorRegistryV1SetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ValidatoroptinrouterValidatorRegistryV1SetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ValidatoroptinrouterValidatorRegistryV1Set represents a ValidatorRegistryV1Set event raised by the Validatoroptinrouter contract. +type ValidatoroptinrouterValidatorRegistryV1Set struct { + OldContract common.Address + NewContract common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterValidatorRegistryV1Set is a free log retrieval operation binding the contract event 0x797d2b493f5b527eeb691c6b2fc743152c6df95318aecce8e12918fde52c5fe2. +// +// Solidity: event ValidatorRegistryV1Set(address oldContract, address newContract) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) FilterValidatorRegistryV1Set(opts *bind.FilterOpts) (*ValidatoroptinrouterValidatorRegistryV1SetIterator, error) { + + logs, sub, err := _Validatoroptinrouter.contract.FilterLogs(opts, "ValidatorRegistryV1Set") + if err != nil { + return nil, err + } + return &ValidatoroptinrouterValidatorRegistryV1SetIterator{contract: _Validatoroptinrouter.contract, event: "ValidatorRegistryV1Set", logs: logs, sub: sub}, nil +} + +// WatchValidatorRegistryV1Set is a free log subscription operation binding the contract event 0x797d2b493f5b527eeb691c6b2fc743152c6df95318aecce8e12918fde52c5fe2. +// +// Solidity: event ValidatorRegistryV1Set(address oldContract, address newContract) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) WatchValidatorRegistryV1Set(opts *bind.WatchOpts, sink chan<- *ValidatoroptinrouterValidatorRegistryV1Set) (event.Subscription, error) { + + logs, sub, err := _Validatoroptinrouter.contract.WatchLogs(opts, "ValidatorRegistryV1Set") + 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(ValidatoroptinrouterValidatorRegistryV1Set) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "ValidatorRegistryV1Set", 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 +} + +// ParseValidatorRegistryV1Set is a log parse operation binding the contract event 0x797d2b493f5b527eeb691c6b2fc743152c6df95318aecce8e12918fde52c5fe2. +// +// Solidity: event ValidatorRegistryV1Set(address oldContract, address newContract) +func (_Validatoroptinrouter *ValidatoroptinrouterFilterer) ParseValidatorRegistryV1Set(log types.Log) (*ValidatoroptinrouterValidatorRegistryV1Set, error) { + event := new(ValidatoroptinrouterValidatorRegistryV1Set) + if err := _Validatoroptinrouter.contract.UnpackLog(event, "ValidatorRegistryV1Set", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts-abi/go.mod b/contracts-abi/go.mod index c80313d2c..52d0beeef 100644 --- a/contracts-abi/go.mod +++ b/contracts-abi/go.mod @@ -5,14 +5,14 @@ go 1.22 require github.com/ethereum/go-ethereum v1.13.14 require ( - github.com/DataDog/zstd v1.5.2 // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect - github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect @@ -21,19 +21,21 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect + github.com/getsentry/sentry-go v0.28.1 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/holiman/uint256 v1.2.4 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rivo/uniseg v0.4.2 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/supranational/blst v0.3.11 // indirect @@ -41,13 +43,13 @@ require ( github.com/tklauser/numcpus v0.7.0 // indirect github.com/urfave/cli/v2 v2.27.1 // indirect github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect + golang.org/x/sys v0.22.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/tools v0.23.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/contracts-abi/go.sum b/contracts-abi/go.sum index 015cae3a8..186391d05 100644 --- a/contracts-abi/go.sum +++ b/contracts-abi/go.sum @@ -1,21 +1,11 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= @@ -24,42 +14,32 @@ github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPx github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= -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= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= @@ -68,165 +48,66 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5il github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ= github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= +github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -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/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= @@ -234,72 +115,35 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= @@ -312,187 +156,37 @@ github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -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/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/contracts-abi/script.sh b/contracts-abi/script.sh index eae903171..b2269361f 100755 --- a/contracts-abi/script.sh +++ b/contracts-abi/script.sh @@ -40,6 +40,8 @@ extract_and_save_abi "$BASE_DIR/out/BlockTracker.sol/BlockTracker.json" "$ABI_DI extract_and_save_abi "$BASE_DIR/out/MevCommitAVS.sol/MevCommitAVS.json" "$ABI_DIR/MevCommitAVS.abi" +extract_and_save_abi "$BASE_DIR/out/ValidatorOptInRouter.sol/ValidatorOptInRouter.json" "$ABI_DIR/ValidatorOptInRouter.abi" + echo "ABI files extracted successfully." @@ -87,5 +89,7 @@ generate_go_code "$ABI_DIR/BlockTracker.abi" "BlockTracker" "blocktracker" generate_go_code "$ABI_DIR/MevCommitAVS.abi" "MevCommitAVS" "mevcommitavs" +generate_go_code "$ABI_DIR/ValidatorOptInRouter.abi" "ValidatorOptInRouter" "validatoroptinrouter" + echo "Go code generated successfully in separate folders." diff --git a/contracts/Dockerfile b/contracts/Dockerfile deleted file mode 100644 index 0494f3f69..000000000 --- a/contracts/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# Use the latest foundry image -FROM ghcr.io/foundry-rs/foundry - -# Set working directory -WORKDIR /app - -# Copy our source code into the container -COPY . . - -# Compile contracts using solidity compiler version 0.8.20 -RUN forge build --use 0.8.20 --via-ir - -# Set environment variables for RPC URL and private key -# These should be passed during the Docker build process -ARG RPC_URL -ARG PRIVATE_KEY -ARG CHAIN_ID -ARG DEPLOY_TYPE -ARG HYP_ERC20_ADDR -ARG RELAYER_ADDR - -RUN chmod +x entrypoint.sh - -ENTRYPOINT ["/app/entrypoint.sh"] - diff --git a/contracts/Makefile b/contracts/Makefile index 6f3d7c0fd..05ddcbced 100644 --- a/contracts/Makefile +++ b/contracts/Makefile @@ -20,6 +20,10 @@ deploy-core: forge clean DEPLOY_TYPE="core" RPC_URL="http://localhost:8545" PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" CHAIN_ID="17864" ./entrypoint.sh +deploy-avs-with-mock-eigen: + forge clean + forge script scripts/validator-registry/avs/DeployAVSWithMockEigen.s.sol:DeployAVSWithMockEigen --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --via-ir --broadcast + run-stake-example: forge script scripts/validator-registry/ValidatorExampleScript.s.sol:StakeExample --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --via-ir --broadcast diff --git a/contracts/contracts/BidderRegistry.sol b/contracts/contracts/BidderRegistry.sol index 519cb6f39..c1fa586d7 100644 --- a/contracts/contracts/BidderRegistry.sol +++ b/contracts/contracts/BidderRegistry.sol @@ -4,10 +4,10 @@ pragma solidity 0.8.20; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; - import {IBidderRegistry} from "./interfaces/IBidderRegistry.sol"; import {IBlockTracker} from "./interfaces/IBlockTracker.sol"; import {WindowFromBlockNumber} from "./utils/WindowFromBlockNumber.sol"; +import {FeePayout} from "./utils/FeePayout.sol"; /// @title Bidder Registry /// @author Kartik Chopra @@ -18,16 +18,12 @@ contract BidderRegistry is ReentrancyGuardUpgradeable, UUPSUpgradeable { + using FeePayout for FeePayout.Tracker; + /// @dev For improved precision uint256 constant public PRECISION = 10 ** 25; uint256 constant public PERCENT = 100 * PRECISION; - /// @dev Amount assigned to feeRecipient - uint256 public feeRecipientAmount; - - /// @dev protocol fee, left over amount when there is no fee recipient assigned - uint256 public protocolFeeAmount; - /// @dev Address of the pre-confirmations contract address public preConfirmationsContract; @@ -37,8 +33,8 @@ contract BidderRegistry is /// @dev Block tracker contract IBlockTracker public blockTrackerContract; - /// @dev Fee recipient - address public feeRecipient; + /// Struct enabling automatic protocol fee payouts + FeePayout.Tracker public protocolFeeTracker; /// @dev Mapping for if bidder is registered mapping(address => bool) public bidderRegistered; @@ -92,6 +88,12 @@ contract BidderRegistry is uint256 indexed amount ); + /// @dev Event emitted when the protocol fee recipient is updated + event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient); + + /// @dev Event emitted when the fee payout period in blocks is updated + event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks); + /** * @dev Modifier to restrict a function to only be callable by the pre-confirmations contract. */ @@ -105,20 +107,22 @@ contract BidderRegistry is /** * @dev Initializes the contract with a minimum deposit requirement. - * @param _feeRecipient The address that receives fee + * @param _protocolFeeRecipient The address that accumulates protocol fees * @param _feePercent The fee percentage for protocol * @param _owner Owner of the contract, explicitly needed since contract is deployed w/ create2 factory. * @param _blockTracker The address of the block tracker contract. * @param _blocksPerWindow The number of blocks per window. + * @param _feePayoutPeriodBlocks The number of blocks for the fee payout period */ function initialize( - address _feeRecipient, + address _protocolFeeRecipient, uint16 _feePercent, address _owner, address _blockTracker, - uint256 _blocksPerWindow + uint256 _blocksPerWindow, + uint256 _feePayoutPeriodBlocks ) external initializer { - feeRecipient = _feeRecipient; + FeePayout.init(protocolFeeTracker, _protocolFeeRecipient, _feePayoutPeriodBlocks); feePercent = _feePercent; blockTrackerContract = IBlockTracker(_blockTracker); blocksPerWindow = _blocksPerWindow; @@ -272,10 +276,9 @@ contract BidderRegistry is PERCENT; uint256 amtMinusFeeAndDecay = decayedAmt - feeAmt; - if (feeRecipient != address(0)) { - feeRecipientAmount += feeAmt; - } else { - protocolFeeAmount += feeAmt; + protocolFeeTracker.accumulatedAmount += feeAmt; + if (FeePayout.isPayoutDue(protocolFeeTracker)) { + FeePayout.transferToRecipient(protocolFeeTracker); } providerAmount[provider] += amtMinusFeeAndDecay; @@ -356,7 +359,9 @@ contract BidderRegistry is // Check if bid exceeds the available amount for the block if (availableAmount < bid) { - // todo: burn it, until oracle will do the calculation and transfers + (bool success, ) = payable(bidder).call{value: bid - availableAmount}(""); + require(success, "couldn't transfer to bidder"); + bid = uint64(availableAmount); } @@ -374,10 +379,11 @@ contract BidderRegistry is /** * @notice Sets the new fee recipient * @dev onlyOwner restriction - * @param newFeeRecipient The address to transfer the slashed funds to. + * @param newProtocolFeeRecipient The new address to accumulate protocol fees */ - function setNewFeeRecipient(address newFeeRecipient) external onlyOwner { - feeRecipient = newFeeRecipient; + function setNewProtocolFeeRecipient(address newProtocolFeeRecipient) external onlyOwner { + protocolFeeTracker.recipient = newProtocolFeeRecipient; + emit ProtocolFeeRecipientUpdated(newProtocolFeeRecipient); } /** @@ -389,15 +395,14 @@ contract BidderRegistry is feePercent = newFeePercent; } - /** - * @dev Withdraw funds to the fee recipient. + /** + * @notice Sets the new fee payout period in blocks + * @dev onlyOwner restriction + * @param newFeePayoutPeriodBlocks The new fee payout period in blocks */ - function withdrawFeeRecipientAmount() external nonReentrant { - uint256 amount = feeRecipientAmount; - feeRecipientAmount = 0; - require(amount != 0, "fee amount is zero"); - (bool successFee, ) = feeRecipient.call{value: amount}(""); - require(successFee, "fee transfer failed"); + function setNewFeePayoutPeriodBlocks(uint256 newFeePayoutPeriodBlocks) external onlyOwner { + protocolFeeTracker.payoutPeriodBlocks = newFeePayoutPeriodBlocks; + emit FeePayoutPeriodBlocksUpdated(newFeePayoutPeriodBlocks); } /** @@ -449,17 +454,11 @@ contract BidderRegistry is } /** - * @dev Withdraw protocol fee. - * @param treasuryAddress The address of the treasury. + * @dev Manually withdraws accumulated protocol fees to the recipient + * to cover the edge case that oracle doesn't slash/reward, and funds still need to be withdrawn. */ - function withdrawProtocolFee( - address payable treasuryAddress - ) external onlyOwner nonReentrant { - uint256 _protocolFeeAmount = protocolFeeAmount; - protocolFeeAmount = 0; - require(_protocolFeeAmount != 0, "insufficient protocol fee amount"); - (bool success, ) = treasuryAddress.call{value: _protocolFeeAmount}(""); - require(success, "transfer failed"); + function manuallyWithdrawProtocolFee() external onlyOwner { + FeePayout.transferToRecipient(protocolFeeTracker); } /** @@ -472,13 +471,6 @@ contract BidderRegistry is return providerAmount[provider]; } - /** - * @dev Get the amount assigned to the fee recipient (treasury). - */ - function getFeeRecipientAmount() external view onlyOwner returns (uint256) { - return feeRecipientAmount; - } - /** * @dev Check the deposit of a bidder. * @param bidder The address of the bidder. @@ -492,6 +484,11 @@ contract BidderRegistry is return lockedFunds[bidder][window]; } + /// @return protocolFee amount not yet transferred to recipient + function getAccumulatedProtocolFee() external view returns (uint256) { + return protocolFeeTracker.accumulatedAmount; + } + // solhint-disable-next-line no-empty-blocks function _authorizeUpgrade(address) internal override onlyOwner {} } diff --git a/contracts/contracts/Oracle.sol b/contracts/contracts/Oracle.sol index e16c271d1..ca2e8603f 100644 --- a/contracts/contracts/Oracle.sol +++ b/contracts/contracts/Oracle.sol @@ -105,7 +105,7 @@ contract Oracle is Ownable2StepUpgradeable, UUPSUpgradeable { IPreConfCommitmentStore.PreConfCommitment memory commitment = _preConfContract.getCommitment(commitmentIndex); if ( - commitment.commiter == builder && + commitment.committer == builder && commitment.blockNumber == blockNumber ) { _processCommitment( diff --git a/contracts/contracts/PreConfCommitmentStore.sol b/contracts/contracts/PreConfCommitmentStore.sol index ab51a7929..6c34d855d 100644 --- a/contracts/contracts/PreConfCommitmentStore.sol +++ b/contracts/contracts/PreConfCommitmentStore.sol @@ -57,8 +57,8 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea // Represents the dispatch window in milliseconds uint64 public commitmentDispatchWindow; - /// @dev Address of the oracle - address public oracle; + /// @dev Address of the oracle contract + address public oracleContract; /// @dev The number of blocks per window uint256 public blocksPerWindow; @@ -84,10 +84,10 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea mapping(bytes32 => EncrPreConfCommitment) public encryptedCommitments; /** - * @dev Makes sure transaction sender is oracle + * @dev Makes sure transaction sender is oracle contract */ - modifier onlyOracle() { - require(msg.sender == oracle, "sender is not oracle"); + modifier onlyOracleContract() { + require(msg.sender == oracleContract, "sender is not oracle contract"); _; } @@ -95,29 +95,28 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea * @dev Initializes the contract with the specified registry addresses, oracle, name, and version. * @param _providerRegistry The address of the provider registry. * @param _bidderRegistry The address of the bidder registry. - * @param _blockTracker The address of the block tracker. - * @param _oracle The address of the oracle. + * @param _oracleContract The address of the oracle contract. * @param _owner Owner of the contract, explicitly needed since contract is deployed w/ create2 factory. + * @param _blockTracker The address of the block tracker. * @param _commitmentDispatchWindow The dispatch window for commitments. * @param _blocksPerWindow The number of blocks per window. */ function initialize( address _providerRegistry, address _bidderRegistry, - address _oracle, + address _oracleContract, address _owner, address _blockTracker, uint64 _commitmentDispatchWindow, uint256 _blocksPerWindow ) external initializer { - oracle = _oracle; - blockTracker = IBlockTracker(_blockTracker); providerRegistry = IProviderRegistry(_providerRegistry); bidderRegistry = IBidderRegistry(_bidderRegistry); - blocksPerWindow = _blocksPerWindow; + oracleContract = _oracleContract; __Ownable_init(_owner); - + blockTracker = IBlockTracker(_blockTracker); commitmentDispatchWindow = _commitmentDispatchWindow; + blocksPerWindow = _blocksPerWindow; } /// @dev See https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#initializing_the_implementation_contract @@ -151,11 +150,11 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea } /** - * @dev Updates the address of the oracle. - * @param newOracle The new oracle address. + * @dev Updates the address of the oracle contract. + * @param newOracleContract The new oracle contract address. */ - function updateOracle(address newOracle) external onlyOwner { - oracle = newOracle; + function updateOracleContract(address newOracleContract) external onlyOwner { + oracleContract = newOracleContract; } /** @@ -239,12 +238,13 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea "Invalid commitment digest" ); - address commiterAddress = commitmentDigest.recover(commitmentSignature); + address committerAddress = commitmentDigest.recover(commitmentSignature); address winner = blockTracker.getBlockWinner(blockNumber); require( - (msg.sender == winner && winner == commiterAddress) || - msg.sender == bidderAddress, + winner == committerAddress && + (msg.sender == winner || + msg.sender == bidderAddress), "invalid sender" ); @@ -255,7 +255,7 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea decayStartTimeStamp, decayEndTimeStamp, encryptedCommitment.dispatchTimestamp, - commiterAddress, + committerAddress, bid, bHash, commitmentDigest, @@ -280,12 +280,12 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea blockNumber ); - ++commitmentsCount[commiterAddress]; + ++commitmentsCount[committerAddress]; emit CommitmentStored( commitmentIndex, bidderAddress, - commiterAddress, + committerAddress, bid, blockNumber, bHash, @@ -319,16 +319,19 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea // Check if the dispatch timestamp is within the allowed dispatch window require(dispatchTimestamp > minTime, "Invalid dispatch timestamp"); - address commiterAddress = commitmentDigest.recover(commitmentSignature); + address committerAddress = commitmentDigest.recover(commitmentSignature); require( - commiterAddress == msg.sender, - "sender is not commiter" + committerAddress == msg.sender, + "sender is not committer" ); + // Ensure the provider's balance is greater than minStake and no pending withdrawal + providerRegistry.isProviderValid(committerAddress); + EncrPreConfCommitment memory newCommitment = EncrPreConfCommitment( false, - commiterAddress, + committerAddress, dispatchTimestamp, commitmentDigest, commitmentSignature @@ -340,7 +343,7 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea emit EncryptedCommitmentStored( commitmentIndex, - commiterAddress, + committerAddress, commitmentDigest, commitmentSignature, dispatchTimestamp @@ -357,12 +360,12 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea function initiateSlash( bytes32 commitmentIndex, uint256 residualBidPercentAfterDecay - ) public onlyOracle { + ) public onlyOracleContract { PreConfCommitment storage commitment = commitments[commitmentIndex]; require(!commitment.isUsed, "Commitment already used"); commitment.isUsed = true; - --commitmentsCount[commitment.commiter]; + --commitmentsCount[commitment.committer]; uint256 windowToSettle = WindowFromBlockNumber.getWindowFromBlockNumber( commitment.blockNumber, @@ -371,7 +374,7 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea providerRegistry.slash( commitment.bid, - commitment.commiter, + commitment.committer, payable(commitment.bidder), residualBidPercentAfterDecay ); @@ -386,7 +389,7 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea function initiateReward( bytes32 commitmentIndex, uint256 residualBidPercentAfterDecay - ) public onlyOracle { + ) public onlyOracleContract { PreConfCommitment storage commitment = commitments[commitmentIndex]; require(!commitment.isUsed, "Commitment already used"); @@ -396,12 +399,12 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea ); commitment.isUsed = true; - --commitmentsCount[commitment.commiter]; + --commitmentsCount[commitment.committer]; bidderRegistry.retrieveFunds( windowToSettle, commitment.commitmentHash, - payable(commitment.commiter), + payable(commitment.committer), residualBidPercentAfterDecay ); } @@ -552,13 +555,13 @@ contract PreConfCommitmentStore is IPreConfCommitmentStore, Ownable2StepUpgradea * @dev Verifies a pre-confirmation commitment by computing the hash and recovering the committer's address. * @param params The commitment params associated with the commitment. * @return preConfHash The hash of the pre-confirmation commitment. - * @return commiterAddress The address of the committer recovered from the commitment signature. + * @return committerAddress The address of the committer recovered from the commitment signature. */ function verifyPreConfCommitment( CommitmentParams memory params - ) public pure returns (bytes32 preConfHash, address commiterAddress) { + ) public pure returns (bytes32 preConfHash, address committerAddress) { preConfHash = _getPreConfHash(params); - commiterAddress = preConfHash.recover(params.commitmentSignature); + committerAddress = preConfHash.recover(params.commitmentSignature); } /** diff --git a/contracts/contracts/ProviderRegistry.sol b/contracts/contracts/ProviderRegistry.sol index 049675d0a..abfca4b34 100644 --- a/contracts/contracts/ProviderRegistry.sol +++ b/contracts/contracts/ProviderRegistry.sol @@ -4,9 +4,9 @@ pragma solidity 0.8.20; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; - import {PreConfCommitmentStore} from "./PreConfCommitmentStore.sol"; import {IProviderRegistry} from "./interfaces/IProviderRegistry.sol"; +import {FeePayout} from "./utils/FeePayout.sol"; /// @title Provider Registry /// @author Kartik Chopra @@ -17,6 +17,8 @@ contract ProviderRegistry is UUPSUpgradeable, ReentrancyGuardUpgradeable { + using FeePayout for FeePayout.Tracker; + /// @dev For improved precision uint256 public constant PRECISION = 10 ** 25; uint256 public constant PERCENT = 100 * PRECISION; @@ -24,38 +26,43 @@ contract ProviderRegistry is /// @dev Minimum stake required for registration uint256 public minStake; - /// @dev Amount assigned to feeRecipient - uint256 public feeRecipientAmount; - /// @dev Address of the pre-confirmations contract address public preConfirmationsContract; /// @dev Fee percent that would be taken by protocol when provider is slashed uint16 public feePercent; - /// @dev Fee recipient - address public feeRecipient; + /// @dev Configurable withdrawal delay in milliseconds + uint256 public withdrawalDelay; + + /// Struct enabling automatic protocol fee payouts + FeePayout.Tracker public protocolFeeTracker; /// @dev Mapping from provider address to whether they are registered or not mapping(address => bool) public providerRegistered; - /// @dev Mapping from a provider's EOA address to their BLS public key mapping(address => bytes) public eoaToBlsPubkey; - /// @dev Mapping from provider addresses to their staked amount mapping(address => uint256) public providerStakes; + /// @dev Mapping of provider to withdrawal request timestamp + mapping(address => uint256) public withdrawalRequests; - /// @dev Amount assigned to bidders - mapping(address => uint256) public bidderAmount; - - /// @dev Event for provider registration + /// @dev Event emitted when a provider is registered event ProviderRegistered(address indexed provider, uint256 stakedAmount, bytes blsPublicKey); - - /// @dev Event for depositing funds + /// @dev Event emitted when funds are deposited event FundsDeposited(address indexed provider, uint256 amount); - - /// @dev Event for slashing funds + /// @dev Event emitted when funds are slashed event FundsSlashed(address indexed provider, uint256 amount); + /// @dev Event emitted when withdrawal is requested + event Unstake(address indexed provider, uint256 timestamp); + /// @dev Event emitted when withdrawal is completed + event Withdraw(address indexed provider, uint256 amount); + /// @dev Event emitted when the withdrawal delay is updated + event WithdrawalDelayUpdated(uint256 newWithdrawalDelay); + /// @dev Event emitted when the protocol fee recipient is updated + event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient); + /// @dev Event emitted when the fee payout period in blocks is updated + event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks); /** * @dev Modifier to restrict a function to only be callable by the pre-confirmations contract. @@ -71,19 +78,24 @@ contract ProviderRegistry is /** * @dev Initializes the contract with a minimum stake requirement. * @param _minStake The minimum stake required for provider registration. - * @param _feeRecipient The address that receives fee + * @param _protocolFeeRecipient The address that accumulates protocol fees * @param _feePercent The fee percentage for protocol * @param _owner Owner of the contract, explicitly needed since contract is deployed w/ create2 factory. + * @param _withdrawalDelay The withdrawal delay in milliseconds. + * @param _protocolFeePayoutPeriodBlocks The min number of blocks between protocol fee payouts */ function initialize( uint256 _minStake, - address _feeRecipient, + address _protocolFeeRecipient, uint16 _feePercent, - address _owner + address _owner, + uint256 _withdrawalDelay, + uint256 _protocolFeePayoutPeriodBlocks ) external initializer { + FeePayout.init(protocolFeeTracker, _protocolFeeRecipient, _protocolFeePayoutPeriodBlocks); minStake = _minStake; - feeRecipient = _feeRecipient; feePercent = _feePercent; + withdrawalDelay = _withdrawalDelay; __Ownable_init(_owner); } @@ -123,9 +135,9 @@ contract ProviderRegistry is } /** - * @dev Deposit more funds into the provider's stake. + * @dev Stake more funds into the provider's stake. */ - function depositFunds() external payable { + function stake() external payable { require(providerRegistered[msg.sender], "Provider not registered"); providerStakes[msg.sender] += msg.value; emit FundsDeposited(msg.sender, msg.value); @@ -146,34 +158,32 @@ contract ProviderRegistry is address payable bidder, uint256 residualBidPercentAfterDecay ) external nonReentrant onlyPreConfirmationEngine { - uint256 residualAmt = (amt * residualBidPercentAfterDecay * PRECISION) / - PERCENT; - require( - providerStakes[provider] >= residualAmt, - "Insufficient funds to slash" - ); + uint256 residualAmt = (amt * residualBidPercentAfterDecay * PRECISION) / PERCENT; + require(providerStakes[provider] >= residualAmt, "Insufficient funds to slash"); providerStakes[provider] -= residualAmt; - uint256 feeAmt = (residualAmt * uint256(feePercent) * PRECISION) / - PERCENT; + uint256 feeAmt = (residualAmt * uint256(feePercent) * PRECISION) / PERCENT; uint256 amtMinusFee = residualAmt - feeAmt; - if (feeRecipient != address(0)) { - feeRecipientAmount += feeAmt; + protocolFeeTracker.accumulatedAmount += feeAmt; + if (FeePayout.isPayoutDue(protocolFeeTracker)) { + FeePayout.transferToRecipient(protocolFeeTracker); } - bidderAmount[bidder] += amtMinusFee; + (bool success, ) = payable(bidder).call{value: amtMinusFee}(""); + require(success, "Transfer to bidder failed"); emit FundsSlashed(provider, amtMinusFee); } /** - * @notice Sets the new fee recipient + * @notice Sets a new protocol fee recipient * @dev onlyOwner restriction - * @param newFeeRecipient The address to transfer the slashed funds to. + * @param newFeeRecipient The address of the new protocol fee recipient */ - function setNewFeeRecipient(address newFeeRecipient) external onlyOwner { - feeRecipient = newFeeRecipient; + function setNewProtocolFeeRecipient(address newFeeRecipient) external onlyOwner { + protocolFeeTracker.recipient = newFeeRecipient; + emit ProtocolFeeRecipientUpdated(newFeeRecipient); } /** @@ -185,63 +195,66 @@ contract ProviderRegistry is feePercent = newFeePercent; } - /** - * @dev Reward funds to the fee receipt. - */ - function withdrawFeeRecipientAmount() external nonReentrant { - feeRecipientAmount = 0; - (bool successFee, ) = feeRecipient.call{value: feeRecipientAmount}(""); - require(successFee, "fee recipient transfer failed"); + /// @dev Sets the withdrawal delay. Can only be called by the owner. + /// @param _withdrawalDelay The new withdrawal delay in milliseconds + /// as mev-commit chain is running with milliseconds. + function setWithdrawalDelay(uint256 _withdrawalDelay) external onlyOwner { + withdrawalDelay = _withdrawalDelay; + emit WithdrawalDelayUpdated(_withdrawalDelay); } - /** - * @dev Withdraw funds to the bidder. - * @param bidder The address of the bidder. - */ - function withdrawBidderAmount(address bidder) external nonReentrant { - require(bidderAmount[bidder] > 0, "Bidder Amount is zero"); - - bidderAmount[bidder] = 0; + /// @dev Sets the fee payout period in blocks + /// @param _feePayoutPeriodBlocks The new fee payout period in blocks + function setFeePayoutPeriodBlocks(uint256 _feePayoutPeriodBlocks) external onlyOwner { + protocolFeeTracker.payoutPeriodBlocks = _feePayoutPeriodBlocks; + emit FeePayoutPeriodBlocksUpdated(_feePayoutPeriodBlocks); + } - (bool success, ) = bidder.call{value: bidderAmount[bidder]}(""); - require(success, "Couldn't transfer to bidder"); + /// @dev Requests unstake of the staked amount. + function unstake() external { + require(providerStakes[msg.sender] != 0, "No stake to withdraw"); + require(withdrawalRequests[msg.sender] == 0, "Unstake request exists"); + withdrawalRequests[msg.sender] = block.timestamp; + emit Unstake(msg.sender, block.timestamp); } - /** - * @dev Withdraw staked amount for the provider. - * @param provider The address of the provider. - */ - function withdrawStakedAmount( - address payable provider - ) external nonReentrant { - require(msg.sender == provider, "Only provider can unstake"); - uint256 stake = providerStakes[provider]; - providerStakes[provider] = 0; - require(stake > 0, "Provider Staked Amount is zero"); - require( - preConfirmationsContract != address(0), - "preconf contract not set" - ); + /// @dev Completes the withdrawal of the staked amount. + function withdraw() external nonReentrant { + require(withdrawalRequests[msg.sender] != 0, "No unstake request"); + require(block.timestamp >= withdrawalRequests[msg.sender] + withdrawalDelay, "Delay has not passed"); + + uint256 providerStake = providerStakes[msg.sender]; + providerStakes[msg.sender] = 0; + withdrawalRequests[msg.sender] = 0; + require(providerStake != 0, "Provider Staked Amount is zero"); + require(preConfirmationsContract != address(0), "preconf contract not set"); uint256 providerPendingCommitmentsCount = PreConfCommitmentStore( payable(preConfirmationsContract) - ).commitmentsCount(provider); + ).commitmentsCount(msg.sender); - require( - providerPendingCommitmentsCount == 0, - "provider commitments are pending" - ); + require(providerPendingCommitmentsCount == 0, "provider commitments are pending"); - (bool success, ) = provider.call{value: stake}(""); + (bool success, ) = msg.sender.call{value: providerStake}(""); require(success, "stake transfer failed"); + + emit Withdraw(msg.sender, providerStake); } /** - * @dev Check the stake of a provider. + * @dev Manually withdraws accumulated protocol fees to the recipient + * to cover the edge case that oracle doesn't slash/reward, and funds still need to be withdrawn. + */ + function manuallyWithdrawProtocolFee() external onlyOwner { + FeePayout.transferToRecipient(protocolFeeTracker); + } + + /** + * @dev Get provider staked amount. * @param provider The address of the provider. * @return The staked amount for the provider. */ - function checkStake(address provider) external view returns (uint256) { + function getProviderStake(address provider) external view returns (uint256) { return providerStakes[provider]; } @@ -250,6 +263,11 @@ contract ProviderRegistry is return eoaToBlsPubkey[provider]; } + /// @return protocolFee amount not yet transferred to recipient + function getAccumulatedProtocolFee() external view returns (uint256) { + return protocolFeeTracker.accumulatedAmount; + } + /** * @dev Register and stake function for providers. * @param blsPublicKey The BLS public key of the provider. @@ -266,6 +284,12 @@ contract ProviderRegistry is emit ProviderRegistered(msg.sender, msg.value, blsPublicKey); } + /// @dev Ensure the provider's balance is greater than minStake and no pending withdrawal + function isProviderValid(address provider) public view { + require(providerStakes[provider] >= minStake, "Insufficient stake"); + require(withdrawalRequests[provider] == 0, "Pending withdrawal request"); + } + // solhint-disable-next-line no-empty-blocks function _authorizeUpgrade(address) internal override onlyOwner {} } diff --git a/contracts/contracts/interfaces/IPreConfCommitmentStore.sol b/contracts/contracts/interfaces/IPreConfCommitmentStore.sol index 6d1dbf2d7..53602e8f4 100644 --- a/contracts/contracts/interfaces/IPreConfCommitmentStore.sol +++ b/contracts/contracts/interfaces/IPreConfCommitmentStore.sol @@ -15,7 +15,7 @@ interface IPreConfCommitmentStore { uint64 decayStartTimeStamp; uint64 decayEndTimeStamp; uint64 dispatchTimestamp; - address commiter; + address committer; uint256 bid; bytes32 bidHash; bytes32 commitmentHash; @@ -43,7 +43,7 @@ interface IPreConfCommitmentStore { /// @dev Struct for all the information around encrypted preconfirmations commitment struct EncrPreConfCommitment { bool isUsed; - address commiter; + address committer; uint64 dispatchTimestamp; bytes32 commitmentDigest; bytes commitmentSignature; @@ -53,7 +53,7 @@ interface IPreConfCommitmentStore { event CommitmentStored( bytes32 indexed commitmentIndex, address bidder, - address commiter, + address committer, uint256 bid, uint64 blockNumber, bytes32 bidHash, @@ -71,7 +71,7 @@ interface IPreConfCommitmentStore { /// @dev Event to log successful encrypted commitment storage event EncryptedCommitmentStored( bytes32 indexed commitmentIndex, - address commiter, + address committer, bytes32 commitmentDigest, bytes commitmentSignature, uint64 dispatchTimestamp @@ -113,10 +113,10 @@ interface IPreConfCommitmentStore { function updateCommitmentDispatchWindow(uint64 newDispatchWindow) external; /** - * @dev Updates the address of the oracle. - * @param newOracle The new oracle address. + * @dev Updates the address of the oracle contract. + * @param newOracleContract The new oracle contract address. */ - function updateOracle(address newOracle) external; + function updateOracleContract(address newOracleContract) external; /** * @dev Updates the address of the bidder registry. @@ -287,11 +287,11 @@ interface IPreConfCommitmentStore { * @dev Verifies a pre-confirmation commitment by computing the hash and recovering the committer's address. * @param params The commitment params associated with the commitment. * @return preConfHash The hash of the pre-confirmation commitment. - * @return commiterAddress The address of the committer recovered from the commitment signature. + * @return committerAddress The address of the committer recovered from the commitment signature. */ function verifyPreConfCommitment( CommitmentParams memory params - ) external pure returns (bytes32 preConfHash, address commiterAddress); + ) external pure returns (bytes32 preConfHash, address committerAddress); /** * @dev Computes the index of a commitment. diff --git a/contracts/contracts/interfaces/IProviderRegistry.sol b/contracts/contracts/interfaces/IProviderRegistry.sol index 56e27eccd..10633139a 100644 --- a/contracts/contracts/interfaces/IProviderRegistry.sol +++ b/contracts/contracts/interfaces/IProviderRegistry.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.20; interface IProviderRegistry { function registerAndStake(bytes calldata blsPublicKey) external payable; - function depositFunds() external payable; + function stake() external payable; function slash( uint256 amt, @@ -12,6 +12,10 @@ interface IProviderRegistry { address payable bidder, uint256 residualBidPercentAfterDecay ) external; + + function isProviderValid(address committerAddress) external view; - function checkStake(address provider) external view returns (uint256); + function minStake() external view returns (uint256); + + function withdrawalRequests(address provider) external view returns (uint256); } diff --git a/contracts/contracts/utils/FeePayout.sol b/contracts/contracts/utils/FeePayout.sol new file mode 100644 index 000000000..1e3db39b4 --- /dev/null +++ b/contracts/contracts/utils/FeePayout.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: BSL 1.1 +pragma solidity 0.8.20; + +library FeePayout { + + struct Tracker { + /// @dev Address that accumulates fees + address recipient; + /// @dev Accumulated fees since last payout + uint256 accumulatedAmount; + /// @dev Block number when the last fee payout was made + uint256 lastPayoutBlock; + /// @dev Min number of blocks between payouts + uint256 payoutPeriodBlocks; + } + + /// @dev Event emitted when fees are transferred to the recipient. + event FeeTransfer(uint256 amount, address indexed recipient); + + /// @dev Initialize a new fee tracker in storage + function init(Tracker storage self, address _recipient, uint256 _payoutPeriodBlocks) internal { + require(_recipient != address(0), "fee recipient is zero"); + require(_payoutPeriodBlocks != 0, "pay period must be positive"); + self.recipient = _recipient; + self.accumulatedAmount = 0; + self.lastPayoutBlock = block.number; + self.payoutPeriodBlocks = _payoutPeriodBlocks; + } + + /// @dev Transfers the accumulated fees to the recipient and resets the tracker + /// @param tracker The FeePayout.Tracker struct + function transferToRecipient(Tracker storage tracker) internal { + uint256 amountToPay = tracker.accumulatedAmount; + (bool success, ) = payable(tracker.recipient).call{value: amountToPay}(""); + require(success, "transfer to recipient failed"); + tracker.accumulatedAmount = 0; + tracker.lastPayoutBlock = block.number; + emit FeeTransfer(amountToPay, tracker.recipient); + } + + /// @dev Checks if a fee payout is due + /// @param tracker The FeePayout.Tracker struct + /// @return true if a payout is due, false otherwise + function isPayoutDue(Tracker storage tracker) internal view returns (bool) { + return block.number > tracker.lastPayoutBlock + tracker.payoutPeriodBlocks; + } +} diff --git a/contracts/scripts/DeployScripts.s.sol b/contracts/scripts/DeployScripts.s.sol index 887080a7c..60aef78b0 100644 --- a/contracts/scripts/DeployScripts.s.sol +++ b/contracts/scripts/DeployScripts.s.sol @@ -20,42 +20,64 @@ contract DeployScript is Script { function run() external { vm.startBroadcast(); - // Replace these with your contract's constructor parameters uint256 minStake = 1 ether; - address feeRecipient = address( - 0x68bC10674b265f266b4b1F079Fa06eF4045c3ab9 + address protocolFeeRecipient = address( + 0xfA0B0f5d298d28EFE4d35641724141ef19C05684 // Placeholder for now, L1 preconf.eth address ); uint16 feePercent = 2; uint64 commitmentDispatchWindow = 2000; uint256 blocksPerWindow = 10; - + uint256 withdrawalDelay = 24 * 3600 * 1000; // 24 hours in milliseconds + uint256 protocolFeePayoutPeriodBlocks = 5 * 3600; // 1 hour with 200ms blocks address oracleKeystoreAddress = vm.envAddress("ORACLE_KEYSTORE_ADDRESS"); require(oracleKeystoreAddress != address(0), "missing Oracle keystore address"); address blockTrackerProxy = Upgrades.deployUUPSProxy( "BlockTracker.sol", - abi.encodeCall(BlockTracker.initialize, (blocksPerWindow, oracleKeystoreAddress, msg.sender)) + abi.encodeCall(BlockTracker.initialize, + (blocksPerWindow, // blocksPerWindow_ param + oracleKeystoreAddress, // oracleAccount_ param + msg.sender)) // owner_ param ); BlockTracker blockTracker = BlockTracker(payable(blockTrackerProxy)); console.log("BlockTracker:", address(blockTracker)); address bidderRegistryProxy = Upgrades.deployUUPSProxy( "BidderRegistry.sol", - abi.encodeCall(BidderRegistry.initialize, (feeRecipient, feePercent, msg.sender, address(blockTracker), blocksPerWindow)) + abi.encodeCall(BidderRegistry.initialize, + (protocolFeeRecipient, // _protocolFeeRecipient param + feePercent, // _feePercent param + msg.sender, // _owner param + address(blockTracker), // _blockTracker param + blocksPerWindow, // _blocksPerWindow param + protocolFeePayoutPeriodBlocks)) // _protocolFeePayoutPeriodBlocks param ); BidderRegistry bidderRegistry = BidderRegistry(payable(bidderRegistryProxy)); console.log("BidderRegistry:", address(bidderRegistry)); address providerRegistryProxy = Upgrades.deployUUPSProxy( "ProviderRegistry.sol", - abi.encodeCall(ProviderRegistry.initialize, (minStake, feeRecipient, feePercent, msg.sender)) + abi.encodeCall(ProviderRegistry.initialize, + (minStake, // _minStake param + protocolFeeRecipient, // _protocolFeeRecipient param + feePercent, // _feePercent param + msg.sender, // _owner param + withdrawalDelay, // _withdrawalDelay param + protocolFeePayoutPeriodBlocks)) // _protocolFeePayoutPeriodBlocks param ); ProviderRegistry providerRegistry = ProviderRegistry(payable(providerRegistryProxy)); console.log("ProviderRegistry:", address(providerRegistry)); address preconfCommitmentStoreProxy = Upgrades.deployUUPSProxy( "PreConfCommitmentStore.sol", - abi.encodeCall(PreConfCommitmentStore.initialize, (address(providerRegistry), address(bidderRegistry), feeRecipient, msg.sender, address(blockTracker), commitmentDispatchWindow, blocksPerWindow)) + abi.encodeCall(PreConfCommitmentStore.initialize, + (address(providerRegistry), // _providerRegistry param + address(bidderRegistry), // _bidderRegistry param + address(0x0), // _oracleContract param, updated later in script. + msg.sender, // _owner param + address(blockTracker), // _blockTracker param + commitmentDispatchWindow, // _commitmentDispatchWindow param + blocksPerWindow)) // _blocksPerWindow param ); PreConfCommitmentStore preConfCommitmentStore = PreConfCommitmentStore(payable(preconfCommitmentStoreProxy)); console.log("PreConfCommitmentStore:", address(preConfCommitmentStore)); @@ -72,12 +94,16 @@ contract DeployScript is Script { address oracleProxy = Upgrades.deployUUPSProxy( "Oracle.sol", - abi.encodeCall(Oracle.initialize, (address(preConfCommitmentStore), address(blockTracker), oracleKeystoreAddress, msg.sender)) + abi.encodeCall(Oracle.initialize, + (address(preConfCommitmentStore), // preConfContract_ param + address(blockTracker), // blockTrackerContract_ param + oracleKeystoreAddress, // oracleAcount_ param + msg.sender)) // owner_ param ); Oracle oracle = Oracle(payable(oracleProxy)); console.log("Oracle:", address(oracle)); - preConfCommitmentStore.updateOracle(address(oracle)); + preConfCommitmentStore.updateOracleContract(address(oracle)); console.log("PreConfCommitmentStoreWithOracle:", address(oracle)); vm.stopBroadcast(); diff --git a/contracts/scripts/validator-registry/DeployValidatorOptInRouter.s.sol b/contracts/scripts/validator-registry/DeployValidatorOptInRouter.s.sol new file mode 100644 index 000000000..67a012912 --- /dev/null +++ b/contracts/scripts/validator-registry/DeployValidatorOptInRouter.s.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: BSL 1.1 + +// solhint-disable no-console +// solhint-disable one-contract-per-file + +pragma solidity 0.8.20; + +import {Script} from "forge-std/Script.sol"; +import {console} from "forge-std/console.sol"; +import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; +import {ValidatorOptInRouter} from "../../contracts/validator-registry/ValidatorOptInRouter.sol"; + +contract BaseDeploy is Script { + function deployValidatorOptInRouter( + address registryV1, + address mevCommitAVS, + address owner + ) public returns (address) { + console.log("Deploying ValidatorOptInRouter on chain:", block.chainid); + address proxy = Upgrades.deployUUPSProxy( + "ValidatorOptInRouter.sol", + abi.encodeCall( + ValidatorOptInRouter.initialize, + (registryV1, mevCommitAVS, owner) + ) + ); + console.log("ValidatorOptInRouter UUPS proxy deployed to:", address(proxy)); + ValidatorOptInRouter router = ValidatorOptInRouter(payable(proxy)); + console.log("ValidatorOptInRouter owner:", router.owner()); + return proxy; + } +} + +contract DeployHolesky is BaseDeploy { + address constant public VAL_REGISTRY_V1 = 0x5d4fC7B5Aeea4CF4F0Ca6Be09A2F5AaDAd2F2803; + address constant public MEV_COMMIT_AVS = 0xcAe2d8C15C603683C862F57850ef8Ae550280432; + + // This is the most important field. On mainnet it'll be the primev multisig. + address constant public OWNER = 0x4535bd6fF24860b5fd2889857651a85fb3d3C6b1; + + function run() external { + require(block.chainid == 17000, "must deploy on Holesky"); + + vm.startBroadcast(); + deployValidatorOptInRouter( + VAL_REGISTRY_V1, + MEV_COMMIT_AVS, + OWNER + ); + vm.stopBroadcast(); + } +} diff --git a/contracts/scripts/validator-registry/DeployValidatorRegistryV1.s.sol b/contracts/scripts/validator-registry/DeployValidatorRegistryV1.s.sol index f9f54519a..6a626909e 100644 --- a/contracts/scripts/validator-registry/DeployValidatorRegistryV1.s.sol +++ b/contracts/scripts/validator-registry/DeployValidatorRegistryV1.s.sol @@ -41,11 +41,14 @@ contract DeployHolesky is BaseDeploy { address constant public SLASH_RECEIVER = 0x4535bd6fF24860b5fd2889857651a85fb3d3C6b1; uint256 constant public UNSTAKE_PERIOD_BLOCKS = 32 * 3; // 2 epoch finalization time + settlement buffer + // This is the most important field. On mainnet it'll be the primev multisig. + address constant public OWNER = 0x4535bd6fF24860b5fd2889857651a85fb3d3C6b1; + function run() external { require(block.chainid == 17000, "must deploy on Holesky"); vm.startBroadcast(); deployValidatorRegistry(MIN_STAKE, SLASH_AMOUNT, - SLASH_ORACLE, SLASH_RECEIVER, UNSTAKE_PERIOD_BLOCKS, msg.sender); + SLASH_ORACLE, SLASH_RECEIVER, UNSTAKE_PERIOD_BLOCKS, OWNER); vm.stopBroadcast(); } } diff --git a/contracts/scripts/validator-registry/avs/DeployAVS.s.sol b/contracts/scripts/validator-registry/avs/DeployAVS.s.sol new file mode 100644 index 000000000..5e3bb4485 --- /dev/null +++ b/contracts/scripts/validator-registry/avs/DeployAVS.s.sol @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: BSL 1.1 + +// solhint-disable no-console +// solhint-disable one-contract-per-file + +pragma solidity 0.8.20; + +import {Script} from "forge-std/Script.sol"; +import {console} from "forge-std/console.sol"; +import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; +import {MevCommitAVS} from "../../../contracts/validator-registry/avs/MevCommitAVS.sol"; +import {IDelegationManager} from "eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol"; +import {IEigenPodManager} from "eigenlayer-contracts/src/contracts/interfaces/IEigenPodManager.sol"; +import {IStrategyManager} from "eigenlayer-contracts/src/contracts/interfaces/IStrategyManager.sol"; +import {IAVSDirectory} from "eigenlayer-contracts/src/contracts/interfaces/IAVSDirectory.sol"; +import {EigenHoleskyReleaseConsts} from "./ReleaseAddrConsts.sol"; + +contract BaseDeploy is Script { + function deployMevCommitAVS( + address owner, + IDelegationManager delegationManager, + IEigenPodManager eigenPodManager, + IStrategyManager strategyManager, + IAVSDirectory avsDirectory, + address[] memory restakeableStrategies, + address freezeOracle, + uint256 unfreezeFee, + address unfreezeReceiver, + uint256 unfreezePeriodBlocks, + uint256 operatorDeregPeriodBlocks, + uint256 validatorDeregPeriodBlocks, + uint256 lstRestakerDeregPeriodBlocks + ) public returns (address) { + console.log("Deploying MevCommitAVS on chain:", block.chainid); + string memory metadataUrl = "https://raw.githubusercontent.com/primev/mev-commit/main/static/avs-metadata.json"; + address proxy = Upgrades.deployUUPSProxy( + "MevCommitAVS.sol", + abi.encodeCall( + MevCommitAVS.initialize, + ( + owner, + delegationManager, + eigenPodManager, + strategyManager, + avsDirectory, + restakeableStrategies, + freezeOracle, + unfreezeFee, + unfreezeReceiver, + unfreezePeriodBlocks, + operatorDeregPeriodBlocks, + validatorDeregPeriodBlocks, + lstRestakerDeregPeriodBlocks, + metadataUrl + ) + ) + ); + console.log("MevCommitAVS UUPS proxy deployed to:", address(proxy)); + MevCommitAVS mevCommitAVS = MevCommitAVS(payable(proxy)); + console.log("MevCommitAVS owner:", mevCommitAVS.owner()); + return proxy; + } +} + +contract DeployHolesky is BaseDeploy { + // This is the most important field. On mainnet it'll be the primev multisig. + address constant public OWNER = 0x4535bd6fF24860b5fd2889857651a85fb3d3C6b1; + + IDelegationManager constant public DELEGATION_MANAGER = IDelegationManager(EigenHoleskyReleaseConsts.DELEGATION_MANAGER); + IEigenPodManager constant public EIGENPOD_MANAGER = IEigenPodManager(EigenHoleskyReleaseConsts.EIGENPOD_MANAGER); + IStrategyManager constant public STRATEGY_MANAGER = IStrategyManager(EigenHoleskyReleaseConsts.STRATEGY_MANAGER); + IAVSDirectory constant public AVS_DIRECTORY = IAVSDirectory(EigenHoleskyReleaseConsts.AVS_DIRECTORY); + address constant public FREEZE_ORACLE = 0x4535bd6fF24860b5fd2889857651a85fb3d3C6b1; // Temporary freeze oracle + uint256 constant public UNFREEZE_FEE = 0.1 ether; + address constant public UNFREEZE_RECEIVER = 0x4535bd6fF24860b5fd2889857651a85fb3d3C6b1; // Temporary unfreezeReceiver + uint256 constant public UNFREEZE_PERIOD_BLOCKS = 12000; // ~ 1 day + uint256 constant public OPERATOR_DEREG_PERIOD_BLOCKS = 12000; // ~ 1 day + uint256 constant public VALIDATOR_DEREG_PERIOD_BLOCKS = 32 * 3; // 2 epoch finalization time + settlement buffer + uint256 constant public LST_RESTARKER_DEREG_PERIOD_BLOCKS = 12000; // ~ 1 day + + function run() external { + require(block.chainid == 17000, "must deploy on Holesky"); + + address[] memory restakeableStrategies = new address[](11); + restakeableStrategies[0] = EigenHoleskyReleaseConsts.STRATEGY_BASE_STETH; + restakeableStrategies[1] = EigenHoleskyReleaseConsts.STRATEGY_BASE_RETH; + restakeableStrategies[2] = EigenHoleskyReleaseConsts.STRATEGY_BASE_WETH; + restakeableStrategies[3] = EigenHoleskyReleaseConsts.STRATEGY_BASE_LSETH; + restakeableStrategies[4] = EigenHoleskyReleaseConsts.STRATEGY_BASE_SFRXETH; + restakeableStrategies[5] = EigenHoleskyReleaseConsts.STRATEGY_BASE_ETHX; + restakeableStrategies[6] = EigenHoleskyReleaseConsts.STRATEGY_BASE_OSETH; + restakeableStrategies[7] = EigenHoleskyReleaseConsts.STRATEGY_BASE_CBETH; + restakeableStrategies[8] = EigenHoleskyReleaseConsts.STRATEGY_BASE_METH; + restakeableStrategies[9] = EigenHoleskyReleaseConsts.STRATEGY_BASE_ANKRETH; + restakeableStrategies[10] = EigenHoleskyReleaseConsts.BEACON_CHAIN_ETH; + + vm.startBroadcast(); + deployMevCommitAVS( + OWNER, + DELEGATION_MANAGER, + EIGENPOD_MANAGER, + STRATEGY_MANAGER, + AVS_DIRECTORY, + restakeableStrategies, + FREEZE_ORACLE, + UNFREEZE_FEE, + UNFREEZE_RECEIVER, + UNFREEZE_PERIOD_BLOCKS, + OPERATOR_DEREG_PERIOD_BLOCKS, + VALIDATOR_DEREG_PERIOD_BLOCKS, + LST_RESTARKER_DEREG_PERIOD_BLOCKS + ); + vm.stopBroadcast(); + } +} diff --git a/contracts/scripts/validator-registry/avs/DeployAVSWithMockEigen.s.sol b/contracts/scripts/validator-registry/avs/DeployAVSWithMockEigen.s.sol new file mode 100644 index 000000000..df084d2a4 --- /dev/null +++ b/contracts/scripts/validator-registry/avs/DeployAVSWithMockEigen.s.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: BSL 1.1 +pragma solidity ^0.8.20; + +// solhint-disable no-console +// solhint-disable one-contract-per-file + +import {Script} from "forge-std/Script.sol"; +import {console} from "forge-std/console.sol"; +import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; +import {MevCommitAVS} from "../../../contracts/validator-registry/avs/MevCommitAVS.sol"; +import {StrategyManagerMock} from "eigenlayer-contracts/src/test/mocks/StrategyManagerMock.sol"; +import {DelegationManagerMock} from "eigenlayer-contracts/src/test/mocks/DelegationManagerMock.sol"; +import {EigenPodManagerMock} from "../../../test/validator-registry/avs/EigenPodManagerMock.sol"; +import {AVSDirectoryMock} from "../../../test/validator-registry/avs/AVSDirectoryMock.sol"; + +contract DeployAVSWithMockEigen is Script { + function run() external { + require(block.chainid == 31337, "must deploy on anvil"); + vm.startBroadcast(); + + StrategyManagerMock strategyManagerMock = new StrategyManagerMock(); + DelegationManagerMock delegationManagerMock = new DelegationManagerMock(); + EigenPodManagerMock eigenPodManagerMock = new EigenPodManagerMock(); + AVSDirectoryMock avsDirectoryMock = new AVSDirectoryMock(); + + address[] memory restakeableStrategies = new address[](3); + restakeableStrategies[0] = address(0x1); + restakeableStrategies[1] = address(0x2); + restakeableStrategies[2] = address(0x3); + + address freezeOracle = address(0x5); + uint256 unfreezeFee = 1 ether; + address unfreezeReceiver = address(0x6); + uint256 unfreezePeriodBlocks = 100; + uint256 operatorDeregPeriodBlocks = 200; + uint256 validatorDeregPeriodBlocks = 300; + uint256 lstRestakerDeregPeriodBlocks = 400; + string memory metadataUrl = "https://raw.githubusercontent.com/primev/mev-commit/main/static/avs-metadata.json"; + + address proxy = Upgrades.deployUUPSProxy( + "MevCommitAVS.sol", + abi.encodeCall(MevCommitAVS.initialize, ( + msg.sender, + delegationManagerMock, + eigenPodManagerMock, + strategyManagerMock, + avsDirectoryMock, + restakeableStrategies, + freezeOracle, + unfreezeFee, + unfreezeReceiver, + unfreezePeriodBlocks, + operatorDeregPeriodBlocks, + validatorDeregPeriodBlocks, + lstRestakerDeregPeriodBlocks, + metadataUrl + )) + ); + MevCommitAVS mevCommitAVS = MevCommitAVS(payable(proxy)); + + console.log("StrategyManagerMock deployed at:", address(strategyManagerMock)); + console.log("DelegationManagerMock deployed at:", address(delegationManagerMock)); + console.log("EigenPodManagerMock deployed at:", address(eigenPodManagerMock)); + console.log("AVSDirectoryMock deployed at:", address(avsDirectoryMock)); + console.log("MevCommitAVS deployed at:", address(mevCommitAVS)); + + delegationManagerMock.setIsOperator(msg.sender, true); + + vm.stopBroadcast(); + } +} diff --git a/contracts/scripts/validator-registry/avs/ReleaseAddrConsts.sol b/contracts/scripts/validator-registry/avs/ReleaseAddrConsts.sol index 9d1207de9..5befe7b69 100644 --- a/contracts/scripts/validator-registry/avs/ReleaseAddrConsts.sol +++ b/contracts/scripts/validator-registry/avs/ReleaseAddrConsts.sol @@ -5,9 +5,8 @@ pragma solidity 0.8.20; -// TODO: Confirm every addr here with the markdown - -/// @notice Constants from https://github.com/Layr-Labs/eigenlayer-contracts?tab=readme-ov-file#deployments +/// @notice Constants from https://github.com/Layr-Labs/eigenlayer-contracts?tab=readme-ov-file#deployments, +/// @notice Last updated 07-26-2024 library EigenMainnetReleaseConsts { address internal constant DELEGATION_MANAGER = 0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A; @@ -15,6 +14,7 @@ library EigenMainnetReleaseConsts { address internal constant EIGENPOD_MANAGER = 0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338; address internal constant AVS_DIRECTORY = 0x135DDa560e946695d6f155dACaFC6f1F25C1F5AF; address internal constant SLASHER = 0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd; + address internal constant REWARDS_COORDINATOR = 0x7750d328b314EfFa365A0402CcfD489B80B0adda; address internal constant STRATEGY_BASE_CBETH = 0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc; address internal constant STRATEGY_BASE_STETH = 0x93c4b944D05dfe6df7645A86cd2206016c51564D; @@ -32,6 +32,7 @@ library EigenMainnetReleaseConsts { } /// @notice Constants from https://github.com/Layr-Labs/eigenlayer-contracts?tab=readme-ov-file#current-testnet-deployment +/// @notice Last updated 07-26-2024 library EigenHoleskyReleaseConsts { address internal constant DELEGATION_MANAGER = 0xA44151489861Fe9e3055d95adC98FbD462B948e7; @@ -41,17 +42,15 @@ library EigenHoleskyReleaseConsts { address internal constant SLASHER = 0xcAe751b75833ef09627549868A04E32679386e7C; address internal constant REWARDS_COORDINATOR = 0xAcc1fb458a1317E886dB376Fc8141540537E68fE; - address internal constant STRATEGY_BASE_CBETH = 0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6; address internal constant STRATEGY_BASE_STETH = 0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3; address internal constant STRATEGY_BASE_RETH = 0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0; + address internal constant STRATEGY_BASE_WETH = 0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9; + address internal constant STRATEGY_BASE_LSETH = 0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943; + address internal constant STRATEGY_BASE_SFRXETH = 0x9281ff96637710Cd9A5CAcce9c6FAD8C9F54631c; address internal constant STRATEGY_BASE_ETHX = 0x31B6F59e1627cEfC9fA174aD03859fC337666af7; - address internal constant STRATEGY_BASE_ANKRETH = 0x7673a47463F80c6a3553Db9E54c8cDcd5313d0ac; - address internal constant STRATEGY_BASE_OETH = 0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9; address internal constant STRATEGY_BASE_OSETH = 0x46281E3B7fDcACdBa44CADf069a94a588Fd4C6Ef; - address internal constant STRATEGY_BASE_SWETH = 0x9281ff96637710Cd9A5CAcce9c6FAD8C9F54631c; - address internal constant STRATEGY_BASE_WBETH = 0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9; - address internal constant STRATEGY_BASE_SFRXETH = 0x9281ff96637710Cd9A5CAcce9c6FAD8C9F54631c; - address internal constant STRATEGY_BASE_LSETH = 0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943; - address internal constant STRATEGY_BASE_METH = 0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943; + address internal constant STRATEGY_BASE_CBETH = 0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6; + address internal constant STRATEGY_BASE_METH = 0xaccc5A86732BE85b5012e8614AF237801636F8e5; + address internal constant STRATEGY_BASE_ANKRETH = 0x7673a47463F80c6a3553Db9E54c8cDcd5313d0ac; address internal constant BEACON_CHAIN_ETH = 0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0; } diff --git a/contracts/test/BidderRegistryTest.sol b/contracts/test/BidderRegistryTest.sol index 6467ab89f..95ade2f58 100644 --- a/contracts/test/BidderRegistryTest.sol +++ b/contracts/test/BidderRegistryTest.sol @@ -4,27 +4,34 @@ pragma solidity 0.8.20; import "forge-std/Test.sol"; import {BidderRegistry} from "../contracts/BidderRegistry.sol"; import {BlockTracker} from "../contracts/BlockTracker.sol"; +import {IBidderRegistry} from "../contracts/interfaces/IBidderRegistry.sol"; import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; contract BidderRegistryTest is Test { - uint256 testNumber; - BidderRegistry internal bidderRegistry; - uint16 internal feePercent; - uint256 internal minStake; - address internal bidder; - address internal feeRecipient; - uint256 blocksPerWindow; - BlockTracker internal blockTracker; + uint256 public testNumber; + BidderRegistry public bidderRegistry; + uint16 public feePercent; + uint256 public minStake; + address public bidder; + address public feeRecipient; + uint256 public feePayoutPeriodBlocks; + uint256 public blocksPerWindow; + BlockTracker public blockTracker; /// @dev Event emitted when a bidder is registered with their staked amount event BidderRegistered(address indexed bidder, uint256 indexed stakedAmount, uint256 indexed windowNumber); + event FeeTransfer(uint256 amount, address indexed recipient); + event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient); + event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks); + function setUp() public { testNumber = 42; feePercent = 10; minStake = 1e18 wei; feeRecipient = vm.addr(9); + feePayoutPeriodBlocks = 100; blocksPerWindow = 10; address blockTrackerProxy = Upgrades.deployUUPSProxy( "BlockTracker.sol", @@ -34,7 +41,7 @@ contract BidderRegistryTest is Test { address bidderRegistryProxy = Upgrades.deployUUPSProxy( "BidderRegistry.sol", - abi.encodeCall(BidderRegistry.initialize, (feeRecipient, feePercent, address(this), address(blockTracker), blocksPerWindow)) + abi.encodeCall(BidderRegistry.initialize, (feeRecipient, feePercent, address(this), address(blockTracker), blocksPerWindow, feePayoutPeriodBlocks)) ); bidderRegistry = BidderRegistry(payable(bidderRegistryProxy)); @@ -44,7 +51,11 @@ contract BidderRegistryTest is Test { } function test_VerifyInitialContractState() public view { - assertEq(bidderRegistry.feeRecipient(), feeRecipient); + (address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) = bidderRegistry.protocolFeeTracker(); + assertEq(recipient, feeRecipient); + assertEq(payoutPeriodBlocks, feePayoutPeriodBlocks); + assertEq(lastPayoutBlock, block.number); + assertEq(accumulatedAmount, 0); assertEq(bidderRegistry.feePercent(), feePercent); assertEq(bidderRegistry.preConfirmationsContract(), address(0)); assertEq(bidderRegistry.bidderRegistered(bidder), false); @@ -88,38 +99,53 @@ contract BidderRegistryTest is Test { bidderRegistry.depositForWindow{value: 1 wei}(2); } - function testFail_receive() public { + function testFail_Receive() public { vm.prank(bidder); vm.expectRevert(bytes("")); (bool success, ) = address(bidderRegistry).call{value: 1 wei}(""); require(success, "couldn't transfer to bidder"); } - function testFail_fallback() public { + function testFail_Fallback() public { vm.prank(bidder); vm.expectRevert(bytes("")); (bool success, ) = address(bidderRegistry).call{value: 1 wei}(""); require(success, "couldn't transfer to bidder"); } - function test_SetNewFeeRecipient() public { + function test_SetNewProtocolFeeRecipient() public { address newRecipient = vm.addr(2); vm.prank(address(this)); - bidderRegistry.setNewFeeRecipient(newRecipient); - - assertEq(bidderRegistry.feeRecipient(), newRecipient); + vm.expectEmit(true, true, true, true); + emit ProtocolFeeRecipientUpdated(newRecipient); + bidderRegistry.setNewProtocolFeeRecipient(newRecipient); + (address recipient, , , ) = bidderRegistry.protocolFeeTracker(); + assertEq(recipient, newRecipient); } - function testFail_SetNewFeeRecipient() public { + function testFail_SetNewProtocolFeeRecipient() public { address newRecipient = vm.addr(2); vm.expectRevert(bytes("")); - bidderRegistry.setNewFeeRecipient(newRecipient); + bidderRegistry.setNewProtocolFeeRecipient(newRecipient); + } + + function test_SetNewFeePayoutPeriodBlocks() public { + vm.prank(address(this)); + vm.expectEmit(true, true, true, true); + emit FeePayoutPeriodBlocksUpdated(890); + bidderRegistry.setNewFeePayoutPeriodBlocks(890); + (, , , uint256 payoutPeriodBlocks) = bidderRegistry.protocolFeeTracker(); + assertEq(payoutPeriodBlocks, 890); + } + + function testFail_SetNewFeePayoutPeriodBlocks() public { + vm.expectRevert(bytes("")); + bidderRegistry.setNewFeePayoutPeriodBlocks(83424); } function test_SetNewFeePercent() public { vm.prank(address(this)); bidderRegistry.setNewFeePercent(uint16(25)); - assertEq(bidderRegistry.feePercent(), uint16(25)); } @@ -132,7 +158,6 @@ contract BidderRegistryTest is Test { vm.prank(address(this)); address newPreConfContract = vm.addr(3); bidderRegistry.setPreconfirmationsContract(newPreConfContract); - assertEq(bidderRegistry.preConfirmationsContract(), newPreConfContract); } @@ -159,12 +184,10 @@ contract BidderRegistryTest is Test { bidderRegistry.retrieveFunds(nextWindow, bidID, payable(provider), 100); uint256 providerAmount = bidderRegistry.providerAmount(provider); - uint256 feeRecipientAmount = bidderRegistry.feeRecipientAmount(); + uint256 feeRecipientAmount = bidderRegistry.getAccumulatedProtocolFee(); assertEq(providerAmount, 900000000000000000); assertEq(feeRecipientAmount, 100000000000000000); - assertEq(bidderRegistry.getFeeRecipientAmount(), 100000000000000000); - assertEq(bidderRegistry.lockedFunds(bidder, nextWindow), 63 ether); } @@ -187,11 +210,10 @@ contract BidderRegistryTest is Test { bidderRegistry.retrieveFunds(nextWindow, bidID, payable(provider), 50); uint256 providerAmount = bidderRegistry.providerAmount(provider); - uint256 feeRecipientAmount = bidderRegistry.feeRecipientAmount(); + uint256 feeRecipientAmount = bidderRegistry.getAccumulatedProtocolFee(); assertEq(providerAmount, 450000000000000000); assertEq(feeRecipientAmount, 50000000000000000); - assertEq(bidderRegistry.getFeeRecipientAmount(), 50000000000000000); assertEq(bidder.balance, bidderBalance + 500000000000000000); assertEq(bidderRegistry.lockedFunds(bidder, nextWindow), 63 ether); @@ -216,7 +238,7 @@ contract BidderRegistryTest is Test { bidderRegistry.unlockFunds(nextWindow, bidID); uint256 providerAmount = bidderRegistry.providerAmount(provider); - uint256 feeRecipientAmount = bidderRegistry.feeRecipientAmount(); + uint256 feeRecipientAmount = bidderRegistry.getAccumulatedProtocolFee(); assertEq(providerAmount, 0); assertEq(feeRecipientAmount, 0); @@ -225,35 +247,6 @@ contract BidderRegistryTest is Test { assertEq(bidderRegistry.lockedFunds(bidder, nextWindow), 63 ether); } - function test_shouldRetrieveFundsWithoutFeeRecipient() public { - vm.prank(address(this)); - uint256 feerecipientValueBefore = bidderRegistry.feeRecipientAmount(); - - bidderRegistry.setNewFeeRecipient(address(0)); - bidderRegistry.setPreconfirmationsContract(address(this)); - - uint256 currentWindow = blockTracker.getCurrentWindow(); - uint256 nextWindow = currentWindow + 1; - vm.prank(bidder); - bidderRegistry.depositForWindow{value: 64 ether}(nextWindow); - - address provider = vm.addr(4); - uint64 blockNumber = uint64(blocksPerWindow + 2); - blockTracker.addBuilderAddress("test", provider); - blockTracker.recordL1Block(blockNumber, "test"); - bytes32 bidID = keccak256("1234"); - bidderRegistry.openBid(bidID, 1 ether, bidder, blockNumber); - bidderRegistry.retrieveFunds(nextWindow, bidID, payable(provider), 100); - - uint256 feerecipientValueAfter = bidderRegistry.feeRecipientAmount(); - uint256 providerAmount = bidderRegistry.providerAmount(provider); - - assertEq(providerAmount, 900000000000000000); - assertEq(feerecipientValueAfter, feerecipientValueBefore); - - assertEq(bidderRegistry.lockedFunds(bidder, nextWindow), 63 ether); - } - function testFail_shouldRetrieveFundsNotPreConf() public { vm.prank(bidder); uint256 currentWindow = blockTracker.getCurrentWindow(); @@ -285,33 +278,6 @@ contract BidderRegistryTest is Test { bidderRegistry.retrieveFunds(nextWindow, bidID, payable(provider),100); } - function test_withdrawFeeRecipientAmount() public { - bidderRegistry.setPreconfirmationsContract(address(this)); - uint256 currentWindow = blockTracker.getCurrentWindow(); - uint256 nextWindow = currentWindow + 1; - vm.prank(bidder); - bidderRegistry.depositForWindow{value: 64 ether}(nextWindow); - address provider = vm.addr(4); - uint256 balanceBefore = feeRecipient.balance; - bytes32 bidID = keccak256("1234"); - uint64 blockNumber = uint64(blocksPerWindow + 2); - blockTracker.addBuilderAddress("test", provider); - blockTracker.recordL1Block(blockNumber, "test"); - - bidderRegistry.openBid(bidID, 1 ether, bidder, blockNumber); - bidderRegistry.retrieveFunds(nextWindow, bidID, payable(provider),100); - bidderRegistry.withdrawFeeRecipientAmount(); - uint256 balanceAfter = feeRecipient.balance; - assertEq(balanceAfter - balanceBefore, 100000000000000000); - assertEq(bidderRegistry.feeRecipientAmount(), 0); - assertEq(bidderRegistry.getFeeRecipientAmount(), 0); - } - - function testFail_withdrawFeeRecipientAmount() public { - bidderRegistry.setPreconfirmationsContract(address(this)); - bidderRegistry.withdrawFeeRecipientAmount(); - } - function test_withdrawProviderAmount() public { bidderRegistry.setPreconfirmationsContract(address(this)); uint256 currentWindow = blockTracker.getCurrentWindow(); @@ -344,50 +310,6 @@ contract BidderRegistryTest is Test { bidderRegistry.withdrawProviderAmount(payable(provider)); } - function test_withdrawProtocolFee() public { - address provider = vm.addr(4); - bidderRegistry.setPreconfirmationsContract(address(this)); - bidderRegistry.setNewFeeRecipient(address(0)); - uint256 currentWindow = blockTracker.getCurrentWindow(); - uint256 nextWindow = currentWindow + 1; - vm.prank(bidder); - bidderRegistry.depositForWindow{value: 128 ether}(nextWindow); - uint256 balanceBefore = address(bidder).balance; - bytes32 bidID = keccak256("1234"); - uint64 blockNumber = uint64(blocksPerWindow + 2); - blockTracker.addBuilderAddress("test", provider); - blockTracker.recordL1Block(blockNumber, "test"); - - bidderRegistry.openBid(bidID, 2 ether, bidder, blockNumber); - bidderRegistry.retrieveFunds(nextWindow, bidID, payable(provider), 100); - vm.prank(bidderRegistry.owner()); - bidderRegistry.withdrawProtocolFee(payable(address(bidder))); - uint256 balanceAfter = address(bidder).balance; - assertEq(balanceAfter - balanceBefore, 200000000000000000); - assertEq(bidderRegistry.protocolFeeAmount(), 0); - } - - function testFail_withdrawProtocolFee() public { - bidderRegistry.setPreconfirmationsContract(address(this)); - bidderRegistry.setNewFeeRecipient(address(0)); - vm.prank(bidder); - uint256 currentWindow = blockTracker.getCurrentWindow(); - uint256 nextWindow = currentWindow + 1; - bidderRegistry.depositForWindow{value: 5 ether}(nextWindow); - vm.prank(bidderRegistry.owner()); - bidderRegistry.withdrawProtocolFee(payable(address(bidder))); - } - - function testFail_withdrawProtocolFeeNotOwner() public { - bidderRegistry.setPreconfirmationsContract(address(this)); - bidderRegistry.setNewFeeRecipient(address(0)); - vm.prank(bidder); - uint256 currentWindow = blockTracker.getCurrentWindow(); - uint256 nextWindow = currentWindow + 1; - bidderRegistry.depositForWindow{value: 5 ether}(nextWindow); - bidderRegistry.withdrawProtocolFee(payable(address(bidder))); - } - function test_DepositForWindows() public { uint256[] memory windows = new uint256[](3); uint256 currentWindow = blockTracker.getCurrentWindow(); @@ -453,4 +375,88 @@ contract BidderRegistryTest is Test { assertEq(maxBid, 0); } } + + function test_OpenBidtransferExcessBid() public { + bytes32 commitmentDigest = keccak256("commitment"); + uint256 bid = 3 ether; + address testBidder = vm.addr(2); + uint64 blockNumber = uint64(blocksPerWindow + 1); + + // Deal some ETH to the test bidder + vm.deal(testBidder, 10 ether); + + // Simulate the pre-confirmations contract + bidderRegistry.setPreconfirmationsContract(address(this)); + + // Deposit some funds for the next window + uint256 currentWindow = blockTracker.getCurrentWindow(); + uint256 nextWindow = currentWindow + 1; + vm.prank(testBidder); + bidderRegistry.depositForWindow{value: 4 ether}(nextWindow); + + // Ensure the used amount is less than the max bid per block + uint256 maxBid = bidderRegistry.maxBidPerBlock(testBidder, nextWindow); + uint256 usedAmount = bidderRegistry.usedFunds(testBidder, blockNumber); + uint256 availableAmount = maxBid > usedAmount ? maxBid - usedAmount : 0; + + // Open a bid that exceeds the available amount + vm.prank(address(this)); + bidderRegistry.openBid(commitmentDigest, bid, testBidder, blockNumber); + + // Verify that the excess bid was transferred back to the test bidder + uint256 expectedBid = availableAmount; + uint256 testBidderBalance = testBidder.balance; + assertEq(testBidderBalance, 10 ether - 4 ether + (bid - expectedBid)); + + // Verify the bid state + (address storedBidder, uint256 storedBidAmt, IBidderRegistry.State storedState) = bidderRegistry.bidPayment(commitmentDigest); + assertEq(storedBidder, testBidder); + assertEq(storedBidAmt, expectedBid); + assertEq(uint(storedState), uint(IBidderRegistry.State.PreConfirmed)); + } + + function test_ProtocolFeePayout() public { + (, , uint256 lastPayoutBlock,) = bidderRegistry.protocolFeeTracker(); + assertEq(lastPayoutBlock, 1); + assertEq(bidderRegistry.getAccumulatedProtocolFee(), 0); + vm.roll(250); // roll past protocol fee payout period + + bidderRegistry.setPreconfirmationsContract(address(this)); + uint256 currentWindow = blockTracker.getCurrentWindow(); + uint256 nextWindow = currentWindow + 1; + vm.prank(bidder); + bidderRegistry.depositForWindow{value: 64 ether}(nextWindow); + address provider = vm.addr(4); + uint256 balanceBefore = feeRecipient.balance; + bytes32 bidID = keccak256("1234"); + uint64 blockNumber = uint64(blocksPerWindow + 2); + blockTracker.addBuilderAddress("test", provider); + blockTracker.recordL1Block(blockNumber, "test"); + bidderRegistry.openBid(bidID, 1 ether, bidder, blockNumber); + vm.expectEmit(true, true, true, true); + emit FeeTransfer(100000000000000000, feeRecipient); + bidderRegistry.retrieveFunds(nextWindow, bidID, payable(provider),100); + uint256 balanceAfter = feeRecipient.balance; + assertEq(balanceAfter - balanceBefore, 100000000000000000); + assertEq(bidderRegistry.getAccumulatedProtocolFee(), 0); + } + + function test_ProtocolFeeAccumulation() public { + bidderRegistry.setPreconfirmationsContract(address(this)); + uint256 currentWindow = blockTracker.getCurrentWindow(); + uint256 nextWindow = currentWindow + 1; + vm.prank(bidder); + bidderRegistry.depositForWindow{value: 64 ether}(nextWindow); + address provider = vm.addr(4); + uint256 balanceBefore = feeRecipient.balance; + bytes32 bidID = keccak256("1234"); + uint64 blockNumber = uint64(blocksPerWindow + 2); + blockTracker.addBuilderAddress("test", provider); + blockTracker.recordL1Block(blockNumber, "test"); + bidderRegistry.openBid(bidID, 1 ether, bidder, blockNumber); + bidderRegistry.retrieveFunds(nextWindow, bidID, payable(provider),100); + uint256 balanceAfter = feeRecipient.balance; + assertEq(balanceAfter - balanceBefore, 0); + assertEq(bidderRegistry.getAccumulatedProtocolFee(), 100000000000000000); + } } diff --git a/contracts/test/OracleTest.sol b/contracts/test/OracleTest.sol index fef752098..393563d08 100644 --- a/contracts/test/OracleTest.sol +++ b/contracts/test/OracleTest.sol @@ -31,7 +31,8 @@ contract OracleTest is Test { bytes public sharedSecretKey; uint256 public blocksPerWindow; bytes public constant validBLSPubkey = hex"80000cddeec66a800e00b0ccbb62f12298073603f5209e812abbac7e870482e488dd1bbe533a9d44497ba8b756e1e82b"; - + uint256 public constant withdrawalDelay = 24 * 3600; // 24 hours + uint256 public constant protocolFeePayoutPeriodBlocks = 100; struct TestCommitment { uint64 bid; uint64 blockNumber; @@ -85,7 +86,7 @@ contract OracleTest is Test { "ProviderRegistry.sol", abi.encodeCall( ProviderRegistry.initialize, - (minStake, feeRecipient, feePercent, address(this)) + (minStake, feeRecipient, feePercent, address(this), withdrawalDelay, protocolFeePayoutPeriodBlocks) ) ); providerRegistry = ProviderRegistry(payable(proxy)); @@ -107,7 +108,8 @@ contract OracleTest is Test { feePercent, address(this), address(blockTracker), - blocksPerWindow + blocksPerWindow, + protocolFeePayoutPeriodBlocks ) ) ); @@ -151,7 +153,7 @@ contract OracleTest is Test { vm.stopPrank(); - preConfCommitmentStore.updateOracle(address(oracle)); + preConfCommitmentStore.updateOracleContract(address(oracle)); bidderRegistry.setPreconfirmationsContract( address(preConfCommitmentStore) ); @@ -257,7 +259,7 @@ contract OracleTest is Test { ); vm.stopPrank(); assertEq( - providerRegistry.checkStake(provider) + ((bid * 50) / 100), + providerRegistry.getProviderStake(provider) + ((bid * 50) / 100), 250 ether ); } @@ -330,7 +332,7 @@ contract OracleTest is Test { 50 ); vm.stopPrank(); - assertEq(providerRegistry.checkStake(provider), 250 ether - bid); + assertEq(providerRegistry.getProviderStake(provider), 250 ether - bid); assertEq( bidderRegistry.getProviderAmount(provider), (((bid * (100 - feePercent)) / 100) * residualAfterDecay) / 100 @@ -444,7 +446,7 @@ contract OracleTest is Test { 100 ); vm.stopPrank(); - assertEq(providerRegistry.checkStake(provider), 250 ether - bid * 4); + assertEq(providerRegistry.getProviderStake(provider), 250 ether - bid * 4); assertEq(bidderRegistry.getProviderAmount(provider), 0); } @@ -535,7 +537,7 @@ contract OracleTest is Test { ); } vm.stopPrank(); - assertEq(providerRegistry.checkStake(provider), 250 ether); + assertEq(providerRegistry.getProviderStake(provider), 250 ether); assertEq(bidderRegistry.getProviderAmount(provider), 4 * bid); } @@ -695,7 +697,7 @@ contract OracleTest is Test { } function constructAndStoreEncryptedCommitment( - address commiterAddress, + address committerAddress, uint64 bid, uint64 blockNumber, string memory txnHash, @@ -739,7 +741,7 @@ contract OracleTest is Test { (v, r, s) = vm.sign(signerPk, commitmentHash); commitmentSignature = abi.encodePacked(r, s, v); - vm.startPrank(commiterAddress); + vm.startPrank(committerAddress); bytes32 encryptedCommitmentIndex = preConfCommitmentStore .storeEncryptedCommitment( commitmentHash, diff --git a/contracts/test/PreConfirmationConfTest.sol b/contracts/test/PreConfirmationConfTest.sol index 1acea4cef..ceaf860fe 100644 --- a/contracts/test/PreConfirmationConfTest.sol +++ b/contracts/test/PreConfirmationConfTest.sol @@ -38,8 +38,10 @@ contract TestPreConfCommitmentStore is Test { BlockTracker public blockTracker; uint256 public blocksPerWindow; BidderRegistry public bidderRegistry; - bytes public constant validBLSPubkey = hex"80000cddeec66a800e00b0ccbb62f12298073603f5209e812abbac7e870482e488dd1bbe533a9d44497ba8b756e1e82b"; - + bytes public validBLSPubkey = hex"80000cddeec66a800e00b0ccbb62f12298073603f5209e812abbac7e870482e488dd1bbe533a9d44497ba8b756e1e82b"; + uint256 public withdrawalDelay; + uint256 public protocolFeePayoutPeriodBlocks; + address public oracleContract; function setUp() public { _testCommitmentAliceBob = TestCommitment( 2, @@ -60,12 +62,14 @@ contract TestPreConfCommitmentStore is Test { minStake = 1e18 wei; feeRecipient = vm.addr(9); blocksPerWindow = 10; - + withdrawalDelay = 24 * 3600; // 24 hours + protocolFeePayoutPeriodBlocks = 100; + oracleContract = address(0x6793); address providerRegistryProxy = Upgrades.deployUUPSProxy( "ProviderRegistry.sol", abi.encodeCall( ProviderRegistry.initialize, - (minStake, feeRecipient, feePercent, address(this)) + (minStake, feeRecipient, feePercent, address(this), withdrawalDelay, protocolFeePayoutPeriodBlocks) ) ); providerRegistry = ProviderRegistry(payable(providerRegistryProxy)); @@ -88,7 +92,8 @@ contract TestPreConfCommitmentStore is Test { feePercent, address(this), address(blockTracker), - blocksPerWindow + blocksPerWindow, + protocolFeePayoutPeriodBlocks ) ) ); @@ -101,7 +106,7 @@ contract TestPreConfCommitmentStore is Test { ( address(providerRegistry), // Provider Registry address(bidderRegistry), // User Registry - feeRecipient, // Oracle + oracleContract, // Oracle address(this), address(blockTracker), // Block Tracker 500, @@ -120,7 +125,7 @@ contract TestPreConfCommitmentStore is Test { ); } - function test_getBidHash() public { + function test_GetBidHash1() public { // Step 1: Prepare the test commitment data PreConfCommitmentStore.CommitmentParams memory testCommitment = IPreConfCommitmentStore.CommitmentParams({ txnHash: "0xkartik", @@ -172,7 +177,7 @@ contract TestPreConfCommitmentStore is Test { } function test_Initialize() public view { - assertEq(preConfCommitmentStore.oracle(), feeRecipient); + assertEq(preConfCommitmentStore.oracleContract(), oracleContract); assertEq( address(preConfCommitmentStore.providerRegistry()), address(providerRegistry) @@ -183,7 +188,7 @@ contract TestPreConfCommitmentStore is Test { ); } - function test_storeEncryptedCommitment() public { + function test_StoreEncryptedCommitment() public { // Step 1: Prepare the commitment information and signature bytes32 commitmentDigest = keccak256( abi.encodePacked("commitment data") @@ -198,8 +203,10 @@ contract TestPreConfCommitmentStore is Test { // Optional: Ensure the committer has enough ETH if needed for the operation vm.deal(committer, 1 ether); vm.prank(committer); + providerRegistry.registerAndStake{value: 1 ether}(validBLSPubkey); // Step 2: Store the commitment + vm.prank(committer); bytes32 commitmentIndex = preConfCommitmentStore .storeEncryptedCommitment( commitmentDigest, @@ -218,7 +225,7 @@ contract TestPreConfCommitmentStore is Test { ); // c. Assertions to verify the stored commitment matches the input - assertEq(commitment.commiter, committer); + assertEq(commitment.committer, committer); assertEq(commitment.commitmentDigest, commitmentDigest); assertEq(commitment.commitmentSignature, commitmentSignature); } @@ -273,8 +280,9 @@ contract TestPreConfCommitmentStore is Test { } function test_UpdateOracle() public { - preConfCommitmentStore.updateOracle(feeRecipient); - assertEq(preConfCommitmentStore.oracle(), feeRecipient); + address newOracle = address(0x123); + preConfCommitmentStore.updateOracleContract(newOracle); + assertEq(preConfCommitmentStore.oracleContract(), newOracle); } function test_UpdateProviderRegistry() public { @@ -293,7 +301,7 @@ contract TestPreConfCommitmentStore is Test { ); } - function test_GetBidHash() public view { + function test_GetBidHash2() public view { bytes32 bidHash = preConfCommitmentStore.getBidHash( _testCommitmentAliceBob.txnHash, _testCommitmentAliceBob.revertingTxHashes, @@ -336,20 +344,6 @@ contract TestPreConfCommitmentStore is Test { (, uint256 providerPk) = makeAddrAndKey("bob"); (v, r, s) = vm.sign(providerPk, preConfHash); signature = abi.encodePacked(r, s, v); - - - } - - function _bytes32ToHexString( - bytes32 _bytes32 - ) internal pure returns (string memory) { - bytes memory HEXCHARS = "0123456789abcdef"; - bytes memory _string = new bytes(64); - for (uint8 i = 0; i < 32; ++i) { - _string[i * 2] = HEXCHARS[uint8(_bytes32[i] >> 4)]; - _string[1 + i * 2] = HEXCHARS[uint8(_bytes32[i] & 0x0f)]; - } - return string(_string); } function test_StoreCommitment() public { @@ -369,12 +363,11 @@ contract TestPreConfCommitmentStore is Test { _testCommitmentAliceBob.bidSignature ); - (address commiter, ) = makeAddrAndKey("bob"); - vm.deal(commiter, 5 ether); + (address committer, ) = makeAddrAndKey("bob"); // Step 2: Store the commitment bytes32 encryptedIndex = storeCommitment( - commiter, + committer, _testCommitmentAliceBob.bid, _testCommitmentAliceBob.blockNumber, _testCommitmentAliceBob.txnHash, @@ -388,7 +381,7 @@ contract TestPreConfCommitmentStore is Test { ); // Step 3: Move to the next window - blockTracker.addBuilderAddress("test", address(this)); + blockTracker.addBuilderAddress("test", committer); blockTracker.recordL1Block(2, "test"); // Step 4: Open the commitment @@ -463,7 +456,7 @@ contract TestPreConfCommitmentStore is Test { } function storeCommitment( - address commiter, + address committer, uint256 bid, uint64 blockNumber, string memory txnHash, @@ -495,7 +488,10 @@ contract TestPreConfCommitmentStore is Test { _bytesToHexString(bidSignature), _bytesToHexString(sharedSecretKey) ); - vm.startPrank(commiter); + vm.deal(committer, 11 ether); + vm.startPrank(committer); + providerRegistry.registerAndStake{value: 10 ether}(validBLSPubkey); + bytes32 commitmentIndex = preConfCommitmentStore .storeEncryptedCommitment( commitmentHash, @@ -564,9 +560,9 @@ contract TestPreConfCommitmentStore is Test { sharedSecretKey: sharedSecretKey }); - (, address commiterAddress) = preConfCommitmentStore.verifyPreConfCommitment(commitmentParams); + (, address committerAddress) = preConfCommitmentStore.verifyPreConfCommitment(commitmentParams); - assertNotEq(commiterAddress, address(0)); + assertNotEq(committerAddress, address(0)); assertEq(commitment.bid, bid, "Stored bid should match input bid"); assertEq( commitment.blockNumber, @@ -610,11 +606,10 @@ contract TestPreConfCommitmentStore is Test { _testCommitmentAliceBob.bidSignature ); // Step 2: Store the commitment - (address commiter, ) = makeAddrAndKey("bob"); - vm.deal(commiter, 5 ether); - + (address committer, ) = makeAddrAndKey("bob"); + providerRegistry.registerAndStake{value: 10 ether}(validBLSPubkey); bytes32 commitmentIndex = storeCommitment( - commiter, + committer, _testCommitmentAliceBob.bid, _testCommitmentAliceBob.blockNumber, _testCommitmentAliceBob.txnHash, @@ -682,10 +677,10 @@ contract TestPreConfCommitmentStore is Test { (,bool isUsed, , , , , , , , , , , , ,) = preConfCommitmentStore .commitments(preConfHash); assert(isUsed == false); - (address commiter, ) = makeAddrAndKey("bob"); - vm.deal(commiter, 5 ether); + (address committer, ) = makeAddrAndKey("bob"); + bytes32 encryptedIndex = storeCommitment( - commiter, + committer, _testCommitmentAliceBob.bid, _testCommitmentAliceBob.blockNumber, _testCommitmentAliceBob.txnHash, @@ -700,13 +695,11 @@ contract TestPreConfCommitmentStore is Test { providerRegistry.setPreconfirmationsContract( address(preConfCommitmentStore) ); - vm.prank(commiter); - providerRegistry.registerAndStake{value: 4 ether}(validBLSPubkey); uint256 blockNumber = 2; - blockTracker.addBuilderAddress("test", commiter); + blockTracker.addBuilderAddress("test", committer); blockTracker.recordL1Block(blockNumber, "test"); bytes32 index = openCommitment( - commiter, + committer, encryptedIndex, _testCommitmentAliceBob.bid, _testCommitmentAliceBob.blockNumber, @@ -718,7 +711,7 @@ contract TestPreConfCommitmentStore is Test { _testCommitmentAliceBob.commitmentSignature, _testCommitmentAliceBob.sharedSecretKey ); - vm.prank(feeRecipient); + vm.prank(oracleContract); preConfCommitmentStore.initiateSlash(index, 100); (,isUsed, , , , , , , , , , , , ,) = preConfCommitmentStore @@ -727,8 +720,8 @@ contract TestPreConfCommitmentStore is Test { assert(isUsed == true); assertEq(bidderRegistry.lockedFunds(bidder, depositWindow), 2 ether - _testCommitmentAliceBob.bid); - assertEq(bidderRegistry.providerAmount(commiter), 0 ether); - assertEq(bidder.balance, 3 ether + _testCommitmentAliceBob.bid); + assertEq(bidderRegistry.providerAmount(committer), 0 ether); + assertEq(bidder.balance, 3 ether + _testCommitmentAliceBob.bid + 2); // +2 is the slashed funds from provider } // commitmentHash value is internal to contract and not asserted } @@ -774,10 +767,10 @@ contract TestPreConfCommitmentStore is Test { (,bool isUsed, , , , , , , , , , , , ,) = preConfCommitmentStore .commitments(preConfHash); assert(isUsed == false); - (address commiter, ) = makeAddrAndKey("bob"); - vm.deal(commiter, 5 ether); + (address committer, ) = makeAddrAndKey("bob"); + bytes32 encryptedIndex = storeCommitment( - commiter, + committer, _testCommitmentAliceBob.bid, _testCommitmentAliceBob.blockNumber, _testCommitmentAliceBob.txnHash, @@ -789,15 +782,13 @@ contract TestPreConfCommitmentStore is Test { _testCommitmentAliceBob.dispatchTimestamp, _testCommitmentAliceBob.sharedSecretKey ); - vm.prank(commiter); - providerRegistry.registerAndStake{value: 4 ether}(validBLSPubkey); - blockTracker.addBuilderAddress("test", commiter); + blockTracker.addBuilderAddress("test", committer); blockTracker.recordL1Block( _testCommitmentAliceBob.blockNumber, "test" ); bytes32 index = openCommitment( - commiter, + committer, encryptedIndex, _testCommitmentAliceBob.bid, _testCommitmentAliceBob.blockNumber, @@ -809,7 +800,7 @@ contract TestPreConfCommitmentStore is Test { _testCommitmentAliceBob.commitmentSignature, _testCommitmentAliceBob.sharedSecretKey ); - vm.prank(feeRecipient); + vm.prank(oracleContract); preConfCommitmentStore.initiateReward(index, 100); (,isUsed, , , , , , , , , , , , ,) = preConfCommitmentStore @@ -862,11 +853,10 @@ contract TestPreConfCommitmentStore is Test { (,bool isUsed, , , , , , , , , , , , ,) = preConfCommitmentStore .commitments(preConfHash); assert(isUsed == false); - (address commiter, ) = makeAddrAndKey("bob"); - vm.deal(commiter, 5 ether); + (address committer, ) = makeAddrAndKey("bob"); bytes32 encryptedIndex = storeCommitment( - commiter, + committer, _testCommitmentAliceBob.bid, _testCommitmentAliceBob.blockNumber, _testCommitmentAliceBob.txnHash, @@ -878,15 +868,13 @@ contract TestPreConfCommitmentStore is Test { _testCommitmentAliceBob.dispatchTimestamp, _testCommitmentAliceBob.sharedSecretKey ); - vm.prank(commiter); - providerRegistry.registerAndStake{value: 4 ether}(validBLSPubkey); - blockTracker.addBuilderAddress("test", commiter); + blockTracker.addBuilderAddress("test", committer); blockTracker.recordL1Block( _testCommitmentAliceBob.blockNumber, "test" ); bytes32 index = openCommitment( - commiter, + committer, encryptedIndex, _testCommitmentAliceBob.bid, _testCommitmentAliceBob.blockNumber, @@ -899,7 +887,7 @@ contract TestPreConfCommitmentStore is Test { _testCommitmentAliceBob.sharedSecretKey ); uint256 window = blockTracker.getCurrentWindow(); - vm.prank(feeRecipient); + vm.prank(oracleContract); preConfCommitmentStore.initiateReward(index, 0); (,isUsed, , , , , , , , , , , , ,) = preConfCommitmentStore @@ -909,19 +897,84 @@ contract TestPreConfCommitmentStore is Test { // commitmentHash value is internal to contract and not asserted assertEq(bidderRegistry.lockedFunds(bidder, window), 2 ether - _testCommitmentAliceBob.bid); - assertEq(bidderRegistry.providerAmount(commiter), 0 ether); + assertEq(bidderRegistry.providerAmount(committer), 0 ether); assertEq(bidder.balance, 3 ether + _testCommitmentAliceBob.bid); } } + function test_StoreEncryptedCommitmentInsufficientStake() public { + // Step 1: Prepare the commitment information and signature + bytes32 commitmentDigest = keccak256( + abi.encodePacked("commitment data") + ); + (address committer, uint256 committerPk) = makeAddrAndKey("committer"); + (uint8 v, bytes32 r, bytes32 s) = vm.sign( + committerPk, + commitmentDigest + ); + bytes memory commitmentSignature = abi.encodePacked(r, s, v); + + // Step 2: Attempt to store the commitment and expect it to fail due to insufficient stake + vm.prank(committer); + vm.expectRevert("Insufficient stake"); + preConfCommitmentStore.storeEncryptedCommitment( + commitmentDigest, + commitmentSignature, + 1000 + ); + } + + function test_StoreEncryptedCommitmentPendingWithdrawal() public { + // Step 1: Prepare the commitment information and signature + bytes32 commitmentDigest = keccak256( + abi.encodePacked("commitment data") + ); + (address committer, uint256 committerPk) = makeAddrAndKey("committer"); + (uint8 v, bytes32 r, bytes32 s) = vm.sign( + committerPk, + commitmentDigest + ); + bytes memory commitmentSignature = abi.encodePacked(r, s, v); + + // Ensure the committer has enough ETH for the required stake + vm.deal(committer, 2 ether); + vm.prank(committer); + providerRegistry.registerAndStake{value: 2 ether}(validBLSPubkey); + + // Request a withdrawal to create a pending withdrawal request + vm.prank(committer); + providerRegistry.unstake(); + + // Step 2: Attempt to store the commitment and expect it to fail due to pending withdrawal request + vm.prank(committer); + vm.expectRevert("Pending withdrawal request"); + preConfCommitmentStore.storeEncryptedCommitment( + commitmentDigest, + commitmentSignature, + 1000 + ); + } + function _bytesToHexString( bytes memory _bytes ) internal pure returns (string memory) { - bytes memory HEXCHARS = "0123456789abcdef"; + bytes memory hexChars = "0123456789abcdef"; bytes memory _string = new bytes(_bytes.length * 2); for (uint256 i = 0; i < _bytes.length; ++i) { - _string[i * 2] = HEXCHARS[uint8(_bytes[i] >> 4)]; - _string[1 + i * 2] = HEXCHARS[uint8(_bytes[i] & 0x0f)]; + _string[i * 2] = hexChars[uint8(_bytes[i] >> 4)]; + _string[1 + i * 2] = hexChars[uint8(_bytes[i] & 0x0f)]; + } + return string(_string); + } + + function _bytes32ToHexString( + bytes32 _bytes32 + ) internal pure returns (string memory) { + bytes memory hexChars = "0123456789abcdef"; + bytes memory _string = new bytes(64); + for (uint8 i = 0; i < 32; ++i) { + _string[i * 2] = hexChars[uint8(_bytes32[i] >> 4)]; + _string[1 + i * 2] = hexChars[uint8(_bytes32[i] & 0x0f)]; } return string(_string); } diff --git a/contracts/test/Preconf.js b/contracts/test/Preconf.js index 70360a0a5..787f93df4 100644 --- a/contracts/test/Preconf.js +++ b/contracts/test/Preconf.js @@ -127,7 +127,7 @@ describe("Preconf", function () { .registerAndStake({ value: ethers.parseEther("2.0") }); await txn.wait(); - const firstAddrStake = await providerRegistry.checkStake(addr1.address); + const firstAddrStake = await providerRegistry.getProviderStake(addr1.address); expect(ethers.formatEther(firstAddrStake)).to.equal("2.0"); }); diff --git a/contracts/test/ProviderRegistryTest.sol b/contracts/test/ProviderRegistryTest.sol index 2340d9f44..107bca189 100644 --- a/contracts/test/ProviderRegistryTest.sol +++ b/contracts/test/ProviderRegistryTest.sol @@ -20,8 +20,15 @@ contract ProviderRegistryTest is Test { PreConfCommitmentStore public preConfCommitmentStore; BlockTracker public blockTracker; uint256 public blocksPerWindow; - bytes public constant validBLSPubkey = hex"80000cddeec66a800e00b0ccbb62f12298073603f5209e812abbac7e870482e488dd1bbe533a9d44497ba8b756e1e82b"; + uint256 public withdrawalDelay; + bytes public validBLSPubkey = hex"80000cddeec66a800e00b0ccbb62f12298073603f5209e812abbac7e870482e488dd1bbe533a9d44497ba8b756e1e82b"; + uint256 public protocolFeePayoutPeriodBlocks; event ProviderRegistered(address indexed provider, uint256 stakedAmount, bytes blsPublicKey); + event WithdrawalRequested(address indexed provider, uint256 timestamp); + event WithdrawalCompleted(address indexed provider, uint256 amount); + event FeeTransfer(uint256 amount, address indexed recipient); + event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient); + event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks); function setUp() public { testNumber = 42; @@ -29,14 +36,18 @@ contract ProviderRegistryTest is Test { minStake = 1e18 wei; feeRecipient = vm.addr(9); blocksPerWindow = 10; - + withdrawalDelay = 24 * 3600; // 24 hours + protocolFeePayoutPeriodBlocks = 100; address providerRegistryProxy = Upgrades.deployUUPSProxy( "ProviderRegistry.sol", abi.encodeCall(ProviderRegistry.initialize, (minStake, feeRecipient, feePercent, - address(this))) + address(this), + withdrawalDelay, + protocolFeePayoutPeriodBlocks + )) ); providerRegistry = ProviderRegistry(payable(providerRegistryProxy)); @@ -54,7 +65,8 @@ contract ProviderRegistryTest is Test { feePercent, address(this), address(blockTracker), - blocksPerWindow)) + blocksPerWindow, + protocolFeePayoutPeriodBlocks)) ); bidderRegistry = BidderRegistry(payable(bidderRegistryProxy)); @@ -78,10 +90,16 @@ contract ProviderRegistryTest is Test { function test_VerifyInitialContractState() public view { assertEq(providerRegistry.minStake(), 1e18 wei); - assertEq(providerRegistry.feeRecipient(), feeRecipient); + assertEq(feePercent, feePercent); + assertEq(withdrawalDelay, withdrawalDelay); assertEq(providerRegistry.feePercent(), feePercent); assertEq(providerRegistry.preConfirmationsContract(), address(0)); assertEq(providerRegistry.providerRegistered(provider), false); + (address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) = bidderRegistry.protocolFeeTracker(); + assertEq(recipient, feeRecipient); + assertEq(payoutPeriodBlocks, protocolFeePayoutPeriodBlocks); + assertEq(lastPayoutBlock, block.number); + assertEq(accumulatedAmount, 0); } function testFail_ProviderStakeAndRegisterMinStake() public { @@ -113,7 +131,7 @@ contract ProviderRegistryTest is Test { ); assertEq(isProviderRegistered, true); - uint256 providerStakeStored = providerRegistry.checkStake(provider); + uint256 providerStakeStored = providerRegistry.getProviderStake(provider); assertEq(providerStakeStored, 1e18 wei); } @@ -125,7 +143,7 @@ contract ProviderRegistryTest is Test { providerRegistry.registerAndStake{value: 1 wei}(validBLSPubkey); } - function testFail_receive() public { + function testFail_Receive() public { vm.deal(provider, 3 ether); vm.prank(provider); vm.expectRevert(bytes("")); @@ -133,7 +151,7 @@ contract ProviderRegistryTest is Test { require(success, "Couldn't transfer to provider"); } - function testFail_fallback() public { + function testFail_Fallback() public { vm.deal(provider, 3 ether); vm.prank(provider); vm.expectRevert(bytes("")); @@ -141,18 +159,34 @@ contract ProviderRegistryTest is Test { require(success, "Couldn't transfer to provider"); } - function test_SetNewFeeRecipient() public { + function test_SetNewProtocolFeeRecipient() public { address newRecipient = vm.addr(2); vm.prank(address(this)); - providerRegistry.setNewFeeRecipient(newRecipient); - - assertEq(providerRegistry.feeRecipient(), newRecipient); + vm.expectEmit(true, true, true, true); + emit ProtocolFeeRecipientUpdated(newRecipient); + providerRegistry.setNewProtocolFeeRecipient(newRecipient); + (address recipient, , ,) = providerRegistry.protocolFeeTracker(); + assertEq(recipient, newRecipient); } - function testFail_SetNewFeeRecipient() public { + function testFail_SetNewProtocolFeeRecipient() public { address newRecipient = vm.addr(2); vm.expectRevert(bytes("")); - providerRegistry.setNewFeeRecipient(newRecipient); + providerRegistry.setNewProtocolFeeRecipient(newRecipient); + } + + function test_SetNewFeePayoutPeriodBlocks() public { + vm.prank(address(this)); + vm.expectEmit(true, true, true, true); + emit FeePayoutPeriodBlocksUpdated(890); + providerRegistry.setFeePayoutPeriodBlocks(890); + (, , , uint256 payoutPeriodBlocks) = providerRegistry.protocolFeeTracker(); + assertEq(payoutPeriodBlocks, 890); + } + + function testFail_SetNewFeePayoutPeriodBlocks() public { + vm.expectRevert(bytes("")); + providerRegistry.setFeePayoutPeriodBlocks(83424); } function test_SetNewFeePercent() public { @@ -184,23 +218,24 @@ contract ProviderRegistryTest is Test { providerRegistry.setPreconfirmationsContract(address(0)); } - function test_shouldSlashProvider() public { + function test_ShouldSlashProvider() public { providerRegistry.setPreconfirmationsContract(address(this)); vm.deal(provider, 3 ether); vm.prank(provider); providerRegistry.registerAndStake{value: 2 ether}(validBLSPubkey); address bidder = vm.addr(4); - providerRegistry.slash(1 ether, provider, payable(bidder),100); + vm.expectCall(bidder, 900000000000000000 wei, new bytes(0)); + providerRegistry.slash(1 ether, provider, payable(bidder), 100); - assertEq(providerRegistry.bidderAmount(bidder), 900000000000000000 wei); - assertEq(providerRegistry.feeRecipientAmount(), 100000000000000000 wei); + assertEq(bidder.balance, 900000000000000000 wei); + assertEq(providerRegistry.getAccumulatedProtocolFee(), 100000000000000000 wei); assertEq(providerRegistry.providerStakes(provider), 1 ether); } - function test_shouldSlashProviderWithoutFeeRecipient() public { + function test_ShouldSlashProviderWithoutFeeRecipient() public { vm.prank(address(this)); - providerRegistry.setNewFeeRecipient(address(0)); + providerRegistry.setNewProtocolFeeRecipient(address(0)); providerRegistry.setPreconfirmationsContract(address(this)); vm.deal(provider, 3 ether); @@ -208,13 +243,14 @@ contract ProviderRegistryTest is Test { providerRegistry.registerAndStake{value: 2 ether}(validBLSPubkey); address bidder = vm.addr(4); - providerRegistry.slash(1 ether, provider, payable(bidder),100); + vm.expectCall(bidder, 900000000000000000 wei, new bytes(0)); + providerRegistry.slash(1 ether, provider, payable(bidder), 100); - assertEq(providerRegistry.bidderAmount(bidder), 900000000000000000 wei); + assertEq(bidder.balance, 900000000000000000 wei); assertEq(providerRegistry.providerStakes(provider), 1 ether); } - function testFail_shouldRetrieveFundsNotPreConf() public { + function testFail_ShouldRetrieveFundsNotPreConf() public { vm.deal(provider, 3 ether); vm.prank(provider); providerRegistry.registerAndStake{value: 2 ether}(validBLSPubkey); @@ -223,7 +259,7 @@ contract ProviderRegistryTest is Test { providerRegistry.slash(1 ether, provider, payable(bidder),100); } - function testFail_shouldRetrieveFundsGreaterThanStake() public { + function testFail_ShouldRetrieveFundsGreaterThanStake() public { vm.prank(address(this)); providerRegistry.setPreconfirmationsContract(address(this)); @@ -234,50 +270,52 @@ contract ProviderRegistryTest is Test { vm.expectRevert(bytes("")); vm.prank(address(this)); - providerRegistry.slash(3 ether, provider, payable(bidder),100); + providerRegistry.slash(3 ether, provider, payable(bidder), 100); } - function test_FeeRecipientAmount() public { - providerRegistry.setNewFeeRecipient(vm.addr(6)); + function test_ProtocolFeeBehavior() public { + providerRegistry.setNewProtocolFeeRecipient(vm.addr(6)); vm.deal(provider, 3 ether); vm.prank(provider); + address bidder = vm.addr(4); + providerRegistry.registerAndStake{value: 2 ether}(validBLSPubkey); providerRegistry.setPreconfirmationsContract(address(this)); - providerRegistry.slash(1e18 wei, provider, payable(provider),50); + providerRegistry.slash(1e18 wei, provider, payable(bidder), 50); assertEq( - providerRegistry.feeRecipientAmount(), + providerRegistry.getAccumulatedProtocolFee(), 5e16 wei, "FeeRecipientAmount should match" ); - providerRegistry.withdrawFeeRecipientAmount(); - assertEq( - providerRegistry.feeRecipientAmount(), - 0, - "FeeRecipientAmount should be zero after withdrawal" - ); - } - function test_WithdrawBidderAmount() public { - address bidder = vm.addr(7); - vm.deal(bidder, 3 ether); - vm.prank(bidder); + address newProvider = vm.addr(11); + vm.deal(newProvider, 3 ether); + vm.prank(newProvider); providerRegistry.registerAndStake{value: 2 ether}(validBLSPubkey); - providerRegistry.setPreconfirmationsContract(address(this)); - providerRegistry.slash(1e18 wei, bidder, payable(bidder),100); - vm.prank(bidder); - providerRegistry.withdrawBidderAmount(bidder); + vm.roll(350); // roll past protocol fee payout period + + vm.expectEmit(true, true, true, true); + emit FeeTransfer(1e17 wei, vm.addr(6)); + providerRegistry.slash(1e18 wei, newProvider, payable(bidder), 50); + assertEq( - providerRegistry.bidderAmount(bidder), + providerRegistry.getAccumulatedProtocolFee(), 0, - "BidderAmount should be zero after withdrawal" + "Accumulated protocol fee should be zero" + ); + assertEq( + vm.addr(6).balance, + 1e17 wei, + "FeeRecipient should have received 1e17 wei" ); } function test_WithdrawStakedAmountWithoutFeeRecipient() public { - providerRegistry.setNewFeeRecipient(address(0)); + providerRegistry.setNewProtocolFeeRecipient(address(0)); address newProvider = vm.addr(8); + address bidder = vm.addr(9); vm.deal(newProvider, 3 ether); vm.prank(newProvider); providerRegistry.registerAndStake{value: 2e18 wei}(validBLSPubkey); @@ -285,9 +323,12 @@ contract ProviderRegistryTest is Test { address(preConfCommitmentStore) ); vm.prank(address(preConfCommitmentStore)); - providerRegistry.slash(1e18 wei, newProvider, payable(newProvider),100); + providerRegistry.slash(1e18 wei, newProvider, payable(bidder),100); vm.prank(newProvider); - providerRegistry.withdrawStakedAmount(payable(newProvider)); + providerRegistry.unstake(); + vm.warp(block.timestamp + 24 hours); // Move forward in time + vm.prank(newProvider); + providerRegistry.withdraw(); assertEq( providerRegistry.providerStakes(newProvider), 0, @@ -306,7 +347,9 @@ contract ProviderRegistryTest is Test { vm.prank(newProvider); providerRegistry.registerAndStake{value: 2e18 wei}(validBLSPubkey); vm.expectRevert(bytes("")); - providerRegistry.withdrawStakedAmount(payable(vm.addr(12))); + address wrongNewProvider = vm.addr(12); + vm.prank(wrongNewProvider); + providerRegistry.withdraw(); } function test_RegisterAndStake() public { @@ -326,8 +369,34 @@ contract ProviderRegistryTest is Test { ); } + function testFail_WithdrawStakedAmountWithoutCommitments() public { + address newProvider = vm.addr(8); + vm.deal(newProvider, 3 ether); + vm.prank(newProvider); + providerRegistry.registerAndStake{value: 2e18 wei}(validBLSPubkey); + providerRegistry.unstake(); + vm.warp(block.timestamp + 24 hours); // Move forward in time + vm.expectRevert("Provider Commitments still pending"); + providerRegistry.withdraw(); + } + + function test_RequestWithdrawal() public { + address newProvider = vm.addr(8); + vm.deal(newProvider, 3 ether); + vm.prank(newProvider); + providerRegistry.registerAndStake{value: 2e18 wei}(validBLSPubkey); + vm.prank(newProvider); + providerRegistry.unstake(); + assertEq( + providerRegistry.withdrawalRequests(newProvider), + block.timestamp, + "Withdrawal request timestamp should match" + ); + } + function test_WithdrawStakedAmount() public { address newProvider = vm.addr(8); + address bidder = vm.addr(9); vm.deal(newProvider, 3 ether); vm.prank(newProvider); providerRegistry.registerAndStake{value: 2e18 wei}(validBLSPubkey); @@ -335,9 +404,12 @@ contract ProviderRegistryTest is Test { address(preConfCommitmentStore) ); vm.prank(address(preConfCommitmentStore)); - providerRegistry.slash(1e18 wei, newProvider, payable(newProvider),100); + providerRegistry.slash(1e18 wei, newProvider, payable(bidder),100); + vm.prank(newProvider); + providerRegistry.unstake(); + vm.warp(block.timestamp + 24 hours); // Move forward in time vm.prank(newProvider); - providerRegistry.withdrawStakedAmount(payable(newProvider)); + providerRegistry.withdraw(); assertEq( providerRegistry.providerStakes(newProvider), 0, @@ -350,12 +422,26 @@ contract ProviderRegistryTest is Test { ); } - function testFail_WithdrawStakedAmountWithoutCommitments() public { + function test_WithdrawStakedAmountBefore24Hours() public { address newProvider = vm.addr(8); vm.deal(newProvider, 3 ether); vm.prank(newProvider); providerRegistry.registerAndStake{value: 2e18 wei}(validBLSPubkey); - vm.expectRevert("Provider Commitments still pending"); - providerRegistry.withdrawStakedAmount(payable(newProvider)); + vm.prank(newProvider); + providerRegistry.unstake(); + vm.warp(block.timestamp + 23 hours); // Move forward less than 24 hours + vm.prank(newProvider); + vm.expectRevert("Delay has not passed"); + providerRegistry.withdraw(); + } + + function test_WithdrawStakedAmountWithoutRequest() public { + address newProvider = vm.addr(8); + vm.deal(newProvider, 3 ether); + vm.prank(newProvider); + providerRegistry.registerAndStake{value: 2e18 wei}(validBLSPubkey); + vm.prank(newProvider); + vm.expectRevert("No unstake request"); + providerRegistry.withdraw(); } } diff --git a/contracts/test/validator-registry/avs/AVSDirectoryMock.sol b/contracts/test/validator-registry/avs/AVSDirectoryMock.sol index 28967fef4..5eb9f85b6 100644 --- a/contracts/test/validator-registry/avs/AVSDirectoryMock.sol +++ b/contracts/test/validator-registry/avs/AVSDirectoryMock.sol @@ -4,10 +4,18 @@ pragma solidity 0.8.20; import "forge-std/Test.sol"; import {IAVSDirectory} from "eigenlayer-contracts/src/contracts/interfaces/IAVSDirectory.sol"; import {ISignatureUtils} from "eigenlayer-contracts/src/contracts/interfaces/ISignatureUtils.sol"; +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; // Eigenlayer core does not define their own mock for AVSDirectory.sol, hence we define our own. contract AVSDirectoryMock is IAVSDirectory, Test { mapping(address => bool) public isOperatorRegistered; + address public avs_; + + bytes32 public constant OPERATOR_AVS_REGISTRATION_TYPEHASH = + keccak256("OperatorAVSRegistration(address operator,address avs,bytes32 salt,uint256 expiry)"); + + bytes32 public constant DOMAIN_TYPEHASH = + keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); function registerOperator(address operator) external { isOperatorRegistered[operator] = true; @@ -17,16 +25,28 @@ contract AVSDirectoryMock is IAVSDirectory, Test { isOperatorRegistered[operator] = false; } - function isRegisteredOperator(address operator) external view returns (bool) { - return isOperatorRegistered[operator]; - } - function registerOperatorToAVS( address operator, ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature ) external override { - require(operator != address(0), "Operator cannot be zero"); - require(operatorSignature.salt != bytes32(0), "Salt cannot be zero"); + require(operator != address(0), "Operator required"); + require(keccak256(operatorSignature.signature) != keccak256(bytes("")), "Signature required"); + require(operatorSignature.salt != bytes32(0), "Salt required"); + require(operatorSignature.expiry != 0, "Expiry required"); + + bytes32 operatorRegistrationDigestHash = calculateOperatorAVSRegistrationDigestHash({ + operator: operator, + avs: msg.sender, + salt: operatorSignature.salt, + expiry: operatorSignature.expiry + }); + + // solhint-disable-next-line reason-string + require( + ECDSA.recover(operatorRegistrationDigestHash, operatorSignature.signature) == operator, + "EIP1271SignatureUtils.checkSignature_EIP1271: signature not from signer" + ); + isOperatorRegistered[operator] = true; emit OperatorAVSRegistrationStatusUpdated(operator, msg.sender, OperatorAVSRegistrationStatus.REGISTERED); } @@ -40,6 +60,10 @@ contract AVSDirectoryMock is IAVSDirectory, Test { emit AVSMetadataURIUpdated(msg.sender, metadataURI); } + function isRegisteredOperator(address operator) external view returns (bool) { + return isOperatorRegistered[operator]; + } + function operatorSaltIsSpent(address operator, bytes32 salt) external pure override returns (bool) { require(operator != address(0), "Operator cannot be zero"); require(salt != bytes32(0), "Salt cannot be zero"); @@ -51,11 +75,17 @@ contract AVSDirectoryMock is IAVSDirectory, Test { address avs, bytes32 salt, uint256 expiry - ) external pure override returns (bytes32) { - return keccak256(abi.encodePacked(operator, avs, salt, expiry)); + ) public view returns (bytes32) { + bytes32 structHash = keccak256( + abi.encode(OPERATOR_AVS_REGISTRATION_TYPEHASH, operator, avs, salt, expiry) + ); + bytes32 digestHash = keccak256( + abi.encodePacked("\x19\x01", domainSeparator(), structHash) + ); + return digestHash; } - function OPERATOR_AVS_REGISTRATION_TYPEHASH() external pure override returns (bytes32) { - return keccak256("OperatorAVSRegistration(address operator,address avs,bytes32 salt,uint256 expiry)"); + function domainSeparator() public view returns (bytes32) { + return keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes("EigenLayer")), block.chainid, address(this))); } } diff --git a/contracts/test/validator-registry/avs/MevCommitAVSTest.sol b/contracts/test/validator-registry/avs/MevCommitAVSTest.sol index 363df57cd..7e1db0fa7 100644 --- a/contracts/test/validator-registry/avs/MevCommitAVSTest.sol +++ b/contracts/test/validator-registry/avs/MevCommitAVSTest.sol @@ -31,6 +31,9 @@ contract MevCommitAVSTest is Test { uint256 public lstRestakerDeregPeriodBlocks; string public metadataUrl; + address public operator = address(0x18A8E44e0E225B10a4Af86CEC6e4c514BB95B342); + uint256 public operatorPrivateKey = uint256(0xe0ea92e36ee0c574bc092425926b3bfe817ec9471afbe90b577757ee16f60fd8); + event OperatorRegistered(address indexed operator); event OperatorDeregistrationRequested(address indexed operator); event OperatorDeregistered(address indexed operator); @@ -95,9 +98,16 @@ contract MevCommitAVSTest is Test { function testRegisterOperator() public { - address operator = address(0x888); + bytes32 digestHash = avsDirectoryMock.calculateOperatorAVSRegistrationDigestHash({ + operator: operator, + avs: address(mevCommitAVS), + salt: bytes32("salt"), + expiry: block.timestamp + 1 days + }); + + (uint8 v, bytes32 r, bytes32 s) = vm.sign(operatorPrivateKey, digestHash); ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature = ISignatureUtils.SignatureWithSaltAndExpiry({ - signature: bytes("signature"), + signature: abi.encodePacked(r, s, v), salt: bytes32("salt"), expiry: block.timestamp + 1 days }); @@ -133,8 +143,6 @@ contract MevCommitAVSTest is Test { function testRequestOperatorDeregistration() public { vm.roll(108); - address operator = address(0x888); - vm.prank(owner); mevCommitAVS.pause(); vm.expectRevert(PausableUpgradeable.EnforcedPause.selector); @@ -176,8 +184,6 @@ contract MevCommitAVSTest is Test { function testDeregisterOperator() public { vm.roll(11); - address operator = address(0x888); - vm.prank(owner); mevCommitAVS.pause(); vm.expectRevert(PausableUpgradeable.EnforcedPause.selector); @@ -232,7 +238,6 @@ contract MevCommitAVSTest is Test { function testRegisterValidatorsByPodOwners() public { vm.roll(55); - address operator = address(0x888); address podOwner = address(0x420); ISignatureUtils.SignatureWithExpiry memory sig = ISignatureUtils.SignatureWithExpiry({ signature: bytes("signature"), @@ -332,7 +337,6 @@ contract MevCommitAVSTest is Test { function testRequestValidatorsDeregistration() public { - address operator = address(0x888); address podOwner = address(0x420); bytes[] memory valPubkeys = new bytes[](2); @@ -388,7 +392,6 @@ contract MevCommitAVSTest is Test { function testDeregisterValidator() public { - address operator = address(0x888); address podOwner = address(0x420); bytes[] memory valPubkeys = new bytes[](1); valPubkeys[0] = bytes("valPubkey1"); @@ -447,7 +450,6 @@ contract MevCommitAVSTest is Test { function testRegisterLSTRestaker() public { - address operator = address(0x888); address lstRestaker = address(0x34443); address otherAcct = address(0x777); bytes[] memory chosenVals = new bytes[](0); @@ -631,7 +633,6 @@ contract MevCommitAVSTest is Test { vm.roll(403); - address operator = address(0x888); bytes[] memory valPubkeys2 = new bytes[](1); valPubkeys2[0] = bytes("valPubkey1"); vm.prank(operator); @@ -699,7 +700,6 @@ contract MevCommitAVSTest is Test { assertTrue(mevCommitAVS.getValidatorRegInfo(valPubkeys[1]).freezeHeight.exists); address lstRestaker = address(0x34443); - address operator = address(0x888); ISignatureUtils.SignatureWithExpiry memory sig = ISignatureUtils.SignatureWithExpiry({ signature: bytes("signature"), expiry: 10 @@ -933,7 +933,6 @@ contract MevCommitAVSTest is Test { function testValidatorsWithReqDeregisteredOperatorsCannotRegister() public { testRegisterOperator(); - address operator = address(0x888); vm.prank(operator); mevCommitAVS.requestOperatorDeregistration(operator); @@ -1012,19 +1011,28 @@ contract MevCommitAVSTest is Test { assertTrue(mevCommitAVS.isValidatorOptedIn(valPubkeys[0])); assertTrue(mevCommitAVS.isValidatorOptedIn(valPubkeys[1])); - address operator = address(0x888); vm.prank(operator); mevCommitAVS.requestOperatorDeregistration(operator); assertFalse(mevCommitAVS.isValidatorOptedIn(valPubkeys[0])); assertFalse(mevCommitAVS.isValidatorOptedIn(valPubkeys[1])); - address newOperator = address(0x999); + address newOperator = address(0x0c94D2aE152F29Bf68A78dc9747BEa59B6f01418); + uint256 newOperatorPrivateKey = uint256(0x61437e7186d6d418e8c3221a88ce4c4aafba32347414d113ed31c425a99085a6); delegationManagerMock.setIsOperator(newOperator, true); + bytes32 digestHash = avsDirectoryMock.calculateOperatorAVSRegistrationDigestHash({ + operator: newOperator, + avs: address(mevCommitAVS), + salt: bytes32("salt"), + expiry: block.timestamp + 1 days + }); + + (uint8 v, bytes32 r, bytes32 s) = vm.sign(newOperatorPrivateKey, digestHash); + vm.prank(newOperator); ISignatureUtils.SignatureWithSaltAndExpiry memory newOperatorSigWithSalt = ISignatureUtils.SignatureWithSaltAndExpiry({ - signature: bytes("signature"), + signature: abi.encodePacked(r, s, v), salt: bytes32("salt"), expiry: block.timestamp + 1 days }); @@ -1046,7 +1054,6 @@ contract MevCommitAVSTest is Test { function testDeregisteredOperatorCanStillDeregisterValidators() public { testRegisterValidatorsByPodOwners(); - address operator = address(0x888); vm.prank(operator); mevCommitAVS.requestOperatorDeregistration(operator); assertTrue(mevCommitAVS.getOperatorRegInfo(operator).exists); diff --git a/external/geth b/external/geth index 553c7c336..e862e7204 160000 --- a/external/geth +++ b/external/geth @@ -1 +1 @@ -Subproject commit 553c7c336fe185ce4c4169b6e9ad1e8e71943826 +Subproject commit e862e720442e9d6d7d6bb46b85be57b428841e3b diff --git a/go.work.sum b/go.work.sum index f3ea849cf..1b54d3025 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,5 +1,6 @@ cloud.google.com/go v0.37.0 h1:69FNAINiZfsEuwH3fKq8QrAAnHz+2m4XL4kVYi5BX0Q= cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= @@ -34,6 +35,7 @@ cloud.google.com/go/apigeeregistry v0.8.3 h1:C+QU2K+DzDjk4g074ouwHQGkoff1h5OMQp6 cloud.google.com/go/apigeeregistry v0.8.3/go.mod h1:aInOWnqF4yMQx8kTjDqHNXjZGh/mxeNlAf52YqtASUs= cloud.google.com/go/apikeys v0.5.0 h1:+77+/BhFuU476/s78kYiWHObxaYBHsC6Us+Gd7W9pJ4= cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= +cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= cloud.google.com/go/appengine v1.8.4 h1:Qub3fqR7iA1daJWdzjp/Q0Jz0fUG0JbMc7Ui4E9IX/E= cloud.google.com/go/appengine v1.8.4/go.mod h1:TZ24v+wXBujtkK77CXCpjZbnuTvsFNT41MUaZ28D6vg= cloud.google.com/go/appengine v1.8.5 h1:l2SviT44zWQiOv8bPoMBzW0vOcMO22iO0s+nVtVhdts= @@ -70,6 +72,7 @@ cloud.google.com/go/beyondcorp v1.0.3 h1:VXf9SnrnSmj2BF2cHkoTHvOUp8gjsz1KJFOMW7c cloud.google.com/go/beyondcorp v1.0.3/go.mod h1:HcBvnEd7eYr+HGDd5ZbuVmBYX019C6CEXBonXbCVwJo= cloud.google.com/go/beyondcorp v1.0.4 h1:qs0J0O9Ol2h1yA0AU+r7l3hOCPzs2MjE1d6d/kaHIKo= cloud.google.com/go/beyondcorp v1.0.4/go.mod h1:Gx8/Rk2MxrvWfn4WIhHIG1NV7IBfg14pTKv1+EArVcc= +cloud.google.com/go/bigquery v1.57.1/go.mod h1:iYzC0tGVWt1jqSzBHqCr3lrRn0u13E8e+AqowBsDgug= cloud.google.com/go/bigquery v1.58.0 h1:drSd9RcPVLJP2iFMimvOB9SCSIrcl+9HD4II03Oy7A0= cloud.google.com/go/bigquery v1.58.0/go.mod h1:0eh4mWNY0KrBTjUzLjoYImapGORq9gEPT7MWjCy9lik= cloud.google.com/go/bigquery v1.59.1 h1:CpT+/njKuKT3CEmswm6IbhNu9u35zt5dO4yPDLW+nG4= @@ -111,6 +114,8 @@ cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJd cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/contactcenterinsights v1.12.1 h1:EiGBeejtDDtr3JXt9W7xlhXyZ+REB5k2tBgVPVtmNb0= cloud.google.com/go/contactcenterinsights v1.12.1/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= cloud.google.com/go/contactcenterinsights v1.13.0 h1:6Vs/YnDG5STGjlWMEjN/xtmft7MrOTOnOZYUZtGTx0w= @@ -123,6 +128,7 @@ cloud.google.com/go/containeranalysis v0.11.3 h1:5rhYLX+3a01drpREqBZVXR9YmWH45Rn cloud.google.com/go/containeranalysis v0.11.3/go.mod h1:kMeST7yWFQMGjiG9K7Eov+fPNQcGhb8mXj/UcTiWw9U= cloud.google.com/go/containeranalysis v0.11.4 h1:doJ0M1ljS4hS0D2UbHywlHGwB7sQLNrt9vFk9Zyi7vY= cloud.google.com/go/containeranalysis v0.11.4/go.mod h1:cVZT7rXYBS9NG1rhQbWL9pWbXCKHWJPYraE8/FTSYPE= +cloud.google.com/go/datacatalog v1.19.0/go.mod h1:5FR6ZIF8RZrtml0VUao22FxhdjkoG+a0866rEnObryM= cloud.google.com/go/datacatalog v1.19.2 h1:BV5sB7fPc8ccv/obwtHwQtCdLMAgI4KyaQWfkh8/mWg= cloud.google.com/go/datacatalog v1.19.2/go.mod h1:2YbODwmhpLM4lOFe3PuEhHK9EyTzQJ5AXgIy7EDKTEE= cloud.google.com/go/datacatalog v1.19.3 h1:A0vKYCQdxQuV4Pi0LL9p39Vwvg4jH5yYveMv50gU5Tw= @@ -163,10 +169,12 @@ cloud.google.com/go/datastream v1.10.3 h1:Z2sKPIB7bT2kMW5Uhxy44ZgdJzxzE5uKjavoW+ cloud.google.com/go/datastream v1.10.3/go.mod h1:YR0USzgjhqA/Id0Ycu1VvZe8hEWwrkjuXrGbzeDOSEA= cloud.google.com/go/datastream v1.10.4 h1:o1QDKMo/hk0FN7vhoUQURREuA0rgKmnYapB+1M+7Qz4= cloud.google.com/go/datastream v1.10.4/go.mod h1:7kRxPdxZxhPg3MFeCSulmAJnil8NJGGvSNdn4p1sRZo= +cloud.google.com/go/deploy v1.16.0/go.mod h1:e5XOUI5D+YGldyLNZ21wbp9S8otJbBE4i88PtO9x/2g= cloud.google.com/go/deploy v1.17.0 h1:P3SgJ+4rAktC2XqaI10G0ip/vzWluNBrC5VG0abMbLw= cloud.google.com/go/deploy v1.17.0/go.mod h1:XBr42U5jIr64t92gcpOXxNrqL2PStQCXHuKK5GRUuYo= cloud.google.com/go/deploy v1.17.1 h1:m27Ojwj03gvpJqCbodLYiVmE9x4/LrHGGMjzc0LBfM4= cloud.google.com/go/deploy v1.17.1/go.mod h1:SXQyfsXrk0fBmgBHRzBjQbZhMfKZ3hMQBw5ym7MN/50= +cloud.google.com/go/dialogflow v1.48.0/go.mod h1:mHly4vU7cPXVweuB5R0zsYKPMzy240aQdAu06SqBbAQ= cloud.google.com/go/dialogflow v1.48.1 h1:1Uq2jDJzjJ3M4xYB608FCCFHfW3JmrTmHIxRSd7JGmY= cloud.google.com/go/dialogflow v1.48.1/go.mod h1:C1sjs2/g9cEwjCltkKeYp3FFpz8BOzNondEaAlCpt+A= cloud.google.com/go/dialogflow v1.49.0 h1:KqG0oxGE71qo0lRVyAoeBozefCvsMfcDzDjoLYSY0F4= @@ -271,6 +279,7 @@ cloud.google.com/go/managedidentities v1.6.4 h1:SF/u1IJduMqQQdJA4MDyivlIQ4SrV5qA cloud.google.com/go/managedidentities v1.6.4/go.mod h1:WgyaECfHmF00t/1Uk8Oun3CQ2PGUtjc3e9Alh79wyiM= cloud.google.com/go/managedidentities v1.6.5 h1:+bpih1piZVLxla/XBqeSUzJBp8gv9plGHIMAI7DLpDM= cloud.google.com/go/managedidentities v1.6.5/go.mod h1:fkFI2PwwyRQbjLxlm5bQ8SjtObFMW3ChBGNqaMcgZjI= +cloud.google.com/go/maps v1.6.2/go.mod h1:4+buOHhYXFBp58Zj/K+Lc1rCmJssxxF4pJ5CJnhdz18= cloud.google.com/go/maps v1.6.3 h1:Qqs6Dza+PRp5CZO5AfgPnLwU1k3pp0IMFRDtLpT+aCA= cloud.google.com/go/maps v1.6.3/go.mod h1:VGAn809ADswi1ASofL5lveOHPnE6Rk/SFTTBx1yuOLw= cloud.google.com/go/maps v1.6.4 h1:EVCZAiDvog9So46460BGbCasPhi613exoaQbpilMVlk= @@ -323,6 +332,7 @@ cloud.google.com/go/osconfig v1.12.4 h1:OrRCIYEAbrbXdhm13/JINn9pQchvTTIzgmOCA7uJ cloud.google.com/go/osconfig v1.12.4/go.mod h1:B1qEwJ/jzqSRslvdOCI8Kdnp0gSng0xW4LOnIebQomA= cloud.google.com/go/osconfig v1.12.5 h1:Mo5jGAxOMKH/PmDY7fgY19yFcVbvwREb5D5zMPQjFfo= cloud.google.com/go/osconfig v1.12.5/go.mod h1:D9QFdxzfjgw3h/+ZaAb5NypM8bhOMqBzgmbhzWViiW8= +cloud.google.com/go/oslogin v1.12.2/go.mod h1:CQ3V8Jvw4Qo4WRhNPF0o+HAM4DiLuE27Ul9CX9g2QdY= cloud.google.com/go/oslogin v1.13.0 h1:gbA/G4p+youIR4O/Rk6DU181QlBlpwPS16kvJwqEz8o= cloud.google.com/go/oslogin v1.13.0/go.mod h1:xPJqLwpTZ90LSE5IL1/svko+6c5avZLluiyylMb/sRA= cloud.google.com/go/oslogin v1.13.1 h1:1K4nOT5VEZNt7XkhaTXupBYos5HjzvJMfhvyD2wWdFs= @@ -339,6 +349,7 @@ cloud.google.com/go/privatecatalog v0.9.4 h1:Vo10IpWKbNvc/z/QZPVXgCiwfjpWoZ/wbgf cloud.google.com/go/privatecatalog v0.9.4/go.mod h1:SOjm93f+5hp/U3PqMZAHTtBtluqLygrDrVO8X8tYtG0= cloud.google.com/go/privatecatalog v0.9.5 h1:UZ0assTnATXSggoxUIh61RjTQ4P9zCMk/kEMbn0nMYA= cloud.google.com/go/privatecatalog v0.9.5/go.mod h1:fVWeBOVe7uj2n3kWRGlUQqR/pOd450J9yZoOECcQqJk= +cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= cloud.google.com/go/pubsub v1.34.0 h1:ZtPbfwfi5rLaPeSvDC29fFoE20/tQvGrUS6kVJZJvkU= cloud.google.com/go/pubsub v1.34.0/go.mod h1:alj4l4rBg+N3YTFDDC+/YyFTs6JAjam2QfYsddcAW4c= cloud.google.com/go/pubsub v1.36.1 h1:dfEPuGCHGbWUhaMCTHUFjfroILEkx55iUmKBZTP5f+Y= @@ -395,18 +406,22 @@ cloud.google.com/go/securitycenter v1.24.4 h1:/5jjkZ+uGe8hZ7pvd7pO30VW/a+pT2Mrrd cloud.google.com/go/securitycenter v1.24.4/go.mod h1:PSccin+o1EMYKcFQzz9HMMnZ2r9+7jbc+LvPjXhpwcU= cloud.google.com/go/servicecontrol v1.10.0 h1:P1OiVugNQtWVM3hVJSzaAmye48pExx1VPX2SKT8Z4Yg= cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= +cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= cloud.google.com/go/servicedirectory v1.11.3 h1:5niCMfkw+jifmFtbBrtRedbXkJm3fubSR/KHbxSJZVM= cloud.google.com/go/servicedirectory v1.11.3/go.mod h1:LV+cHkomRLr67YoQy3Xq2tUXBGOs5z5bPofdq7qtiAw= cloud.google.com/go/servicedirectory v1.11.4 h1:da7HFI1229kyzIyuVEzHXip0cw0d+E0s8mjQby0WN+k= cloud.google.com/go/servicedirectory v1.11.4/go.mod h1:Bz2T9t+/Ehg6x+Y7Ycq5xiShYLD96NfEsWNHyitj1qM= cloud.google.com/go/servicemanagement v1.6.0 h1:flWoX0eJy21+34I/7HPUbpr6xTHPVzws1xnecLFlUm0= cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= +cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= cloud.google.com/go/serviceusage v1.5.0 h1:fl1AGgOx7E2eyBmH5ofDXT9w8xGvEaEnHYyNYGkxaqg= cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= +cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= cloud.google.com/go/shell v1.7.4 h1:nurhlJcSVFZneoRZgkBEHumTYf/kFJptCK2eBUq/88M= cloud.google.com/go/shell v1.7.4/go.mod h1:yLeXB8eKLxw0dpEmXQ/FjriYrBijNsONpwnWsdPqlKM= cloud.google.com/go/shell v1.7.5 h1:3Fq2hzO0ZSyaqBboJrFkwwf/qMufDtqwwA6ep8EZxEI= cloud.google.com/go/shell v1.7.5/go.mod h1:hL2++7F47/IfpfTO53KYf1EC+F56k3ThfNEXd4zcuiE= +cloud.google.com/go/spanner v1.54.0/go.mod h1:wZvSQVBgngF0Gq86fKup6KIYmN2be7uOKjtK97X+bQU= cloud.google.com/go/spanner v1.55.0 h1:YF/A/k73EMYCjp8wcJTpkE+TcrWutHRlsCtlRSfWS64= cloud.google.com/go/spanner v1.55.0/go.mod h1:HXEznMUVhC+PC+HDyo9YFG2Ajj5BQDkcbqB9Z2Ffxi0= cloud.google.com/go/spanner v1.56.0 h1:o/Cv7/zZ1WgRXVCd5g3Nc23ZI39p/1pWFqFwvg6Wcu8= @@ -502,19 +517,25 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgx github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible h1:rZgFj+Gtf3NMi/U5FvCvhzaxzW/TaPYgUYx3bAPz9DE= github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= github.com/CloudyKit/jet/v3 v3.0.0 h1:1PwO5w5VCtlUUl+KTOBsTGZlhjWkcybsGaAau52tOy8= github.com/CloudyKit/jet/v6 v6.1.0 h1:hvO96X345XagdH1fAoBjpBYG4a1ghhL/QzalkduPuXk= github.com/CloudyKit/jet/v6 v6.1.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= +github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= +github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7 h1:mreN1m/5VJ/Zc3b4pzj9qU6D9SRQ6Vm+3KfI328t3S8= github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= +github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= +github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= @@ -524,6 +545,7 @@ github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/akavel/rsrc v0.10.2 h1:Zxm8V5eI1hW4gGaYsJQUhxpjkENuG91ki8B4zCrvEsw= github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWrKI6ocU= @@ -537,9 +559,12 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= github.com/apache/arrow/go/v12 v12.0.1 h1:JsR2+hzYYjgSUkBSaahpqCetqZMr76djX80fF/DiJbg= github.com/apache/arrow/go/v12 v12.0.1/go.mod h1:weuTY7JvTG/HDPtMQxEUp7pU73vkLWMLpY67QwZ/WWw= github.com/apache/arrow/go/v14 v14.0.2 h1:N8OkaJEOfI3mEZt07BIkvo4sC6XDbL+48MBPWO5IONw= @@ -585,6 +610,7 @@ github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMr github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= @@ -620,12 +646,11 @@ github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50 h1:DBmgJDC9dTfkVyGgipa github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50/go.mod h1:5e1+Vvlzido69INQaVO6d87Qn543Xr6nooe9Kz7oBFM= github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= github.com/container-orchestrated-devices/container-device-interface v0.5.4 h1:PqQGqJqQttMP5oJ/qNGEg8JttlHqGY3xDbbcKb5T9E8= github.com/container-orchestrated-devices/container-device-interface v0.5.4/go.mod h1:DjE95rfPiiSmG7uVXtg0z6MnPm/Lx4wxKCIts0ZE0vg= @@ -675,6 +700,7 @@ github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c h1:/ovYnF02fw github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deepmap/oapi-codegen v1.6.0 h1:w/d1ntwh91XI0b/8ja7+u5SvA4IFfM0UNNLmiDR1gg0= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/dgraph-io/badger v1.6.2 h1:mNw0qs90GVgGGWylh0umH5iag1j6n/PeJtNvL6KY/x8= @@ -713,6 +739,7 @@ github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d h1:W1n4DvpzZGOI github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -723,6 +750,7 @@ github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 h1:Dddq github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -745,6 +773,7 @@ github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILD github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8= github.com/getkin/kin-openapi v0.53.0 h1:7WzP+MZRRe7YQz2Kc74Ley3dukJmXDvifVbElGmQfoA= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 h1:r5GgOLGbza2wVHRzK7aAj6lWZjfbAwiu/RDCVOKjRyM= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= @@ -756,8 +785,6 @@ github.com/gliderlabs/ssh v0.1.1 h1:j3L6gSLQalDETeEg/Jg0mGY0/y/N6zI2xX1978P0Uqw= github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= github.com/go-chi/chi/v5 v5.0.0 h1:DBPx88FjZJH3FsICfDAfIfnb7XxKIYVGG6lOPlhENAg= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= @@ -771,6 +798,7 @@ github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ4 github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= @@ -800,8 +828,12 @@ github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/K github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/gofiber/fiber/v2 v2.52.2 h1:b0rYH6b06Df+4NyrbdptQL8ifuxw/Tf2DgfkZkDaxEo= +github.com/gofiber/fiber/v2 v2.52.2/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA= +github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -811,6 +843,7 @@ github.com/golang/lint v0.0.0-20180702182130-06c8688daad7 h1:2hRPrmiwPrp3fQX967r github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -859,6 +892,7 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= @@ -900,7 +934,9 @@ github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1: github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= @@ -921,6 +957,8 @@ github.com/iris-contrib/blackfriday v2.0.0+incompatible h1:o5sHQHHm0ToHUlAJSTjW9 github.com/iris-contrib/go.uuid v2.0.0+incompatible h1:XZubAYg61/JwnJNbZilGjf3b3pB80+OQg2qf6c8BfWE= github.com/iris-contrib/httpexpect/v2 v2.3.1 h1:A69ilxKGW1jDRKK5UAhjTL4uJYh3RjD4qzt9vNZ7fpY= github.com/iris-contrib/httpexpect/v2 v2.3.1/go.mod h1:ICTf89VBKSD3KB0fsyyHviKF8G8hyepP0dOXJPWz3T0= +github.com/iris-contrib/httpexpect/v2 v2.12.1 h1:3cTZSyBBen/kfjCtgNFoUKi1u0FVXNaAjyRJOo6AVS4= +github.com/iris-contrib/httpexpect/v2 v2.12.1/go.mod h1:7+RB6W5oNClX7PTwJgJnsQP3ZuUUYB3u61KCqeSgZ88= github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0 h1:Kyp9KiXwsyZRTeoNjgVCrWks7D8ht9+kg6yCjh8K97o= github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= github.com/iris-contrib/jade v1.1.4 h1:WoYdfyJFfZIUgqNAeOyRfTNQZOksSlZ6+FnXR3AEpX0= @@ -964,15 +1002,20 @@ github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304E github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= github.com/kataras/golog v0.1.7 h1:0TY5tHn5L5DlRIikepcaRR/6oInIr9AiWsxzt0vvlBE= github.com/kataras/golog v0.1.7/go.mod h1:jOSQ+C5fUqsNSwurB/oAHq1IFSb0KI3l6GMa7xB6dZA= +github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= +github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= github.com/kataras/iris/v12 v12.2.0-beta5 h1:grB/oCf5baZhmYIeDMfgN3LYrtEcmK8pbxlRvEZ2pgw= github.com/kataras/iris/v12 v12.2.0-beta5/go.mod h1:q26aoWJ0Knx/00iPKg5iizDK7oQQSPjbD8np0XDh6dc= +github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= +github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= github.com/kataras/jwt v0.1.8 h1:u71baOsYD22HWeSOg32tCHbczPjdCk7V4MMeJqTtmGk= github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= github.com/kataras/neffos v0.0.14 h1:pdJaTvUG3NQfeMbbVCI8JT2T5goPldyyfUB2PJfh1Bs= github.com/kataras/neffos v0.0.20 h1:swTzKZ3Mo2sIQ8ATKSKf0xDG1tuhr6w4tZmmRsvCYlg= github.com/kataras/neffos v0.0.20/go.mod h1:srdvC/Uo8mgrApWW0AYtiiLgMbyNPf69qPsd2FhE6MQ= +github.com/kataras/neffos v0.0.21/go.mod h1:FeGka8lu8cjD2H+0OpBvW8c6xXawy3fj5VX6xcIJ1Fg= github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= github.com/kataras/pio v0.0.10/go.mod h1:gS3ui9xSD+lAUpbYnjOGiQyY7sUMJO+EHpiRzhtZ5no= github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= @@ -990,6 +1033,7 @@ github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -1001,8 +1045,12 @@ github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvf github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/echo/v4 v4.9.0 h1:wPOF1CE6gvt/kmbMR4dGzWvHMPT+sAEUJOwOTtvITVY= github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= +github.com/labstack/echo/v4 v4.10.0 h1:5CiyngihEO4HXsz3vVsJn7f8xAlWwRr3aY6Ih280ZKA= +github.com/labstack/echo/v4 v4.10.0/go.mod h1:S/T/5fy/GigaXnHTkh0ZGe4LpkkQysvRjFMSUTkDRNQ= github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o= github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= +github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kULo2bwGEkFvCePZ3qHDDTC3/J9Swo= github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= @@ -1029,6 +1077,8 @@ github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLO github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/mailgun/raymond/v2 v2.0.46 h1:aOYHhvTpF5USySJ0o7cpPno/Uh2I5qg2115K25A+Ft4= github.com/mailgun/raymond/v2 v2.0.46/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= +github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= +github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= @@ -1053,9 +1103,12 @@ github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQ github.com/mediocregopher/radix/v3 v3.4.2 h1:galbPBjIwmyREgwGCfQEN4X8lxbJnKBYurgz+VfcStA= github.com/mediocregopher/radix/v3 v3.8.0 h1:HI8EgkaM7WzsrFpYAkOXIgUKbjNonb2Ne7K6Le61Pmg= github.com/mediocregopher/radix/v3 v3.8.0/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/mediocregopher/radix/v3 v3.8.1/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.1 h1:SIYunPjnlXcW+gVfvm0IlSeR5U3WZUOLfVmqg85Go44= github.com/microcosm-cc/bluemonday v1.0.21 h1:dNH3e4PSyE4vNX+KlRGHT5KrSvjeUkoNPwEORjffHJg= github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= +github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= +github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= @@ -1069,6 +1122,9 @@ github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy github.com/mistifyio/go-zfs/v3 v3.0.1 h1:YaoXgBePoMA12+S1u/ddkv+QqxcfiZK4prI6HPnkFiU= github.com/mistifyio/go-zfs/v3 v3.0.1/go.mod h1:CzVgeB0RvF2EGzQnytKVvVSDwmKJXxkOTUGbNrTja/k= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mmcloughlin/profile v0.1.1 h1:jhDmAqPyebOsVDOCICJoINoLb/AnLBaUw58nFzxWS2w= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= @@ -1099,6 +1155,7 @@ github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.16.0 h1:zvLE7fGBQYW6MWaFaRdsgm9qT39PJDQoju+DS8KsO1g= github.com/nats-io/nats.go v1.16.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nats.go v1.23.0/go.mod h1:ki/Scsa23edbh8IRZbCuNXR9TDcbvfaSijKtaqQgw+Q= github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= github.com/nats-io/nkeys v0.1.0 h1:qMd4+pRHgdr1nAClu+2h/2a5F2TmKcCzjCDazVgRoX4= github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= @@ -1136,14 +1193,16 @@ github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwb github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= @@ -1164,11 +1223,13 @@ github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqn github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s= +github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= +github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= +github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sclevine/agouti v3.0.0+incompatible h1:8IBJS6PWz3uTlMP3YBIR5f+KAldcGuOeFkFbUWfBgK4= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 h1:RpforrEYXWkmGwJHIGnLZ3tTWStkjVVstwzNGqxX2Ds= @@ -1224,9 +1285,11 @@ github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOH github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07 h1:UyzmZLoiDWMRywV4DUYb9Fbt8uiOSooupjTq10vpvnU= github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= @@ -1236,6 +1299,7 @@ github.com/tdewolff/parse/v2 v2.6.4 h1:KCkDvNUMof10e3QExio9OPZJT8SbdKojLBumw8YZy github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= github.com/tdewolff/test v1.0.7 h1:8Vs0142DmPFW/bQeHRP3MV19m1gvndjUb1sn8yy74LM= github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= +github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= @@ -1246,10 +1310,16 @@ github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/urfave/cli/v2 v2.24.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.40.0 h1:CRq/00MfruPGFLTQKY8b+8SfdK60TxNztjRMnH0t1Yc= github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= +github.com/valyala/fasthttp v1.52.0 h1:wqBQpxH71XW0e2g+Og4dzQM8pk34aFYlA1Ga8db7gU0= +github.com/valyala/fasthttp v1.52.0/go.mod h1:hf5C4QnVMkNXMspnsUlfM3WitlgYflyhHYoKol/szxQ= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= @@ -1267,26 +1337,30 @@ github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvV github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yashtewari/glob-intersection v0.1.0 h1:6gJvMYQlTDOL3dMsPF6J0+26vwX9MB8/1q3uAdhmTrg= github.com/yashtewari/glob-intersection v0.1.0/go.mod h1:LK7pIC3piUjovexikBbJ26Yml7g8xa5bsjfx2v1fwok= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= @@ -1368,10 +1442,16 @@ golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDA golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= @@ -1379,16 +1459,20 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852 h1:xYq6+9AtI+xP3M4r0N1hCkHrInHDBohhquRgx9Kk6gI= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5 h1:ObuXPmIgI4ZMyQLIz48cJYgSyWdjUXc2SZAdyJMwEAU= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1397,6 +1481,7 @@ golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1407,16 +1492,26 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= +golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= @@ -1430,7 +1525,10 @@ google.golang.org/api v0.166.0/go.mod h1:4FcBc686KFi7QI/U51/2GKKevfZMpM17sCdibqe google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20230227214838-9b19f0bdc514/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY= @@ -1474,9 +1572,12 @@ google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJai google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= @@ -1512,6 +1613,8 @@ k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrD k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= moul.io/http2curl v1.0.0 h1:6XwpyZOYsgZJrU8exnG87ncVkU1FVCcTRpwzOkTDUi8= moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= +moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= +moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= diff --git a/infrastructure/README.md b/infrastructure/README.md index bbbcb1a93..0bdc1c5fe 100644 --- a/infrastructure/README.md +++ b/infrastructure/README.md @@ -1 +1,3 @@ -# infrastructure +# Infrastructure + +This directory contains the infrastructure code for the project. diff --git a/infrastructure/artifacts/faucet/UTC--2024-05-28T06-17-56.991113000Z--9a5a8ebd13951c8500c728c1982317a503b3e8ce b/infrastructure/artifacts/faucet/UTC--2024-05-28T06-17-56.991113000Z--9a5a8ebd13951c8500c728c1982317a503b3e8ce deleted file mode 100644 index 253d7c361..000000000 --- a/infrastructure/artifacts/faucet/UTC--2024-05-28T06-17-56.991113000Z--9a5a8ebd13951c8500c728c1982317a503b3e8ce +++ /dev/null @@ -1 +0,0 @@ -{"address":"9a5a8ebd13951c8500c728c1982317a503b3e8ce","crypto":{"cipher":"aes-128-ctr","ciphertext":"6c2c4b0e504884c932097191a9e265cc4321ad94b1d15a90419656decd81a841","cipherparams":{"iv":"3b33ba1dda819a2af9cf931964d8f3de"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":4096,"p":6,"r":8,"salt":"e9bc31022959a541c8a7bad49f0bff971de227642c7bbf740d6b4acb9de9d808"},"mac":"2ef0da7c95e5624adbf52929989bc38cf3b6af8d4f185e8a33d3b4726d7c377f"},"id":"11915da0-dceb-4a79-a9c7-0de5abb0d508","version":3} \ No newline at end of file diff --git a/infrastructure/blockscout/blockscout.sh b/infrastructure/blockscout/blockscout.sh deleted file mode 100644 index c5ebb9367..000000000 --- a/infrastructure/blockscout/blockscout.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -BACKEND_IP_ADDRESS=$1 -FRONTEND_IP_ADDRESS=$2 - -if [ -z "${BACKEND_IP_ADDRESS}" || -z "${FRONTEND_IP_ADDRESS}" ]; then - echo "Usage: $0 " - exit 1 -fi - -BLOCKSCOUT_ALL_IN_ONE_DIR="./docker-compose" -BLOCKSCOUT_ALL_IN_ONE_URL="https://mev-commit.s3.us-west-2.amazonaws.com/blockscout-docker-compose.tar.gz" - -wget -qO- ${BLOCKSCOUT_ALL_IN_ONE_URL} | tar -xvzf - - -cat < "${BLOCKSCOUT_ALL_IN_ONE_DIR}/.backend.env" -BLOCK_TRANSFORMER=clique -ETHEREUM_JSONRPC_VARIANT=geth -ETHEREUM_JSONRPC_HTTP_URL=http://${BACKEND_IP_ADDRESS}:8555/ -ETHEREUM_JSONRPC_TRACE_URL=http://${BACKEND_IP_ADDRESS}:8555/ -ETHEREUM_JSONRPC_WS_URL=ws://${BACKEND_IP_ADDRESS}:8556/ -CHAIN_ID=17864 -EOH - -cat < "${BLOCKSCOUT_ALL_IN_ONE_DIR}/.frontend.env" -NEXT_PUBLIC_API_HOST=${FRONTEND_IP_ADDRESS} -NEXT_PUBLIC_STATS_API_HOST=http://${FRONTEND_IP_ADDRESS}:8080 -NEXT_PUBLIC_VISUALIZE_API_HOST=http://${FRONTEND_IP_ADDRESS}:8081 -NEXT_PUBLIC_APP_HOST=${FRONTEND_IP_ADDRESS} -NEXT_PUBLIC_NETWORK_NAME=primev-testnet -EOH - -cp docker-compose.yml "${BLOCKSCOUT_ALL_IN_ONE_DIR}/" -docker compose -f "${BLOCKSCOUT_ALL_IN_ONE_DIR}/docker-compose.yml" up -d diff --git a/infrastructure/blockscout/docker-compose.yml b/infrastructure/blockscout/docker-compose.yml deleted file mode 100644 index ff827ab71..000000000 --- a/infrastructure/blockscout/docker-compose.yml +++ /dev/null @@ -1,89 +0,0 @@ -version: '3.9' - -services: - redis_db: - extends: - file: ./services/redis.yml - service: redis_db - - db-init: - extends: - file: ./services/db.yml - service: db-init - - db: - extends: - file: ./services/db.yml - service: db - - backend: - depends_on: - - db - - redis_db - extends: - file: ./services/backend.yml - service: backend - build: - context: .. - dockerfile: ./docker/Dockerfile - args: - CACHE_EXCHANGE_RATES_PERIOD: "" - API_V1_READ_METHODS_DISABLED: "false" - DISABLE_WEBAPP: "false" - API_V1_WRITE_METHODS_DISABLED: "false" - CACHE_TOTAL_GAS_USAGE_COUNTER_ENABLED: "" - CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL: "" - ADMIN_PANEL_ENABLED: "" - RELEASE_VERSION: 6.1.0 - links: - - db:database - env_file: - - .backend.env - - visualizer: - extends: - file: ./services/visualizer.yml - service: visualizer - - sig-provider: - extends: - file: ./services/sig-provider.yml - service: sig-provider - - frontend: - depends_on: - - backend - extends: - file: ./services/frontend.yml - service: frontend - env_file: - - .frontend.env - - - stats-db-init: - extends: - file: ./services/stats.yml - service: stats-db-init - - stats-db: - depends_on: - - backend - extends: - file: ./services/stats.yml - service: stats-db - - stats: - depends_on: - - stats-db - extends: - file: ./services/stats.yml - service: stats - - proxy: - depends_on: - - backend - - frontend - - stats - extends: - file: ./services/nginx.yml - service: proxy diff --git a/infrastructure/nomad/README.md b/infrastructure/nomad/README.md index 002096f7c..dbebaa713 100644 --- a/infrastructure/nomad/README.md +++ b/infrastructure/nomad/README.md @@ -50,6 +50,9 @@ Add your private key to the SSH agent: ssh-add /path/to/your/private_key ``` +Prepare `ansible.cfg` File: This file contains the configuration settings for Ansible and is also used to specify the location of the inventory file. +There is a sample `ansible.cfg.example` file located in this directory. Copy this file if you're happy with the default settings or create your own. + Prepare `hosts.ini` File: This file contains the IP addresses of your Nomad servers and clients. Replace the sample IP addresses with the actual IP addresses of your machines. ```ini [nomad_servers] @@ -93,6 +96,9 @@ Test the connection to the target machines: ansible all --inventory path/to/your/hosts.ini --module-name ping ``` +> The `ansible.cfg.example` refers to the `hosts.ini` file in the same directory. +> If you have a different location for your inventory file, update the `inventory` setting in your `ansible.cfg` file. + ## Cluster Management To manage the Nomad cluster, use the `cluster.sh` script. This script allows you to initialize, deploy, and destroy the Nomad cluster. @@ -100,3 +106,15 @@ For detailed usage instructions on how to use the script, run the following comm ```shell ./cluster.sh --help ``` + +Example of destroying running Nomad cluster: +```shell +./cluster.sh destroy +``` + +Example of deploying Nomad cluster: +```shell +./cluster.sh deploy --no-logs-collection --datadog-key ` --l1-rpc-url +``` + +> After successful deployment, you can find all secrets at: http://:1111/secrets.json diff --git a/infrastructure/nomad/playbooks/deploy.yml b/infrastructure/nomad/playbooks/deploy.yml index 79265758b..e7c50da30 100644 --- a/infrastructure/nomad/playbooks/deploy.yml +++ b/infrastructure/nomad/playbooks/deploy.yml @@ -176,7 +176,7 @@ - name: Build keystore-generator ansible.builtin.shell: | BINARY_PATH="{{ dist_dir }}/keystore-generator-{{ environments[env].version }}" - go build -o "${BINARY_PATH}" ./infrastructure/tools/keystore-generator/cmd/main.go + go build -o "${BINARY_PATH}" ./infrastructure/tools/keystore-generator/main.go echo "${BINARY_PATH}" args: chdir: "{{ root_dir }}" diff --git a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-funder.nomad.j2 b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-funder.nomad.j2 index 6f86b01b5..64c79b2ed 100644 --- a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-funder.nomad.j2 +++ b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-funder.nomad.j2 @@ -72,15 +72,8 @@ job "{{ job.name }}" { {{ end }} {{- range nomadService "{% endraw %}{{ job.target.name }}{% raw %}" }} - {{- if contains "http" .Tags }} - URL="https://{{ .Address }}:{{ .Port }}/health" - if ! timeout 5m bash -c 'until httping -sql -c 1 -G "'${URL}'"; do sleep 1; done'; then - echo "Unreachable endpoint: ${URL}" - exit 1 - fi - - {{- range nomadService "mev-commit-geth-bootnode1" }} - {{- if contains "http" .Tags }} + {{- range nomadService "mev-commit-geth-bootnode1" }} + {{- if contains "http" .Tags }} ADDRESS=$(cat "${KEYSTORE_FILE}" | jq -r '.address') cast send \ --keystore "${KEYSTORE_FILE}" \ @@ -97,9 +90,7 @@ job "{{ job.name }}" { echo "Failed to send funds to: ${ADDRESS}" exit 1 fi - {{- end }} {{- end }} - {{- end }} {{- end }} {% endraw %} diff --git a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 index c78d8c3ee..b02fcbac8 100644 --- a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 +++ b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 @@ -46,6 +46,7 @@ job "{{ job.name }}" { } {% elif profile == 'stressnet' %} resources { + cpu = 2000 memory = 16384 } {% endif %} @@ -107,6 +108,8 @@ job "{{ job.name }}" { {% endraw %} {% elif job.env['type'] == 'member' %} GETH_SYNC_MODE="{{ job.env['sync_mode'] }}" + {% elif job.env['type'] == 'archive' %} + GETH_SYNC_MODE="{{ job.env['sync_mode'] }}" {% endif %} {%- if job.env['type'] != 'bootnode' %} {%- raw %} diff --git a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-oracle.nomad.j2 b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-oracle.nomad.j2 index 82f45f2b0..a21ca35fe 100644 --- a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-oracle.nomad.j2 +++ b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-oracle.nomad.j2 @@ -42,6 +42,14 @@ job "{{ job.name }}" { port = "{{ port_name }}" tags = ["{{ port_name }}"] provider = "nomad" + {% if port_name == "http" %} + check { + type = "http" + path = "/health" + interval = "10s" + timeout = "2s" + } + {% endif %} } {% endfor %} @@ -149,7 +157,8 @@ job "{{ job.name }}" { } {% elif profile == 'stressnet' %} resources { - memory = 1024 + cpu = 4000 + memory = 4096 } {% endif %} @@ -184,7 +193,7 @@ job "{{ job.name }}" { else 'service:' + job.name + '-{{ env "NOMAD_ALLOC_INDEX" }}' }}" MEV_ORACLE_LOG_LEVEL="{{ job.env.get('log-level', 'info') }}" - MEV_ORACLE_LAGGERD_MODE="{{ job.env.get('laggerd-mode', '20') }}" + MEV_ORACLE_LAGGERD_MODE="{{ job.env.get('laggerd-mode', '10') }}" MEV_ORACLE_L1_RPC_URL="{{ job.env['l1_rpc_url'] }}" {%- raw %} MEV_ORACLE_KEYSTORE_PATH="/local/data-{{ env "NOMAD_ALLOC_INDEX" }}/keystore" @@ -240,10 +249,6 @@ job "{{ job.name }}" { {{- range nomadService "mev-commit-provider-node1" }} {{- if contains "http" .Tags }} URL="https://{{ .Address }}:{{ .Port }}/v1/debug/topology" - if ! timeout 5m bash -c 'until httping -sql -c 1 -G "'${URL}'"; do sleep 1; done'; then - echo "Unreachable {{ .Name }} endpoint: ${URL}" - exit 1 - fi ETH_ADDRESS="$(curl -sk ${URL} | jq -r '.topology.self["Ethereum Address"]')" if [ -n "${ETH_ADDRESS}" ]; then if [ -z "${MEV_ORACLE_OVERRIDE_WINNERS}" ]; then @@ -258,10 +263,6 @@ job "{{ job.name }}" { {{- range nomadService "mev-commit-provider-node2" }} {{- if contains "http" .Tags }} URL="https://{{ .Address }}:{{ .Port }}/v1/debug/topology" - if ! timeout 5m bash -c 'until httping -sql -c 1 -G "'${URL}'"; do sleep 1; done'; then - echo "Unreachable {{ .Name }} endpoint: ${URL}" - exit 1 - fi ETH_ADDRESS="$(curl -sk ${URL} | jq -r '.topology.self["Ethereum Address"]')" if [ -n "${ETH_ADDRESS}" ]; then if [ -z "${MEV_ORACLE_OVERRIDE_WINNERS}" ]; then @@ -276,10 +277,6 @@ job "{{ job.name }}" { {{- range nomadService "mev-commit-provider-node3" }} {{- if contains "http" .Tags }} URL="https://{{ .Address }}:{{ .Port }}/v1/debug/topology" - if ! timeout 5m bash -c 'until httping -sql -c 1 -G "'${URL}'"; do sleep 1; done'; then - echo "Unreachable {{ .Name }} endpoint: ${URL}" - exit 1 - fi ETH_ADDRESS="$(curl -sk ${URL} | jq -r '.topology.self["Ethereum Address"]')" if [ -n "${ETH_ADDRESS}" ]; then if [ -z "${MEV_ORACLE_OVERRIDE_WINNERS}" ]; then @@ -303,10 +300,6 @@ job "{{ job.name }}" { {{ if contains "http" .Tags }} URL="http://{{ .Address }}:{{ .Port }}/contracts.json" CONTRACTS_FILE="/local/contracts.json" - if ! timeout 5m bash -c 'until httping -sq -c 1 "'${URL}'"; do sleep 1; done'; then - echo "Unreachable endpoint: ${URL}" - exit 1 - fi curl -s -o "${CONTRACTS_FILE}" "${URL}" export MEV_ORACLE_PROVIDERREGISTRY_CONTRACT_ADDR="$(jq -r '.ProviderRegistry' ${CONTRACTS_FILE})" export MEV_ORACLE_BIDDERREGISTRY_CONTRACT_ADDR="$(jq -r '.BidderRegistry' ${CONTRACTS_FILE})" diff --git a/infrastructure/nomad/playbooks/templates/jobs/mev-commit.nomad.j2 b/infrastructure/nomad/playbooks/templates/jobs/mev-commit.nomad.j2 index df0f366ad..cf55de621 100644 --- a/infrastructure/nomad/playbooks/templates/jobs/mev-commit.nomad.j2 +++ b/infrastructure/nomad/playbooks/templates/jobs/mev-commit.nomad.j2 @@ -42,6 +42,15 @@ job "{{ job.name }}" { port = "{{ port_name }}" tags = ["{{ port_name }}"] provider = "nomad" + {% if port_name == "http" %} + check { + type = "http" + protocol = "https" + path = "/health" + interval = "10s" + timeout = "2s" + } + {% endif %} } {% endfor %} @@ -55,6 +64,7 @@ job "{{ job.name }}" { } {% elif profile == 'stressnet' %} resources { + cpu = 4000 memory = 4096 } {% endif %} @@ -93,7 +103,7 @@ job "{{ job.name }}" { {{- end }} {{- if contains "ws" .Tags }} MEV_COMMIT_SETTLEMENT_WS_RPC_ENDPOINT="ws://{{ .Address}}:{{ .Port }}" - {{- end }} + {{- end }} {{- end }} {% endraw %} MEV_COMMIT_PEER_TYPE="{{ job.env['type'] }}" @@ -141,10 +151,6 @@ job "{{ job.name }}" { {{- range nomadService "mev-commit-bootnode1" }} {{- if contains "http" .Tags }} URL="https://{{ .Address }}:{{ .Port }}/v1/debug/topology" - if ! timeout 5m bash -c 'until httping -sql -c 1 -G "'${URL}'"; do sleep 1; done'; then - echo "Unreachable endpoint: ${URL}" - exit 1 - fi PEER_ID=$(echo $(curl -sk "${URL}") | jq -r '.topology.self.Underlay') {{- else if contains "p2p" .Tags }} export MEV_COMMIT_BOOTNODES="/ip4/{{ .Address }}/tcp/{{ .Port }}/p2p/${PEER_ID}" @@ -158,10 +164,6 @@ job "{{ job.name }}" { {{ if contains "http" .Tags }} URL="http://{{ .Address }}:{{ .Port }}/contracts.json" CONTRACTS_FILE="/local/contracts.json" - if ! timeout 5m bash -c 'until httping -sq -c 1 "'${URL}'"; do sleep 1; done'; then - echo "Unreachable endpoint: ${URL}" - exit 1 - fi curl -s -o "${CONTRACTS_FILE}" "${URL}" export MEV_COMMIT_PROVIDER_REGISTRY_ADDR="$(jq -r '.ProviderRegistry' ${CONTRACTS_FILE})" export MEV_COMMIT_BIDDER_REGISTRY_ADDR="$(jq -r '.BidderRegistry' ${CONTRACTS_FILE})" diff --git a/infrastructure/nomad/playbooks/variables/profiles.yml b/infrastructure/nomad/playbooks/variables/profiles.yml index 88317fbfd..d40831ee4 100644 --- a/infrastructure/nomad/playbooks/variables/profiles.yml +++ b/infrastructure/nomad/playbooks/variables/profiles.yml @@ -105,6 +105,30 @@ jobs: type: member sync_mode: snap + mev_commit_geth_archive_node: &mev_commit_geth_archive_node_job + name: mev-commit-geth-archive-node + template: mev-commit-geth.nomad.j2 + artifacts: + - *geth_artifact + count: 1 + ports: + - metrics: + to: 6060 + http: + static: 8555 + to: 8545 + ws: + static: 8556 + to: 8546 + p2p: + to: 30311 + env: + ip: 0.0.0.0 + public_ip: "{{ ansible_facts['default_ipv4']['address'] }}" + net_restrict: 0.0.0.0/0 + type: archive + sync_mode: snap + contracts_deployer: &contracts_deployer_job name: contracts-deployer template: contracts-deployer.nomad.j2 @@ -583,3 +607,23 @@ profiles: - *mev_commit_bidder_emulator_nodes_job - *mev_commit_faucet_job - *datadog_agent_metrics_collector_job + + manual-test: + jobs: + - *artifacts_job + - *datadog_agent_logs_collector_job + - *mev_commit_geth_bootnode1_job + - *mev_commit_geth_signer_node1_job + - *mev_commit_geth_member_node_job + - *contracts_deployer_job + - *mev_commit_bootnode1_job + - *mev_commit_provider_node1_job + - *mev_commit_provider_node1_funder_job + - *mev_commit_provider_node2_job + - *mev_commit_provider_node2_funder_job + - *mev_commit_provider_node3_job + - *mev_commit_provider_node3_funder_job + - *mev_commit_provider_emulator_nodes_job + - *mev_commit_oracle_job + - *mev_commit_faucet_job + - *datadog_agent_metrics_collector_job diff --git a/infrastructure/tools/keystore-generator/.goreleaser.yml b/infrastructure/tools/keystore-generator/.goreleaser.yml index c7f0a395d..9e7a1f3cc 100644 --- a/infrastructure/tools/keystore-generator/.goreleaser.yml +++ b/infrastructure/tools/keystore-generator/.goreleaser.yml @@ -19,7 +19,6 @@ builds: - goos: windows goarch: arm64 dir: ./infrastructure/tools/keystore-generator - main: ./cmd binary: "{{ .ProjectName }}" archives: diff --git a/infrastructure/tools/keystore-generator/go.mod b/infrastructure/tools/keystore-generator/go.mod index 89b124f3e..ca1703f52 100644 --- a/infrastructure/tools/keystore-generator/go.mod +++ b/infrastructure/tools/keystore-generator/go.mod @@ -1,4 +1,4 @@ -module keystoreGenerator +module github.com/primev/mev-commit/infrastructure/tools/keystore-generator go 1.21.2 @@ -9,12 +9,12 @@ require ( require ( github.com/BurntSushi/toml v1.3.2 // indirect - github.com/DataDog/zstd v1.5.2 // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect - github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect @@ -23,26 +23,28 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect + github.com/getsentry/sentry-go v0.28.1 // indirect github.com/google/uuid v1.6.0 // indirect github.com/holiman/uint256 v1.2.4 // indirect - github.com/klauspost/compress v1.17.8 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/klauspost/compress v1.17.9 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rivo/uniseg v0.4.2 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/go-sysconf v0.3.13 // indirect github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/sys v0.22.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/infrastructure/tools/keystore-generator/go.sum b/infrastructure/tools/keystore-generator/go.sum index 51dff8dff..d3effc14c 100644 --- a/infrastructure/tools/keystore-generator/go.sum +++ b/infrastructure/tools/keystore-generator/go.sum @@ -1,21 +1,11 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= @@ -24,42 +14,32 @@ github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPx github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= -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= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= @@ -68,203 +48,69 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5il github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ= github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= +github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -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/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= @@ -275,178 +121,29 @@ github.com/tklauser/go-sysconf v0.3.13 h1:GBUpcahXSpR2xN01jhkNAbTLRk2Yzgggk8IM08 github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5IJePewFCGVEa0= github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr4= github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -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/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/infrastructure/tools/keystore-generator/cmd/main.go b/infrastructure/tools/keystore-generator/main.go similarity index 100% rename from infrastructure/tools/keystore-generator/cmd/main.go rename to infrastructure/tools/keystore-generator/main.go diff --git a/launchmevcommit b/launchmevcommit index 6966dcbca..34ca08e62 100755 --- a/launchmevcommit +++ b/launchmevcommit @@ -181,11 +181,26 @@ parse_args() { # The function is idempotent and only kills the process once. cleanup() { local pid="${1}" - if [ -z "${cleaned_up}" ] && kill -0 ${pid} 2>/dev/null; then + local grace_period=5 # Set grace period in seconds + + if [ -z "${cleaned_up}" ]; then + cleaned_up=true log_info "Killing mev-commit node with PID ${pid}" - kill ${pid} + + log_info "Waiting for ${grace_period} seconds before force killing..." + sleep ${grace_period} + + if kill -0 ${pid} 2>/dev/null; then + log_warn "Process ${pid} still running, force killing now." + kill -9 ${pid} + fi + + if wait ${pid}; then + log_info "mev-commit node with PID ${pid} has been killed" + else + log_error "Failed to kill mev-commit node with PID ${pid}" + fi fi - cleaned_up=true exit 0 } @@ -236,6 +251,7 @@ main() { fi trap "cleanup ${pid}" EXIT SIGINT SIGTERM + log_info "To kill mev-commit, exit the script with Ctrl+C" local address=$(cast wallet address --private-key "0x$(cat ${ROOT_PATH}/key)") @@ -278,4 +294,7 @@ main() { wait ${pid} } +# Global flag for cleanup +cleaned_up=false + main "$@" || exit 1 diff --git a/mev-commit-cli.sh b/mev-commit-cli.sh deleted file mode 100755 index c22fb7dd1..000000000 --- a/mev-commit-cli.sh +++ /dev/null @@ -1,506 +0,0 @@ -#!/bin/bash - -# Default RPC URL and Paths -L1_RPC_BASE_URL=https://ethereum-holesky-rpc.publicnode.com -DEFAULT_RPC_URL="http://sl-bootnode:8545" -PRIMEV_DIR="$HOME/.primev" -DEFAULT_CHAIN_ID="17864" - -# Default Docker network name -DOCKER_NETWORK_NAME="primev_net" - -# Contract addresses -BIDDER_REGISTRY="0x02CcEcB19c6D7EFe583C8b97022cB4b4C0B65608" -PROVIDER_REGISTRY="0xF69451b49598F11c63956bAD5E27f55114200753" -PRECONF_CONTRACT="0x86281283DA6D9e3987A55Aa702140fAB4dC71B27" - -# Default values for optional arguments -rpc_url=$DEFAULT_RPC_URL -datadog_key="" -command="" - -# Function to initialize the environment -initialize_environment() { - create_docker_network -} - -# Function to create a Docker network -create_docker_network() { - echo "Creating Docker network: $DOCKER_NETWORK_NAME..." - if ! docker network inspect $DOCKER_NETWORK_NAME >/dev/null 2>&1; then - docker network create --driver bridge --subnet 172.29.0.0/16 $DOCKER_NETWORK_NAME - else - echo "Network $DOCKER_NETWORK_NAME already exists." - fi -} - -start_settlement_layer() { - local datadog_key=$1 - - cat > "external/geth/geth-poa/.env" < "p2p/integrationtest/.env" <<-EOF - BIDDER_REGISTRY=${BIDDER_REGISTRY} - PROVIDER_REGISTRY=${PROVIDER_REGISTRY} - PRECONF_CONTRACT=${PRECONF_CONTRACT} - - RPC_URL=${rpc_url} - PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - L1_RPC_URL="${L1_RPC_BASE_URL}" -EOF - - docker compose --profile minimal-setup -f "p2p/integration-compose.yml" up --build -d -} - -start_mev_commit_e2e() { - local datadog_key="" - echo "Starting MEV-Commit..." - # Loop through arguments and process them - for arg in "$@" - do - case $arg in - --datadog-key=*) - datadog_key="${arg#*=}" - shift # Remove --datadog-key= from processing - ;; - *) - # Unknown option - ;; - esac - done - - echo "Setting .env file..." - # Create or overwrite the .env file - cat > "p2p/integrationtest/.env" <<-EOF - BIDDER_REGISTRY=${BIDDER_REGISTRY} - PROVIDER_REGISTRY=${PROVIDER_REGISTRY} - PRECONF_CONTRACT=${PRECONF_CONTRACT} - - RPC_URL=${rpc_url} - PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - L1_RPC_URL="${L1_RPC_BASE_URL}" -EOF - - - # Check if datadog_key is empty - if [ -z "$datadog_key" ]; then - echo "DD_KEY is empty, so no agents will be started." - # Run Docker Compose without --profile agent - docker compose --profile e2etest -f "p2p/e2e-compose.yml" up --build -d - else - # Run Docker Compose with --profile agent - DD_KEY="$datadog_key" docker compose --profile e2etest --profile agent -f "p2p/e2e-compose.yml" up --build -d - fi -} - -start_mev_commit() { - local datadog_key=$1 - - echo "Starting MEV-Commit..." - - # Check if datadog_key is empty - if [ -z "$datadog_key" ]; then - echo "DD_KEY is empty, so no agents will be started." - # Run Docker Compose without --profile agent - docker compose --profile integration-test -f "p2p/integration-compose.yml" up --build -d - else - # Run Docker Compose with --profile agent - DD_KEY="$datadog_key" docker compose --profile integration-test --profile agent -f "p2p/integration-compose.yml" up --build -d - fi -} - -# Builds contract-deployer image only if it doesn't already exist -build_contract_deployer() { - docker build -t contract-deployer "contracts" -} - -deploy_create2() { - local rpc_url=${1:-$DEFAULT_RPC_URL} - local network_name=${2:-"$DOCKER_NETWORK_NAME"} - chmod +x "external/geth/geth-poa/util/deploy_create2.sh" - docker run \ - --rm \ - --network "$network_name" \ - -v "$(pwd)/external/geth/geth-poa/util/deploy_create2.sh:/deploy_create2.sh" \ - alpine /bin/sh -c \ - "apk add --no-cache curl jq \ - && /deploy_create2.sh ${rpc_url}" -} - -deploy_contracts() { - local rpc_url=${1:-$DEFAULT_RPC_URL} - local chain_id=${2:-$DEFAULT_CHAIN_ID} - local private_key=${3:-"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"} # Default private key - - # Wait for the Geth POA network to be up and running - echo "Waiting for Geth POA network to be fully up..." - sleep 10 - - build_contract_deployer - - # Run the Docker container to deploy the contracts - echo "Deploying Contracts with RPC URL: $rpc_url, Chain ID: $chain_id, and Private Key: [HIDDEN]" - docker run --rm --network "$DOCKER_NETWORK_NAME" \ - -e RPC_URL="$rpc_url" \ - -e CHAIN_ID="$chain_id" \ - -e PRIVATE_KEY="$private_key" \ - contract-deployer -} - -start_oracle(){ - local l1_url=${L1_RPC_BASE_URL} - local datadog_key=$2 - # Run Docker Compose - L1_URL="$l1_url" DD_KEY="$datadog_key" docker compose -f "oracle/integration-compose.yml" up -d --build -} - -stop_oracle(){ - # Run Docker Compose - docker compose -f "oracle/integration-compose.yml" down -} - -start_hyperlane(){ - local public_rpc_url=${1:-$DEFAULT_RPC_URL} - local rpc_url=${2:-$DEFAULT_RPC_URL} - local chain_id=${3:-$DEFAULT_CHAIN_ID} - local private_key=${4:-"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"} - AGENT_BASE_IMAGE=gcr.io/abacus-labs-dev/hyperlane-agent@sha256:854f92966eac6b49e5132e152cc58168ecdddc76c2d390e657b81bdaf1396af0 \ - PUBLIC_SETTLEMENT_RPC_URL="$public_rpc_url" \ - SETTLEMENT_RPC_URL="$rpc_url" \ - HYPERLANE_DEPLOYER_PRIVATE_KEY="$private_key" \ - docker compose -f "bridge/hyperlane/docker-compose.yml" --profile bridge up -d --build - - # Run Alpine container which: - # 1. Install jq - # 2. Prints warp-deployment.json from docker volume - # 3. Parses the JSON to get hyperlane ERC20 contract address "router" deployed on settlement layer - HYP_ERC20_ADDR=$(docker run --rm -v hyperlane_hyperlane-deploy-artifacts:/data alpine /bin/sh -c "apk add --no-cache -q jq && cat /data/warp-deployment.json | jq -r '.mevcommitsettlement.router'") - - echo "HYP_ERC20_ADDR: $HYP_ERC20_ADDR" - - build_contract_deployer - - # Deploy whitelist contract - docker run --rm --network "$DOCKER_NETWORK_NAME" \ - -e RPC_URL="$rpc_url" \ - -e CHAIN_ID="$chain_id" \ - -e PRIVATE_KEY="$private_key" \ - -e DEPLOY_TYPE="whitelist" \ - -e HYP_ERC20_ADDR="$HYP_ERC20_ADDR" \ - contract-deployer -} - -stop_hyperlane(){ - AGENT_BASE_IMAGE=gcr.io/abacus-labs-dev/hyperlane-agent@sha256:854f92966eac6b49e5132e152cc58168ecdddc76c2d390e657b81bdaf1396af0 PUBLIC_SETTLEMENT_RPC_URL="$public_rpc_url" SETTLEMENT_RPC_URL="$rpc_url" docker compose -f "bridge/hyperlane/docker-compose.yml" --profile bridge down -} - -start_local_l1() { - DD_KEY=nil docker compose --profile local_l1 -f "external/geth/geth-poa/docker-compose.yml" up -d --build - # wait for l1 to be up before deploying create2 - sleep 10 - deploy_create2 "http://l1-bootnode:8545" "geth-poa_l1_net" -} - -stop_local_l1() { - DD_KEY=nil docker compose --profile local_l1 -f "external/geth/geth-poa/docker-compose.yml" down -} - -deploy_standard_bridge_contracts() { - local rpc_url=$DEFAULT_RPC_URL - local chain_id=$DEFAULT_CHAIN_ID - # Pre-funded account for deployment on settlement layer - local private_key="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" - - build_contract_deployer - - docker run --rm --network "$DOCKER_NETWORK_NAME" \ - -e RPC_URL="$rpc_url" \ - -e CHAIN_ID="$chain_id" \ - -e PRIVATE_KEY="$private_key" \ - -e DEPLOY_TYPE="settlement-gateway" \ - -e RELAYER_ADDR="0x0DCaa27B9E4Db92F820189345792f8eC5Ef148F6" \ - contract-deployer - - local settlement_gateway_addr="0xc1f93bE11D7472c9B9a4d87B41dD0a491F1fbc75" - docker run --rm --network "$DOCKER_NETWORK_NAME" \ - -e RPC_URL="$rpc_url" \ - -e CHAIN_ID="$chain_id" \ - -e PRIVATE_KEY="$private_key" \ - -e DEPLOY_TYPE="whitelist" \ - -e HYP_ERC20_ADDR="$settlement_gateway_addr" \ - contract-deployer - - docker run --rm --network "geth-poa_l1_net" \ - -e RPC_URL="http://l1-bootnode:8545" \ - -e CHAIN_ID="39999" \ - -e PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" \ - -e DEPLOY_TYPE="l1-gateway" \ - -e RELAYER_ADDR="0x0DCaa27B9E4Db92F820189345792f8eC5Ef148F6" \ - contract-deployer - - echo "Standard bridge gateway contracts finished deploying on both chains" -} - -start_standard_bridge() { - echo "Starting standard bridge..." - docker compose -f "bridge/standard/bridge-v1/docker-compose.yml" up --build -d -} - -stop_standard_bridge() { - echo "Stopping standard bridge..." - docker compose -f "bridge/standard/bridge-v1/docker-compose.yml" down -} - -clean() { - echo "Cleaning up..." - # Docker cleanup script - echo "Stopping all Docker containers..." - docker ps -aq | xargs -r docker stop - - echo "Removing all Docker containers..." - docker ps -aq | xargs -r docker rm - - echo "Removing all Docker images..." - docker images -q | xargs -r docker rmi - - echo "Removing all Docker volumes..." - docker volume ls -q | xargs -r docker volume rm - - echo "Removing all Docker networks..." - docker network ls | grep "bridge\|none\|host" -v | awk '{if(NR>1)print $1}' | xargs -r -I {} docker network rm {} - - echo "Pruning Docker system..." - docker system prune -a -f --volumes - - echo "Docker cleanup complete." -} - -stop_services() { - service=$1 - echo "Stopping Docker Compose services..." - - case $service in - "sl") - stop_settlement_layer - ;; - "oracle") - stop_oracle # Assuming stop_oracle is a function you've defined elsewhere - ;; - "hyperlane") - stop_hyperlane - ;; - "mev-commit") - docker compose -f "p2p/integration-compose.yml" down - ;; - "local_l1") - stop_local_l1 - ;; - "standard_bridge") - stop_standard_bridge - ;; - "all") - stop_settlement_layer - stop_oracle - stop_hyperlane - stop_local_l1 - stop_standard_bridge - docker compose -f "p2p/integration-compose.yml" down - ;; - *) - echo "Invalid service: $service" - echo "Valid services: sl, oracle, mev-commit, hyperlane, local_l1, standard_bridge, all" - return 1 - esac - - echo "Service(s) stopped." -} - - -start_service() { - local service_name=$1 - case $service_name in - "all") - create_docker_network - start_settlement_layer "$datadog_key" - deploy_contracts "$rpc_url" - start_mev_commit "$datadog_key" - start_oracle "$datadog_key" - start_hyperlane "$public_rpc_url" - ;; - "e2e") - initialize_environment - start_settlement_layer "$datadog_key" - deploy_contracts "$rpc_url" - start_mev_commit_e2e "--datadog-key=$datadog_key" - sleep 12 - start_oracle "$datadog_key" - start_hyperlane "$public_rpc_url" - ;; - "mev-commit") - start_mev_commit "$datadog_key" - ;; - "oracle") - start_oracle "$datadog_key" - ;; - "sl") - start_settlement_layer "$datadog_key" - ;; - "hyperlane") - start_hyperlane "$public_rpc_url" - ;; - "minimal") - initialize_environment - start_settlement_layer "$datadog_key" - deploy_contracts "$rpc_url" - start_mev_commit_minimal - ;; - "local_l1") - start_local_l1 - ;; - "standard_bridge") - create_docker_network - start_settlement_layer - start_local_l1 - deploy_standard_bridge_contracts - start_standard_bridge - ;; - *) - echo "Invalid service name: $service_name" - echo "Valid services: all, e2e, oracle, sl, hyperlane, minimal, local_l1, standard_bridge" - return 1 - ;; - esac -} - -# Function to display help -show_help() { - echo "Usage: $0 [command] [service(s)] [options]" - echo "" - echo "Commands:" - echo " deploy_contracts Deploy contracts" - echo " start [services] Start specified services. Available services: all, e2e, mev-commit, oracle, sl, hyperlane, minimal, local_l1, standard_bridge" - echo " stop [service] Stop specified service. Available services: sl, mev-commit, hyperlane, local_l1, standard_bridge, all" - echo " update Update repositories" - echo " clean Cleanup Docker" - echo "" - echo "Options:" - echo " -h, --help Show this help message" - echo " --rpc-url URL Set the internal RPC URL for mev-commit-geth" - echo " --public-rpc-url URL Set the public RPC URL for mev-commit-geth" - echo " --datadog-key KEY Set the Datadog key" - echo "" - echo "Examples:" - echo " $0 start all --rpc-url http://localhost:8545 Start all services with a specific RPC URL" - echo " $0 start e2e --datadog-key abc123 Start only the e2e service with a Datadog key" - echo " $0 start oracle Start only the oracle service" - echo " $0 start sl Start only the settlement layer service" - echo " $0 stop sl Stop the settlement layer service" - echo "" -} - -# Parse command line options -while [[ "$#" -gt 0 ]]; do - case "$1" in - -h|--help) - show_help - exit 0 - ;; - --rpc-url) - rpc_url="$2" - shift 2 - ;; - --public-rpc-url) - public_rpc_url="$2" - shift 2 - ;; - --datadog-key) - datadog_key="$2" - shift 2 - ;; - start|stop|deploy_contracts|update|clean|init_network) - command="$1" - shift - # If additional arguments are present after the command, they are captured as service names or additional options - service_names=() - while [[ "$#" -gt 0 ]] && [[ "$1" != "--"* ]]; do - service_names+=("$1") - shift - done - ;; - *) - echo "Invalid option: $1" - show_help - exit 1 - ;; - esac -done - -# Check if a command has been specified -if [[ -z "$command" ]]; then - echo "No command specified." - show_help - exit 1 -fi - -# Main script logic based on the command variable -case "$command" in - init_network) - create_docker_network - ;; - start) - if [ ${#service_names[@]} -eq 0 ]; then - echo "No service specified. Starting all services." - start_service "all" - else - for service_name in "${service_names[@]}"; do - start_service "$service_name" - done - fi - ;; - deploy_contracts) - deploy_contracts "$rpc_url" - ;; - stop) - if [ -z "${service_names[0]}" ]; then - echo "No service specified for stopping." - exit 1 - else - stop_services "${service_names[0]}" - fi - ;; - update) - update_repos - ;; - clean) - clean - ;; -esac - -exit 0 diff --git a/oracle/Dockerfile b/oracle/Dockerfile deleted file mode 100644 index cea814676..000000000 --- a/oracle/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM golang:1.22.1 AS builder - -WORKDIR /app -COPY ./oracle ./oracle -COPY ./contracts-abi ./contracts-abi -WORKDIR ./oracle -RUN CGO_ENABLED=0 GOOS=linux go build -o mev-commit-oracle ./cmd/main.go - -FROM alpine:latest - -COPY --from=builder /app/oracle/mev-commit-oracle /usr/local/bin/mev-commit-oracle -COPY --from=builder /app/oracle/keystore /keystore -COPY --from=builder /app/oracle/config.yaml /config.yaml -COPY --from=builder /app/oracle/entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -EXPOSE 8080 - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/oracle/cmd/main.go b/oracle/cmd/main.go index 36d2ae207..3de9d09d8 100644 --- a/oracle/cmd/main.go +++ b/oracle/cmd/main.go @@ -1,14 +1,17 @@ package main import ( + "context" "fmt" "io" "log/slog" "math/big" "os" + "os/signal" "path/filepath" "slices" "strings" + "syscall" "time" "github.com/ethereum/go-ethereum/common" @@ -190,7 +193,7 @@ var ( Name: "laggerd-mode", Usage: "No of blocks to lag behind for L1 chain", EnvVars: []string{"MEV_ORACLE_LAGGERD_MODE"}, - Value: 64, + Value: 10, }) optionOverrideWinners = altsrc.NewStringSliceFlag(&cli.StringSliceFlag{ @@ -284,9 +287,22 @@ func main() { return initializeApplication(c) }, }, - }} + }, + } + + ctx, cancel := context.WithCancel(context.Background()) + sigc := make(chan os.Signal, 1) + signal.Notify(sigc, syscall.SIGINT, syscall.SIGTERM) + go func() { + <-sigc + fmt.Fprintln(app.Writer, "received interrupt signal, exiting... Force exit with Ctrl+C") + cancel() + <-sigc + fmt.Fprintln(app.Writer, "force exiting...") + os.Exit(1) + }() - if err := app.Run(os.Args); err != nil { + if err := app.RunContext(ctx, os.Args); err != nil { fmt.Fprintf(app.Writer, "exited with error: %v\n", err) } } diff --git a/oracle/docker-compose.yml b/oracle/docker-compose.yml deleted file mode 100644 index 06311376b..000000000 --- a/oracle/docker-compose.yml +++ /dev/null @@ -1,67 +0,0 @@ -version: '3.8' - -services: - oracle: - build: - context: ../ - dockerfile: ./oracle/Dockerfile - restart: always - environment: - - L1_URL=${L1_URL} - - ORACLE_USER=${ORACLE_USER} - - ORACLE_PASS=${ORACLE_PASS} - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "production", - "metrics": [ - "mev_commit_oracle*", - "go*" - ] - } - ] - depends_on: - - oracle-db - networks: - - primev_net - - oracle-db: - image: postgres:latest - restart: always - environment: - POSTGRES_DB: oracle_db - POSTGRES_USER: ${ORACLE_USER} - POSTGRES_PASSWORD: ${ORACLE_PASS} - ports: - - "5432:5432" - volumes: - - postgres_data:/var/lib/postgresql/data - - datadog-agent: - image: gcr.io/datadoghq/agent:latest - restart: always - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - - /proc/:/host/proc/:ro - - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro - environment: - - DD_API_KEY=${DD_KEY} - - DD_TAGS=env:production - - DD_SITE=datadoghq.com - - DD_LOGS_ENABLED=true - - DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true - - DD_CONTAINER_EXCLUDE="name:datadog-agent" - networks: - - primev_net - -networks: - primev_net: - external: true - - -volumes: - postgres_data: diff --git a/oracle/go.mod b/oracle/go.mod index 9e90885fa..47d503a93 100644 --- a/oracle/go.mod +++ b/oracle/go.mod @@ -12,7 +12,7 @@ require ( github.com/prometheus/client_golang v1.19.1 github.com/testcontainers/testcontainers-go v0.27.0 github.com/urfave/cli/v2 v2.27.1 - golang.org/x/crypto v0.23.0 + golang.org/x/crypto v0.25.0 golang.org/x/sync v0.7.0 ) @@ -27,7 +27,8 @@ require ( github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/containerd/containerd v1.7.11 // indirect @@ -48,7 +49,7 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/holiman/uint256 v1.2.4 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect @@ -56,14 +57,15 @@ require ( github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/opencontainers/runc v1.1.12 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/shirou/gopsutil/v3 v3.23.11 // indirect @@ -74,14 +76,14 @@ require ( github.com/tklauser/numcpus v0.7.0 // indirect github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/tools v0.23.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect google.golang.org/grpc v1.64.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/oracle/go.sum b/oracle/go.sum index 73100d133..7dd08d857 100644 --- a/oracle/go.sum +++ b/oracle/go.sum @@ -6,8 +6,8 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= @@ -28,16 +28,18 @@ github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqy github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= @@ -87,8 +89,8 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= +github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= @@ -128,8 +130,8 @@ github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7Bd github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -148,8 +150,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= @@ -165,6 +167,8 @@ github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -183,14 +187,14 @@ github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQ github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -241,20 +245,20 @@ github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -272,20 +276,20 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -294,8 +298,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1: google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/oracle/integration-compose.yml b/oracle/integration-compose.yml deleted file mode 100644 index 19ca11735..000000000 --- a/oracle/integration-compose.yml +++ /dev/null @@ -1,66 +0,0 @@ -version: '3.8' - -services: - oracle: - build: - context: ../ - dockerfile: ./oracle/integrationtest/Dockerfile - restart: always - environment: - - L1_URL=${L1_URL} - networks: - - primev_net - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit_oracle*", - "go*" - ] - } - ] - depends_on: - - oracle-db - - oracle-db: - image: postgres:latest - restart: always - environment: - POSTGRES_DB: oracle_db - POSTGRES_USER: oracle_user - POSTGRES_PASSWORD: oracle_pass - ports: - - "5432:5432" - volumes: - - postgres_data:/var/lib/postgresql/data - networks: - - primev_net - - datadog-agent: - image: gcr.io/datadoghq/agent:latest - restart: always - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - - /proc/:/host/proc/:ro - - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro - environment: - - DD_API_KEY=${DD_KEY} - - DD_TAGS=env:test - - DD_SITE=datadoghq.com - - DD_LOGS_ENABLED=true - - DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true - - DD_CONTAINER_EXCLUDE="name:datadog-agent" - networks: - - primev_net - -networks: - primev_net: - external: true - -volumes: - postgres_data: diff --git a/oracle/pkg/apiserver/apiserver.go b/oracle/pkg/apiserver/apiserver.go index a043bc9ad..033c64a41 100644 --- a/oracle/pkg/apiserver/apiserver.go +++ b/oracle/pkg/apiserver/apiserver.go @@ -4,6 +4,7 @@ import ( "bufio" "context" "expvar" + "fmt" "log/slog" "net" "net/http" @@ -20,6 +21,7 @@ import ( "github.com/primev/mev-commit/oracle/pkg/updater" "github.com/primev/mev-commit/x/contracts/events" "github.com/primev/mev-commit/x/contracts/txmonitor" + "github.com/primev/mev-commit/x/health" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -143,7 +145,7 @@ func (s *Service) registerProvider(token string) http.Handler { return } - stake, err := s.providerRegistry.CheckStake(providerAddress) + stake, err := s.providerRegistry.GetProviderStake(providerAddress) if err != nil { http.Error(w, "Failed to check provider stake", http.StatusInternalServerError) return @@ -261,6 +263,20 @@ func (s *Service) RegisterMetricsCollectors(cs ...prometheus.Collector) { s.metricsRegistry.MustRegister(cs...) } +func (s *Service) RegisterHealthCheck(hc health.Health) { + s.router.HandleFunc( + "/health", + func(w http.ResponseWriter, r *http.Request) { + if err := hc.Health(); err != nil { + http.Error(w, err.Error(), http.StatusServiceUnavailable) + return + } + w.WriteHeader(http.StatusOK) + fmt.Fprintln(w, "ok") + }, + ) +} + type responseStatusRecorder struct { http.ResponseWriter status int diff --git a/oracle/pkg/node/node.go b/oracle/pkg/node/node.go index 2ddb22713..2787d32d1 100644 --- a/oracle/pkg/node/node.go +++ b/oracle/pkg/node/node.go @@ -30,6 +30,7 @@ import ( "github.com/primev/mev-commit/x/contracts/events/publisher" "github.com/primev/mev-commit/x/contracts/transactor" "github.com/primev/mev-commit/x/contracts/txmonitor" + "github.com/primev/mev-commit/x/health" "github.com/primev/mev-commit/x/keysigner" ) @@ -71,6 +72,7 @@ type Node struct { func NewNode(opts *Options) (*Node, error) { nd := &Node{logger: opts.Logger} + healthChecker := health.New() db, err := initDB(opts) if err != nil { @@ -117,6 +119,7 @@ func NewNode(opts *Options) (*Node, error) { ) monitorClosed := monitor.Start(ctx) + healthChecker.Register(health.CloseChannelHealthCheck("txmonitor", monitorClosed)) txnMgr := transactor.NewTransactor( settlementClient, @@ -240,6 +243,7 @@ func NewNode(opts *Options) (*Node, error) { blockTrackerTransactor, ) l1LisClosed := l1Lis.Start(ctx) + healthChecker.Register(health.CloseChannelHealthCheck("l1_listener", l1LisClosed)) updtr, err := updater.NewUpdater( nd.logger.With("component", "updater"), @@ -256,6 +260,7 @@ func NewNode(opts *Options) (*Node, error) { } updtrClosed := updtr.Start(ctx) + healthChecker.Register(health.CloseChannelHealthCheck("updater", updtrClosed)) providerRegistry, err := providerregistry.NewProviderregistryCaller( opts.ProviderRegistryContractAddr, @@ -286,12 +291,14 @@ func NewNode(opts *Options) (*Node, error) { ) pubDone := eventsPublisher.Start(ctx, contractAddrs...) + healthChecker.Register(health.CloseChannelHealthCheck("events_publisher", pubDone)) srv.RegisterMetricsCollectors(l1Lis.Metrics()...) srv.RegisterMetricsCollectors(updtr.Metrics()...) srv.RegisterMetricsCollectors(monitor.Metrics()...) srv.RegisterMetricsCollectors(evtMgr.Metrics()...) srv.RegisterMetricsCollectors(settlementRPC.Metrics()...) + srv.RegisterHealthCheck(healthChecker) srvClosed := srv.Start(fmt.Sprintf(":%d", opts.HTTPPort)) diff --git a/oracle/pkg/store/store.go b/oracle/pkg/store/store.go index ad5b280c0..170867893 100644 --- a/oracle/pkg/store/store.go +++ b/oracle/pkg/store/store.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" _ "github.com/lib/pq" "github.com/primev/mev-commit/oracle/pkg/updater" + "github.com/primev/mev-commit/x/contracts/txmonitor" ) var settlementType = ` @@ -399,6 +400,37 @@ func (s *Store) PendingTxnCount() (int, error) { return count, nil } +func (s *Store) PendingTxns() ([]*txmonitor.TxnDetails, error) { + rows, err := s.db.Query("SELECT hash, nonce FROM sent_transactions WHERE settled = false") + if err != nil { + return nil, err + } + defer rows.Close() + + var txns []*txmonitor.TxnDetails + for rows.Next() { + var hashBase64 string + var nonce uint64 + if err := rows.Scan(&hashBase64, &nonce); err != nil { + return nil, err + } + + hash, err := base64.StdEncoding.DecodeString(hashBase64) + if err != nil { + return nil, err + } + + txns = append(txns, &txmonitor.TxnDetails{ + Hash: common.BytesToHash(hash), + Nonce: nonce, + }) + } + if err := rows.Err(); err != nil { + return nil, err + } + return txns, nil +} + func (s *Store) LastBlock() (uint64, error) { var lastBlock sql.NullInt64 err := s.db.QueryRow("SELECT value FROM integers WHERE key = 'last_block'").Scan(&lastBlock) diff --git a/oracle/pkg/updater/updater.go b/oracle/pkg/updater/updater.go index 3ffaf79c9..2fbfa0ba8 100644 --- a/oracle/pkg/updater/updater.go +++ b/oracle/pkg/updater/updater.go @@ -130,11 +130,8 @@ func NewUpdater( oracle: oracle, receiptBatcher: receiptBatcher, metrics: newMetrics(), - // the buffered channel here is required to ensure that the event processing - // does not block the event manager. This event involves making a settlement - // transaction on the blockchain, which can take a while to complete. - openedCmts: make(chan *preconf.PreconfcommitmentstoreCommitmentStored, 200), - encryptedCmts: make(chan *preconf.PreconfcommitmentstoreEncryptedCommitmentStored), + openedCmts: make(chan *preconf.PreconfcommitmentstoreCommitmentStored), + encryptedCmts: make(chan *preconf.PreconfcommitmentstoreEncryptedCommitmentStored), }, nil } @@ -245,7 +242,7 @@ func (u *Updater) handleEncryptedCommitment( err := u.winnerRegister.AddEncryptedCommitment( ctx, update.CommitmentIndex[:], - update.Commiter.Bytes(), + update.Committer.Bytes(), update.CommitmentDigest[:], update.CommitmentSignature, update.DispatchTimestamp, @@ -319,13 +316,13 @@ func (u *Updater) handleOpenedCommitment( return nil } - if common.BytesToAddress(winner.Winner).Cmp(update.Commiter) != 0 { + if common.BytesToAddress(winner.Winner).Cmp(update.Committer) != 0 { // The winner is not the committer of the commitment u.logger.Info( "winner is not the committer", "commitmentIdx", common.Bytes2Hex(update.CommitmentIndex[:]), "winner", common.Bytes2Hex(winner.Winner), - "committer", update.Commiter.Hex(), + "committer", update.Committer.Hex(), "blockNumber", update.BlockNumber, ) return nil @@ -405,7 +402,7 @@ func (u *Updater) settle( commitmentPostingTxn, err := u.oracle.ProcessBuilderCommitmentForBlockNumber( update.CommitmentIndex, big.NewInt(0).SetUint64(update.BlockNumber), - update.Commiter, + update.Committer, settlementType == SettlementTypeSlash, big.NewInt(decayPercentage), ) @@ -453,7 +450,7 @@ func (u *Updater) addSettlement( update.TxnHash, int64(update.BlockNumber), update.Bid, - update.Commiter.Bytes(), + update.Committer.Bytes(), update.CommitmentHash[:], settlementType, decayPercentage, diff --git a/oracle/pkg/updater/updater_test.go b/oracle/pkg/updater/updater_test.go index fcc030d9f..8e8e624bd 100644 --- a/oracle/pkg/updater/updater_test.go +++ b/oracle/pkg/updater/updater_test.go @@ -136,13 +136,13 @@ func TestUpdater(t *testing.T) { } if i%2 == 0 { - encCommitment.Commiter = builderAddr - commitment.Commiter = builderAddr + encCommitment.Committer = builderAddr + commitment.Committer = builderAddr encCommitments = append(encCommitments, encCommitment) commitments = append(commitments, commitment) } else { - encCommitment.Commiter = otherBuilderAddr - commitment.Commiter = otherBuilderAddr + encCommitment.Committer = otherBuilderAddr + commitment.Committer = otherBuilderAddr encCommitments = append(encCommitments, encCommitment) commitments = append(commitments, commitment) } @@ -159,14 +159,14 @@ func TestUpdater(t *testing.T) { encCommitment := preconf.PreconfcommitmentstoreEncryptedCommitmentStored{ CommitmentIndex: idxBytes, - Commiter: builderAddr, + Committer: builderAddr, CommitmentDigest: common.HexToHash(fmt.Sprintf("0x%02d", i)), CommitmentSignature: []byte("signature"), DispatchTimestamp: uint64(midTimestamp.UnixMilli()), } commitment := preconf.PreconfcommitmentstoreCommitmentStored{ CommitmentIndex: idxBytes, - Commiter: builderAddr, + Committer: builderAddr, Bid: big.NewInt(10), TxnHash: bundle, BlockNumber: 5, @@ -262,7 +262,7 @@ func TestUpdater(t *testing.T) { if !bytes.Equal(enc.commitmentIdx, ec.CommitmentIndex[:]) { t.Fatal("wrong commitment index") } - if !bytes.Equal(enc.committer, ec.Commiter.Bytes()) { + if !bytes.Equal(enc.committer, ec.Committer.Bytes()) { t.Fatal("wrong committer") } if !bytes.Equal(enc.commitmentHash, ec.CommitmentDigest[:]) { @@ -282,7 +282,7 @@ func TestUpdater(t *testing.T) { t.Fatal(err) } - if c.Commiter.Cmp(otherBuilderAddr) == 0 { + if c.Committer.Cmp(otherBuilderAddr) == 0 { continue } @@ -296,7 +296,7 @@ func TestUpdater(t *testing.T) { if commitment.blockNum.Cmp(big.NewInt(5)) != 0 { t.Fatal("wrong block number") } - if commitment.builder != c.Commiter { + if commitment.builder != c.Committer { t.Fatal("wrong builder") } if commitment.isSlash { @@ -320,7 +320,7 @@ func TestUpdater(t *testing.T) { if settlement.blockNum != 5 { t.Fatal("wrong block number") } - if !bytes.Equal(settlement.builder, c.Commiter.Bytes()) { + if !bytes.Equal(settlement.builder, c.Committer.Bytes()) { t.Fatal("wrong builder") } if settlement.amount.Uint64() != 10 { @@ -400,13 +400,13 @@ func TestUpdaterRevertedTxns(t *testing.T) { } if i%2 == 0 { - encCommitment.Commiter = builderAddr - commitment.Commiter = builderAddr + encCommitment.Committer = builderAddr + commitment.Committer = builderAddr encCommitments = append(encCommitments, encCommitment) commitments = append(commitments, commitment) } else { - encCommitment.Commiter = otherBuilderAddr - commitment.Commiter = otherBuilderAddr + encCommitment.Committer = otherBuilderAddr + commitment.Committer = otherBuilderAddr encCommitments = append(encCommitments, encCommitment) commitments = append(commitments, commitment) } @@ -423,14 +423,14 @@ func TestUpdaterRevertedTxns(t *testing.T) { encCommitment := preconf.PreconfcommitmentstoreEncryptedCommitmentStored{ CommitmentIndex: idxBytes, - Commiter: builderAddr, + Committer: builderAddr, CommitmentDigest: common.HexToHash(fmt.Sprintf("0x%02d", i)), CommitmentSignature: []byte("signature"), DispatchTimestamp: uint64(midTimestamp.UnixMilli()), } commitment := preconf.PreconfcommitmentstoreCommitmentStored{ CommitmentIndex: idxBytes, - Commiter: builderAddr, + Committer: builderAddr, Bid: big.NewInt(10), TxnHash: bundle, BlockNumber: 5, @@ -532,7 +532,7 @@ func TestUpdaterRevertedTxns(t *testing.T) { if !bytes.Equal(enc.commitmentIdx, ec.CommitmentIndex[:]) { t.Fatal("wrong commitment index") } - if !bytes.Equal(enc.committer, ec.Commiter.Bytes()) { + if !bytes.Equal(enc.committer, ec.Committer.Bytes()) { t.Fatal("wrong committer") } if !bytes.Equal(enc.commitmentHash, ec.CommitmentDigest[:]) { @@ -552,7 +552,7 @@ func TestUpdaterRevertedTxns(t *testing.T) { t.Fatal(err) } - if c.Commiter.Cmp(otherBuilderAddr) == 0 { + if c.Committer.Cmp(otherBuilderAddr) == 0 { continue } @@ -566,7 +566,7 @@ func TestUpdaterRevertedTxns(t *testing.T) { if commitment.blockNum.Cmp(big.NewInt(5)) != 0 { t.Fatal("wrong block number") } - if commitment.builder != c.Commiter { + if commitment.builder != c.Committer { t.Fatal("wrong builder") } if !commitment.isSlash { @@ -590,7 +590,7 @@ func TestUpdaterRevertedTxns(t *testing.T) { if settlement.blockNum != 5 { t.Fatal("wrong block number") } - if !bytes.Equal(settlement.builder, c.Commiter.Bytes()) { + if !bytes.Equal(settlement.builder, c.Committer.Bytes()) { t.Fatal("wrong builder") } if settlement.amount.Uint64() != 10 { @@ -671,13 +671,13 @@ func TestUpdaterRevertedTxnsWithRevertingHashes(t *testing.T) { } if i%2 == 0 { - encCommitment.Commiter = builderAddr - commitment.Commiter = builderAddr + encCommitment.Committer = builderAddr + commitment.Committer = builderAddr encCommitments = append(encCommitments, encCommitment) commitments = append(commitments, commitment) } else { - encCommitment.Commiter = otherBuilderAddr - commitment.Commiter = otherBuilderAddr + encCommitment.Committer = otherBuilderAddr + commitment.Committer = otherBuilderAddr encCommitments = append(encCommitments, encCommitment) commitments = append(commitments, commitment) } @@ -694,14 +694,14 @@ func TestUpdaterRevertedTxnsWithRevertingHashes(t *testing.T) { encCommitment := preconf.PreconfcommitmentstoreEncryptedCommitmentStored{ CommitmentIndex: idxBytes, - Commiter: builderAddr, + Committer: builderAddr, CommitmentDigest: common.HexToHash(fmt.Sprintf("0x%02d", i)), CommitmentSignature: []byte("signature"), DispatchTimestamp: uint64(midTimestamp.UnixMilli()), } commitment := preconf.PreconfcommitmentstoreCommitmentStored{ CommitmentIndex: idxBytes, - Commiter: builderAddr, + Committer: builderAddr, Bid: big.NewInt(10), TxnHash: bundle, BlockNumber: 5, @@ -803,7 +803,7 @@ func TestUpdaterRevertedTxnsWithRevertingHashes(t *testing.T) { if !bytes.Equal(enc.commitmentIdx, ec.CommitmentIndex[:]) { t.Fatal("wrong commitment index") } - if !bytes.Equal(enc.committer, ec.Commiter.Bytes()) { + if !bytes.Equal(enc.committer, ec.Committer.Bytes()) { t.Fatal("wrong committer") } if !bytes.Equal(enc.commitmentHash, ec.CommitmentDigest[:]) { @@ -823,7 +823,7 @@ func TestUpdaterRevertedTxnsWithRevertingHashes(t *testing.T) { t.Fatal(err) } - if c.Commiter.Cmp(otherBuilderAddr) == 0 { + if c.Committer.Cmp(otherBuilderAddr) == 0 { continue } @@ -837,7 +837,7 @@ func TestUpdaterRevertedTxnsWithRevertingHashes(t *testing.T) { if commitment.blockNum.Cmp(big.NewInt(5)) != 0 { t.Fatal("wrong block number") } - if commitment.builder != c.Commiter { + if commitment.builder != c.Committer { t.Fatal("wrong builder") } if commitment.isSlash { @@ -861,7 +861,7 @@ func TestUpdaterRevertedTxnsWithRevertingHashes(t *testing.T) { if settlement.blockNum != 5 { t.Fatal("wrong block number") } - if !bytes.Equal(settlement.builder, c.Commiter.Bytes()) { + if !bytes.Equal(settlement.builder, c.Committer.Bytes()) { t.Fatal("wrong builder") } if settlement.amount.Uint64() != 10 { @@ -925,7 +925,7 @@ func TestUpdaterBundlesFailure(t *testing.T) { commitment := preconf.PreconfcommitmentstoreCommitmentStored{ CommitmentIndex: idxBytes, - Commiter: builderAddr, + Committer: builderAddr, Bid: big.NewInt(10), TxnHash: bundle, BlockNumber: 5, @@ -1023,7 +1023,7 @@ func TestUpdaterBundlesFailure(t *testing.T) { if commitment.blockNum.Cmp(big.NewInt(5)) != 0 { t.Fatal("wrong block number") } - if commitment.builder != c.Commiter { + if commitment.builder != c.Committer { t.Fatal("wrong builder") } if !commitment.isSlash { @@ -1047,7 +1047,7 @@ func TestUpdaterBundlesFailure(t *testing.T) { if settlement.blockNum != 5 { t.Fatal("wrong block number") } - if !bytes.Equal(settlement.builder, c.Commiter.Bytes()) { + if !bytes.Equal(settlement.builder, c.Committer.Bytes()) { t.Fatal("wrong builder") } if settlement.amount.Uint64() != 10 { @@ -1117,7 +1117,7 @@ func TestUpdaterIgnoreCommitments(t *testing.T) { commitment := preconf.PreconfcommitmentstoreCommitmentStored{ CommitmentIndex: idxBytes, - Commiter: builderAddr, + Committer: builderAddr, Bid: big.NewInt(10), TxnHash: strings.TrimPrefix(txn.Hash().Hex(), "0x"), RevertingTxHashes: "", @@ -1238,7 +1238,7 @@ func TestUpdaterIgnoreCommitments(t *testing.T) { if commitment.blockNum.Cmp(big.NewInt(10)) != 0 { t.Fatal("wrong block number", commitment.blockNum) } - if commitment.builder != c.Commiter { + if commitment.builder != c.Committer { t.Fatal("wrong builder") } if commitment.isSlash { @@ -1262,7 +1262,7 @@ func TestUpdaterIgnoreCommitments(t *testing.T) { if settlement.blockNum != 10 { t.Fatal("wrong block number") } - if !bytes.Equal(settlement.builder, c.Commiter.Bytes()) { + if !bytes.Equal(settlement.builder, c.Committer.Bytes()) { t.Fatal("wrong builder") } if settlement.amount.Uint64() != 10 { @@ -1443,7 +1443,7 @@ func publishEncCommitment( ) error { event := pcABI.Events["EncryptedCommitmentStored"] buf, err := event.Inputs.NonIndexed().Pack( - ec.Commiter, + ec.Committer, ec.CommitmentDigest, ec.CommitmentSignature, ec.DispatchTimestamp, @@ -1476,7 +1476,7 @@ func publishCommitment( event := pcABI.Events["CommitmentStored"] buf, err := event.Inputs.NonIndexed().Pack( c.Bidder, - c.Commiter, + c.Committer, c.Bid, c.BlockNumber, c.BidHash, diff --git a/p2p/Dockerfile b/p2p/Dockerfile deleted file mode 100644 index a629fd877..000000000 --- a/p2p/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM golang:1.22.1 AS builder - -WORKDIR /app -COPY . . -WORKDIR ./p2p -RUN CGO_ENABLED=0 make build - -FROM alpine:latest - -COPY --from=builder /app/p2p/bin/mev-commit /usr/local/bin/mev-commit - -EXPOSE 13522 13523 13524 - -ENTRYPOINT ["mev-commit"] diff --git a/p2p/Dockerfile.goreleaser b/p2p/Dockerfile.goreleaser deleted file mode 100644 index ce4a6f533..000000000 --- a/p2p/Dockerfile.goreleaser +++ /dev/null @@ -1,9 +0,0 @@ -FROM alpine:latest - -COPY mev-commit /usr/local/bin/mev-commit - -EXPOSE 13522 13523 13524 - -LABEL org.opencontainers.image.source https://github.com/primev/mev-commit/tree/main/p2p - -ENTRYPOINT ["mev-commit"] diff --git a/p2p/cmd/main.go b/p2p/cmd/main.go index 63f5c1dee..e3573b64e 100644 --- a/p2p/cmd/main.go +++ b/p2p/cmd/main.go @@ -1,12 +1,15 @@ package main import ( + "context" "fmt" "math/big" "os" + "os/signal" "path/filepath" "slices" "strings" + "syscall" "time" "github.com/ethereum/go-ethereum/common" @@ -30,6 +33,9 @@ const ( defaultKeyFile = "key" defaultSecret = "secret" defaultKeystore = "keystore" + defaultDataDir = "db" + + defaultOracleWindowOffset = 1 ) var ( @@ -57,6 +63,13 @@ var ( EnvVars: []string{"MEV_COMMIT_CONFIG"}, } + optionDataDir = altsrc.NewStringFlag(&cli.StringFlag{ + Name: "data-dir", + Usage: "path to data directory", + EnvVars: []string{"MEV_COMMIT_DATA_DIR"}, + Value: filepath.Join(defaultConfigDir, defaultDataDir), + }) + optionPrivKeyFile = altsrc.NewStringFlag(&cli.StringFlag{ Name: "priv-key-file", Usage: "path to private key file", @@ -315,6 +328,7 @@ var ( func main() { flags := []cli.Flag{ optionConfig, + optionDataDir, optionPeerType, optionPrivKeyFile, optionKeystorePassword, @@ -357,9 +371,25 @@ func main() { Action: initializeApplication, } - if err := app.Run(os.Args); err != nil { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + sigc := make(chan os.Signal, 1) + signal.Notify(sigc, syscall.SIGINT, syscall.SIGTERM) + go func() { + <-sigc + fmt.Fprintln(app.Writer, "received interrupt signal, exiting... Force exit with Ctrl+C") + cancel() + <-sigc + fmt.Fprintln(app.Writer, "force exiting...") + os.Exit(1) + }() + + if err := app.RunContext(ctx, os.Args); err != nil { fmt.Fprintln(app.Writer, "exited with error:", err) } + + os.Exit(0) } func initializeApplication(c *cli.Context) error { @@ -441,8 +471,20 @@ func launchNodeWithConfig(c *cli.Context) error { } } + dbPath := "" + if c.String(optionDataDir.Name) != "" { + dbPath, err = util.ResolveFilePath(c.String(optionDataDir.Name)) + if err != nil { + return fmt.Errorf("failed to resolve data directory: %w", err) + } + if err := os.MkdirAll(dbPath, 0700); err != nil { + return fmt.Errorf("failed to create data directory: %w", err) + } + } + nd, err := node.NewNode(&node.Options{ KeySigner: keysigner, + DataDir: dbPath, Secret: c.String(optionSecret.Name), PeerType: c.String(optionPeerType.Name), P2PPort: c.Int(optionP2PPort.Name), @@ -465,6 +507,7 @@ func launchNodeWithConfig(c *cli.Context) error { DefaultGasLimit: uint64(c.Int(optionGasLimit.Name)), DefaultGasTipCap: gasTipCap, DefaultGasFeeCap: gasFeeCap, + OracleWindowOffset: big.NewInt(defaultOracleWindowOffset), }) if err != nil { return fmt.Errorf("failed starting node: %w", err) diff --git a/p2p/e2e-compose.yml b/p2p/e2e-compose.yml deleted file mode 100644 index f8f24e545..000000000 --- a/p2p/e2e-compose.yml +++ /dev/null @@ -1,581 +0,0 @@ -version: '3' - -services: - bootnode: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bootnode - restart: always - volumes: - - ./integrationtest/keys/bootnode:/key - depends_on: - - funder - networks: - primev_net: - ipv4_address: 172.29.18.2 - ports: - - "8080:13523" - env_file: - - integrationtest/.env - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - profiles: - - e2etest - - provider-1: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: provider - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/provider1:/key - networks: - - primev_net - ports: - - "8081:13523" - env_file: - - integrationtest/.env - profiles: - - minimal-setup - - e2etest - - demo - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - provider-emulator-1: - build: - context: ../ - dockerfile: ./p2p/integrationtest/provider/Dockerfile - restart: always - depends_on: - - provider-1 - environment: - - PROVIDER_IP=provider-1:13524 - networks: - - primev_net - ports: - - "8082:8080" - profiles: - - minimal-setup - - e2etest - - demo - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - provider-2: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: provider - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/provider2:/key - networks: - - primev_net - ports: - - "8083:13523" - env_file: - - integrationtest/.env - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - provider-emulator-2: - build: - context: ../ - dockerfile: ./p2p/integrationtest/provider/Dockerfile - restart: always - depends_on: - - provider-2 - environment: - - PROVIDER_IP=provider-2:13524 - networks: - - primev_net - ports: - - "8084:8080" - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - provider-3: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: provider - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/provider3:/key - networks: - - primev_net - ports: - - "8085:13523" - env_file: - - integrationtest/.env - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - provider-emulator-3: - build: - context: ../ - dockerfile: ./p2p/integrationtest/provider/Dockerfile - restart: always - depends_on: - - provider-3 - environment: - - PROVIDER_IP=provider-3:13524 - networks: - - primev_net - ports: - - "8086:8080" - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-1: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder1:/key - networks: - - primev_net - ports: - - "8087:13523" - env_file: - - integrationtest/.env - profiles: - - minimal-setup - - e2etest - - demo - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-1: - build: - context: ../ - dockerfile: ./p2p/integrationtest/real-bidder/Dockerfile - restart: always - depends_on: - - bidder-1 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-1:13524 - networks: - - primev_net - ports: - - "8088:8080" - profiles: - - minimal-setup - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-2: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder2:/key - networks: - - primev_net - ports: - - "8089:13523" - env_file: - - integrationtest/.env - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-2: - build: - context: ../ - dockerfile: ./p2p/integrationtest/real-bidder/Dockerfile - restart: always - depends_on: - - bidder-2 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-2:13524 - networks: - - primev_net - ports: - - "8090:8080" - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-3: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder3:/key - networks: - - primev_net - ports: - - "8091:13523" - env_file: - - integrationtest/.env - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-3: - build: - context: ../ - dockerfile: ./p2p/integrationtest/real-bidder/Dockerfile - restart: always - depends_on: - - bidder-3 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-3:13524 - networks: - - primev_net - ports: - - "8092:8080" - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-4: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder4:/key - networks: - - primev_net - ports: - - "8093:13523" - env_file: - - integrationtest/.env - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-4: - build: - context: ../ - dockerfile: ./p2p/integrationtest/real-bidder/Dockerfile - restart: always - depends_on: - - bidder-4 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-4:13524 - networks: - - primev_net - ports: - - "8094:8080" - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-5: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder5:/key - networks: - - primev_net - ports: - - "8095:13523" - env_file: - - integrationtest/.env - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-5: - build: - context: ../ - dockerfile: ./p2p/integrationtest/real-bidder/Dockerfile - restart: always - depends_on: - - bidder-5 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-5:13524 - networks: - - primev_net - ports: - - "8096:8080" - profiles: - - e2etest - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - funder: - build: - context: ./integrationtest/foundry - env_file: - - integrationtest/.env - networks: - - primev_net - profiles: - - e2etest - -networks: - primev_net: - external: true \ No newline at end of file diff --git a/p2p/gen/go/bidderapi/v1/bidderapi.pb.go b/p2p/gen/go/bidderapi/v1/bidderapi.pb.go index 4d6c88f1b..29909d7ff 100644 --- a/p2p/gen/go/bidderapi/v1/bidderapi.pb.go +++ b/p2p/gen/go/bidderapi/v1/bidderapi.pb.go @@ -1224,288 +1224,289 @@ var file_bidderapi_v1_bidderapi_proto_rawDesc = []byte{ 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x20, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x33, 0x20, 0x7d, - 0x20, 0x5d, 0x7d, 0x22, 0xb3, 0x0d, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0xa3, 0x02, 0x0a, 0x09, + 0x20, 0x5d, 0x7d, 0x22, 0xbd, 0x0d, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0xa8, 0x02, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, - 0x85, 0x02, 0x92, 0x41, 0x78, 0x32, 0x64, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x8a, 0x02, 0x92, 0x41, 0x78, 0x32, 0x64, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, - 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0xba, 0x48, 0x86, - 0x01, 0xba, 0x01, 0x82, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0xba, 0x48, 0x8b, + 0x01, 0xba, 0x01, 0x87, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x36, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x3d, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, + 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x42, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, - 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, - 0x7d, 0x24, 0x27, 0x29, 0x29, 0x20, 0x26, 0x26, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x74, 0x68, - 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, - 0x73, 0x12, 0xed, 0x01, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0xd4, 0x01, 0x92, 0x41, 0x76, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x69, - 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, - 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0xba, 0x48, - 0x58, 0xba, 0x01, 0x55, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x2a, 0x74, - 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x30, - 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x28, - 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0xb9, 0x01, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x95, 0x01, 0x92, 0x41, 0x47, 0x32, 0x45, - 0x4d, 0x61, 0x78, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x69, 0x6e, 0x2e, 0xba, 0x48, 0x48, 0xba, 0x01, 0x45, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x25, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, - 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, - 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, - 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0xc2, 0x01, - 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x8d, 0x01, - 0x92, 0x41, 0x2d, 0x32, 0x2b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, - 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, - 0xba, 0x48, 0x5a, 0xba, 0x01, 0x57, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x64, - 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, - 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x13, 0x64, - 0x65, 0x63, 0x61, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0xb8, 0x01, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x87, 0x01, 0x92, 0x41, 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, - 0x69, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, - 0x2e, 0xba, 0x48, 0x56, 0xba, 0x01, 0x53, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, - 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2c, 0x64, 0x65, - 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, - 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x11, 0x64, 0x65, 0x63, 0x61, - 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x8a, 0x02, - 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0xd9, 0x01, 0x92, 0x41, - 0x49, 0x32, 0x47, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x72, 0x61, - 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x78, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x74, - 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, - 0x74, 0x6f, 0x20, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x62, 0x65, 0x20, - 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x65, 0x64, 0x2e, 0xba, 0x48, 0x89, 0x01, 0xba, 0x01, - 0x85, 0x01, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x41, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6d, 0x75, 0x73, - 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, - 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x2b, 0x74, 0x68, 0x69, 0x73, - 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, - 0x36, 0x34, 0x7d, 0x24, 0x27, 0x29, 0x29, 0x52, 0x11, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, - 0x6e, 0x67, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x3a, 0xcc, 0x02, 0x92, 0x41, 0xc8, - 0x02, 0x0a, 0x73, 0x2a, 0x0b, 0x42, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x32, 0x40, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, - 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x20, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x20, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0xd2, 0x01, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0xd2, 0x01, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x32, 0xd0, 0x01, 0x7b, 0x22, 0x74, 0x78, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x22, 0x66, 0x65, 0x34, 0x63, 0x62, 0x34, 0x37, - 0x64, 0x62, 0x33, 0x36, 0x33, 0x30, 0x35, 0x35, 0x31, 0x62, 0x65, 0x65, 0x64, 0x66, 0x62, 0x64, - 0x30, 0x32, 0x61, 0x37, 0x31, 0x65, 0x63, 0x63, 0x36, 0x39, 0x66, 0x64, 0x35, 0x39, 0x37, 0x35, - 0x38, 0x65, 0x32, 0x62, 0x61, 0x36, 0x39, 0x39, 0x36, 0x30, 0x36, 0x65, 0x32, 0x64, 0x35, 0x63, - 0x37, 0x34, 0x32, 0x38, 0x34, 0x66, 0x66, 0x61, 0x37, 0x22, 0x2c, 0x20, 0x22, 0x37, 0x31, 0x63, - 0x31, 0x33, 0x34, 0x38, 0x66, 0x32, 0x64, 0x37, 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, - 0x39, 0x63, 0x33, 0x36, 0x31, 0x37, 0x39, 0x38, 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, - 0x61, 0x37, 0x34, 0x34, 0x36, 0x64, 0x65, 0x34, 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, - 0x38, 0x62, 0x66, 0x31, 0x64, 0x65, 0x33, 0x35, 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x5d, 0x2c, - 0x20, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, - 0x2c, 0x20, 0x22, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, - 0x3a, 0x20, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x7d, 0x22, 0xda, 0x0b, 0x0a, 0x0a, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x78, 0x92, 0x41, - 0x75, 0x32, 0x61, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, - 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, + 0x27, 0x5e, 0x28, 0x30, 0x78, 0x29, 0x3f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, + 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x24, 0x27, 0x29, 0x29, 0x20, 0x26, 0x26, 0x20, 0x73, 0x69, + 0x7a, 0x65, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x08, 0x74, 0x78, + 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0xed, 0x01, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0xd4, 0x01, 0x92, 0x41, 0x76, 0x32, 0x6b, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, + 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, + 0x77, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, + 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x06, 0x5b, 0x30, 0x2d, + 0x39, 0x5d, 0x2b, 0xba, 0x48, 0x58, 0xba, 0x01, 0x55, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x1f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, + 0x72, 0x2e, 0x1a, 0x2a, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, + 0x28, 0x27, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0xb9, 0x01, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x95, 0x01, + 0x92, 0x41, 0x47, 0x32, 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, - 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, - 0x12, 0x8f, 0x01, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x70, 0x92, 0x41, 0x6d, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x67, - 0x72, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x6d, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x32, 0x45, 0x4d, - 0x61, 0x78, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, 0xba, 0x48, 0x48, 0xba, 0x01, 0x45, + 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x25, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, + 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0xc2, 0x01, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x8d, 0x01, 0x92, 0x41, 0x2d, 0x32, 0x2b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x62, 0x69, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x5a, 0xba, 0x01, 0x57, 0x0a, 0x15, 0x64, 0x65, 0x63, + 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x2e, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, + 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, + 0x20, 0x30, 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0xb8, 0x01, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x87, 0x01, 0x92, 0x41, 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, + 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x56, 0xba, 0x01, 0x53, 0x0a, 0x13, 0x64, 0x65, + 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x2c, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, + 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, + 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, + 0x11, 0x64, 0x65, 0x63, 0x61, 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x8f, 0x02, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, + 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, + 0x42, 0xde, 0x01, 0x92, 0x41, 0x49, 0x32, 0x47, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x78, 0x20, 0x68, 0x61, 0x73, + 0x68, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6f, + 0x72, 0x20, 0x62, 0x65, 0x20, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x65, 0x64, 0x2e, 0xba, + 0x48, 0x8e, 0x01, 0xba, 0x01, 0x8a, 0x01, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x41, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, + 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, + 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, + 0x30, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x28, 0x30, 0x78, 0x29, 0x3f, 0x5b, 0x61, + 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x24, 0x27, 0x29, + 0x29, 0x52, 0x11, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x48, 0x61, + 0x73, 0x68, 0x65, 0x73, 0x3a, 0xcc, 0x02, 0x92, 0x41, 0xc8, 0x02, 0x0a, 0x73, 0x2a, 0x0b, 0x42, + 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x40, 0x55, 0x6e, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x76, 0x2d, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0xd2, 0x01, 0x09, 0x74, + 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0xd2, 0x01, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0xd2, 0x01, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x32, 0xd0, 0x01, 0x7b, 0x22, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x22, 0x3a, + 0x20, 0x5b, 0x22, 0x66, 0x65, 0x34, 0x63, 0x62, 0x34, 0x37, 0x64, 0x62, 0x33, 0x36, 0x33, 0x30, + 0x35, 0x35, 0x31, 0x62, 0x65, 0x65, 0x64, 0x66, 0x62, 0x64, 0x30, 0x32, 0x61, 0x37, 0x31, 0x65, + 0x63, 0x63, 0x36, 0x39, 0x66, 0x64, 0x35, 0x39, 0x37, 0x35, 0x38, 0x65, 0x32, 0x62, 0x61, 0x36, + 0x39, 0x39, 0x36, 0x30, 0x36, 0x65, 0x32, 0x64, 0x35, 0x63, 0x37, 0x34, 0x32, 0x38, 0x34, 0x66, + 0x66, 0x61, 0x37, 0x22, 0x2c, 0x20, 0x22, 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, 0x38, 0x66, 0x32, + 0x64, 0x37, 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, 0x36, 0x31, 0x37, + 0x39, 0x38, 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, 0x34, 0x36, 0x64, + 0x65, 0x34, 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, 0x31, 0x64, 0x65, + 0x33, 0x35, 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x5d, 0x2c, 0x20, 0x22, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x7d, 0x22, 0xda, 0x0b, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x78, 0x92, 0x41, 0x75, 0x32, 0x61, 0x48, 0x65, 0x78, + 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x69, 0x6e, 0x2e, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x7b, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x69, - 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, - 0x92, 0x41, 0x48, 0x32, 0x46, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, - 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x11, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x7d, - 0x0a, 0x16, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x47, - 0x92, 0x41, 0x44, 0x32, 0x42, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, - 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, - 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, - 0x69, 0x73, 0x20, 0x62, 0x69, 0x64, 0x2e, 0x52, 0x14, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x42, 0x69, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x62, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x32, 0x30, 0x48, + 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, + 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, + 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x0a, 0x62, + 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x70, 0x92, 0x41, 0x6d, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, + 0x64, 0x65, 0x72, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x67, 0x72, 0x65, 0x65, 0x64, 0x20, 0x74, + 0x6f, 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x6d, 0x0a, 0x0c, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x32, 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, + 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x7b, 0x0a, 0x13, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, 0x92, 0x41, 0x48, 0x32, 0x46, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, - 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, - 0x74, 0x12, 0x9e, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x6b, 0x92, 0x41, 0x68, 0x32, 0x66, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x69, 0x73, - 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x13, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5d, 0x92, - 0x41, 0x5a, 0x32, 0x58, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, - 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, - 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x0f, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x64, 0x0a, - 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x30, 0x92, 0x41, - 0x2d, 0x32, 0x2b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, - 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x13, - 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x5e, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x2e, 0x92, 0x41, 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, - 0x64, 0x20, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, - 0x52, 0x11, 0x64, 0x65, 0x63, 0x61, 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x63, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, - 0x34, 0x92, 0x41, 0x31, 0x32, 0x2f, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, - 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x65, 0x64, 0x2e, 0x52, 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x7c, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, - 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, - 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, 0x4c, 0x92, 0x41, 0x49, 0x32, 0x47, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x78, - 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, - 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x76, 0x65, - 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x62, 0x65, 0x20, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, - 0x65, 0x64, 0x2e, 0x52, 0x11, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x78, - 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x32, 0xcc, 0x07, 0x0a, 0x06, 0x42, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x12, 0x53, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x69, 0x64, 0x12, 0x11, 0x2e, 0x62, - 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, 0x1a, - 0x18, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x2f, 0x62, 0x69, 0x64, 0x30, 0x01, 0x12, 0x6b, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x12, 0x1c, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, - 0x65, 0x72, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2f, 0x7b, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x7d, 0x12, 0x7b, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x12, 0x1c, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, - 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x5f, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2f, 0x7b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x7d, - 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x75, 0x74, 0x6f, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x26, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x75, 0x74, 0x6f, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, - 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, - 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x63, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x12, 0x80, 0x01, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x13, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x12, 0x28, 0x2e, - 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, + 0x64, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x11, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, + 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x7d, 0x0a, 0x16, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x47, 0x92, 0x41, 0x44, 0x32, 0x42, 0x48, + 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, + 0x61, 0x74, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x62, 0x69, 0x64, + 0x2e, 0x52, 0x14, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x69, 0x64, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x62, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x32, 0x30, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, + 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x9e, 0x01, 0x0a, 0x14, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x6b, 0x92, 0x41, 0x68, 0x32, + 0x66, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x88, 0x01, 0x0a, + 0x10, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5d, 0x92, 0x41, 0x5a, 0x32, 0x58, 0x48, 0x65, + 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x64, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x30, 0x92, 0x41, 0x2d, 0x32, 0x2b, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x64, + 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x5e, 0x0a, + 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x42, 0x2e, 0x92, 0x41, 0x2b, 0x32, + 0x29, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, + 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x73, + 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x11, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x63, 0x0a, + 0x12, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, 0x34, 0x92, 0x41, 0x31, 0x32, 0x2f, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, + 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x2e, 0x52, + 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x7c, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x4c, 0x92, 0x41, 0x49, 0x32, 0x47, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x61, + 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x78, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, + 0x62, 0x65, 0x20, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x65, 0x64, 0x2e, 0x52, 0x11, 0x72, + 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x32, 0xcc, 0x07, 0x0a, 0x06, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x07, 0x53, + 0x65, 0x6e, 0x64, 0x42, 0x69, 0x64, 0x12, 0x11, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, 0x1a, 0x18, 0x2e, 0x62, 0x69, 0x64, 0x64, + 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x69, 0x64, 0x30, 0x01, + 0x12, 0x6b, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1c, 0x2e, 0x62, 0x69, + 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x69, 0x64, 0x64, + 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, + 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x2f, 0x7b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x12, 0x7b, 0x0a, + 0x0b, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1c, 0x2e, 0x62, + 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x69, 0x64, + 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, + 0x64, 0x64, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x2f, 0x7b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x12, 0x26, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x75, + 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, + 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, + 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x80, 0x01, 0x0a, + 0x11, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, + 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, + 0x74, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, + 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x6f, + 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x97, 0x01, 0x0a, 0x13, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, + 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, - 0x72, 0x6f, 0x6d, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, - 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x12, - 0x6c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1f, 0x2e, - 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x66, 0x0a, - 0x08, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x1d, 0x2e, 0x62, 0x69, 0x64, 0x64, - 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, - 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x77, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x42, 0xaa, 0x02, 0x92, 0x41, 0x72, 0x12, 0x70, 0x0a, 0x0a, 0x42, - 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x2a, 0x55, 0x0a, 0x1b, 0x42, 0x75, 0x73, - 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x4c, 0x69, 0x63, - 0x65, 0x6e, 0x73, 0x65, 0x20, 0x31, 0x2e, 0x31, 0x12, 0x36, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, - 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, - 0x6d, 0x65, 0x76, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x62, - 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, - 0x32, 0x0b, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x0a, 0x10, 0x63, - 0x6f, 0x6d, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, - 0x0e, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, - 0x69, 0x6d, 0x65, 0x76, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, - 0x70, 0x32, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x42, 0x69, 0x64, 0x64, - 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x42, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0d, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x6d, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x69, 0x6e, + 0x64, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, + 0x64, 0x65, 0x72, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x66, 0x72, 0x6f, + 0x6d, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x12, 0x6c, 0x0a, 0x0a, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1f, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, + 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x12, 0x1d, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, + 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x42, + 0xaa, 0x02, 0x92, 0x41, 0x72, 0x12, 0x70, 0x0a, 0x0a, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, + 0x41, 0x50, 0x49, 0x2a, 0x55, 0x0a, 0x1b, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x31, + 0x2e, 0x31, 0x12, 0x36, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x2f, 0x6d, 0x65, + 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, + 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x0b, 0x31, 0x2e, 0x30, 0x2e, + 0x30, 0x2d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x69, 0x64, + 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x69, 0x64, 0x64, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x2f, 0x6d, + 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x3b, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x42, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x0c, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x18, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x42, + 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/p2p/gen/go/bidderapi/v1/bidderapi.pb.gw.go b/p2p/gen/go/bidderapi/v1/bidderapi.pb.gw.go index 9e474fa24..cf4b45570 100644 --- a/p2p/gen/go/bidderapi/v1/bidderapi.pb.gw.go +++ b/p2p/gen/go/bidderapi/v1/bidderapi.pb.gw.go @@ -328,6 +328,7 @@ func local_request_Bidder_Withdraw_0(ctx context.Context, marshaler runtime.Mars // UnaryRPC :call BidderServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBidderHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterBidderHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BidderServer) error { mux.Handle("POST", pattern_Bidder_SendBid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -550,7 +551,7 @@ func RegisterBidderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BidderClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BidderClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "BidderClient" to call the correct interceptors. +// "BidderClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterBidderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BidderClient) error { mux.Handle("POST", pattern_Bidder_SendBid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/p2p/gen/go/bidderapi/v1/bidderapi_grpc.pb.go b/p2p/gen/go/bidderapi/v1/bidderapi_grpc.pb.go index 43f42ed12..314b0d6a8 100644 --- a/p2p/gen/go/bidderapi/v1/bidderapi_grpc.pb.go +++ b/p2p/gen/go/bidderapi/v1/bidderapi_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: bidderapi/v1/bidderapi.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Bidder_SendBid_FullMethodName = "/bidderapi.v1.Bidder/SendBid" @@ -36,7 +36,7 @@ type BidderClient interface { // SendBid // // Send a bid to the bidder mev-commit node. - SendBid(ctx context.Context, in *Bid, opts ...grpc.CallOption) (Bidder_SendBidClient, error) + SendBid(ctx context.Context, in *Bid, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Commitment], error) // Deposit // // Deposit is called by the bidder node to add deposit in the bidder registry. @@ -75,13 +75,13 @@ func NewBidderClient(cc grpc.ClientConnInterface) BidderClient { return &bidderClient{cc} } -func (c *bidderClient) SendBid(ctx context.Context, in *Bid, opts ...grpc.CallOption) (Bidder_SendBidClient, error) { +func (c *bidderClient) SendBid(ctx context.Context, in *Bid, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Commitment], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &Bidder_ServiceDesc.Streams[0], Bidder_SendBid_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &bidderSendBidClient{ClientStream: stream} + x := &grpc.GenericClientStream[Bid, Commitment]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -91,22 +91,8 @@ func (c *bidderClient) SendBid(ctx context.Context, in *Bid, opts ...grpc.CallOp return x, nil } -type Bidder_SendBidClient interface { - Recv() (*Commitment, error) - grpc.ClientStream -} - -type bidderSendBidClient struct { - grpc.ClientStream -} - -func (x *bidderSendBidClient) Recv() (*Commitment, error) { - m := new(Commitment) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Bidder_SendBidClient = grpc.ServerStreamingClient[Commitment] func (c *bidderClient) Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*DepositResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) @@ -180,12 +166,12 @@ func (c *bidderClient) Withdraw(ctx context.Context, in *WithdrawRequest, opts . // BidderServer is the server API for Bidder service. // All implementations must embed UnimplementedBidderServer -// for forward compatibility +// for forward compatibility. type BidderServer interface { // SendBid // // Send a bid to the bidder mev-commit node. - SendBid(*Bid, Bidder_SendBidServer) error + SendBid(*Bid, grpc.ServerStreamingServer[Commitment]) error // Deposit // // Deposit is called by the bidder node to add deposit in the bidder registry. @@ -217,11 +203,14 @@ type BidderServer interface { mustEmbedUnimplementedBidderServer() } -// UnimplementedBidderServer must be embedded to have forward compatible implementations. -type UnimplementedBidderServer struct { -} +// UnimplementedBidderServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedBidderServer struct{} -func (UnimplementedBidderServer) SendBid(*Bid, Bidder_SendBidServer) error { +func (UnimplementedBidderServer) SendBid(*Bid, grpc.ServerStreamingServer[Commitment]) error { return status.Errorf(codes.Unimplemented, "method SendBid not implemented") } func (UnimplementedBidderServer) Deposit(context.Context, *DepositRequest) (*DepositResponse, error) { @@ -246,6 +235,7 @@ func (UnimplementedBidderServer) Withdraw(context.Context, *WithdrawRequest) (*W return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") } func (UnimplementedBidderServer) mustEmbedUnimplementedBidderServer() {} +func (UnimplementedBidderServer) testEmbeddedByValue() {} // UnsafeBidderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BidderServer will @@ -255,6 +245,13 @@ type UnsafeBidderServer interface { } func RegisterBidderServer(s grpc.ServiceRegistrar, srv BidderServer) { + // If the following call pancis, it indicates UnimplementedBidderServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Bidder_ServiceDesc, srv) } @@ -263,21 +260,11 @@ func _Bidder_SendBid_Handler(srv interface{}, stream grpc.ServerStream) error { if err := stream.RecvMsg(m); err != nil { return err } - return srv.(BidderServer).SendBid(m, &bidderSendBidServer{ServerStream: stream}) -} - -type Bidder_SendBidServer interface { - Send(*Commitment) error - grpc.ServerStream + return srv.(BidderServer).SendBid(m, &grpc.GenericServerStream[Bid, Commitment]{ServerStream: stream}) } -type bidderSendBidServer struct { - grpc.ServerStream -} - -func (x *bidderSendBidServer) Send(m *Commitment) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Bidder_SendBidServer = grpc.ServerStreamingServer[Commitment] func _Bidder_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DepositRequest) diff --git a/p2p/gen/go/debugapi/v1/debugapi.pb.gw.go b/p2p/gen/go/debugapi/v1/debugapi.pb.gw.go index c01da47a2..89bc8c901 100644 --- a/p2p/gen/go/debugapi/v1/debugapi.pb.gw.go +++ b/p2p/gen/go/debugapi/v1/debugapi.pb.gw.go @@ -123,6 +123,7 @@ func local_request_DebugService_CancelTransaction_0(ctx context.Context, marshal // UnaryRPC :call DebugServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDebugServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterDebugServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DebugServiceServer) error { mux.Handle("GET", pattern_DebugService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -238,7 +239,7 @@ func RegisterDebugServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DebugServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DebugServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "DebugServiceClient" to call the correct interceptors. +// "DebugServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterDebugServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DebugServiceClient) error { mux.Handle("GET", pattern_DebugService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/p2p/gen/go/debugapi/v1/debugapi_grpc.pb.go b/p2p/gen/go/debugapi/v1/debugapi_grpc.pb.go index e98cb2f11..20f4ffc94 100644 --- a/p2p/gen/go/debugapi/v1/debugapi_grpc.pb.go +++ b/p2p/gen/go/debugapi/v1/debugapi_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: debugapi/v1/debugapi.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( DebugService_GetTopology_FullMethodName = "/debugapi.v1.DebugService/GetTopology" @@ -83,7 +83,7 @@ func (c *debugServiceClient) CancelTransaction(ctx context.Context, in *CancelTr // DebugServiceServer is the server API for DebugService service. // All implementations must embed UnimplementedDebugServiceServer -// for forward compatibility +// for forward compatibility. type DebugServiceServer interface { // GetTopology // @@ -101,9 +101,12 @@ type DebugServiceServer interface { mustEmbedUnimplementedDebugServiceServer() } -// UnimplementedDebugServiceServer must be embedded to have forward compatible implementations. -type UnimplementedDebugServiceServer struct { -} +// UnimplementedDebugServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDebugServiceServer struct{} func (UnimplementedDebugServiceServer) GetTopology(context.Context, *EmptyMessage) (*TopologyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTopology not implemented") @@ -115,6 +118,7 @@ func (UnimplementedDebugServiceServer) CancelTransaction(context.Context, *Cance return nil, status.Errorf(codes.Unimplemented, "method CancelTransaction not implemented") } func (UnimplementedDebugServiceServer) mustEmbedUnimplementedDebugServiceServer() {} +func (UnimplementedDebugServiceServer) testEmbeddedByValue() {} // UnsafeDebugServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DebugServiceServer will @@ -124,6 +128,13 @@ type UnsafeDebugServiceServer interface { } func RegisterDebugServiceServer(s grpc.ServiceRegistrar, srv DebugServiceServer) { + // If the following call pancis, it indicates UnimplementedDebugServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&DebugService_ServiceDesc, srv) } diff --git a/p2p/gen/go/providerapi/v1/providerapi.pb.go b/p2p/gen/go/providerapi/v1/providerapi.pb.go index 4f7e08e53..7978a2e16 100644 --- a/p2p/gen/go/providerapi/v1/providerapi.pb.go +++ b/p2p/gen/go/providerapi/v1/providerapi.pb.go @@ -69,7 +69,7 @@ func (x BidResponse_Status) Number() protoreflect.EnumNumber { // Deprecated: Use BidResponse_Status.Descriptor instead. func (BidResponse_Status) EnumDescriptor() ([]byte, []int) { - return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{4, 0} + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{5, 0} } type StakeRequest struct { @@ -182,6 +182,53 @@ func (x *StakeResponse) GetBlsPublicKey() string { return "" } +type WithdrawalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *WithdrawalResponse) Reset() { + *x = WithdrawalResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WithdrawalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawalResponse) ProtoMessage() {} + +func (x *WithdrawalResponse) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_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 WithdrawalResponse.ProtoReflect.Descriptor instead. +func (*WithdrawalResponse) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{2} +} + +func (x *WithdrawalResponse) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + type EmptyMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -191,7 +238,7 @@ type EmptyMessage struct { func (x *EmptyMessage) Reset() { *x = EmptyMessage{} if protoimpl.UnsafeEnabled { - mi := &file_providerapi_v1_providerapi_proto_msgTypes[2] + mi := &file_providerapi_v1_providerapi_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -204,7 +251,7 @@ func (x *EmptyMessage) String() string { func (*EmptyMessage) ProtoMessage() {} func (x *EmptyMessage) ProtoReflect() protoreflect.Message { - mi := &file_providerapi_v1_providerapi_proto_msgTypes[2] + mi := &file_providerapi_v1_providerapi_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -217,7 +264,7 @@ func (x *EmptyMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead. func (*EmptyMessage) Descriptor() ([]byte, []int) { - return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{2} + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{3} } type Bid struct { @@ -237,7 +284,7 @@ type Bid struct { func (x *Bid) Reset() { *x = Bid{} if protoimpl.UnsafeEnabled { - mi := &file_providerapi_v1_providerapi_proto_msgTypes[3] + mi := &file_providerapi_v1_providerapi_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -250,7 +297,7 @@ func (x *Bid) String() string { func (*Bid) ProtoMessage() {} func (x *Bid) ProtoReflect() protoreflect.Message { - mi := &file_providerapi_v1_providerapi_proto_msgTypes[3] + mi := &file_providerapi_v1_providerapi_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -263,7 +310,7 @@ func (x *Bid) ProtoReflect() protoreflect.Message { // Deprecated: Use Bid.ProtoReflect.Descriptor instead. func (*Bid) Descriptor() ([]byte, []int) { - return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{3} + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{4} } func (x *Bid) GetTxHashes() []string { @@ -328,7 +375,7 @@ type BidResponse struct { func (x *BidResponse) Reset() { *x = BidResponse{} if protoimpl.UnsafeEnabled { - mi := &file_providerapi_v1_providerapi_proto_msgTypes[4] + mi := &file_providerapi_v1_providerapi_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -341,7 +388,7 @@ func (x *BidResponse) String() string { func (*BidResponse) ProtoMessage() {} func (x *BidResponse) ProtoReflect() protoreflect.Message { - mi := &file_providerapi_v1_providerapi_proto_msgTypes[4] + mi := &file_providerapi_v1_providerapi_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -354,7 +401,7 @@ func (x *BidResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BidResponse.ProtoReflect.Descriptor instead. func (*BidResponse) Descriptor() ([]byte, []int) { - return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{4} + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{5} } func (x *BidResponse) GetBidDigest() []byte { @@ -453,229 +500,254 @@ var file_providerapi_v1_providerapi_proto_rawDesc = []byte{ 0x35, 0x32, 0x30, 0x39, 0x65, 0x38, 0x31, 0x32, 0x61, 0x62, 0x62, 0x61, 0x63, 0x37, 0x65, 0x38, 0x37, 0x30, 0x34, 0x38, 0x32, 0x65, 0x34, 0x38, 0x38, 0x64, 0x64, 0x31, 0x62, 0x62, 0x65, 0x35, 0x33, 0x33, 0x61, 0x39, 0x64, 0x34, 0x34, 0x39, 0x37, 0x62, 0x61, 0x38, 0x62, 0x37, 0x35, 0x36, - 0x65, 0x31, 0x65, 0x38, 0x32, 0x62, 0x22, 0x7d, 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xbe, 0x0e, 0x0a, 0x03, 0x42, 0x69, 0x64, - 0x12, 0xa3, 0x02, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x85, 0x02, 0x92, 0x41, 0x78, 0x32, 0x64, 0x48, 0x65, 0x78, 0x20, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, - 0x34, 0x7d, 0xba, 0x48, 0x86, 0x01, 0xba, 0x01, 0x82, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x36, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, - 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x3d, 0x74, - 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, - 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x24, 0x27, 0x29, 0x29, 0x20, 0x26, 0x26, 0x20, 0x73, 0x69, - 0x7a, 0x65, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x08, 0x74, 0x78, - 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0xfc, 0x01, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0xdc, 0x01, 0x92, 0x41, - 0x76, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, - 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x20, 0x69, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x70, - 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, - 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0xba, 0x48, 0x60, 0xba, 0x01, 0x5d, 0x0a, 0x0a, 0x62, - 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x62, 0x69, 0x64, 0x5f, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x2a, - 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, - 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, 0x6e, 0x74, - 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x74, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x51, 0x92, 0x41, 0x47, - 0x32, 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, - 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, 0xba, 0x48, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x0b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0a, 0x62, - 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x3d, 0x92, 0x41, 0x31, 0x32, 0x2f, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, - 0x64, 0x64, 0x65, 0x72, 0x2e, 0xba, 0x48, 0x06, 0x7a, 0x04, 0x10, 0x01, 0x18, 0x40, 0x52, 0x09, - 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x15, 0x64, 0x65, - 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x8d, 0x01, 0x92, 0x41, 0x2d, 0x32, - 0x2b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, - 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x5a, 0xba, - 0x01, 0x57, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x64, 0x65, 0x63, 0x61, 0x79, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, - 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0xb8, - 0x01, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x87, 0x01, 0x92, - 0x41, 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, - 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x65, - 0x6e, 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x56, - 0xba, 0x01, 0x53, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2c, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, - 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, - 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, - 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, - 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x11, 0x64, 0x65, 0x63, 0x61, 0x79, 0x45, 0x6e, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x8a, 0x02, 0x0a, 0x13, 0x72, 0x65, - 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, 0xd9, 0x01, 0x92, 0x41, 0x49, 0x32, 0x47, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x78, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, - 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x72, - 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x62, 0x65, 0x20, 0x64, 0x69, 0x73, 0x63, - 0x61, 0x72, 0x64, 0x65, 0x64, 0x2e, 0xba, 0x48, 0x89, 0x01, 0xba, 0x01, 0x85, 0x01, 0x0a, 0x13, - 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x65, 0x73, 0x12, 0x41, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, + 0x65, 0x31, 0x65, 0x38, 0x32, 0x62, 0x22, 0x7d, 0x22, 0xa5, 0x01, 0x0a, 0x12, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x77, 0x92, 0x41, 0x74, 0x0a, 0x4f, 0x2a, 0x13, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0x38, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x20, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x32, 0x21, 0x7b, + 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, + 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0xbe, 0x0e, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0xa3, 0x02, 0x0a, 0x09, 0x74, 0x78, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x85, 0x02, 0x92, + 0x41, 0x78, 0x32, 0x64, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, + 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, + 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, + 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0xba, 0x48, 0x86, 0x01, 0xba, 0x01, + 0x82, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x36, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, - 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, - 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x2b, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, - 0x28, 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, - 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x24, - 0x27, 0x29, 0x29, 0x52, 0x11, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x78, - 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x3a, 0xb0, 0x03, 0x92, 0x41, 0xac, 0x03, 0x0a, 0x70, 0x2a, - 0x0b, 0x42, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x30, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0xd2, 0x01, - 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0xd2, 0x01, 0x09, 0x62, 0x69, 0x64, 0x41, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0xd2, 0x01, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x32, - 0xb7, 0x02, 0x7b, 0x22, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, - 0x22, 0x66, 0x65, 0x34, 0x63, 0x62, 0x34, 0x37, 0x64, 0x62, 0x33, 0x36, 0x33, 0x30, 0x35, 0x35, - 0x31, 0x62, 0x65, 0x65, 0x64, 0x66, 0x62, 0x64, 0x30, 0x32, 0x61, 0x37, 0x31, 0x65, 0x63, 0x63, - 0x36, 0x39, 0x66, 0x64, 0x35, 0x39, 0x37, 0x35, 0x38, 0x65, 0x32, 0x62, 0x61, 0x36, 0x39, 0x39, - 0x36, 0x30, 0x36, 0x65, 0x32, 0x64, 0x35, 0x63, 0x37, 0x34, 0x32, 0x38, 0x34, 0x66, 0x66, 0x61, - 0x37, 0x22, 0x2c, 0x20, 0x22, 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, 0x38, 0x66, 0x32, 0x64, 0x37, - 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, 0x36, 0x31, 0x37, 0x39, 0x38, - 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, 0x34, 0x36, 0x64, 0x65, 0x34, - 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, 0x31, 0x64, 0x65, 0x33, 0x35, - 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x5d, 0x2c, 0x20, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x2c, - 0x20, 0x22, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x39, - 0x64, 0x4a, 0x69, 0x6e, 0x77, 0x4c, 0x2b, 0x46, 0x5a, 0x36, 0x42, 0x31, 0x78, 0x73, 0x49, 0x51, - 0x51, 0x6f, 0x38, 0x74, 0x38, 0x42, 0x30, 0x5a, 0x58, 0x4a, 0x75, 0x62, 0x4a, 0x77, 0x59, 0x38, - 0x36, 0x6c, 0x2f, 0x59, 0x75, 0x37, 0x79, 0x41, 0x48, 0x31, 0x35, 0x39, 0x51, 0x72, 0x50, 0x48, - 0x55, 0x30, 0x71, 0x6a, 0x32, 0x50, 0x2b, 0x59, 0x46, 0x6a, 0x2b, 0x6c, 0x6c, 0x62, 0x75, 0x49, - 0x31, 0x5a, 0x79, 0x67, 0x64, 0x78, 0x47, 0x73, 0x58, 0x38, 0x2b, 0x50, 0x33, 0x62, 0x79, 0x4d, - 0x45, 0x41, 0x35, 0x69, 0x67, 0x3d, 0x3d, 0x22, 0x7d, 0x22, 0x81, 0x06, 0x0a, 0x0b, 0x42, 0x69, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0a, 0x62, 0x69, 0x64, - 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x34, 0x92, - 0x41, 0x31, 0x32, 0x2f, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, - 0x65, 0x72, 0x2e, 0x52, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x5f, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x42, 0x23, 0x92, 0x41, 0x14, 0x32, 0x12, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x2e, 0xba, 0x48, 0x09, 0x82, 0x01, - 0x06, 0x10, 0x01, 0x1a, 0x02, 0x01, 0x02, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0xb4, 0x01, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x84, 0x01, 0x92, - 0x41, 0x80, 0x01, 0x32, 0x7e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, - 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x61, - 0x6e, 0x64, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x20, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x75, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4a, 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, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, - 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, - 0x10, 0x02, 0x3a, 0xb8, 0x02, 0x92, 0x41, 0xb4, 0x02, 0x0a, 0x82, 0x01, 0x2a, 0x0c, 0x42, 0x69, - 0x64, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x44, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x2e, - 0xd2, 0x01, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0xd2, 0x01, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0xd2, 0x01, 0x16, 0x64, 0x65, 0x63, 0x61, 0x79, 0x44, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xac, - 0x01, 0x7b, 0x22, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, - 0x39, 0x64, 0x4a, 0x69, 0x6e, 0x77, 0x4c, 0x2b, 0x46, 0x5a, 0x36, 0x42, 0x31, 0x78, 0x73, 0x49, - 0x51, 0x51, 0x6f, 0x38, 0x74, 0x38, 0x42, 0x30, 0x5a, 0x58, 0x4a, 0x75, 0x62, 0x4a, 0x77, 0x59, - 0x38, 0x36, 0x6c, 0x2f, 0x59, 0x75, 0x37, 0x79, 0x41, 0x48, 0x31, 0x35, 0x39, 0x51, 0x72, 0x50, - 0x48, 0x55, 0x30, 0x71, 0x6a, 0x32, 0x50, 0x2b, 0x59, 0x46, 0x6a, 0x2b, 0x6c, 0x6c, 0x62, 0x75, - 0x49, 0x31, 0x5a, 0x79, 0x67, 0x64, 0x78, 0x47, 0x73, 0x58, 0x38, 0x2b, 0x50, 0x33, 0x62, 0x79, - 0x4d, 0x45, 0x41, 0x35, 0x69, 0x67, 0x3d, 0x3d, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x3a, 0x20, 0x22, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, - 0x45, 0x50, 0x54, 0x45, 0x44, 0x22, 0x2c, 0x20, 0x22, 0x64, 0x65, 0x63, 0x61, 0x79, 0x44, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, - 0x3a, 0x20, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x7d, 0x32, 0xc5, 0x04, - 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x0b, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x42, 0x69, 0x64, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, 0x22, 0x21, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x2f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x62, 0x69, 0x64, 0x73, 0x30, - 0x01, 0x12, 0x7d, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x65, 0x64, 0x42, 0x69, 0x64, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, + 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x3d, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, + 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, + 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x24, 0x27, + 0x29, 0x29, 0x20, 0x26, 0x26, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, + 0x20, 0x3e, 0x20, 0x30, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0xfc, + 0x01, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0xdc, 0x01, 0x92, 0x41, 0x76, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, + 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0xba, + 0x48, 0x60, 0xba, 0x01, 0x5d, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x23, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, + 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x2a, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, 0x29, + 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, + 0x20, 0x30, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x74, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x51, 0x92, 0x41, 0x47, 0x32, 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, + 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, 0xba, + 0x48, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x3d, 0x92, 0x41, 0x31, 0x32, 0x2f, 0x44, 0x69, + 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, + 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2e, 0xba, 0x48, 0x06, + 0x7a, 0x04, 0x10, 0x01, 0x18, 0x40, 0x52, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x8d, 0x01, 0x92, 0x41, 0x2d, 0x32, 0x2b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x62, 0x69, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, + 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x5a, 0xba, 0x01, 0x57, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x2e, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, + 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, + 0x30, 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0xb8, 0x01, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, + 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x87, 0x01, 0x92, 0x41, 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x56, 0xba, 0x01, 0x53, 0x0a, 0x13, 0x64, 0x65, 0x63, + 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x2c, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, + 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x11, + 0x64, 0x65, 0x63, 0x61, 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x8a, 0x02, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, + 0xd9, 0x01, 0x92, 0x41, 0x49, 0x32, 0x47, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, + 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x78, 0x20, 0x68, 0x61, 0x73, 0x68, + 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6f, 0x72, + 0x20, 0x62, 0x65, 0x20, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x65, 0x64, 0x2e, 0xba, 0x48, + 0x89, 0x01, 0xba, 0x01, 0x85, 0x01, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x41, 0x72, 0x65, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, + 0x79, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x2b, + 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, + 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x24, 0x27, 0x29, 0x29, 0x52, 0x11, 0x72, 0x65, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x3a, 0xb0, + 0x03, 0x92, 0x41, 0xac, 0x03, 0x0a, 0x70, 0x2a, 0x0b, 0x42, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x69, 0x64, + 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, + 0x64, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0xd2, 0x01, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, + 0x73, 0xd2, 0x01, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0xd2, 0x01, 0x09, 0x62, 0x69, + 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x32, 0xb7, 0x02, 0x7b, 0x22, 0x74, 0x78, 0x48, 0x61, + 0x73, 0x68, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x22, 0x66, 0x65, 0x34, 0x63, 0x62, 0x34, 0x37, + 0x64, 0x62, 0x33, 0x36, 0x33, 0x30, 0x35, 0x35, 0x31, 0x62, 0x65, 0x65, 0x64, 0x66, 0x62, 0x64, + 0x30, 0x32, 0x61, 0x37, 0x31, 0x65, 0x63, 0x63, 0x36, 0x39, 0x66, 0x64, 0x35, 0x39, 0x37, 0x35, + 0x38, 0x65, 0x32, 0x62, 0x61, 0x36, 0x39, 0x39, 0x36, 0x30, 0x36, 0x65, 0x32, 0x64, 0x35, 0x63, + 0x37, 0x34, 0x32, 0x38, 0x34, 0x66, 0x66, 0x61, 0x37, 0x22, 0x2c, 0x20, 0x22, 0x37, 0x31, 0x63, + 0x31, 0x33, 0x34, 0x38, 0x66, 0x32, 0x64, 0x37, 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, + 0x39, 0x63, 0x33, 0x36, 0x31, 0x37, 0x39, 0x38, 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, + 0x61, 0x37, 0x34, 0x34, 0x36, 0x64, 0x65, 0x34, 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, + 0x38, 0x62, 0x66, 0x31, 0x64, 0x65, 0x33, 0x35, 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x5d, 0x2c, + 0x20, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, + 0x2c, 0x20, 0x22, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, + 0x20, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, + 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x39, 0x64, 0x4a, 0x69, 0x6e, 0x77, 0x4c, 0x2b, 0x46, + 0x5a, 0x36, 0x42, 0x31, 0x78, 0x73, 0x49, 0x51, 0x51, 0x6f, 0x38, 0x74, 0x38, 0x42, 0x30, 0x5a, + 0x58, 0x4a, 0x75, 0x62, 0x4a, 0x77, 0x59, 0x38, 0x36, 0x6c, 0x2f, 0x59, 0x75, 0x37, 0x79, 0x41, + 0x48, 0x31, 0x35, 0x39, 0x51, 0x72, 0x50, 0x48, 0x55, 0x30, 0x71, 0x6a, 0x32, 0x50, 0x2b, 0x59, + 0x46, 0x6a, 0x2b, 0x6c, 0x6c, 0x62, 0x75, 0x49, 0x31, 0x5a, 0x79, 0x67, 0x64, 0x78, 0x47, 0x73, + 0x58, 0x38, 0x2b, 0x50, 0x33, 0x62, 0x79, 0x4d, 0x45, 0x41, 0x35, 0x69, 0x67, 0x3d, 0x3d, 0x22, + 0x7d, 0x22, 0x81, 0x06, 0x0a, 0x0b, 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x53, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x34, 0x92, 0x41, 0x31, 0x32, 0x2f, 0x44, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x09, 0x62, 0x69, 0x64, + 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, - 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x5f, - 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x73, 0x28, 0x01, - 0x12, 0x7a, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x2f, 0x7b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x12, 0x67, 0x0a, 0x08, - 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x6e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x6e, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x42, 0xbc, 0x02, 0x92, 0x41, 0x74, 0x12, 0x72, 0x0a, 0x0c, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x2a, 0x55, 0x0a, 0x1b, 0x42, - 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x4c, - 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x31, 0x2e, 0x31, 0x12, 0x36, 0x68, 0x74, 0x74, 0x70, - 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x72, 0x69, 0x6d, 0x65, 0x76, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, - 0x53, 0x45, 0x32, 0x0b, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x0a, - 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x42, 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x23, 0x92, 0x41, 0x14, 0x32, + 0x12, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, + 0x69, 0x64, 0x2e, 0xba, 0x48, 0x09, 0x82, 0x01, 0x06, 0x10, 0x01, 0x1a, 0x02, 0x01, 0x02, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xb4, 0x01, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x84, 0x01, 0x92, 0x41, 0x80, 0x01, 0x32, 0x7e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, + 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x76, 0x65, 0x6e, + 0x75, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x64, 0x69, 0x73, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4a, + 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, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, + 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x3a, 0xb8, 0x02, 0x92, 0x41, 0xb4, + 0x02, 0x0a, 0x82, 0x01, 0x2a, 0x0c, 0x42, 0x69, 0x64, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x73, 0x65, 0x6e, + 0x74, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x2e, 0xd2, 0x01, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, + 0x67, 0x65, 0x73, 0x74, 0xd2, 0x01, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0xd2, 0x01, 0x16, + 0x64, 0x65, 0x63, 0x61, 0x79, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xac, 0x01, 0x7b, 0x22, 0x62, 0x69, 0x64, 0x44, 0x69, + 0x67, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x39, 0x64, 0x4a, 0x69, 0x6e, 0x77, 0x4c, 0x2b, + 0x46, 0x5a, 0x36, 0x42, 0x31, 0x78, 0x73, 0x49, 0x51, 0x51, 0x6f, 0x38, 0x74, 0x38, 0x42, 0x30, + 0x5a, 0x58, 0x4a, 0x75, 0x62, 0x4a, 0x77, 0x59, 0x38, 0x36, 0x6c, 0x2f, 0x59, 0x75, 0x37, 0x79, + 0x41, 0x48, 0x31, 0x35, 0x39, 0x51, 0x72, 0x50, 0x48, 0x55, 0x30, 0x71, 0x6a, 0x32, 0x50, 0x2b, + 0x59, 0x46, 0x6a, 0x2b, 0x6c, 0x6c, 0x62, 0x75, 0x49, 0x31, 0x5a, 0x79, 0x67, 0x64, 0x78, 0x47, + 0x73, 0x58, 0x38, 0x2b, 0x50, 0x33, 0x62, 0x79, 0x4d, 0x45, 0x41, 0x35, 0x69, 0x67, 0x3d, 0x3d, + 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x20, 0x22, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x22, 0x2c, 0x20, + 0x22, 0x64, 0x65, 0x63, 0x61, 0x79, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + 0x37, 0x38, 0x39, 0x30, 0x7d, 0x32, 0xa2, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x12, 0x65, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x42, 0x69, 0x64, + 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, + 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x69, 0x64, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x5f, 0x62, 0x69, 0x64, 0x73, 0x30, 0x01, 0x12, 0x7d, 0x0a, 0x11, 0x53, 0x65, 0x6e, + 0x64, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x69, 0x64, 0x73, 0x12, 0x1b, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x1c, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x5f, 0x62, 0x69, 0x64, 0x73, 0x28, 0x01, 0x12, 0x7a, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x24, + 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x2f, 0x7b, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x7d, 0x12, 0x67, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1d, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x6e, 0x0a, + 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1c, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, + 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x76, 0x0a, + 0x0d, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1c, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x22, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x63, 0x0a, 0x07, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1c, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x2f, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x42, 0xbc, 0x02, 0x92, 0x41, 0x74, + 0x12, 0x72, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, + 0x2a, 0x55, 0x0a, 0x1b, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x31, 0x2e, 0x31, 0x12, + 0x36, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x50, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, - 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, + 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x0b, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x2f, + 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -691,29 +763,34 @@ func file_providerapi_v1_providerapi_proto_rawDescGZIP() []byte { } var file_providerapi_v1_providerapi_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_providerapi_v1_providerapi_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_providerapi_v1_providerapi_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_providerapi_v1_providerapi_proto_goTypes = []interface{}{ - (BidResponse_Status)(0), // 0: providerapi.v1.BidResponse.Status - (*StakeRequest)(nil), // 1: providerapi.v1.StakeRequest - (*StakeResponse)(nil), // 2: providerapi.v1.StakeResponse - (*EmptyMessage)(nil), // 3: providerapi.v1.EmptyMessage - (*Bid)(nil), // 4: providerapi.v1.Bid - (*BidResponse)(nil), // 5: providerapi.v1.BidResponse + (BidResponse_Status)(0), // 0: providerapi.v1.BidResponse.Status + (*StakeRequest)(nil), // 1: providerapi.v1.StakeRequest + (*StakeResponse)(nil), // 2: providerapi.v1.StakeResponse + (*WithdrawalResponse)(nil), // 3: providerapi.v1.WithdrawalResponse + (*EmptyMessage)(nil), // 4: providerapi.v1.EmptyMessage + (*Bid)(nil), // 5: providerapi.v1.Bid + (*BidResponse)(nil), // 6: providerapi.v1.BidResponse } var file_providerapi_v1_providerapi_proto_depIdxs = []int32{ 0, // 0: providerapi.v1.BidResponse.status:type_name -> providerapi.v1.BidResponse.Status - 3, // 1: providerapi.v1.Provider.ReceiveBids:input_type -> providerapi.v1.EmptyMessage - 5, // 2: providerapi.v1.Provider.SendProcessedBids:input_type -> providerapi.v1.BidResponse + 4, // 1: providerapi.v1.Provider.ReceiveBids:input_type -> providerapi.v1.EmptyMessage + 6, // 2: providerapi.v1.Provider.SendProcessedBids:input_type -> providerapi.v1.BidResponse 1, // 3: providerapi.v1.Provider.RegisterStake:input_type -> providerapi.v1.StakeRequest - 3, // 4: providerapi.v1.Provider.GetStake:input_type -> providerapi.v1.EmptyMessage - 3, // 5: providerapi.v1.Provider.GetMinStake:input_type -> providerapi.v1.EmptyMessage - 4, // 6: providerapi.v1.Provider.ReceiveBids:output_type -> providerapi.v1.Bid - 3, // 7: providerapi.v1.Provider.SendProcessedBids:output_type -> providerapi.v1.EmptyMessage - 2, // 8: providerapi.v1.Provider.RegisterStake:output_type -> providerapi.v1.StakeResponse - 2, // 9: providerapi.v1.Provider.GetStake:output_type -> providerapi.v1.StakeResponse - 2, // 10: providerapi.v1.Provider.GetMinStake:output_type -> providerapi.v1.StakeResponse - 6, // [6:11] is the sub-list for method output_type - 1, // [1:6] is the sub-list for method input_type + 4, // 4: providerapi.v1.Provider.GetStake:input_type -> providerapi.v1.EmptyMessage + 4, // 5: providerapi.v1.Provider.GetMinStake:input_type -> providerapi.v1.EmptyMessage + 4, // 6: providerapi.v1.Provider.WithdrawStake:input_type -> providerapi.v1.EmptyMessage + 4, // 7: providerapi.v1.Provider.Unstake:input_type -> providerapi.v1.EmptyMessage + 5, // 8: providerapi.v1.Provider.ReceiveBids:output_type -> providerapi.v1.Bid + 4, // 9: providerapi.v1.Provider.SendProcessedBids:output_type -> providerapi.v1.EmptyMessage + 2, // 10: providerapi.v1.Provider.RegisterStake:output_type -> providerapi.v1.StakeResponse + 2, // 11: providerapi.v1.Provider.GetStake:output_type -> providerapi.v1.StakeResponse + 2, // 12: providerapi.v1.Provider.GetMinStake:output_type -> providerapi.v1.StakeResponse + 3, // 13: providerapi.v1.Provider.WithdrawStake:output_type -> providerapi.v1.WithdrawalResponse + 4, // 14: providerapi.v1.Provider.Unstake:output_type -> providerapi.v1.EmptyMessage + 8, // [8:15] is the sub-list for method output_type + 1, // [1:8] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -750,7 +827,7 @@ func file_providerapi_v1_providerapi_proto_init() { } } file_providerapi_v1_providerapi_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyMessage); i { + switch v := v.(*WithdrawalResponse); i { case 0: return &v.state case 1: @@ -762,7 +839,7 @@ func file_providerapi_v1_providerapi_proto_init() { } } file_providerapi_v1_providerapi_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bid); i { + switch v := v.(*EmptyMessage); i { case 0: return &v.state case 1: @@ -774,6 +851,18 @@ func file_providerapi_v1_providerapi_proto_init() { } } file_providerapi_v1_providerapi_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bid); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_providerapi_v1_providerapi_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BidResponse); i { case 0: return &v.state @@ -792,7 +881,7 @@ func file_providerapi_v1_providerapi_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_providerapi_v1_providerapi_proto_rawDesc, NumEnums: 1, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/p2p/gen/go/providerapi/v1/providerapi.pb.gw.go b/p2p/gen/go/providerapi/v1/providerapi.pb.gw.go index fe81e1a66..acf8c8400 100644 --- a/p2p/gen/go/providerapi/v1/providerapi.pb.gw.go +++ b/p2p/gen/go/providerapi/v1/providerapi.pb.gw.go @@ -198,10 +198,47 @@ func local_request_Provider_GetMinStake_0(ctx context.Context, marshaler runtime } +func request_Provider_WithdrawStake_0(ctx context.Context, marshaler runtime.Marshaler, client ProviderClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EmptyMessage + var metadata runtime.ServerMetadata + + msg, err := client.WithdrawStake(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Provider_WithdrawStake_0(ctx context.Context, marshaler runtime.Marshaler, server ProviderServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EmptyMessage + var metadata runtime.ServerMetadata + + msg, err := server.WithdrawStake(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Provider_Unstake_0(ctx context.Context, marshaler runtime.Marshaler, client ProviderClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EmptyMessage + var metadata runtime.ServerMetadata + + msg, err := client.Unstake(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Provider_Unstake_0(ctx context.Context, marshaler runtime.Marshaler, server ProviderServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EmptyMessage + var metadata runtime.ServerMetadata + + msg, err := server.Unstake(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterProviderHandlerServer registers the http handlers for service Provider to "mux". // UnaryRPC :call ProviderServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProviderHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProviderServer) error { mux.Handle("GET", pattern_Provider_ReceiveBids_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -293,6 +330,56 @@ func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, s }) + mux.Handle("POST", pattern_Provider_WithdrawStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/providerapi.v1.Provider/WithdrawStake", runtime.WithHTTPPathPattern("/v1/provider/withdraw_stake")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Provider_WithdrawStake_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Provider_WithdrawStake_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Provider_Unstake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/providerapi.v1.Provider/Unstake", runtime.WithHTTPPathPattern("/v1/provider/unstake")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Provider_Unstake_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Provider_Unstake_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -331,7 +418,7 @@ func RegisterProviderHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProviderClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProviderClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ProviderClient" to call the correct interceptors. +// "ProviderClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProviderClient) error { mux.Handle("GET", pattern_Provider_ReceiveBids_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -444,6 +531,50 @@ func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, c }) + mux.Handle("POST", pattern_Provider_WithdrawStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/providerapi.v1.Provider/WithdrawStake", runtime.WithHTTPPathPattern("/v1/provider/withdraw_stake")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Provider_WithdrawStake_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Provider_WithdrawStake_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Provider_Unstake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/providerapi.v1.Provider/Unstake", runtime.WithHTTPPathPattern("/v1/provider/unstake")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Provider_Unstake_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Provider_Unstake_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -457,6 +588,10 @@ var ( pattern_Provider_GetStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "provider", "get_stake"}, "")) pattern_Provider_GetMinStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "provider", "get_min_stake"}, "")) + + pattern_Provider_WithdrawStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "provider", "withdraw_stake"}, "")) + + pattern_Provider_Unstake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "provider", "unstake"}, "")) ) var ( @@ -469,4 +604,8 @@ var ( forward_Provider_GetStake_0 = runtime.ForwardResponseMessage forward_Provider_GetMinStake_0 = runtime.ForwardResponseMessage + + forward_Provider_WithdrawStake_0 = runtime.ForwardResponseMessage + + forward_Provider_Unstake_0 = runtime.ForwardResponseMessage ) diff --git a/p2p/gen/go/providerapi/v1/providerapi_grpc.pb.go b/p2p/gen/go/providerapi/v1/providerapi_grpc.pb.go index 4987f48f1..b6e07fd88 100644 --- a/p2p/gen/go/providerapi/v1/providerapi_grpc.pb.go +++ b/p2p/gen/go/providerapi/v1/providerapi_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: providerapi/v1/providerapi.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Provider_ReceiveBids_FullMethodName = "/providerapi.v1.Provider/ReceiveBids" @@ -24,6 +24,8 @@ const ( Provider_RegisterStake_FullMethodName = "/providerapi.v1.Provider/RegisterStake" Provider_GetStake_FullMethodName = "/providerapi.v1.Provider/GetStake" Provider_GetMinStake_FullMethodName = "/providerapi.v1.Provider/GetMinStake" + Provider_WithdrawStake_FullMethodName = "/providerapi.v1.Provider/WithdrawStake" + Provider_Unstake_FullMethodName = "/providerapi.v1.Provider/Unstake" ) // ProviderClient is the client API for Provider service. @@ -34,12 +36,12 @@ type ProviderClient interface { // // ReceiveBids is called by the provider to receive bids from the mev-commit node. // The mev-commit node will stream bids to the provider as the response. - ReceiveBids(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (Provider_ReceiveBidsClient, error) + ReceiveBids(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Bid], error) // SendProcessedBids // // SendProcessedBids is called by the provider to send processed bids to the mev-commit node. // The provider will stream processed bids to the mev-commit node. - SendProcessedBids(ctx context.Context, opts ...grpc.CallOption) (Provider_SendProcessedBidsClient, error) + SendProcessedBids(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BidResponse, EmptyMessage], error) // RegisterStake // // RegisterStake is called by the provider to register its stake in the provider registry. @@ -52,6 +54,14 @@ type ProviderClient interface { // // GetMinStake is called by the provider to get the minimum stake required to be in the provider registry. GetMinStake(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*StakeResponse, error) + // WithdrawStake + // + // WithdrawStake is called by the provider to withdraw its stake from the provider registry. + WithdrawStake(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*WithdrawalResponse, error) + // Unstake + // + // Unstake is called by the provider to request a unstake from the provider registry. + Unstake(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*EmptyMessage, error) } type providerClient struct { @@ -62,13 +72,13 @@ func NewProviderClient(cc grpc.ClientConnInterface) ProviderClient { return &providerClient{cc} } -func (c *providerClient) ReceiveBids(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (Provider_ReceiveBidsClient, error) { +func (c *providerClient) ReceiveBids(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Bid], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &Provider_ServiceDesc.Streams[0], Provider_ReceiveBids_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &providerReceiveBidsClient{ClientStream: stream} + x := &grpc.GenericClientStream[EmptyMessage, Bid]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -78,57 +88,21 @@ func (c *providerClient) ReceiveBids(ctx context.Context, in *EmptyMessage, opts return x, nil } -type Provider_ReceiveBidsClient interface { - Recv() (*Bid, error) - grpc.ClientStream -} - -type providerReceiveBidsClient struct { - grpc.ClientStream -} - -func (x *providerReceiveBidsClient) Recv() (*Bid, error) { - m := new(Bid) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Provider_ReceiveBidsClient = grpc.ServerStreamingClient[Bid] -func (c *providerClient) SendProcessedBids(ctx context.Context, opts ...grpc.CallOption) (Provider_SendProcessedBidsClient, error) { +func (c *providerClient) SendProcessedBids(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BidResponse, EmptyMessage], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &Provider_ServiceDesc.Streams[1], Provider_SendProcessedBids_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &providerSendProcessedBidsClient{ClientStream: stream} + x := &grpc.GenericClientStream[BidResponse, EmptyMessage]{ClientStream: stream} return x, nil } -type Provider_SendProcessedBidsClient interface { - Send(*BidResponse) error - CloseAndRecv() (*EmptyMessage, error) - grpc.ClientStream -} - -type providerSendProcessedBidsClient struct { - grpc.ClientStream -} - -func (x *providerSendProcessedBidsClient) Send(m *BidResponse) error { - return x.ClientStream.SendMsg(m) -} - -func (x *providerSendProcessedBidsClient) CloseAndRecv() (*EmptyMessage, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(EmptyMessage) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Provider_SendProcessedBidsClient = grpc.ClientStreamingClient[BidResponse, EmptyMessage] func (c *providerClient) RegisterStake(ctx context.Context, in *StakeRequest, opts ...grpc.CallOption) (*StakeResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) @@ -160,20 +134,40 @@ func (c *providerClient) GetMinStake(ctx context.Context, in *EmptyMessage, opts return out, nil } +func (c *providerClient) WithdrawStake(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*WithdrawalResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WithdrawalResponse) + err := c.cc.Invoke(ctx, Provider_WithdrawStake_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) Unstake(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*EmptyMessage, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(EmptyMessage) + err := c.cc.Invoke(ctx, Provider_Unstake_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // ProviderServer is the server API for Provider service. // All implementations must embed UnimplementedProviderServer -// for forward compatibility +// for forward compatibility. type ProviderServer interface { // ReceiveBids // // ReceiveBids is called by the provider to receive bids from the mev-commit node. // The mev-commit node will stream bids to the provider as the response. - ReceiveBids(*EmptyMessage, Provider_ReceiveBidsServer) error + ReceiveBids(*EmptyMessage, grpc.ServerStreamingServer[Bid]) error // SendProcessedBids // // SendProcessedBids is called by the provider to send processed bids to the mev-commit node. // The provider will stream processed bids to the mev-commit node. - SendProcessedBids(Provider_SendProcessedBidsServer) error + SendProcessedBids(grpc.ClientStreamingServer[BidResponse, EmptyMessage]) error // RegisterStake // // RegisterStake is called by the provider to register its stake in the provider registry. @@ -186,17 +180,28 @@ type ProviderServer interface { // // GetMinStake is called by the provider to get the minimum stake required to be in the provider registry. GetMinStake(context.Context, *EmptyMessage) (*StakeResponse, error) + // WithdrawStake + // + // WithdrawStake is called by the provider to withdraw its stake from the provider registry. + WithdrawStake(context.Context, *EmptyMessage) (*WithdrawalResponse, error) + // Unstake + // + // Unstake is called by the provider to request a unstake from the provider registry. + Unstake(context.Context, *EmptyMessage) (*EmptyMessage, error) mustEmbedUnimplementedProviderServer() } -// UnimplementedProviderServer must be embedded to have forward compatible implementations. -type UnimplementedProviderServer struct { -} +// UnimplementedProviderServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedProviderServer struct{} -func (UnimplementedProviderServer) ReceiveBids(*EmptyMessage, Provider_ReceiveBidsServer) error { +func (UnimplementedProviderServer) ReceiveBids(*EmptyMessage, grpc.ServerStreamingServer[Bid]) error { return status.Errorf(codes.Unimplemented, "method ReceiveBids not implemented") } -func (UnimplementedProviderServer) SendProcessedBids(Provider_SendProcessedBidsServer) error { +func (UnimplementedProviderServer) SendProcessedBids(grpc.ClientStreamingServer[BidResponse, EmptyMessage]) error { return status.Errorf(codes.Unimplemented, "method SendProcessedBids not implemented") } func (UnimplementedProviderServer) RegisterStake(context.Context, *StakeRequest) (*StakeResponse, error) { @@ -208,7 +213,14 @@ func (UnimplementedProviderServer) GetStake(context.Context, *EmptyMessage) (*St func (UnimplementedProviderServer) GetMinStake(context.Context, *EmptyMessage) (*StakeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMinStake not implemented") } +func (UnimplementedProviderServer) WithdrawStake(context.Context, *EmptyMessage) (*WithdrawalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawStake not implemented") +} +func (UnimplementedProviderServer) Unstake(context.Context, *EmptyMessage) (*EmptyMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method Unstake not implemented") +} func (UnimplementedProviderServer) mustEmbedUnimplementedProviderServer() {} +func (UnimplementedProviderServer) testEmbeddedByValue() {} // UnsafeProviderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ProviderServer will @@ -218,6 +230,13 @@ type UnsafeProviderServer interface { } func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer) { + // If the following call pancis, it indicates UnimplementedProviderServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Provider_ServiceDesc, srv) } @@ -226,47 +245,18 @@ func _Provider_ReceiveBids_Handler(srv interface{}, stream grpc.ServerStream) er if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ProviderServer).ReceiveBids(m, &providerReceiveBidsServer{ServerStream: stream}) + return srv.(ProviderServer).ReceiveBids(m, &grpc.GenericServerStream[EmptyMessage, Bid]{ServerStream: stream}) } -type Provider_ReceiveBidsServer interface { - Send(*Bid) error - grpc.ServerStream -} - -type providerReceiveBidsServer struct { - grpc.ServerStream -} - -func (x *providerReceiveBidsServer) Send(m *Bid) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Provider_ReceiveBidsServer = grpc.ServerStreamingServer[Bid] func _Provider_SendProcessedBids_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ProviderServer).SendProcessedBids(&providerSendProcessedBidsServer{ServerStream: stream}) + return srv.(ProviderServer).SendProcessedBids(&grpc.GenericServerStream[BidResponse, EmptyMessage]{ServerStream: stream}) } -type Provider_SendProcessedBidsServer interface { - SendAndClose(*EmptyMessage) error - Recv() (*BidResponse, error) - grpc.ServerStream -} - -type providerSendProcessedBidsServer struct { - grpc.ServerStream -} - -func (x *providerSendProcessedBidsServer) SendAndClose(m *EmptyMessage) error { - return x.ServerStream.SendMsg(m) -} - -func (x *providerSendProcessedBidsServer) Recv() (*BidResponse, error) { - m := new(BidResponse) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Provider_SendProcessedBidsServer = grpc.ClientStreamingServer[BidResponse, EmptyMessage] func _Provider_RegisterStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StakeRequest) @@ -322,6 +312,42 @@ func _Provider_GetMinStake_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Provider_WithdrawStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).WithdrawStake(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Provider_WithdrawStake_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).WithdrawStake(ctx, req.(*EmptyMessage)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_Unstake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).Unstake(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Provider_Unstake_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).Unstake(ctx, req.(*EmptyMessage)) + } + return interceptor(ctx, in, info, handler) +} + // Provider_ServiceDesc is the grpc.ServiceDesc for Provider service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -341,6 +367,14 @@ var Provider_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetMinStake", Handler: _Provider_GetMinStake_Handler, }, + { + MethodName: "WithdrawStake", + Handler: _Provider_WithdrawStake_Handler, + }, + { + MethodName: "Unstake", + Handler: _Provider_Unstake_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/p2p/gen/openapi/providerapi/v1/providerapi.swagger.yaml b/p2p/gen/openapi/providerapi/v1/providerapi.swagger.yaml index 35f648303..c75dbf80e 100644 --- a/p2p/gen/openapi/providerapi/v1/providerapi.swagger.yaml +++ b/p2p/gen/openapi/providerapi/v1/providerapi.swagger.yaml @@ -109,6 +109,34 @@ paths: required: true schema: $ref: '#/definitions/v1BidResponse' + /v1/provider/unstake: + post: + summary: Unstake + description: Unstake is called by the provider to request a unstake from the provider registry. + operationId: Provider_Unstake + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/providerapiv1EmptyMessage' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + /v1/provider/withdraw_stake: + post: + summary: WithdrawStake + description: WithdrawStake is called by the provider to withdraw its stake from the provider registry. + operationId: Provider_WithdrawStake + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1WithdrawalResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' definitions: googlerpcStatus: type: object @@ -220,3 +248,12 @@ definitions: type: string description: Get staked amount for provider in the provider registry. title: Stake response + v1WithdrawalResponse: + type: object + example: + amount: "1000000000000000000" + properties: + amount: + type: string + description: Withdrawal amount for provider in the provider registry. + title: Withdrawal response diff --git a/p2p/go.mod b/p2p/go.mod index c90f29442..26ad1c905 100644 --- a/p2p/go.mod +++ b/p2p/go.mod @@ -7,6 +7,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/armon/go-radix v1.0.0 github.com/bufbuild/protovalidate-go v0.6.0 + github.com/cockroachdb/pebble v1.1.1 github.com/ethereum/go-ethereum v1.13.14 github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/hashicorp/golang-lru/v2 v2.0.7 @@ -19,18 +20,20 @@ require ( github.com/prometheus/client_golang v1.19.1 github.com/stretchr/testify v1.9.0 github.com/urfave/cli/v2 v2.27.1 - golang.org/x/crypto v0.23.0 + github.com/vmihailenco/msgpack/v5 v5.4.1 + golang.org/x/crypto v0.25.0 golang.org/x/sync v0.7.0 golang.org/x/time v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 google.golang.org/grpc v1.64.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/BurntSushi/toml v1.3.2 // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect @@ -38,7 +41,12 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/containerd/cgroups v1.1.0 // indirect @@ -55,11 +63,13 @@ require ( github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.28.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/cel-go v0.20.0 // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 // indirect @@ -71,9 +81,11 @@ require ( github.com/ipfs/go-log/v2 v2.5.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/koron/go-ssdp v0.0.4 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-flow-metrics v0.1.0 // indirect github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect @@ -97,6 +109,7 @@ require ( github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-multistream v0.5.0 // indirect github.com/multiformats/go-varint v0.0.7 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/onsi/ginkgo/v2 v2.15.0 // indirect github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect @@ -119,12 +132,13 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/quic-go v0.44.0 // indirect github.com/quic-go/webtransport-go v0.8.0 // indirect github.com/raulk/go-watchdog v1.3.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect @@ -132,18 +146,19 @@ require ( github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/go-sysconf v0.3.13 // indirect github.com/tklauser/numcpus v0.7.0 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect go.uber.org/dig v1.17.1 // indirect go.uber.org/fx v1.22.1 // indirect go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/tools v0.23.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/p2p/go.sum b/p2p/go.sum index e6e02ad7c..5202f245b 100644 --- a/p2p/go.sum +++ b/p2p/go.sum @@ -12,8 +12,8 @@ git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGy github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -46,18 +46,22 @@ github.com/bufbuild/protovalidate-go v0.6.0/go.mod h1:1LamgoYHZ2NdIQH0XGczGTc6Z8 github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= @@ -79,6 +83,7 @@ github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUp github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -117,11 +122,13 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= +github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -209,8 +216,8 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0= @@ -257,8 +264,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= @@ -310,6 +317,8 @@ github.com/multiformats/go-multistream v0.5.0/go.mod h1:n6tMZiwiP2wUsR8DgfDWw1dy github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -324,6 +333,8 @@ github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pion/datachannel v1.5.6 h1:1IxKJntfSlYkpUj8LlYRSWpYiTTC02nUrOE8T3DqGeg= github.com/pion/datachannel v1.5.6/go.mod h1:1eKT6Q85pRnr2mHiWHxJwO50SfZRtWHTsNIVb/NfGW4= github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= @@ -368,6 +379,7 @@ github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc= github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= github.com/pion/webrtc/v3 v3.2.40 h1:Wtfi6AZMQg+624cvCXUuSmrKWepSB7zfgYDOYqsSOVU= github.com/pion/webrtc/v3 v3.2.40/go.mod h1:M1RAe3TNTD1tzyvqHrbVODfwdPGSXOUo/OgpoGGJqFY= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -380,11 +392,11 @@ github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1: github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/quic-go v0.44.0 h1:So5wOr7jyO4vzL2sd8/pD9Kesciv91zSk8BoFngItQ0= @@ -395,8 +407,9 @@ github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtB github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU= github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -470,6 +483,10 @@ github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -510,11 +527,11 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -526,8 +543,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -553,8 +570,8 @@ golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -604,8 +621,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -625,8 +642,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= @@ -645,8 +662,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -675,8 +692,8 @@ google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/p2p/integration-compose.yml b/p2p/integration-compose.yml deleted file mode 100644 index e4d9d1080..000000000 --- a/p2p/integration-compose.yml +++ /dev/null @@ -1,611 +0,0 @@ -version: '3' - -services: - bootnode: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bootnode - service_name: bootnode - restart: always - volumes: - - ./integrationtest/keys/bootnode:/key - depends_on: - - funder - networks: - primev_net: - ipv4_address: 172.29.18.2 - ports: - - "8080:13523" - env_file: - - integrationtest/.env - profiles: - - minimal-setup - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - provider-1: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: provider - service_name: provider1 - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/provider1:/key - networks: - primev_net: - ipv4_address: 172.29.18.3 - ports: - - "8081:13523" - env_file: - - integrationtest/.env - profiles: - - minimal-setup - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - provider-emulator-1: - build: - context: ../ - dockerfile: ./p2p/integrationtest/provider/Dockerfile - restart: always - depends_on: - - provider-1 - environment: - - PROVIDER_IP=provider-1:13524 - networks: - - primev_net - ports: - - "8082:8080" - profiles: - - minimal-setup - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - provider-2: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: provider - service_name: provider2 - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/provider2:/key - networks: - - primev_net - ports: - - "8083:13523" - env_file: - - integrationtest/.env - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - provider-emulator-2: - build: - context: ../ - dockerfile: ./p2p/integrationtest/provider/Dockerfile - restart: always - depends_on: - - provider-2 - environment: - - PROVIDER_IP=provider-2:13524 - networks: - - primev_net - ports: - - "8084:8080" - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - provider-3: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: provider - service_name: provider3 - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/provider3:/key - networks: - - primev_net - ports: - - "8085:13523" - env_file: - - integrationtest/.env - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - provider-emulator-3: - build: - context: ../ - dockerfile: ./p2p/integrationtest/provider/Dockerfile - restart: always - depends_on: - - provider-3 - environment: - - PROVIDER_IP=provider-3:13524 - networks: - - primev_net - ports: - - "8086:8080" - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-1: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - service_name: bidder1 - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder1:/key - networks: - primev_net: - ipv4_address: 172.29.18.4 - ports: - - "8087:13523" - env_file: - - integrationtest/.env - profiles: - - minimal-setup - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-1: - build: - context: ../ - dockerfile: ./p2p/integrationtest/bidder/Dockerfile - restart: always - depends_on: - - bidder-1 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-1:13524 - networks: - - primev_net - ports: - - "8088:8080" - profiles: - - minimal-setup - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-2: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - service_name: bidder2 - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder2:/key - networks: - - primev_net - ports: - - "8089:13523" - env_file: - - integrationtest/.env - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-2: - build: - context: ../ - dockerfile: ./p2p/integrationtest/bidder/Dockerfile - restart: always - depends_on: - - bidder-2 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-2:13524 - networks: - - primev_net - ports: - - "8090:8080" - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-3: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - service_name: bidder3 - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder3:/key - networks: - - primev_net - ports: - - "8091:13523" - env_file: - - integrationtest/.env - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-3: - build: - context: ../ - dockerfile: ./p2p/integrationtest/bidder/Dockerfile - restart: always - depends_on: - - bidder-3 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-3:13524 - networks: - - primev_net - ports: - - "8092:8080" - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-4: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - service_name: bidder4 - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder4:/key - networks: - - primev_net - ports: - - "8093:13523" - env_file: - - integrationtest/.env - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-4: - build: - context: ../ - dockerfile: ./p2p/integrationtest/bidder/Dockerfile - restart: always - depends_on: - - bidder-4 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-4:13524 - networks: - - primev_net - ports: - - "8094:8080" - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - bidder-5: - build: - context: ../ - dockerfile: ./p2p/integrationtest/Dockerfile - args: - node_type: bidder - service_name: bidder5 - restart: always - depends_on: - - bootnode - volumes: - - ./integrationtest/keys/bidder5:/key - networks: - - primev_net - ports: - - "8095:13523" - env_file: - - integrationtest/.env - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:13523/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*", - "go*", - "libp2p*" - ] - } - ] - - bidder-emulator-5: - build: - context: ../ - dockerfile: ./p2p/integrationtest/bidder/Dockerfile - restart: always - depends_on: - - bidder-5 - env_file: - - integrationtest/.env - environment: - - BIDDER_IP=bidder-5:13524 - networks: - - primev_net - ports: - - "8096:8080" - profiles: - - integration-test - labels: - com.datadoghq.ad.check_names: '["openmetrics"]' - com.datadoghq.ad.init_configs: '[{}]' - com.datadoghq.ad.instances: | - [ - { - "openmetrics_endpoint": "http://%%host%%:8080/metrics", - "namespace": "integrationtest", - "metrics": [ - "mev_commit*" - ] - } - ] - - funder: - build: - context: ./integrationtest/foundry - env_file: - - integrationtest/.env - networks: - - primev_net - profiles: - - minimal-setup - - integration-test - - datadog-agent: - image: gcr.io/datadoghq/agent:latest - restart: always - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - - /proc/:/host/proc/:ro - - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro - environment: - - DD_API_KEY=${DD_KEY} - - DD_TAGS=env:test - - DD_SITE=datadoghq.com - - DD_LOGS_ENABLED=true - - DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true - - DD_CONTAINER_EXCLUDE="name:datadog-agent" - networks: - primev_net: - ipv4_address: 172.29.58.3 - profiles: - - agent - -networks: - primev_net: - external: true \ No newline at end of file diff --git a/p2p/integrationtest/real-bidder/main.go b/p2p/integrationtest/real-bidder/main.go index 32a980d7f..356a892ca 100644 --- a/p2p/integrationtest/real-bidder/main.go +++ b/p2p/integrationtest/real-bidder/main.go @@ -173,24 +173,31 @@ func main() { txns []string } - blockChans := make([]chan blockWithTxns, *bidWorkers) + blockChans := make([]chan *blockWithTxns, *bidWorkers) for i := 0; i < *bidWorkers; i++ { - blockChans[i] = make(chan blockWithTxns, 1) + blockChans[i] = make(chan *blockWithTxns, 1) } wg.Add(1) go func(logger *slog.Logger) { defer wg.Done() - currentBlkNum := int64(0) - for { - block, blkNum, err := RetreivedBlock(rpcClient) - if err != nil || len(block) == 0 { - logger.Error("failed to get block", "err", err) + currentBlkNum := uint64(0) + ticker := time.NewTicker(2 * time.Second) + for range ticker.C { + blkNum, err := rpcClient.BlockNumber(context.Background()) + if err != nil { + logger.Error("failed to get block number", "err", err) + continue + } + + if blkNum <= currentBlkNum { + continue } - if currentBlkNum == blkNum { - time.Sleep(1 * time.Second) + block, err := RetrieveTxns(rpcClient, blkNum) + if err != nil { + logger.Error("failed to get block", "err", err) continue } @@ -199,8 +206,8 @@ func main() { txns := make([]string, len(block)) copy(txns, block) - ch <- blockWithTxns{ - blockNum: blkNum, + ch <- &blockWithTxns{ + blockNum: int64(blkNum), txns: txns, } } @@ -209,13 +216,16 @@ func main() { for i := 0; i < *bidWorkers; i++ { wg.Add(1) - go func(logger *slog.Logger, newBlockChan <-chan blockWithTxns) { + go func(logger *slog.Logger, newBlockChan <-chan *blockWithTxns) { defer wg.Done() ticker := time.NewTicker(200 * time.Millisecond) - currentBlock := blockWithTxns{} + currentBlock := &blockWithTxns{} for { select { case block := <-newBlockChan: + if block.blockNum <= currentBlock.blockNum { + continue + } currentBlock = block case <-ticker.C: } @@ -224,7 +234,7 @@ func main() { continue } - bundleLen := rand.Intn(10) + bundleLen := rand.Intn(10) + 1 bundleStart := rand.Intn(len(currentBlock.txns)) bundleEnd := bundleStart + bundleLen if bundleEnd > len(currentBlock.txns) { @@ -238,7 +248,6 @@ func main() { err = sendBid( bidderClient, logger, - rpcClient, currentBlock.txns[bundleStart:bundleEnd], currentBlock.blockNum, (time.Now().UnixMilli())-int64(startTimeDiff), @@ -254,14 +263,10 @@ func main() { wg.Wait() } -func RetreivedBlock(rpcClient *ethclient.Client) ([]string, int64, error) { - blkNum, err := rpcClient.BlockNumber(context.Background()) - if err != nil { - return nil, -1, err - } +func RetrieveTxns(rpcClient *ethclient.Client, blkNum uint64) ([]string, error) { fullBlock, err := rpcClient.BlockByNumber(context.Background(), big.NewInt(int64(blkNum))) if err != nil { - return nil, -1, err + return nil, err } blockTxns := []string{} @@ -270,18 +275,24 @@ func RetreivedBlock(rpcClient *ethclient.Client) ([]string, int64, error) { blockTxns = append(blockTxns, strings.TrimPrefix(txn.Hash().Hex(), "0x")) } - return blockTxns, int64(blkNum), nil + if len(blockTxns) == 0 { + return nil, errors.New("no txns in block") + } + + return blockTxns, nil } func sendBid( bidderClient pb.BidderClient, logger *slog.Logger, - rpcClient *ethclient.Client, txnHashes []string, blkNum int64, decayStartTimestamp int64, decayEndTimestamp int64, ) error { + if len(txnHashes) == 0 { + return errors.New("no txns to send") + } amount := rand.Intn(200000) amount += 100000 diff --git a/p2p/pkg/autodepositor/autodepositor.go b/p2p/pkg/autodepositor/autodepositor.go index 8d49b483d..cad1646c6 100644 --- a/p2p/pkg/autodepositor/autodepositor.go +++ b/p2p/pkg/autodepositor/autodepositor.go @@ -10,6 +10,7 @@ import ( "sync/atomic" "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" blocktracker "github.com/primev/mev-commit/contracts-abi/clients/BlockTracker" "github.com/primev/mev-commit/x/contracts/events" @@ -22,23 +23,38 @@ type OptsGetter func(context.Context) (*bind.TransactOpts, error) type BidderRegistryContract interface { DepositForWindows(opts *bind.TransactOpts, windows []*big.Int) (*types.Transaction, error) + DepositForWindow(opts *bind.TransactOpts, window *big.Int) (*types.Transaction, error) WithdrawFromWindows(opts *bind.TransactOpts, windows []*big.Int) (*types.Transaction, error) + GetDeposit(opts *bind.CallOpts, bidder common.Address, window *big.Int) (*big.Int, error) } type BlockTrackerContract interface { GetCurrentWindow() (*big.Int, error) } +type DepositStore interface { + // StoreDeposits stores the deposited windows. + StoreDeposits(ctx context.Context, windows []*big.Int) error + // ListDeposits lists the deposited windows upto and including the lastWindow. + // If lastWindow is nil, it lists all deposits. + ListDeposits(ctx context.Context, lastWindow *big.Int) ([]*big.Int, error) + // ClearDeposits clears the deposits for the given windows. + ClearDeposits(ctx context.Context, windows []*big.Int) error + // IsDepositMade checks if the deposit is already made for the given window. + IsDepositMade(ctx context.Context, window *big.Int) bool +} + type AutoDepositTracker struct { startMu sync.Mutex isWorking bool eventMgr events.EventManager - deposits sync.Map windowChan chan *blocktracker.BlocktrackerNewWindow brContract BidderRegistryContract btContract BlockTrackerContract + store DepositStore optsGetter OptsGetter currentOracleWindow atomic.Value + oracleWindowOffset *big.Int logger *slog.Logger cancelFunc context.CancelFunc } @@ -48,15 +64,19 @@ func New( brContract BidderRegistryContract, btContract BlockTrackerContract, optsGetter OptsGetter, + store DepositStore, + oracleWindowOffset *big.Int, logger *slog.Logger, ) *AutoDepositTracker { return &AutoDepositTracker{ - eventMgr: evtMgr, - brContract: brContract, - btContract: btContract, - optsGetter: optsGetter, - windowChan: make(chan *blocktracker.BlocktrackerNewWindow, 1), - logger: logger, + eventMgr: evtMgr, + brContract: brContract, + btContract: btContract, + optsGetter: optsGetter, + store: store, + oracleWindowOffset: oracleWindowOffset, + windowChan: make(chan *blocktracker.BlocktrackerNewWindow, 1), + logger: logger, } } @@ -79,8 +99,8 @@ func (adt *AutoDepositTracker) Start( if startWindow == nil { startWindow = currentOracleWindow - // adding +2 as oracle runs two windows behind - startWindow = new(big.Int).Add(startWindow, big.NewInt(2)) + // adding + N as oracle runs N window behind + startWindow = new(big.Int).Add(startWindow, adt.oracleWindowOffset) } eg, egCtx := errgroup.WithContext(context.Background()) @@ -121,23 +141,31 @@ func (adt *AutoDepositTracker) Start( func (adt *AutoDepositTracker) doInitialDeposit(ctx context.Context, startWindow, amount *big.Int) error { nextWindow := new(big.Int).Add(startWindow, big.NewInt(1)) + newDeposits := []*big.Int{startWindow, nextWindow} + + // Check if the deposit is already made. If the nodes was down for a short period + // and the deposits were already made, we should not make the deposit again. + newDeposits = slices.DeleteFunc(newDeposits, func(i *big.Int) bool { + return adt.isDeposited(ctx, i) + }) + + if len(newDeposits) == 0 { + return nil + } opts, err := adt.optsGetter(ctx) if err != nil { return fmt.Errorf("failed to get transact opts: %w", err) } - opts.Value = big.NewInt(0).Mul(amount, big.NewInt(2)) + opts.Value = big.NewInt(0).Mul(amount, big.NewInt(int64(len(newDeposits)))) // Make initial deposit for the first two windows - _, err = adt.brContract.DepositForWindows(opts, []*big.Int{startWindow, nextWindow}) + _, err = adt.brContract.DepositForWindows(opts, newDeposits) if err != nil { return fmt.Errorf("failed to deposit for windows: %w", err) } - adt.deposits.Store(startWindow.Uint64(), true) - adt.deposits.Store(nextWindow.Uint64(), true) - - return nil + return adt.store.StoreDeposits(ctx, newDeposits) } func (adt *AutoDepositTracker) initSub(egCtx context.Context) (events.Subscription, error) { @@ -173,15 +201,15 @@ func (adt *AutoDepositTracker) startAutodeposit(egCtx context.Context, eg *errgr return fmt.Errorf("error in autodeposit event subscription: %w", err) case window := <-adt.windowChan: adt.currentOracleWindow.Store(window.Window) - withdrawWindows := make([]*big.Int, 0) - adt.deposits.Range(func(key, value interface{}) bool { - if key.(uint64) < window.Window.Uint64() { - withdrawWindows = append(withdrawWindows, new(big.Int).SetUint64(key.(uint64))) - } - return true - }) - - if len(withdrawWindows) > 0 { + withdrawWindows, err := adt.store.ListDeposits(egCtx, new(big.Int).Sub(window.Window, big.NewInt(1))) + switch { + case err != nil: + adt.logger.Error("failed to list deposits", "err", err) + return err + case len(withdrawWindows) == 0: + adt.logger.Info("no deposits to withdraw") + case len(withdrawWindows) > 0: + adt.logger.Info("deposits to withdraw", "windows", withdrawWindows) opts, err := adt.optsGetter(egCtx) if err != nil { return err @@ -191,16 +219,17 @@ func (adt *AutoDepositTracker) startAutodeposit(egCtx context.Context, eg *errgr return err } adt.logger.Info("withdraw from windows", "hash", txn.Hash(), "windows", withdrawWindows) - for _, window := range withdrawWindows { - adt.deposits.Delete(window.Uint64()) + err = adt.store.ClearDeposits(egCtx, withdrawWindows) + if err != nil { + return fmt.Errorf("failed to clear deposits: %w", err) } } - // Make deposit for the next window. The window event is 2 windows - // behind the current window in progress. So we need to make deposit - // for the next window. - nextWindow := new(big.Int).Add(window.Window, big.NewInt(3)) - if _, ok := adt.deposits.Load(nextWindow.Uint64()); ok { + // Make deposit for the next window. The window event is N windows + // behind the current window in progress. + nextWindow := new(big.Int).Add(window.Window, adt.oracleWindowOffset) + nextWindow = new(big.Int).Add(nextWindow, big.NewInt(1)) + if adt.isDeposited(egCtx, nextWindow) { continue } @@ -210,7 +239,7 @@ func (adt *AutoDepositTracker) startAutodeposit(egCtx context.Context, eg *errgr } opts.Value = amount - txn, err := adt.brContract.DepositForWindows(opts, []*big.Int{nextWindow}) + txn, err := adt.brContract.DepositForWindow(opts, nextWindow) if err != nil { return err } @@ -220,7 +249,10 @@ func (adt *AutoDepositTracker) startAutodeposit(egCtx context.Context, eg *errgr "window", nextWindow, "amount", amount, ) - adt.deposits.Store(nextWindow.Uint64(), true) + err = adt.store.StoreDeposits(egCtx, []*big.Int{nextWindow}) + if err != nil { + return fmt.Errorf("failed to store deposits: %w", err) + } } } }) @@ -236,17 +268,11 @@ func (adt *AutoDepositTracker) Stop() ([]*big.Int, error) { if adt.cancelFunc != nil { adt.cancelFunc() } - var windowNumbers []*big.Int - adt.deposits.Range(func(key, value interface{}) bool { - windowNumbers = append(windowNumbers, new(big.Int).SetUint64(key.(uint64))) - adt.deposits.Delete(key) - return true - }) - - slices.SortFunc(windowNumbers, func(i, j *big.Int) int { - return i.Cmp(j) - }) + windowNumbers, err := adt.store.ListDeposits(context.Background(), nil) + if err != nil { + adt.logger.Error("failed to list deposits", "err", err) + } adt.isWorking = false @@ -266,11 +292,14 @@ func (adt *AutoDepositTracker) GetStatus() (map[uint64]bool, bool, *big.Int) { isWorking := adt.isWorking adt.startMu.Unlock() + windows, err := adt.store.ListDeposits(context.Background(), nil) + if err != nil { + adt.logger.Error("failed to list deposits", "err", err) + } deposits := make(map[uint64]bool) - adt.deposits.Range(func(key, value interface{}) bool { - deposits[key.(uint64)] = value.(bool) - return true - }) + for _, w := range windows { + deposits[w.Uint64()] = true + } var currentOracleWindow *big.Int if val := adt.currentOracleWindow.Load(); val != nil { @@ -279,3 +308,27 @@ func (adt *AutoDepositTracker) GetStatus() (map[uint64]bool, bool, *big.Int) { return deposits, isWorking, currentOracleWindow } + +func (adt *AutoDepositTracker) isDeposited(ctx context.Context, window *big.Int) bool { + if adt.store.IsDepositMade(ctx, window) { + return true + } + + opts, err := adt.optsGetter(ctx) + if err != nil { + adt.logger.Error("failed to get transact opts", "err", err) + return false + } + + // fallback to contract call if the local state was not flushed properly + deposit, err := adt.brContract.GetDeposit(&bind.CallOpts{ + Context: ctx, + From: opts.From, + }, opts.From, window) + if err != nil { + adt.logger.Error("failed to get deposit", "err", err) + return false + } + + return deposit.Cmp(big.NewInt(0)) > 0 +} diff --git a/p2p/pkg/autodepositor/autodepositor_test.go b/p2p/pkg/autodepositor/autodepositor_test.go index 8c9f096fc..430af89e5 100644 --- a/p2p/pkg/autodepositor/autodepositor_test.go +++ b/p2p/pkg/autodepositor/autodepositor_test.go @@ -16,6 +16,8 @@ import ( bidderregistry "github.com/primev/mev-commit/contracts-abi/clients/BidderRegistry" blocktracker "github.com/primev/mev-commit/contracts-abi/clients/BlockTracker" "github.com/primev/mev-commit/p2p/pkg/autodepositor" + "github.com/primev/mev-commit/p2p/pkg/autodepositor/store" + inmemstorage "github.com/primev/mev-commit/p2p/pkg/storage/inmem" "github.com/primev/mev-commit/x/contracts/events" "github.com/primev/mev-commit/x/util" ) @@ -23,16 +25,32 @@ import ( type MockBidderRegistryContract struct { DepositForWindowsFunc func(opts *bind.TransactOpts, windows []*big.Int) (*types.Transaction, error) WithdrawFromWindowsFunc func(opts *bind.TransactOpts, windows []*big.Int) (*types.Transaction, error) + DepositForWindowFunc func(opts *bind.TransactOpts, window *big.Int) (*types.Transaction, error) } func (m *MockBidderRegistryContract) DepositForWindows(opts *bind.TransactOpts, windows []*big.Int) (*types.Transaction, error) { return m.DepositForWindowsFunc(opts, windows) } +func (m *MockBidderRegistryContract) DepositForWindow(opts *bind.TransactOpts, window *big.Int) (*types.Transaction, error) { + return m.DepositForWindowFunc(opts, window) +} + func (m *MockBidderRegistryContract) WithdrawFromWindows(opts *bind.TransactOpts, windows []*big.Int) (*types.Transaction, error) { return m.WithdrawFromWindowsFunc(opts, windows) } +func (m *MockBidderRegistryContract) GetDeposit(opts *bind.CallOpts, bidder common.Address, window *big.Int) (*big.Int, error) { + if opts.Context != nil { + select { + case <-opts.Context.Done(): + return nil, opts.Context.Err() + default: + } + } + return big.NewInt(0), nil +} + type MockBlockTrackerContract struct { GetCurrentWindowFunc func() (*big.Int, error) } @@ -56,6 +74,7 @@ func TestAutoDepositTracker_Start(t *testing.T) { } amount := big.NewInt(100) + oracleWindowOffset := big.NewInt(1) logger := util.NewTestLogger(os.Stdout) evtMgr := events.NewListener(logger, &btABI, &brABI) brContract := &MockBidderRegistryContract{ @@ -65,6 +84,9 @@ func TestAutoDepositTracker_Start(t *testing.T) { WithdrawFromWindowsFunc: func(opts *bind.TransactOpts, windows []*big.Int) (*types.Transaction, error) { return types.NewTransaction(1, common.Address{}, nil, 0, nil, nil), nil }, + DepositForWindowFunc: func(opts *bind.TransactOpts, window *big.Int) (*types.Transaction, error) { + return types.NewTransaction(1, common.Address{}, nil, 0, nil, nil), nil + }, } btContract := &MockBlockTrackerContract{ GetCurrentWindowFunc: func() (*big.Int, error) { @@ -75,8 +97,10 @@ func TestAutoDepositTracker_Start(t *testing.T) { return &bind.TransactOpts{}, nil } + st := store.New(inmemstorage.New()) + // Create AutoDepositTracker instance - adt := autodepositor.New(evtMgr, brContract, btContract, optsGetter, logger) + adt := autodepositor.New(evtMgr, brContract, btContract, optsGetter, st, oracleWindowOffset, logger) // Start AutoDepositTracker ctx := context.Background() @@ -110,17 +134,13 @@ func TestAutoDepositTracker_Start(t *testing.T) { assertStatus(t, true, []uint64{2, 3}) - publishNewWindow(evtMgr, &btABI, big.NewInt(1)) - - assertStatus(t, true, []uint64{2, 3, 4}) - publishNewWindow(evtMgr, &btABI, big.NewInt(2)) - assertStatus(t, true, []uint64{2, 3, 4, 5}) + assertStatus(t, true, []uint64{2, 3, 4}) publishNewWindow(evtMgr, &btABI, big.NewInt(3)) - assertStatus(t, true, []uint64{3, 4, 5, 6}) + assertStatus(t, true, []uint64{3, 4, 5}) // Stop AutoDepositTracker windowNumbers, err := adt.Stop() @@ -129,7 +149,7 @@ func TestAutoDepositTracker_Start(t *testing.T) { } // Assert window numbers - expectedWindowNumbers := []*big.Int{big.NewInt(3), big.NewInt(4), big.NewInt(5), big.NewInt(6)} + expectedWindowNumbers := []*big.Int{big.NewInt(3), big.NewInt(4), big.NewInt(5)} if len(windowNumbers) != len(expectedWindowNumbers) { t.Fatalf("expected %d window numbers, got %d", len(expectedWindowNumbers), len(windowNumbers)) } @@ -139,7 +159,7 @@ func TestAutoDepositTracker_Start(t *testing.T) { } } - assertStatus(t, false, []uint64{}) + assertStatus(t, false, []uint64{3, 4, 5}) } func TestAutoDepositTracker_Start_CancelContext(t *testing.T) { @@ -162,6 +182,9 @@ func TestAutoDepositTracker_Start_CancelContext(t *testing.T) { DepositForWindowsFunc: func(opts *bind.TransactOpts, windows []*big.Int) (*types.Transaction, error) { return types.NewTransaction(1, common.Address{}, nil, 0, nil, nil), nil }, + DepositForWindowFunc: func(opts *bind.TransactOpts, window *big.Int) (*types.Transaction, error) { + return types.NewTransaction(1, common.Address{}, nil, 0, nil, nil), nil + }, } btContract := &MockBlockTrackerContract{ GetCurrentWindowFunc: func() (*big.Int, error) { @@ -172,8 +195,11 @@ func TestAutoDepositTracker_Start_CancelContext(t *testing.T) { return &bind.TransactOpts{}, nil } + oracleWindowOffset := big.NewInt(1) + st := store.New(inmemstorage.New()) + // Create AutoDepositTracker instance - adt := autodepositor.New(evtMgr, brContract, btContract, optsGetter, logger) + adt := autodepositor.New(evtMgr, brContract, btContract, optsGetter, st, oracleWindowOffset, logger) // Start AutoDepositTracker with a cancelable context ctx, cancel := context.WithCancel(context.Background()) @@ -208,8 +234,11 @@ func TestAutoDepositTracker_Stop_NotRunning(t *testing.T) { return &bind.TransactOpts{}, nil } + oracleWindowOffset := big.NewInt(1) + st := store.New(inmemstorage.New()) + // Create AutoDepositTracker instance - adt := autodepositor.New(evtMgr, brContract, btContract, optsGetter, logger) + adt := autodepositor.New(evtMgr, brContract, btContract, optsGetter, st, oracleWindowOffset, logger) // Stop AutoDepositTracker when not running _, err = adt.Stop() @@ -249,8 +278,11 @@ func TestAutoDepositTracker_IsWorking(t *testing.T) { return &bind.TransactOpts{}, nil } + oracleWindowOffset := big.NewInt(1) + st := store.New(inmemstorage.New()) + // Create AutoDepositTracker instance - adt := autodepositor.New(evtMgr, brContract, btContract, optsGetter, logger) + adt := autodepositor.New(evtMgr, brContract, btContract, optsGetter, st, oracleWindowOffset, logger) // Assert initial IsWorking status if adt.IsWorking() { diff --git a/p2p/pkg/autodepositor/store/store.go b/p2p/pkg/autodepositor/store/store.go new file mode 100644 index 000000000..3a6108fec --- /dev/null +++ b/p2p/pkg/autodepositor/store/store.go @@ -0,0 +1,94 @@ +package store + +import ( + "context" + "fmt" + "math/big" + "strings" + "sync" + + "github.com/primev/mev-commit/p2p/pkg/storage" +) + +const ( + // local deposit entries + depositNS = "dep/" +) + +var ( + depositKey = func(window *big.Int) string { + return fmt.Sprintf("%s%s", depositNS, window) + } +) + +type Store struct { + mu sync.RWMutex + st storage.Storage +} + +func New(st storage.Storage) *Store { + return &Store{ + st: st, + } +} + +func (s *Store) StoreDeposits(ctx context.Context, window []*big.Int) error { + s.mu.Lock() + defer s.mu.Unlock() + + for _, w := range window { + err := s.st.Put(depositKey(w), []byte{}) + if err != nil { + return err + } + } + return nil +} + +func (s *Store) ListDeposits(ctx context.Context, till *big.Int) ([]*big.Int, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + deposits := make([]*big.Int, 0) + err := s.st.WalkPrefix(depositNS, func(key string, _ []byte) bool { + parts := strings.Split(key, "/") + if len(parts) != 2 { + return false + } + w, ok := new(big.Int).SetString(parts[1], 10) + if !ok { + return false + } + if till == nil || w.Cmp(till) != 1 { + deposits = append(deposits, w) + } + return false + }) + if err != nil { + return nil, err + } + + return deposits, nil +} + +func (s *Store) ClearDeposits(ctx context.Context, windows []*big.Int) error { + s.mu.Lock() + defer s.mu.Unlock() + + for _, w := range windows { + err := s.st.Delete(depositKey(w)) + if err != nil { + return err + } + } + + return nil +} + +func (s *Store) IsDepositMade(ctx context.Context, window *big.Int) bool { + s.mu.RLock() + defer s.mu.RUnlock() + + _, err := s.st.Get(depositKey(window)) + return err == nil +} diff --git a/p2p/pkg/autodepositor/store/store_test.go b/p2p/pkg/autodepositor/store/store_test.go new file mode 100644 index 000000000..4e20b2a64 --- /dev/null +++ b/p2p/pkg/autodepositor/store/store_test.go @@ -0,0 +1,55 @@ +package store_test + +import ( + "context" + "math/big" + "reflect" + "testing" + + "github.com/primev/mev-commit/p2p/pkg/autodepositor/store" + inmem "github.com/primev/mev-commit/p2p/pkg/storage/inmem" +) + +func TestStore(t *testing.T) { + st := inmem.New() + store := store.New(st) + windows := []*big.Int{big.NewInt(1), big.NewInt(2)} + + t.Run("StoreDeposits", func(t *testing.T) { + err := store.StoreDeposits(context.Background(), windows) + if err != nil { + t.Fatalf("StoreDeposits failed: %v", err) + } + + for _, w := range windows { + if !store.IsDepositMade(context.Background(), w) { + t.Errorf("Deposit for window %s was not stored", w) + } + } + }) + + t.Run("ListDeposits", func(t *testing.T) { + deposits, err := store.ListDeposits(context.Background(), big.NewInt(2)) + if err != nil { + t.Fatalf("ListDeposits failed: %v", err) + } + + expectedDeposits := []*big.Int{big.NewInt(1), big.NewInt(2)} + if !reflect.DeepEqual(deposits, expectedDeposits) { + t.Errorf("Expected deposits %+v, got %+v", expectedDeposits, deposits) + } + }) + + t.Run("ClearDeposits", func(t *testing.T) { + err := store.ClearDeposits(context.Background(), windows) + if err != nil { + t.Fatalf("ClearDeposits failed: %v", err) + } + + for _, w := range windows { + if store.IsDepositMade(context.Background(), w) { + t.Errorf("Deposit for window %s was not cleared", w) + } + } + }) +} diff --git a/p2p/pkg/depositmanager/deposit.go b/p2p/pkg/depositmanager/deposit.go index 6ec34c072..aadf03a8b 100644 --- a/p2p/pkg/depositmanager/deposit.go +++ b/p2p/pkg/depositmanager/deposit.go @@ -6,6 +6,7 @@ import ( "log/slog" "math/big" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" bidderregistry "github.com/primev/mev-commit/contracts-abi/clients/BidderRegistry" blocktracker "github.com/primev/mev-commit/contracts-abi/clients/BlockTracker" @@ -15,6 +16,10 @@ import ( "google.golang.org/grpc/status" ) +type BidderRegistryContract interface { + GetDeposit(opts *bind.CallOpts, bidder common.Address, window *big.Int) (*big.Int, error) +} + type Store interface { GetBalance(bidder common.Address, windowNumber *big.Int) (*big.Int, error) SetBalance(bidder common.Address, windowNumber *big.Int, balance *big.Int) error @@ -41,6 +46,7 @@ type Store interface { type DepositManager struct { store Store evtMgr events.EventManager + bidderRegistry BidderRegistryContract blocksPerWindow uint64 bidderRegs chan *bidderregistry.BidderregistryBidderRegistered windowChan chan *blocktracker.BlocktrackerNewWindow @@ -51,11 +57,13 @@ func NewDepositManager( blocksPerWindow uint64, store Store, evtMgr events.EventManager, + bidderRegistry BidderRegistryContract, logger *slog.Logger, ) *DepositManager { return &DepositManager{ store: store, blocksPerWindow: blocksPerWindow, + bidderRegistry: bidderRegistry, bidderRegs: make(chan *bidderregistry.BidderregistryBidderRegistered), windowChan: make(chan *blocktracker.BlocktrackerNewWindow), evtMgr: evtMgr, @@ -115,7 +123,7 @@ func (dm *DepositManager) Start(ctx context.Context) <-chan struct{} { dm.logger.Info("clear balances set balances context done") return nil case window := <-dm.windowChan: - windowToClear := new(big.Int).Sub(window.Window, big.NewInt(2)) + windowToClear := new(big.Int).Sub(window.Window, big.NewInt(1)) windows, err := dm.store.ClearBalances(windowToClear) if err != nil { dm.logger.Error("failed to clear balances", "error", err, "window", windowToClear) @@ -125,6 +133,7 @@ func (dm *DepositManager) Start(ctx context.Context) <-chan struct{} { case bidderReg := <-dm.bidderRegs: effectiveStake := new(big.Int).Div(bidderReg.DepositedAmount, new(big.Int).SetUint64(dm.blocksPerWindow)) if err := dm.store.SetBalance(bidderReg.Bidder, bidderReg.WindowNumber, effectiveStake); err != nil { + dm.logger.Error("setting balance", "error", err) return err } dm.logger.Info("set balance", "bidder", bidderReg.Bidder, "window", bidderReg.WindowNumber, "amount", effectiveStake) @@ -177,10 +186,9 @@ func (dm *DepositManager) CheckAndDeductDeposit( }, nil } - defaultBalance, err := dm.store.GetBalance(address, windowToCheck) + defaultBalance, err := dm.getBalanceForWindow(ctx, address, windowToCheck) if err != nil { - dm.logger.Error("getting balance", "error", err) - return nil, status.Errorf(codes.Internal, "failed to get balance: %v", err) + return nil, err } if defaultBalance == nil { @@ -203,3 +211,43 @@ func (dm *DepositManager) CheckAndDeductDeposit( return dm.store.RefundBalanceForBlock(address, windowToCheck, bidAmount, blockNumber) }, nil } + +// fallback to contract if balance not found in store +func (dm *DepositManager) getBalanceForWindow( + ctx context.Context, + address common.Address, + windowNumber *big.Int, +) (*big.Int, error) { + balance, err := dm.store.GetBalance(address, windowNumber) + if err != nil { + dm.logger.Error("getting balance", "error", err) + return nil, status.Errorf(codes.Internal, "failed to get balance: %v", err) + } + + if balance == nil { + dm.logger.Info("balance not found in store", "address", address.Hex(), "window", windowNumber) + balance, err = dm.bidderRegistry.GetDeposit(&bind.CallOpts{ + Context: ctx, + }, address, windowNumber) + if err != nil { + dm.logger.Error("getting deposit from contract", "error", err) + return nil, status.Errorf(codes.Internal, "failed to get deposit: %v", err) + } + + // The set balance will only set the max amount that can be used in a block for + // the given window. The actual balance will be deducted in the CheckAndDeductDeposit. + // This prevents the need to synchrnoize the balance update from the events. They + // update the same value. + effectiveBalance := new(big.Int).Div(balance, new(big.Int).SetUint64(dm.blocksPerWindow)) + if err := dm.store.SetBalance(address, windowNumber, effectiveBalance); err != nil { + dm.logger.Error("setting balance", "error", err) + return nil, status.Errorf(codes.Internal, "failed to set balance: %v", err) + } + } + + if balance.Cmp(big.NewInt(0)) == 0 { + return nil, nil + } + + return balance, nil +} diff --git a/p2p/pkg/depositmanager/deposit_test.go b/p2p/pkg/depositmanager/deposit_test.go index 5e3e1769d..27d068029 100644 --- a/p2p/pkg/depositmanager/deposit_test.go +++ b/p2p/pkg/depositmanager/deposit_test.go @@ -9,16 +9,30 @@ import ( "time" "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" bidderregistry "github.com/primev/mev-commit/contracts-abi/clients/BidderRegistry" blocktracker "github.com/primev/mev-commit/contracts-abi/clients/BlockTracker" "github.com/primev/mev-commit/p2p/pkg/depositmanager" - "github.com/primev/mev-commit/p2p/pkg/store" + depositstore "github.com/primev/mev-commit/p2p/pkg/depositmanager/store" + inmemstorage "github.com/primev/mev-commit/p2p/pkg/storage/inmem" "github.com/primev/mev-commit/x/contracts/events" "github.com/primev/mev-commit/x/util" ) +type MockBidderRegistryContract struct { + GetDepositFunc func(opts *bind.CallOpts, bidder common.Address, window *big.Int) (*big.Int, error) +} + +func (m *MockBidderRegistryContract) GetDeposit( + opts *bind.CallOpts, + bidder common.Address, + window *big.Int, +) (*big.Int, error) { + return m.GetDepositFunc(opts, bidder, window) +} + func TestDepositManager(t *testing.T) { t.Parallel() @@ -35,11 +49,20 @@ func TestDepositManager(t *testing.T) { logger := util.NewTestLogger(io.Discard) evtMgr := events.NewListener(logger, &btABI, &brABI) - st := store.NewStore() + st := depositstore.New(inmemstorage.New()) + bidderRegistry := &MockBidderRegistryContract{ + GetDepositFunc: func( + opts *bind.CallOpts, + bidder common.Address, + window *big.Int, + ) (*big.Int, error) { + return big.NewInt(0), nil + }, + } ctx, cancel := context.WithCancel(context.Background()) - dm := depositmanager.NewDepositManager(10, st, evtMgr, logger) + dm := depositmanager.NewDepositManager(10, st, evtMgr, bidderRegistry, logger) done := dm.Start(ctx) // no deposit @@ -116,7 +139,11 @@ func TestDepositManager(t *testing.T) { publishNewWindow(evtMgr, &btABI, big.NewInt(12)) for { - if st.Len() == 0 { + count, err := st.BalanceEntries(big.NewInt(1)) + if err != nil { + t.Fatal(err) + } + if count == 0 { break } time.Sleep(1 * time.Second) diff --git a/p2p/pkg/depositmanager/store/store.go b/p2p/pkg/depositmanager/store/store.go new file mode 100644 index 000000000..853008afb --- /dev/null +++ b/p2p/pkg/depositmanager/store/store.go @@ -0,0 +1,173 @@ +package store + +import ( + "errors" + "fmt" + "math/big" + "strings" + "sync" + + "github.com/ethereum/go-ethereum/common" + "github.com/primev/mev-commit/p2p/pkg/storage" +) + +const ( + balanceNS = "bbs/" +) + +var ( + balanceKey = func(window *big.Int, bidder common.Address) string { + return fmt.Sprintf("%s%s/%s", balanceNS, window, bidder) + } + blockBalanceKey = func(window *big.Int, bidder common.Address, blockNumber int64) string { + return fmt.Sprintf("%s%s/%s/%d", balanceNS, window, bidder, blockNumber) + } + balancePrefix = func(window *big.Int) string { + return fmt.Sprintf("%s%s", balanceNS, window) + } +) + +type Store struct { + mu sync.RWMutex + st storage.Storage +} + +func New(st storage.Storage) *Store { + return &Store{ + st: st, + } +} + +func (s *Store) SetBalance(bidder common.Address, windowNumber, depositedAmount *big.Int) error { + s.mu.Lock() + defer s.mu.Unlock() + + return s.st.Put(balanceKey(windowNumber, bidder), depositedAmount.Bytes()) +} + +func (s *Store) GetBalance(bidder common.Address, windowNumber *big.Int) (*big.Int, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + val, err := s.st.Get(balanceKey(windowNumber, bidder)) + switch { + case errors.Is(err, storage.ErrKeyNotFound): + return nil, nil + case err != nil: + return nil, err + } + + return new(big.Int).SetBytes(val), nil +} + +func (s *Store) ClearBalances(windowNumber *big.Int) ([]*big.Int, error) { + if windowNumber == nil || windowNumber.Cmp(big.NewInt(0)) == -1 { + return nil, nil + } + + s.mu.RLock() + windows := make([]*big.Int, 0) + err := s.st.WalkPrefix(balanceNS, func(key string, _ []byte) bool { + parts := strings.Split(key, "/") + if len(parts) != 3 { + return false + } + w, ok := new(big.Int).SetString(parts[1], 10) + if !ok { + return false + } + switch w.Cmp(windowNumber) { + case -1: + windows = append(windows, w) + case 0: + windows = append(windows, w) + return true + } + return false + }) + s.mu.RUnlock() + if err != nil { + return nil, err + } + + s.mu.Lock() + for _, w := range windows { + err := s.st.DeletePrefix(balancePrefix(w)) + if err != nil { + s.mu.Unlock() + return nil, err + } + } + s.mu.Unlock() + + return windows, nil +} + +func (s *Store) GetBalanceForBlock( + bidder common.Address, + window *big.Int, + blockNumber int64, +) (*big.Int, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + val, err := s.st.Get(blockBalanceKey(window, bidder, blockNumber)) + switch { + case errors.Is(err, storage.ErrKeyNotFound): + return nil, nil + case err != nil: + return nil, err + } + + return new(big.Int).SetBytes(val), nil +} + +func (s *Store) SetBalanceForBlock( + bidder common.Address, + window *big.Int, + amount *big.Int, + blockNumber int64, +) error { + s.mu.Lock() + defer s.mu.Unlock() + + return s.st.Put(blockBalanceKey(window, bidder, blockNumber), amount.Bytes()) +} + +func (s *Store) RefundBalanceForBlock( + bidder common.Address, + window *big.Int, + amount *big.Int, + blockNumber int64, +) error { + s.mu.Lock() + defer s.mu.Unlock() + + val, err := s.st.Get(blockBalanceKey(window, bidder, blockNumber)) + switch { + case errors.Is(err, storage.ErrKeyNotFound): + return s.st.Put(blockBalanceKey(window, bidder, blockNumber), amount.Bytes()) + case err != nil: + return err + } + + newAmount := new(big.Int).Add(new(big.Int).SetBytes(val), amount) + return s.st.Put(blockBalanceKey(window, bidder, blockNumber), newAmount.Bytes()) +} + +func (s *Store) BalanceEntries(windowNumber *big.Int) (int, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + entries := 0 + prefix := balancePrefix(windowNumber) + err := s.st.WalkPrefix(prefix, func(key string, val []byte) bool { + entries++ + return false + }) + if err != nil { + return 0, err + } + + return entries, nil +} diff --git a/p2p/pkg/depositmanager/store/store_test.go b/p2p/pkg/depositmanager/store/store_test.go new file mode 100644 index 000000000..6b9749f85 --- /dev/null +++ b/p2p/pkg/depositmanager/store/store_test.go @@ -0,0 +1,173 @@ +package store_test + +import ( + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/primev/mev-commit/p2p/pkg/depositmanager/store" + inmem "github.com/primev/mev-commit/p2p/pkg/storage/inmem" +) + +func TestStore_SetBalance(t *testing.T) { + st := inmem.New() + s := store.New(st) + + bidder := common.HexToAddress("0x123") + windowNumber := big.NewInt(1) + depositedAmount := big.NewInt(10) + + err := s.SetBalance(bidder, windowNumber, depositedAmount) + if err != nil { + t.Fatal(err) + } + + val, err := s.GetBalance(bidder, windowNumber) + if err != nil { + t.Fatal(err) + } + if val.Cmp(depositedAmount) != 0 { + t.Fatalf("expected %s, got %s", depositedAmount.String(), val.String()) + } +} + +func TestStore_GetBalance(t *testing.T) { + st := inmem.New() + s := store.New(st) + + bidder := common.HexToAddress("0x123") + windowNumber := big.NewInt(1) + depositedAmount := big.NewInt(10) + + err := s.SetBalance(bidder, windowNumber, depositedAmount) + if err != nil { + t.Fatal(err) + } + + val, err := s.GetBalance(bidder, windowNumber) + if err != nil { + t.Fatal(err) + } + if val.Cmp(depositedAmount) != 0 { + t.Fatalf("expected %s, got %s", depositedAmount.String(), val.String()) + } +} + +func TestStore_ClearBalances(t *testing.T) { + st := inmem.New() + s := store.New(st) + + windowNumber := big.NewInt(1) + bidder1 := common.HexToAddress("0x123") + bidder2 := common.HexToAddress("0x456") + depositedAmount := big.NewInt(10) + + err := s.SetBalance(bidder1, windowNumber, depositedAmount) + if err != nil { + t.Fatal(err) + } + err = s.SetBalance(bidder2, windowNumber, depositedAmount) + if err != nil { + t.Fatal(err) + } + + windows, err := s.ClearBalances(windowNumber) + if err != nil { + t.Fatal(err) + } + if len(windows) != 1 { + t.Fatalf("expected 1, got %d", len(windows)) + } + + val1, err := s.GetBalance(bidder1, windowNumber) + if err != nil { + t.Fatal(err) + } + if val1 != nil { + t.Fatalf("expected nil, got %s", val1.String()) + } + + val2, err := s.GetBalance(bidder2, windowNumber) + if err != nil { + t.Fatal(err) + } + if val2 != nil { + t.Fatalf("expected nil, got %s", val2.String()) + } +} + +func TestStore_GetBalanceForBlock(t *testing.T) { + st := inmem.New() + s := store.New(st) + + bidder := common.HexToAddress("0x123") + windowNumber := big.NewInt(1) + blockNumber := int64(10) + amount := big.NewInt(20) + + err := s.SetBalanceForBlock(bidder, windowNumber, amount, blockNumber) + if err != nil { + t.Fatal(err) + } + + val, err := s.GetBalanceForBlock(bidder, windowNumber, blockNumber) + if err != nil { + t.Fatal(err) + } + if val.Cmp(amount) != 0 { + t.Fatalf("expected %s, got %s", amount.String(), val.String()) + } +} + +func TestStore_SetBalanceForBlock(t *testing.T) { + st := inmem.New() + s := store.New(st) + + bidder := common.HexToAddress("0x123") + windowNumber := big.NewInt(1) + blockNumber := int64(10) + amount := big.NewInt(20) + + err := s.SetBalanceForBlock(bidder, windowNumber, amount, blockNumber) + if err != nil { + t.Fatal(err) + } + + val, err := s.GetBalanceForBlock(bidder, windowNumber, blockNumber) + if err != nil { + t.Fatal(err) + } + if val.Cmp(amount) != 0 { + t.Fatalf("expected %s, got %s", amount.String(), val.String()) + } +} + +func TestStore_RefundBalanceForBlock(t *testing.T) { + st := inmem.New() + s := store.New(st) + + bidder := common.HexToAddress("0x123") + windowNumber := big.NewInt(1) + blockNumber := int64(10) + amount := big.NewInt(20) + + err := s.SetBalanceForBlock(bidder, windowNumber, amount, blockNumber) + if err != nil { + t.Fatal(err) + } + + refundAmount := big.NewInt(5) + err = s.RefundBalanceForBlock(bidder, windowNumber, refundAmount, blockNumber) + if err != nil { + t.Fatal(err) + } + + val, err := s.GetBalanceForBlock(bidder, windowNumber, blockNumber) + if err != nil { + t.Fatal(err) + } + expectedAmount := new(big.Int).Add(amount, refundAmount) + if val.Cmp(expectedAmount) != 0 { + t.Fatalf("expected %s, got %s", expectedAmount.String(), val.String()) + } +} diff --git a/p2p/pkg/keyexchange/keyexchange_test.go b/p2p/pkg/keyexchange/keyexchange_test.go index 5e2c6233a..306fa77df 100644 --- a/p2p/pkg/keyexchange/keyexchange_test.go +++ b/p2p/pkg/keyexchange/keyexchange_test.go @@ -18,10 +18,11 @@ import ( "github.com/ethereum/go-ethereum/crypto/ecies" p2pcrypto "github.com/primev/mev-commit/p2p/pkg/crypto" "github.com/primev/mev-commit/p2p/pkg/keyexchange" + "github.com/primev/mev-commit/p2p/pkg/keysstore" "github.com/primev/mev-commit/p2p/pkg/p2p" p2ptest "github.com/primev/mev-commit/p2p/pkg/p2p/testing" "github.com/primev/mev-commit/p2p/pkg/signer" - "github.com/primev/mev-commit/p2p/pkg/store" + inmemstorage "github.com/primev/mev-commit/p2p/pkg/storage/inmem" "github.com/primev/mev-commit/p2p/pkg/topology" mockkeysigner "github.com/primev/mev-commit/x/keysigner/mock" ) @@ -58,8 +59,8 @@ func TestKeyExchange_SendAndHandleTimestampMessage(t *testing.T) { Type: p2p.PeerTypeBidder, } - bidderStore := store.NewStore() - providerStore := store.NewStore() + bidderStore := keysstore.New(inmemstorage.New()) + providerStore := keysstore.New(inmemstorage.New()) encryptionPrivateKey, err := ecies.GenerateKey(rand.Reader, elliptic.P256(), nil) if err != nil { @@ -159,8 +160,8 @@ func TestKeyExchange_Whitelist(t *testing.T) { Type: p2p.PeerTypeBidder, } - bidderStore := store.NewStore() - providerStore := store.NewStore() + bidderStore := keysstore.New(inmemstorage.New()) + providerStore := keysstore.New(inmemstorage.New()) encryptionPrivateKey, err := ecies.GenerateKey(rand.Reader, elliptic.P256(), nil) if err != nil { diff --git a/p2p/pkg/keysstore/keysstore.go b/p2p/pkg/keysstore/keysstore.go new file mode 100644 index 000000000..07f93e595 --- /dev/null +++ b/p2p/pkg/keysstore/keysstore.go @@ -0,0 +1,123 @@ +package keysstore + +import ( + "crypto/ecdh" + "crypto/elliptic" + "errors" + "fmt" + "math/big" + "sync" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/ecies" + "github.com/primev/mev-commit/p2p/pkg/storage" +) + +const ( + aesKeysNS = "aes/" + eciesPrivateKeyNS = "ecies/" + nikePrivateKeyNS = "nike/" +) + +var ( + bidderAesKey = func(bidder common.Address) string { + return fmt.Sprintf("%s%s", aesKeysNS, bidder) + } +) + +type Store struct { + mu sync.RWMutex + st storage.Storage +} + +func New(st storage.Storage) *Store { + return &Store{ + st: st, + } +} + +func (s *Store) SetAESKey(bidder common.Address, key []byte) error { + s.mu.Lock() + defer s.mu.Unlock() + + return s.st.Put(bidderAesKey(bidder), key) +} + +func (s *Store) GetAESKey(bidder common.Address) ([]byte, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + val, err := s.st.Get(bidderAesKey(bidder)) + switch { + case errors.Is(err, storage.ErrKeyNotFound): + return nil, nil + case err != nil: + return nil, err + } + return val, nil +} + +func eciesPrivateKeyToBytes(priv *ecies.PrivateKey) []byte { + return priv.ExportECDSA().D.Bytes() +} + +func eciesPrivateKeyFromBytes(data []byte) *ecies.PrivateKey { + curve := elliptic.P256() + priv := new(ecies.PrivateKey) + priv.PublicKey.Curve = curve + priv.D = new(big.Int).SetBytes(data) + priv.PublicKey.X, priv.PublicKey.Y = curve.ScalarBaseMult(data) + return priv +} + +func (s *Store) SetECIESPrivateKey(key *ecies.PrivateKey) error { + s.mu.Lock() + defer s.mu.Unlock() + + return s.st.Put(eciesPrivateKeyNS, eciesPrivateKeyToBytes(key)) +} + +func (s *Store) GetECIESPrivateKey() (*ecies.PrivateKey, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + val, err := s.st.Get(eciesPrivateKeyNS) + switch { + case errors.Is(err, storage.ErrKeyNotFound): + return nil, nil + case err != nil: + return nil, err + } + + return eciesPrivateKeyFromBytes(val), nil +} + +func ecdhPrivateKeyToBytes(priv *ecdh.PrivateKey) []byte { + return priv.Bytes() +} + +func ecdhPrivateKeyFromBytes(data []byte) (*ecdh.PrivateKey, error) { + return ecdh.P256().NewPrivateKey(data) +} + +func (s *Store) SetNikePrivateKey(key *ecdh.PrivateKey) error { + s.mu.Lock() + defer s.mu.Unlock() + + return s.st.Put(nikePrivateKeyNS, ecdhPrivateKeyToBytes(key)) +} + +func (s *Store) GetNikePrivateKey() (*ecdh.PrivateKey, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + val, err := s.st.Get(nikePrivateKeyNS) + switch { + case errors.Is(err, storage.ErrKeyNotFound): + return nil, nil + case err != nil: + return nil, err + } + + return ecdhPrivateKeyFromBytes(val) +} diff --git a/p2p/pkg/keysstore/keysstore_test.go b/p2p/pkg/keysstore/keysstore_test.go new file mode 100644 index 000000000..ea53dceb5 --- /dev/null +++ b/p2p/pkg/keysstore/keysstore_test.go @@ -0,0 +1,79 @@ +package keysstore_test + +import ( + "crypto/ecdh" + "crypto/elliptic" + "crypto/rand" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/ecies" + "github.com/primev/mev-commit/p2p/pkg/keysstore" + inmem "github.com/primev/mev-commit/p2p/pkg/storage/inmem" + "github.com/stretchr/testify/assert" +) + +func TestAESKey(t *testing.T) { + st := inmem.New() + store := keysstore.New(st) + bidder := common.HexToAddress("0x1") + + // Set and get AES key + expectedKey := []byte("aes-key") + err := store.SetAESKey(bidder, expectedKey) + assert.NoError(t, err) + + retrievedKey, err := store.GetAESKey(bidder) + assert.NoError(t, err) + assert.Equal(t, expectedKey, retrievedKey) + + // Get non-existent AES key + nonExistentBidder := common.HexToAddress("0x2") + retrievedKey, err = store.GetAESKey(nonExistentBidder) + assert.NoError(t, err) + assert.Nil(t, retrievedKey) +} + +func TestECIESPrivateKey(t *testing.T) { + st := inmem.New() + store := keysstore.New(st) + + // Get non-existent ECIES private key + retrievedKey, err := store.GetECIESPrivateKey() + assert.NoError(t, err) + assert.Nil(t, retrievedKey) + + // Generate ECIES private key + privateKeyECIES, err := ecies.GenerateKey(rand.Reader, elliptic.P256(), nil) + assert.NoError(t, err) + + // Set and get ECIES private key + err = store.SetECIESPrivateKey(privateKeyECIES) + assert.NoError(t, err) + + retrievedKey, err = store.GetECIESPrivateKey() + assert.NoError(t, err) + assert.Equal(t, privateKeyECIES.D, retrievedKey.D) +} + +func TestNikePrivateKey(t *testing.T) { + st := inmem.New() + store := keysstore.New(st) + + // Get non-existent Nike private key + retrievedKey, err := store.GetNikePrivateKey() + assert.NoError(t, err) + assert.Nil(t, retrievedKey) + + // Generate Nike private key + privateKeyNike, err := ecdh.P256().GenerateKey(rand.Reader) + assert.NoError(t, err) + + // Set and get Nike private key + err = store.SetNikePrivateKey(privateKeyNike) + assert.NoError(t, err) + + retrievedKey, err = store.GetNikePrivateKey() + assert.NoError(t, err) + assert.Equal(t, privateKeyNike.Bytes(), retrievedKey.Bytes()) +} diff --git a/p2p/pkg/node/node.go b/p2p/pkg/node/node.go index fc11b75bf..009f3d215 100644 --- a/p2p/pkg/node/node.go +++ b/p2p/pkg/node/node.go @@ -11,6 +11,7 @@ import ( "net" "net/http" "strings" + "sync/atomic" "time" "github.com/bufbuild/protovalidate-go" @@ -30,28 +31,35 @@ import ( providerapiv1 "github.com/primev/mev-commit/p2p/gen/go/providerapi/v1" "github.com/primev/mev-commit/p2p/pkg/apiserver" "github.com/primev/mev-commit/p2p/pkg/autodepositor" + autodepositorstore "github.com/primev/mev-commit/p2p/pkg/autodepositor/store" "github.com/primev/mev-commit/p2p/pkg/crypto" "github.com/primev/mev-commit/p2p/pkg/depositmanager" + depositmanagerstore "github.com/primev/mev-commit/p2p/pkg/depositmanager/store" "github.com/primev/mev-commit/p2p/pkg/discovery" "github.com/primev/mev-commit/p2p/pkg/keyexchange" + "github.com/primev/mev-commit/p2p/pkg/keysstore" "github.com/primev/mev-commit/p2p/pkg/p2p" "github.com/primev/mev-commit/p2p/pkg/p2p/libp2p" "github.com/primev/mev-commit/p2p/pkg/preconfirmation" + preconfstore "github.com/primev/mev-commit/p2p/pkg/preconfirmation/store" preconftracker "github.com/primev/mev-commit/p2p/pkg/preconfirmation/tracker" bidderapi "github.com/primev/mev-commit/p2p/pkg/rpc/bidder" debugapi "github.com/primev/mev-commit/p2p/pkg/rpc/debug" providerapi "github.com/primev/mev-commit/p2p/pkg/rpc/provider" "github.com/primev/mev-commit/p2p/pkg/signer" "github.com/primev/mev-commit/p2p/pkg/signer/preconfencryptor" - "github.com/primev/mev-commit/p2p/pkg/store" + "github.com/primev/mev-commit/p2p/pkg/storage" + inmem "github.com/primev/mev-commit/p2p/pkg/storage/inmem" + pebblestorage "github.com/primev/mev-commit/p2p/pkg/storage/pebble" "github.com/primev/mev-commit/p2p/pkg/topology" + "github.com/primev/mev-commit/p2p/pkg/txnstore" "github.com/primev/mev-commit/x/contracts/events" "github.com/primev/mev-commit/x/contracts/events/publisher" "github.com/primev/mev-commit/x/contracts/transactor" "github.com/primev/mev-commit/x/contracts/txmonitor" + "github.com/primev/mev-commit/x/health" "github.com/primev/mev-commit/x/keysigner" "google.golang.org/grpc" - "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" ) @@ -62,6 +70,7 @@ const ( type Options struct { Version string + DataDir string KeySigner keysigner.KeySigner Secret string PeerType string @@ -85,6 +94,7 @@ type Options struct { DefaultGasLimit uint64 DefaultGasTipCap *big.Int DefaultGasFeeCap *big.Int + OracleWindowOffset *big.Int } type Node struct { @@ -119,13 +129,25 @@ func NewNode(opts *Options) (*Node, error) { } } + progressstore := &progressStore{contractRPC: contractRPC} + chainID, err := contractRPC.ChainID(context.Background()) if err != nil { opts.Logger.Error("failed to get chain ID", "error", err) return nil, err } - store := store.NewStore() + var store storage.Storage + if opts.DataDir != "" { + store, err = pebblestorage.New(opts.DataDir) + if err != nil { + opts.Logger.Error("failed to create storage", "error", err) + return nil, err + } + } else { + store = inmem.New() + } + nd.closers = append(nd.closers, store) contracts, err := getContractABIs(opts) if err != nil { @@ -141,42 +163,26 @@ func NewNode(opts *Options) (*Node, error) { contractAddrs = append(contractAddrs, addr) } - lastBlock, err := contractRPC.BlockNumber(context.Background()) - if err != nil { - opts.Logger.Error("failed to get last block", "error", err) - return nil, errors.Join(err, nd.Close()) - } - - // TODO: Having this block setting here because the store is in-memory. - // Once we have a database, this should be removed. - err = store.SetLastBlock(lastBlock) - if err != nil { - opts.Logger.Error("failed to set last block", "error", err) - return nil, errors.Join(err, nd.Close()) - } - - opts.Logger.Info("node set latest block", "lastBlock", lastBlock) - evtMgr := events.NewListener( opts.Logger.With("component", "events"), abis..., ) srv.RegisterMetricsCollectors(evtMgr.Metrics()...) - var startables []Startable + var startables []StartableObjWithDesc var evtPublisher PublisherStartable if opts.WSRPCEndpoint != "" { // Use WS publisher if WSRPCEndpoint is set evtPublisher = publisher.NewWSPublisher( - store, + progressstore, opts.Logger.With("component", "ws_publisher"), contractRPC, evtMgr, ) } else { evtPublisher = publisher.NewHTTPPublisher( - store, + progressstore, opts.Logger.With("component", "http_publisher"), contractRPC, evtMgr, @@ -185,20 +191,31 @@ func NewNode(opts *Options) (*Node, error) { startables = append( startables, - StartableFunc(func(ctx context.Context) <-chan struct{} { - return evtPublisher.Start(ctx, contractAddrs...) - }), + StartableObjWithDesc{ + Desc: "events_publisher", + Startable: StartableFunc(func(ctx context.Context) <-chan struct{} { + return evtPublisher.Start(ctx, contractAddrs...) + }), + }, ) + txnStore := txnstore.New(store) + monitor := txmonitor.New( opts.KeySigner.GetAddress(), contractRPC, txmonitor.NewEVMHelperWithLogger(contractRPC.Client(), opts.Logger.With("component", "txmonitor")), - store, + txnStore, opts.Logger.With("component", "txmonitor"), 1024, ) - startables = append(startables, monitor) + startables = append( + startables, + StartableObjWithDesc{ + Desc: "txmonitor", + Startable: monitor, + }, + ) srv.RegisterMetricsCollectors(monitor.Metrics()...) contractsBackend := transactor.NewMetricsWrapper( @@ -238,6 +255,8 @@ func NewNode(opts *Options) (*Node, error) { return tOpts, err } + keysStore := keysstore.New(store) + p2pSvc, err := libp2p.New(&libp2p.Options{ KeySigner: opts.KeySigner, Secret: opts.Secret, @@ -246,7 +265,7 @@ func NewNode(opts *Options) (*Node, error) { providerRegistry: providerRegistry, from: opts.KeySigner.GetAddress(), }, - Store: store, + Store: keysStore, Logger: opts.Logger.With("component", "p2p"), ListenPort: opts.P2PPort, ListenAddr: opts.P2PAddr, @@ -295,7 +314,7 @@ func NewNode(opts *Options) (*Node, error) { grpcServer := grpc.NewServer(grpc.Creds(tlsCredentials)) debugService := debugapi.NewService( - store, + txnStore, txmonitor.NewCanceller( chainID, contractRPC, @@ -350,13 +369,19 @@ func NewNode(opts *Options) (*Node, error) { peerType, opts.KeySigner.GetAddress(), evtMgr, - store, + preconfstore.New(store), commitmentDA, txmonitor.NewEVMHelperWithLogger(contractRPC.Client(), opts.Logger.With("component", "evm_helper")), optsGetter, opts.Logger.With("component", "tracker"), ) - startables = append(startables, tracker) + startables = append( + startables, + StartableObjWithDesc{ + Desc: "tracker", + Startable: tracker, + }, + ) srv.RegisterMetricsCollectors(tracker.Metrics()...) bpwBigInt, err := blockTrackerSession.GetBlocksPerWindow() @@ -382,12 +407,19 @@ func NewNode(opts *Options) (*Node, error) { srv.RegisterMetricsCollectors(providerAPI.Metrics()...) depositMgr = depositmanager.NewDepositManager( blocksPerWindow, - store, + depositmanagerstore.New(store), evtMgr, + bidderRegistry, opts.Logger.With("component", "depositmanager"), ) - startables = append(startables, depositMgr.(*depositmanager.DepositManager)) - preconfEncryptor, err := preconfencryptor.NewEncryptor(opts.KeySigner, store) + startables = append( + startables, + StartableObjWithDesc{ + Desc: "deposit_manager", + Startable: depositMgr.(*depositmanager.DepositManager), + }, + ) + preconfEncryptor, err := preconfencryptor.NewEncryptor(opts.KeySigner, keysStore) if err != nil { opts.Logger.Error("failed to create preconf encryptor", "error", err) return nil, errors.Join(err, nd.Close()) @@ -411,7 +443,7 @@ func NewNode(opts *Options) (*Node, error) { p2pSvc, opts.KeySigner, nil, - store, + keysStore, opts.Logger.With("component", "keyexchange_protocol"), signer.New(), nil, @@ -425,13 +457,13 @@ func NewNode(opts *Options) (*Node, error) { opts.Logger.Error("failed to generate AES key", "error", err) return nil, errors.Join(err, nd.Close()) } - err = store.SetAESKey(opts.KeySigner.GetAddress(), aesKey) + err = keysStore.SetAESKey(opts.KeySigner.GetAddress(), aesKey) if err != nil { opts.Logger.Error("failed to set AES key", "error", err) return nil, errors.Join(err, nd.Close()) } - preconfEncryptor, err := preconfencryptor.NewEncryptor(opts.KeySigner, store) + preconfEncryptor, err := preconfencryptor.NewEncryptor(opts.KeySigner, keysStore) if err != nil { opts.Logger.Error("failed to create preconf encryptor", "error", err) return nil, errors.Join(err, nd.Close()) @@ -451,11 +483,15 @@ func NewNode(opts *Options) (*Node, error) { srv.RegisterMetricsCollectors(preconfProto.Metrics()...) + autodepositorStore := autodepositorstore.New(store) + autoDeposit := autodepositor.New( evtMgr, bidderRegistry, blockTrackerSession, optsGetter, + autodepositorStore, + opts.OracleWindowOffset, opts.Logger.With("component", "auto_deposit_tracker"), ) @@ -465,8 +501,8 @@ func NewNode(opts *Options) (*Node, error) { opts.Logger.Error("failed to start auto deposit tracker", "error", err) return nil, errors.Join(err, nd.Close()) } - nd.autoDeposit = autoDeposit } + nd.autoDeposit = autoDeposit bidderAPI := bidderapi.NewService( opts.KeySigner.GetAddress(), @@ -478,6 +514,8 @@ func NewNode(opts *Options) (*Node, error) { monitor, optsGetter, autoDeposit, + autodepositorStore, + opts.OracleWindowOffset, opts.Logger.With("component", "bidderapi"), ) bidderapiv1.RegisterBidderServer(grpcServer, bidderAPI) @@ -487,7 +525,7 @@ func NewNode(opts *Options) (*Node, error) { p2pSvc, opts.KeySigner, aesKey, - store, + keysStore, opts.Logger.With("component", "keyexchange_protocol"), signer.New(), opts.ProviderWhitelist, @@ -506,9 +544,12 @@ func NewNode(opts *Options) (*Node, error) { } ctx, cancel := context.WithCancel(context.Background()) + healthChecker := health.New() for _, s := range startables { - nd.closers = append(nd.closers, channelCloserFunc(s.Start(ctx))) + closeChan := s.Startable.Start(ctx) + healthChecker.Register(health.CloseChannelHealthCheck(s.Desc, closeChan)) + nd.closers = append(nd.closers, channelCloserFunc(closeChan)) } nd.cancelFunc = cancel @@ -568,6 +609,8 @@ func NewNode(opts *Options) (*Node, error) { return nil, errors.New("dialing of grpc server failed") } + healthChecker.Register(health.GrpcGatewayHealthCheck(grpcConn)) + handlerCtx, handlerCancel := context.WithTimeout(context.Background(), 3*time.Second) defer handlerCancel() @@ -599,10 +642,11 @@ func NewNode(opts *Options) (*Node, error) { http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/plain") - if s := grpcConn.GetState(); s != connectivity.Ready { - http.Error(w, fmt.Sprintf("grpc server is %s", s), http.StatusBadGateway) + if err := healthChecker.Health(); err != nil { + http.Error(w, err.Error(), http.StatusServiceUnavailable) return } + w.WriteHeader(http.StatusOK) fmt.Fprintln(w, "ok") }, ), @@ -666,15 +710,12 @@ func (n *Node) Close() error { } var err error + _, err = n.autoDeposit.Stop() + for _, c := range n.closers { err = errors.Join(err, c.Close()) } - _, adErr := n.autoDeposit.Stop() - if adErr != nil && !errors.Is(adErr, autodepositor.ErrNotRunning) { - return errors.Join(err, adErr) - } - return err } @@ -717,6 +758,11 @@ type PublisherStartable interface { Start(ctx context.Context, contracts ...common.Address) <-chan struct{} } +type StartableObjWithDesc struct { + Startable Startable + Desc string +} + type Startable interface { Start(ctx context.Context) <-chan struct{} } @@ -743,10 +789,24 @@ func (p *providerStakeChecker) CheckProviderRegistered(ctx context.Context, prov return false } - stake, err := p.providerRegistry.CheckStake(callOpts, provider) + stake, err := p.providerRegistry.GetProviderStake(callOpts, provider) if err != nil { return false } return stake.Cmp(minStake) >= 0 } + +type progressStore struct { + contractRPC *ethclient.Client + lastBlock atomic.Uint64 +} + +func (p *progressStore) LastBlock() (uint64, error) { + return p.contractRPC.BlockNumber(context.Background()) +} + +func (p *progressStore) SetLastBlock(block uint64) error { + p.lastBlock.Store(block) + return nil +} diff --git a/p2p/pkg/p2p/libp2p/internal/handshake/handshake_test.go b/p2p/pkg/p2p/libp2p/internal/handshake/handshake_test.go index 6a0961024..a1f9c161e 100644 --- a/p2p/pkg/p2p/libp2p/internal/handshake/handshake_test.go +++ b/p2p/pkg/p2p/libp2p/internal/handshake/handshake_test.go @@ -11,10 +11,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto/ecies" "github.com/libp2p/go-libp2p/core" + "github.com/primev/mev-commit/p2p/pkg/keysstore" "github.com/primev/mev-commit/p2p/pkg/p2p" "github.com/primev/mev-commit/p2p/pkg/p2p/libp2p/internal/handshake" p2ptest "github.com/primev/mev-commit/p2p/pkg/p2p/testing" - "github.com/primev/mev-commit/p2p/pkg/store" + inmemstorage "github.com/primev/mev-commit/p2p/pkg/storage/inmem" mockkeysigner "github.com/primev/mev-commit/x/keysigner/mock" ) @@ -56,7 +57,7 @@ func TestHandshake(t *testing.T) { address2 := common.HexToAddress("0x2") ks2 := mockkeysigner.NewMockKeySigner(privKey2, address2) - store1 := store.NewStore() + store1 := keysstore.New(inmemstorage.New()) nikePrivateKey1, err := ecdh.P256().GenerateKey(rand.Reader) if err != nil { t.Fatal(err) @@ -91,7 +92,7 @@ func TestHandshake(t *testing.T) { if err != nil { t.Fatal(err) } - store2 := store.NewStore() + store2 := keysstore.New(inmemstorage.New()) nikePrivateKey2, err := ecdh.P256().GenerateKey(rand.Reader) if err != nil { t.Fatal(err) diff --git a/p2p/pkg/p2p/libp2p/libp2p_test.go b/p2p/pkg/p2p/libp2p/libp2p_test.go index 28f0d8072..64193feeb 100644 --- a/p2p/pkg/p2p/libp2p/libp2p_test.go +++ b/p2p/pkg/p2p/libp2p/libp2p_test.go @@ -13,9 +13,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/libp2p/go-libp2p/core/peer" + "github.com/primev/mev-commit/p2p/pkg/keysstore" "github.com/primev/mev-commit/p2p/pkg/p2p" "github.com/primev/mev-commit/p2p/pkg/p2p/libp2p" - "github.com/primev/mev-commit/p2p/pkg/store" + inmemstorage "github.com/primev/mev-commit/p2p/pkg/storage/inmem" mockkeysigner "github.com/primev/mev-commit/x/keysigner/mock" "github.com/stretchr/testify/assert" "google.golang.org/grpc/codes" @@ -57,7 +58,7 @@ func newTestService(t *testing.T) *libp2p.Service { ListenAddr: "0.0.0.0", PeerType: p2p.PeerTypeProvider, Register: &testRegistry{}, - Store: store.NewStore(), + Store: keysstore.New(inmemstorage.New()), Logger: newTestLogger(t, os.Stdout), }) if err != nil { @@ -241,7 +242,7 @@ func TestBootstrap(t *testing.T) { ListenAddr: "0.0.0.0", PeerType: p2p.PeerTypeProvider, Register: &testRegistry{}, - Store: store.NewStore(), + Store: keysstore.New(inmemstorage.New()), Logger: newTestLogger(t, os.Stdout), } diff --git a/p2p/pkg/preconfirmation/preconfirmation.go b/p2p/pkg/preconfirmation/preconfirmation.go index 7542b3501..a416f3585 100644 --- a/p2p/pkg/preconfirmation/preconfirmation.go +++ b/p2p/pkg/preconfirmation/preconfirmation.go @@ -13,9 +13,9 @@ import ( preconfpb "github.com/primev/mev-commit/p2p/gen/go/preconfirmation/v1" providerapiv1 "github.com/primev/mev-commit/p2p/gen/go/providerapi/v1" "github.com/primev/mev-commit/p2p/pkg/p2p" + "github.com/primev/mev-commit/p2p/pkg/preconfirmation/store" providerapi "github.com/primev/mev-commit/p2p/pkg/rpc/provider" encryptor "github.com/primev/mev-commit/p2p/pkg/signer/preconfencryptor" - "github.com/primev/mev-commit/p2p/pkg/store" "github.com/primev/mev-commit/p2p/pkg/topology" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/p2p/pkg/preconfirmation/preconfirmation_test.go b/p2p/pkg/preconfirmation/preconfirmation_test.go index 121afbef6..10b9acdbc 100644 --- a/p2p/pkg/preconfirmation/preconfirmation_test.go +++ b/p2p/pkg/preconfirmation/preconfirmation_test.go @@ -20,8 +20,8 @@ import ( "github.com/primev/mev-commit/p2p/pkg/p2p" p2ptest "github.com/primev/mev-commit/p2p/pkg/p2p/testing" "github.com/primev/mev-commit/p2p/pkg/preconfirmation" + "github.com/primev/mev-commit/p2p/pkg/preconfirmation/store" providerapi "github.com/primev/mev-commit/p2p/pkg/rpc/provider" - "github.com/primev/mev-commit/p2p/pkg/store" "github.com/primev/mev-commit/p2p/pkg/topology" ) diff --git a/p2p/pkg/preconfirmation/store/export_test.go b/p2p/pkg/preconfirmation/store/export_test.go new file mode 100644 index 000000000..9cdabdf02 --- /dev/null +++ b/p2p/pkg/preconfirmation/store/export_test.go @@ -0,0 +1,3 @@ +package store + +var CmtIndexNS = cmtIndexNS diff --git a/p2p/pkg/preconfirmation/store/store.go b/p2p/pkg/preconfirmation/store/store.go new file mode 100644 index 000000000..caefd8f88 --- /dev/null +++ b/p2p/pkg/preconfirmation/store/store.go @@ -0,0 +1,236 @@ +package store + +import ( + "encoding/binary" + "fmt" + "sync" + + "github.com/ethereum/go-ethereum/common" + preconfpb "github.com/primev/mev-commit/p2p/gen/go/preconfirmation/v1" + "github.com/primev/mev-commit/p2p/pkg/storage" + "github.com/vmihailenco/msgpack/v5" +) + +const ( + commitmentNS = "cm/" + + // block winners + blockWinnerNS = "bw/" + + cmtIndexNS = "ci/" +) + +var ( + commitmentKey = func(blockNum int64, index []byte) string { + return fmt.Sprintf("%s%d/%s", commitmentNS, blockNum, string(index)) + } + blockCommitmentPrefix = func(blockNum int64) string { + return fmt.Sprintf("%s%d", commitmentNS, blockNum) + } + blockWinnerKey = func(blockNumber int64) string { + return fmt.Sprintf("%s%d", blockWinnerNS, blockNumber) + } + cmtIndexKey = func(cIndex []byte) string { + return fmt.Sprintf("%s%s", cmtIndexNS, string(cIndex)) + } +) + +type Store struct { + mu sync.RWMutex + st storage.Storage +} + +type EncryptedPreConfirmationWithDecrypted struct { + *preconfpb.EncryptedPreConfirmation + *preconfpb.PreConfirmation + TxnHash common.Hash +} + +type BlockWinner struct { + BlockNumber int64 + Winner common.Address +} + +func New(st storage.Storage) *Store { + return &Store{ + st: st, + } +} + +func (s *Store) AddCommitment(commitment *EncryptedPreConfirmationWithDecrypted) (err error) { + s.mu.Lock() + defer s.mu.Unlock() + + var writer storage.Writer + if w, ok := s.st.(storage.Batcher); ok { + batch := w.Batch() + writer = batch + defer func() { + switch { + case err != nil: + batch.Reset() + case err == nil: + err = batch.Write() + } + }() + + } else { + writer = s.st + } + + key := commitmentKey(commitment.Bid.BlockNumber, commitment.EncryptedPreConfirmation.Commitment) + + buf, err := msgpack.Marshal(commitment) + if err != nil { + return err + } + + if err := writer.Put(key, buf); err != nil { + return err + } + + cIndexKey := cmtIndexKey(commitment.EncryptedPreConfirmation.Commitment) + blkNumBuf := make([]byte, 8) + binary.LittleEndian.PutUint64(blkNumBuf, uint64(commitment.Bid.BlockNumber)) + + return writer.Put(cIndexKey, blkNumBuf) +} + +func (s *Store) GetCommitments(blockNum int64) ([]*EncryptedPreConfirmationWithDecrypted, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + blockCommitmentsKey := blockCommitmentPrefix(blockNum) + commitments := make([]*EncryptedPreConfirmationWithDecrypted, 0) + + err := s.st.WalkPrefix(blockCommitmentsKey, func(key string, value []byte) bool { + commitment := new(EncryptedPreConfirmationWithDecrypted) + err := msgpack.Unmarshal(value, commitment) + if err != nil { + return false + } + commitments = append(commitments, commitment) + return false + }) + if err != nil { + return nil, err + } + return commitments, nil +} + +func (s *Store) ClearBlockNumber(blockNum int64) error { + s.mu.Lock() + defer s.mu.Unlock() + + err := s.st.DeletePrefix(blockCommitmentPrefix(blockNum)) + if err != nil { + return err + } + + return s.st.Delete(blockWinnerKey(blockNum)) +} + +func (s *Store) DeleteCommitmentByDigest(blockNum int64, digest [32]byte) error { + s.mu.Lock() + defer s.mu.Unlock() + + return s.st.Delete(commitmentKey(blockNum, digest[:])) +} + +func (s *Store) SetCommitmentIndexByDigest(cDigest, cIndex [32]byte) error { + s.mu.RLock() + blkNumBuf, err := s.st.Get(cmtIndexKey(cDigest[:])) + s.mu.RUnlock() + switch { + case err == storage.ErrKeyNotFound: + // this would happen for most of the commitments as the node only + // stores the commitments it is involved in. + return nil + case err != nil: + return err + } + + s.mu.Lock() + defer s.mu.Unlock() + + blkNum := binary.LittleEndian.Uint64(blkNumBuf) + commitmentKey := commitmentKey(int64(blkNum), cDigest[:]) + cmtBuf, err := s.st.Get(commitmentKey) + if err != nil { + return err + } + + cmt := new(EncryptedPreConfirmationWithDecrypted) + err = msgpack.Unmarshal(cmtBuf, cmt) + if err != nil { + return err + } + + cmt.EncryptedPreConfirmation.CommitmentIndex = cIndex[:] + buf, err := msgpack.Marshal(cmt) + if err != nil { + return err + } + + return s.st.Put(commitmentKey, buf) +} + +func (s *Store) ClearCommitmentIndexes(uptoBlock int64) error { + keys := make([]string, 0) + s.mu.RLock() + err := s.st.WalkPrefix(cmtIndexNS, func(key string, val []byte) bool { + blkNum := binary.LittleEndian.Uint64([]byte(val)) + if blkNum < uint64(uptoBlock) { + keys = append(keys, key) + } + return false + }) + s.mu.RUnlock() + if err != nil { + return err + } + + s.mu.Lock() + defer s.mu.Unlock() + + for _, key := range keys { + err := s.st.Delete(key) + if err != nil { + return err + } + } + + return nil +} + +func (s *Store) AddWinner(blockWinner *BlockWinner) error { + s.mu.Lock() + defer s.mu.Unlock() + + buf, err := msgpack.Marshal(blockWinner) + if err != nil { + return err + } + + return s.st.Put(blockWinnerKey(blockWinner.BlockNumber), buf) +} + +func (s *Store) BlockWinners() ([]*BlockWinner, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + winners := make([]*BlockWinner, 0) + err := s.st.WalkPrefix(blockWinnerNS, func(key string, value []byte) bool { + w := new(BlockWinner) + err := msgpack.Unmarshal(value, w) + if err != nil { + return false + } + winners = append(winners, w) + return false + }) + if err != nil { + return nil, err + } + return winners, nil +} diff --git a/p2p/pkg/preconfirmation/store/store_test.go b/p2p/pkg/preconfirmation/store/store_test.go new file mode 100644 index 000000000..0f88192e0 --- /dev/null +++ b/p2p/pkg/preconfirmation/store/store_test.go @@ -0,0 +1,216 @@ +package store_test + +import ( + "bytes" + "testing" + + "github.com/ethereum/go-ethereum/common" + preconfpb "github.com/primev/mev-commit/p2p/gen/go/preconfirmation/v1" + "github.com/primev/mev-commit/p2p/pkg/preconfirmation/store" + inmem "github.com/primev/mev-commit/p2p/pkg/storage/inmem" +) + +func TestStore_AddCommitment(t *testing.T) { + st := store.New(inmem.New()) + commitment := &store.EncryptedPreConfirmationWithDecrypted{ + EncryptedPreConfirmation: &preconfpb.EncryptedPreConfirmation{ + Commitment: []byte("commitment"), + }, + PreConfirmation: &preconfpb.PreConfirmation{ + Bid: &preconfpb.Bid{ + BlockNumber: 1, + }, + }, + } + err := st.AddCommitment(commitment) + if err != nil { + t.Fatal(err) + } + + commitments, err := st.GetCommitments(1) + if err != nil { + t.Fatal(err) + } + + if len(commitments) != 1 { + t.Fatalf("expected 1 commitment, got %d", len(commitments)) + } + + if !bytes.Equal(commitments[0].EncryptedPreConfirmation.Commitment, []byte("commitment")) { + t.Fatalf("expected commitment, got %s", commitments[0].EncryptedPreConfirmation.Commitment) + } +} + +func TestStore_ClearBlockNumber(t *testing.T) { + st := store.New(inmem.New()) + commitment := &store.EncryptedPreConfirmationWithDecrypted{ + EncryptedPreConfirmation: &preconfpb.EncryptedPreConfirmation{ + Commitment: []byte("commitment"), + }, + PreConfirmation: &preconfpb.PreConfirmation{ + Bid: &preconfpb.Bid{ + BlockNumber: 1, + }, + }, + } + err := st.AddCommitment(commitment) + if err != nil { + t.Fatal(err) + } + + err = st.ClearBlockNumber(1) + if err != nil { + t.Fatal(err) + } + + commitments, err := st.GetCommitments(1) + if err != nil { + t.Fatal(err) + } + + if len(commitments) != 0 { + t.Fatalf("expected 0 commitments, got %d", len(commitments)) + } +} + +func TestStore_ClearCommitmentIndex(t *testing.T) { + inmemstore := inmem.New() + st := store.New(inmemstore) + commitment := &store.EncryptedPreConfirmationWithDecrypted{ + EncryptedPreConfirmation: &preconfpb.EncryptedPreConfirmation{ + Commitment: []byte("commitment"), + }, + PreConfirmation: &preconfpb.PreConfirmation{ + Bid: &preconfpb.Bid{ + BlockNumber: 1, + }, + }, + } + err := st.AddCommitment(commitment) + if err != nil { + t.Fatal(err) + } + + err = st.ClearCommitmentIndexes(2) + if err != nil { + t.Fatal(err) + } + + entries := 0 + err = inmemstore.WalkPrefix(store.CmtIndexNS, func(_ string, _ []byte) bool { + entries++ + return false + }) + if err != nil { + t.Fatal(err) + } + + if entries != 0 { + t.Fatalf("expected 0 entries, got %d", entries) + } +} + +func TestStore_DeleteCommitmentByDigest(t *testing.T) { + st := store.New(inmem.New()) + digest := [32]byte{} + copy(digest[:], []byte("commitment")) + + commitment := &store.EncryptedPreConfirmationWithDecrypted{ + EncryptedPreConfirmation: &preconfpb.EncryptedPreConfirmation{ + Commitment: digest[:], + }, + PreConfirmation: &preconfpb.PreConfirmation{ + Bid: &preconfpb.Bid{ + BlockNumber: 1, + }, + }, + } + err := st.AddCommitment(commitment) + if err != nil { + t.Fatal(err) + } + + err = st.DeleteCommitmentByDigest(1, digest) + if err != nil { + t.Fatal(err) + } + + commitments, err := st.GetCommitments(1) + if err != nil { + t.Fatal(err) + } + + if len(commitments) != 0 { + t.Fatalf("expected 0 commitments, got %d", len(commitments)) + } +} + +func TestStore_SetCommitmentIndexByDigest(t *testing.T) { + st := store.New(inmem.New()) + digest := [32]byte{} + copy(digest[:], []byte("commitment")) + index := [32]byte{} + copy(index[:], []byte("index")) + + commitment := &store.EncryptedPreConfirmationWithDecrypted{ + EncryptedPreConfirmation: &preconfpb.EncryptedPreConfirmation{ + Commitment: digest[:], + }, + PreConfirmation: &preconfpb.PreConfirmation{ + Bid: &preconfpb.Bid{ + BlockNumber: 1, + }, + }, + } + err := st.AddCommitment(commitment) + if err != nil { + t.Fatal(err) + } + + err = st.SetCommitmentIndexByDigest(digest, index) + if err != nil { + t.Fatal(err) + } + + commitments, err := st.GetCommitments(1) + if err != nil { + t.Fatal(err) + } + + if len(commitments) != 1 { + t.Fatalf("expected 1 commitment, got %d", len(commitments)) + } + + if !bytes.Equal(commitments[0].EncryptedPreConfirmation.CommitmentIndex, index[:]) { + t.Fatalf("expected index, got %s", commitments[0].EncryptedPreConfirmation.CommitmentIndex) + } +} + +func TestStore_AddWinner(t *testing.T) { + st := store.New(inmem.New()) + winner := &store.BlockWinner{ + BlockNumber: 1, + Winner: common.HexToAddress("0x123"), + } + err := st.AddWinner(winner) + if err != nil { + t.Fatal(err) + } + + winners, err := st.BlockWinners() + if err != nil { + t.Fatal(err) + } + + if len(winners) != 1 { + t.Fatalf("expected 1 winner, got %d", len(winners)) + } + + if winners[0].BlockNumber != 1 { + t.Fatalf("expected block number 1, got %d", winners[0].BlockNumber) + } + + if winners[0].Winner != common.HexToAddress("0x123") { + t.Fatalf("expected winner 0x123, got %s", winners[0].Winner.Hex()) + } +} diff --git a/p2p/pkg/preconfirmation/tracker/tracker.go b/p2p/pkg/preconfirmation/tracker/tracker.go index 3d80fdac1..d3786c1a5 100644 --- a/p2p/pkg/preconfirmation/tracker/tracker.go +++ b/p2p/pkg/preconfirmation/tracker/tracker.go @@ -5,6 +5,7 @@ import ( "fmt" "log/slog" "math/big" + "slices" "time" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -14,13 +15,17 @@ import ( blocktracker "github.com/primev/mev-commit/contracts-abi/clients/BlockTracker" preconfcommstore "github.com/primev/mev-commit/contracts-abi/clients/PreConfCommitmentStore" "github.com/primev/mev-commit/p2p/pkg/p2p" - "github.com/primev/mev-commit/p2p/pkg/store" + "github.com/primev/mev-commit/p2p/pkg/preconfirmation/store" "github.com/primev/mev-commit/x/contracts/events" "github.com/primev/mev-commit/x/contracts/txmonitor" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sync/errgroup" ) +const ( + allowedDelayToOpenCommitment = 10 +) + type Tracker struct { peerType p2p.PeerType self common.Address @@ -32,7 +37,7 @@ type Tracker struct { newL1Blocks chan *blocktracker.BlocktrackerNewL1Block enryptedCmts chan *preconfcommstore.PreconfcommitmentstoreEncryptedCommitmentStored commitments chan *preconfcommstore.PreconfcommitmentstoreCommitmentStored - winners map[int64]*blocktracker.BlocktrackerNewL1Block + triggerOpen chan struct{} metrics *metrics logger *slog.Logger } @@ -40,17 +45,20 @@ type Tracker struct { type OptsGetter func(context.Context) (*bind.TransactOpts, error) type CommitmentStore interface { - GetCommitmentsByBlockNumber(blockNum int64) ([]*store.EncryptedPreConfirmationWithDecrypted, error) - AddCommitment(commitment *store.EncryptedPreConfirmationWithDecrypted) - DeleteCommitmentByBlockNumber(blockNum int64) error + GetCommitments(blockNum int64) ([]*store.EncryptedPreConfirmationWithDecrypted, error) + AddCommitment(commitment *store.EncryptedPreConfirmationWithDecrypted) error + ClearBlockNumber(blockNum int64) error DeleteCommitmentByDigest( blockNum int64, digest [32]byte, ) error - SetCommitmentIndexByCommitmentDigest( + SetCommitmentIndexByDigest( commitmentDigest, commitmentIndex [32]byte, ) error + ClearCommitmentIndexes(upto int64) error + AddWinner(winner *store.BlockWinner) error + BlockWinners() ([]*store.BlockWinner, error) } type PreconfContract interface { @@ -87,15 +95,12 @@ func NewTracker( preconfContract: preconfContract, receiptGetter: receiptGetter, optsGetter: optsGetter, - // Buffered channels to avoid blocking the event manager. The buffer size - // should be enough to allow the tracker time to process commitments for a block - // which involves opening commitments on-chain. - newL1Blocks: make(chan *blocktracker.BlocktrackerNewL1Block, 5), - enryptedCmts: make(chan *preconfcommstore.PreconfcommitmentstoreEncryptedCommitmentStored), - commitments: make(chan *preconfcommstore.PreconfcommitmentstoreCommitmentStored), - winners: make(map[int64]*blocktracker.BlocktrackerNewL1Block), - metrics: newMetrics(), - logger: logger, + newL1Blocks: make(chan *blocktracker.BlocktrackerNewL1Block), + enryptedCmts: make(chan *preconfcommstore.PreconfcommitmentstoreEncryptedCommitmentStored), + commitments: make(chan *preconfcommstore.PreconfcommitmentstoreCommitmentStored), + triggerOpen: make(chan struct{}), + metrics: newMetrics(), + logger: logger, } } @@ -177,26 +182,19 @@ func (t *Tracker) Start(ctx context.Context) <-chan struct{} { return doneChan } - eg.Go(func() error { - select { - case <-egCtx.Done(): - t.logger.Info("err listener context done") - return nil - case err := <-sub.Err(): - return fmt.Errorf("event subscription error: %w", err) - } - }) - eg.Go(func() error { for { select { case <-egCtx.Done(): t.logger.Info("handleNewL1Block context done") return nil + case err := <-sub.Err(): + return fmt.Errorf("event subscription error: %w", err) case newL1Block := <-t.newL1Blocks: if err := t.handleNewL1Block(egCtx, newL1Block); err != nil { return err } + t.triggerOpenCommitments() } } }) @@ -207,6 +205,8 @@ func (t *Tracker) Start(ctx context.Context) <-chan struct{} { case <-egCtx.Done(): t.logger.Info("handleEncryptedCommitmentStored context done") return nil + case err := <-sub.Err(): + return fmt.Errorf("event subscription error: %w", err) case ec := <-t.enryptedCmts: if err := t.handleEncryptedCommitmentStored(egCtx, ec); err != nil { return err @@ -215,6 +215,72 @@ func (t *Tracker) Start(ctx context.Context) <-chan struct{} { } }) + eg.Go(func() error { + tick := time.NewTicker(2 * time.Second) + defer tick.Stop() + for { + select { + case <-egCtx.Done(): + t.logger.Info("openCommitments context done") + return nil + case <-t.triggerOpen: + case <-tick.C: + } + winners, err := t.store.BlockWinners() + if err != nil { + t.logger.Error("failed to get block winners", "error", err) + continue + } + if len(winners) == 0 { + t.logger.Info("no winners to open commitments") + continue + } + t.logger.Info("stored block winners", "count", len(winners)) + oldBlockNos := make([]int64, 0) + winners = slices.DeleteFunc(winners, func(item *store.BlockWinner) bool { + // the last block is the latest, so if any of the previous blocks are + // older than the allowed delay, we should not open the commitments + if winners[len(winners)-1].BlockNumber-item.BlockNumber > allowedDelayToOpenCommitment { + oldBlockNos = append(oldBlockNos, item.BlockNumber) + return true + } + return false + }) + // cleanup old state + for _, oldBlockNo := range oldBlockNos { + if err := t.store.ClearBlockNumber(oldBlockNo); err != nil { + t.logger.Error("failed to delete commitments by block number", "blockNumber", oldBlockNo, "error", err) + } + t.logger.Info("old block commitments deleted", "blockNumber", oldBlockNo) + } + if t.peerType == p2p.PeerTypeBidder { + if len(winners) > 2 { + // Bidders should process the block 2 behind the current one. Ideally the + // provider should open the commitment as they get the reward, so the incentive + // for bidder to open is only in cases of slashes as he will get refund. Only one + // of bidder or provider should open the commitment as 1 of the txns would + // fail. This delay is to ensure this. + t.logger.Info("bidder detected, processing 2 blocks behind the current one") + winners = winners[:len(winners)-2] + } else { + t.logger.Info("no winners to open commitments") + continue + } + } + t.logger.Info("opening commitments", "count", len(winners)) + for _, winner := range winners { + if err := t.openCommitments(egCtx, winner); err != nil { + t.logger.Error("failed to open commitments", "error", err) + return err + } + } + } + }) + + eg.Go(func() error { + return t.clearCommitments(egCtx) + }) + if t.peerType == p2p.PeerTypeBidder { eg.Go(func() error { for { @@ -222,6 +288,8 @@ func (t *Tracker) Start(ctx context.Context) <-chan struct{} { case <-egCtx.Done(): t.logger.Info("handleCommitmentStored context done") return nil + case err := <-sub.Err(): + return fmt.Errorf("event subscription error: %w", err) case cs := <-t.commitments: if err := t.handleCommitmentStored(egCtx, cs); err != nil { return err @@ -245,14 +313,20 @@ func (t *Tracker) TrackCommitment( ctx context.Context, commitment *store.EncryptedPreConfirmationWithDecrypted, ) error { - t.store.AddCommitment(commitment) - return nil + return t.store.AddCommitment(commitment) } func (t *Tracker) Metrics() []prometheus.Collector { return t.metrics.Metrics() } +func (t *Tracker) triggerOpenCommitments() { + select { + case t.triggerOpen <- struct{}{}: + default: + } +} + func (t *Tracker) handleNewL1Block( ctx context.Context, newL1Block *blocktracker.BlocktrackerNewL1Block, @@ -264,30 +338,19 @@ func (t *Tracker) handleNewL1Block( "window", newL1Block.Window, ) - openStart := time.Now() + return t.store.AddWinner(&store.BlockWinner{ + BlockNumber: newL1Block.BlockNumber.Int64(), + Winner: newL1Block.Winner, + }) +} - if t.peerType == p2p.PeerTypeBidder { - // Bidders should process the block 1 behind the current one. Ideally the - // provider should open the commitment as they get the reward, so the incentive - // for bidder to open is only in cases of slashes as he will get refund. Only one - // of bidder or provider should open the commitment as 1 of the txns would - // fail. This delay is to ensure this. - t.logger.Info("bidder detected, processing 2 blocks behind the current one") - t.winners[newL1Block.BlockNumber.Int64()] = newL1Block - pastBlock, ok := t.winners[newL1Block.BlockNumber.Int64()-2] - if !ok { - return nil - } - newL1Block = pastBlock - t.logger.Info("processing past block", "blockNumber", pastBlock.BlockNumber) - for k := range t.winners { - if k < pastBlock.BlockNumber.Int64() { - delete(t.winners, k) - } - } - } +func (t *Tracker) openCommitments( + ctx context.Context, + newL1Block *store.BlockWinner, +) error { + openStart := time.Now() - commitments, err := t.store.GetCommitmentsByBlockNumber(newL1Block.BlockNumber.Int64()) + commitments, err := t.store.GetCommitments(newL1Block.BlockNumber) if err != nil { t.logger.Error("failed to get commitments by block number", "blockNumber", newL1Block.BlockNumber, "error", err) return err @@ -349,12 +412,12 @@ func (t *Tracker) handleNewL1Block( t.logger.Info("opened commitment", "txHash", txHash, "duration", duration, "blockNumber", newL1Block.BlockNumber, - "commiter", common.Bytes2Hex(commitment.ProviderAddress), + "committer", common.Bytes2Hex(commitment.ProviderAddress), ) settled++ } - err = t.store.DeleteCommitmentByBlockNumber(newL1Block.BlockNumber.Int64()) + err = t.store.ClearBlockNumber(newL1Block.BlockNumber) if err != nil { t.logger.Error("failed to delete commitments by block number", "blockNumber", newL1Block.BlockNumber, "error", err) return err @@ -391,12 +454,41 @@ func (t *Tracker) handleNewL1Block( return nil } +func (t *Tracker) clearCommitments(ctx context.Context) error { + ticker := time.NewTicker(10 * time.Minute) + defer ticker.Stop() + + for { + select { + case <-ctx.Done(): + return ctx.Err() + case <-ticker.C: + } + winners, err := t.store.BlockWinners() + if err != nil { + return err + } + + if len(winners) == 0 { + continue + } + + // clear commitment indexes for all the blocks before the oldest winner + err = t.store.ClearCommitmentIndexes(winners[0].BlockNumber) + if err != nil { + return err + } + + t.logger.Info("commitment indexes cleared", "blockNumber", winners[0].BlockNumber) + } +} + func (t *Tracker) handleEncryptedCommitmentStored( ctx context.Context, ec *preconfcommstore.PreconfcommitmentstoreEncryptedCommitmentStored, ) error { t.metrics.totalEncryptedCommitments.Inc() - return t.store.SetCommitmentIndexByCommitmentDigest(ec.CommitmentDigest, ec.CommitmentIndex) + return t.store.SetCommitmentIndexByDigest(ec.CommitmentDigest, ec.CommitmentIndex) } func (t *Tracker) handleCommitmentStored( diff --git a/p2p/pkg/preconfirmation/tracker/tracker_test.go b/p2p/pkg/preconfirmation/tracker/tracker_test.go index ee8aa229d..686658d5a 100644 --- a/p2p/pkg/preconfirmation/tracker/tracker_test.go +++ b/p2p/pkg/preconfirmation/tracker/tracker_test.go @@ -5,11 +5,11 @@ import ( "context" "errors" "fmt" - "io" "math/big" "os" "strings" "testing" + "time" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -20,8 +20,9 @@ import ( preconf "github.com/primev/mev-commit/contracts-abi/clients/PreConfCommitmentStore" preconfpb "github.com/primev/mev-commit/p2p/gen/go/preconfirmation/v1" "github.com/primev/mev-commit/p2p/pkg/p2p" + "github.com/primev/mev-commit/p2p/pkg/preconfirmation/store" preconftracker "github.com/primev/mev-commit/p2p/pkg/preconfirmation/tracker" - "github.com/primev/mev-commit/p2p/pkg/store" + inmemstorage "github.com/primev/mev-commit/p2p/pkg/storage/inmem" "github.com/primev/mev-commit/x/contracts/events" "github.com/primev/mev-commit/x/contracts/txmonitor" "github.com/primev/mev-commit/x/util" @@ -52,7 +53,7 @@ func TestTracker(t *testing.T) { &brABI, ) - st := store.NewStore() + st := store.New(inmemstorage.New()) contract := &testPreconfContract{ openedCommitments: make(chan openedCommitment, 10), @@ -70,7 +71,7 @@ func TestTracker(t *testing.T) { From: common.HexToAddress("0x1234"), }, nil }, - util.NewTestLogger(io.Discard), + util.NewTestLogger(os.Stdout), ) ctx, cancel := context.WithCancel(context.Background()) @@ -132,7 +133,7 @@ func TestTracker(t *testing.T) { } err = publishEncCommitment(evtMgr, &pcABI, preconf.PreconfcommitmentstoreEncryptedCommitmentStored{ - Commiter: common.BytesToAddress(c.PreConfirmation.ProviderAddress), + Committer: common.BytesToAddress(c.PreConfirmation.ProviderAddress), CommitmentIndex: common.HexToHash(fmt.Sprintf("0x%x", i+1)), CommitmentDigest: common.BytesToHash(c.EncryptedPreConfirmation.Commitment), CommitmentSignature: c.EncryptedPreConfirmation.Signature, @@ -151,7 +152,7 @@ func TestTracker(t *testing.T) { err = publishCommitment(evtMgr, &pcABI, preconf.PreconfcommitmentstoreCommitmentStored{ CommitmentIndex: common.HexToHash(fmt.Sprintf("0x%x", 5)), Bidder: common.HexToAddress("0x1234"), - Commiter: common.BytesToAddress(commitments[4].PreConfirmation.ProviderAddress), + Committer: common.BytesToAddress(commitments[4].PreConfirmation.ProviderAddress), Bid: amount, BlockNumber: uint64(commitments[4].PreConfirmation.Bid.BlockNumber), BidHash: common.BytesToHash(commitments[4].PreConfirmation.Bid.Digest), @@ -185,7 +186,7 @@ func TestTracker(t *testing.T) { for _, c := range opened { oc := <-contract.openedCommitments - if !bytes.Equal(c.EncryptedPreConfirmation.CommitmentIndex, oc.encryptedCommitmentIndex[:]) { + if !bytes.Equal(c.EncryptedPreConfirmation.Commitment, oc.encryptedCommitmentIndex[:]) { t.Fatalf( "expected commitment index %x, got %x", c.EncryptedPreConfirmation.CommitmentIndex, @@ -258,7 +259,7 @@ func TestTracker(t *testing.T) { for _, c := range opened { oc := <-contract.openedCommitments - if !bytes.Equal(c.EncryptedPreConfirmation.CommitmentIndex, oc.encryptedCommitmentIndex[:]) { + if !bytes.Equal(c.EncryptedPreConfirmation.Commitment, oc.encryptedCommitmentIndex[:]) { t.Fatalf( "expected commitment index %x, got %x", c.EncryptedPreConfirmation.CommitmentIndex, @@ -315,6 +316,86 @@ func TestTracker(t *testing.T) { <-doneChan } +func TestTrackerIgnoreOldBlocks(t *testing.T) { + t.Parallel() + + pcABI, err := abi.JSON(strings.NewReader(preconf.PreconfcommitmentstoreABI)) + if err != nil { + t.Fatal(err) + } + + btABI, err := abi.JSON(strings.NewReader(blocktracker.BlocktrackerABI)) + if err != nil { + t.Fatal(err) + } + + brABI, err := abi.JSON(strings.NewReader(bidderregistry.BidderregistryABI)) + if err != nil { + t.Fatal(err) + } + + evtMgr := events.NewListener( + util.NewTestLogger(os.Stdout), + &btABI, + &pcABI, + &brABI, + ) + + st := store.New(inmemstorage.New()) + + for _, b := range []int64{1, 12, 13} { + if err := st.AddWinner(&store.BlockWinner{ + BlockNumber: b, + Winner: common.HexToAddress("0x1234"), + }); err != nil { + t.Fatal(err) + } + } + + contract := &testPreconfContract{ + openedCommitments: make(chan openedCommitment, 10), + } + + tracker := preconftracker.NewTracker( + p2p.PeerTypeProvider, + common.HexToAddress("0x1234"), + evtMgr, + st, + contract, + &testReceiptGetter{count: 1}, + func(context.Context) (*bind.TransactOpts, error) { + return &bind.TransactOpts{ + From: common.HexToAddress("0x1234"), + }, nil + }, + util.NewTestLogger(os.Stdout), + ) + + ctx, cancel := context.WithCancel(context.Background()) + doneChan := tracker.Start(ctx) + + startTime := time.Now() + for { + winners, err := st.BlockWinners() + if err != nil { + t.Fatal(err) + } + + if len(winners) == 0 { + break + } + + time.Sleep(100 * time.Millisecond) + if time.Since(startTime) > 5*time.Second { + t.Fatal("timed out waiting for block winners to be cleared") + } + } + + cancel() + + <-doneChan +} + type openedCommitment struct { encryptedCommitmentIndex [32]byte bid *big.Int @@ -384,7 +465,7 @@ func publishEncCommitment( ) error { event := pcABI.Events["EncryptedCommitmentStored"] buf, err := event.Inputs.NonIndexed().Pack( - ec.Commiter, + ec.Committer, ec.CommitmentDigest, ec.CommitmentSignature, ec.DispatchTimestamp, @@ -417,7 +498,7 @@ func publishCommitment( event := pcABI.Events["CommitmentStored"] buf, err := event.Inputs.NonIndexed().Pack( c.Bidder, - c.Commiter, + c.Committer, c.Bid, c.BlockNumber, c.BidHash, diff --git a/p2p/pkg/rpc/bidder/service.go b/p2p/pkg/rpc/bidder/service.go index 78f61b8a7..bd1661acd 100644 --- a/p2p/pkg/rpc/bidder/service.go +++ b/p2p/pkg/rpc/bidder/service.go @@ -30,6 +30,8 @@ type Service struct { watcher TxWatcher optsGetter OptsGetter autoDepositTracker AutoDepositTracker + store DepositStore + oracleWindowOffset *big.Int logger *slog.Logger metrics *metrics validator *protovalidate.Validator @@ -45,6 +47,8 @@ func NewService( watcher TxWatcher, optsGetter OptsGetter, autoDepositTracker AutoDepositTracker, + store DepositStore, + oracleWindowOffset *big.Int, logger *slog.Logger, ) *Service { return &Service{ @@ -58,6 +62,8 @@ func NewService( logger: logger, metrics: newMetrics(), autoDepositTracker: autoDepositTracker, + oracleWindowOffset: oracleWindowOffset, + store: store, validator: validator, } } @@ -92,6 +98,15 @@ type TxWatcher interface { type OptsGetter func(context.Context) (*bind.TransactOpts, error) +type DepositStore interface { + // StoreDeposits stores the deposited windows. + StoreDeposits(ctx context.Context, windows []*big.Int) error + // ClearDeposits clears the deposits for the given windows. + ClearDeposits(ctx context.Context, windows []*big.Int) error + // IsDepositMade checks if the deposit is already made for the given window. + IsDepositMade(ctx context.Context, window *big.Int) bool +} + func (s *Service) SendBid( bid *bidderapiv1.Bid, srv bidderapiv1.Bidder_SendBidServer, @@ -108,8 +123,16 @@ func (s *Service) SendBid( return status.Errorf(codes.InvalidArgument, "validating bid: %v", err) } - txnsStr := strings.Join(bid.TxHashes, ",") - revertingTxHashesStr := strings.Join(bid.RevertingTxHashes, ",") + // Helper function to strip "0x" prefix + stripPrefix := func(hashes []string) []string { + stripped := make([]string, len(hashes)) + for i, hash := range hashes { + stripped[i] = strings.TrimPrefix(hash, "0x") + } + return stripped + } + txnsStr := strings.Join(stripPrefix(bid.TxHashes), ",") + revertingTxHashesStr := strings.Join(stripPrefix(bid.RevertingTxHashes), ",") respC, err := s.sender.SendBid( ctx, @@ -199,6 +222,11 @@ func (s *Service) Deposit( return nil, status.Errorf(codes.Internal, "receipt status: %v", receipt.Status) } + err = s.store.StoreDeposits(ctx, []*big.Int{windowToDeposit}) + if err != nil { + return nil, status.Errorf(codes.Internal, "storing deposits: %v", err) + } + for _, log := range receipt.Logs { if registration, err := s.registryContract.ParseBidderRegistered(*log); err == nil { s.logger.Info("deposit successful", "amount", registration.DepositedAmount, "window", registration.WindowNumber) @@ -226,9 +254,9 @@ func (s *Service) calculateWindowToDeposit(ctx context.Context, r *bidderapiv1.D } else if r.BlockNumber != nil { return new(big.Int).SetUint64((r.BlockNumber.Value-1)/s.blocksPerWindow + 1), nil } - // Default to two windows ahead of the current window if no specific block or window is given. - // This is for the case where the oracle works 2 windows behind the current window. - return new(big.Int).SetUint64(currentWindow + 2), nil + // Default to N window ahead of the current window if no specific block or window is given. + // This is for the case where the oracle works N windows behind the current window. + return new(big.Int).SetUint64(currentWindow + s.oracleWindowOffset.Uint64()), nil } func (s *Service) GetDeposit( @@ -244,8 +272,8 @@ func (s *Service) GetDeposit( if err != nil { return nil, status.Errorf(codes.Internal, "getting current window: %v", err) } - // as oracle working 2 windows behind the current window, we add + 2 here - window = new(big.Int).Add(window, big.NewInt(2)) + // as oracle working N windows behind the current window, we add + N here + window = new(big.Int).Add(window, s.oracleWindowOffset) } else { window = new(big.Int).SetUint64(r.WindowNumber.Value) } @@ -303,6 +331,11 @@ func (s *Service) Withdraw( return nil, status.Errorf(codes.Internal, "receipt status: %v", receipt.Status) } + err = s.store.ClearDeposits(ctx, []*big.Int{window}) + if err != nil { + return nil, status.Errorf(codes.Internal, "clearing deposits: %v", err) + } + for _, log := range receipt.Logs { if withdrawal, err := s.registryContract.ParseBidderWithdrawal(*log); err == nil { s.logger.Info("withdrawal successful", "amount", withdrawal.Amount.String(), "window", withdrawal.Window.String()) @@ -414,6 +447,11 @@ func (s *Service) CancelAutoDeposit( } if receipt.Status != types.ReceiptStatusSuccessful { s.logger.Error("receipt status", "status", receipt.Status) + return + } + err = s.store.ClearDeposits(context.Background(), windows) + if err != nil { + s.logger.Error("clearing deposits", "error", err) } return } @@ -470,6 +508,11 @@ func (s *Service) WithdrawFromWindows( return nil, status.Errorf(codes.Internal, "receipt status: %v", receipt.Status) } + err = s.store.ClearDeposits(ctx, windows) + if err != nil { + return nil, status.Errorf(codes.Internal, "clearing deposits: %v", err) + } + var amountsAndWindows []*bidderapiv1.WithdrawResponse for _, log := range receipt.Logs { if withdrawal, err := s.registryContract.ParseBidderWithdrawal(*log); err == nil { @@ -503,8 +546,8 @@ func (s *Service) AutoDepositStatus( ) (*bidderapiv1.AutoDepositStatusResponse, error) { deposits, isAutodepositEnabled, currentWindow := s.autoDepositTracker.GetStatus() if currentWindow != nil { - // as oracle working 2 windows behind the current window, we add + 2 here - currentWindow = new(big.Int).Add(currentWindow, big.NewInt(2)) + // as oracle working N windows behind the current window, we add + N here + currentWindow = new(big.Int).Add(currentWindow, s.oracleWindowOffset) } var autoDeposits []*bidderapiv1.AutoDeposit for window, ok := range deposits { diff --git a/p2p/pkg/rpc/bidder/service_test.go b/p2p/pkg/rpc/bidder/service_test.go index 16a3c8f94..1d9d8bec5 100644 --- a/p2p/pkg/rpc/bidder/service_test.go +++ b/p2p/pkg/rpc/bidder/service_test.go @@ -19,7 +19,9 @@ import ( bidderregistry "github.com/primev/mev-commit/contracts-abi/clients/BidderRegistry" bidderapiv1 "github.com/primev/mev-commit/p2p/gen/go/bidderapi/v1" preconfpb "github.com/primev/mev-commit/p2p/gen/go/preconfirmation/v1" + autodepositorstore "github.com/primev/mev-commit/p2p/pkg/autodepositor/store" bidderapi "github.com/primev/mev-commit/p2p/pkg/rpc/bidder" + inmemstorage "github.com/primev/mev-commit/p2p/pkg/storage/inmem" "github.com/primev/mev-commit/x/util" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -216,6 +218,8 @@ func startServer(t *testing.T) bidderapiv1.BidderClient { sender := &testSender{noOfPreconfs: 2} blockTrackerContract := &testBlockTrackerContract{lastBlockNumber: blocksPerWindow + 1, blocksPerWindow: blocksPerWindow, blockNumberToWinner: make(map[uint64]common.Address)} testAutoDepositTracker := &testAutoDepositTracker{deposits: make(map[uint64]bool)} + oracleWindowOffset := big.NewInt(1) + store := autodepositorstore.New(inmemstorage.New()) srvImpl := bidderapi.NewService( owner, blockTrackerContract.blocksPerWindow, @@ -231,6 +235,8 @@ func startServer(t *testing.T) bidderapiv1.BidderClient { }, nil }, testAutoDepositTracker, + store, + oracleWindowOffset, logger, ) @@ -493,6 +499,15 @@ func TestSendBid(t *testing.T) { decayEndTimestamp: 20, err: "", }, + { + name: "success", + txHexs: []string{common.HexToHash("0x0000ab").Hex()}, + amount: "1000000000000000000", + blockNum: 1, + decayStartTimestamp: 10, + decayEndTimestamp: 20, + err: "", + }, } { t.Run(tc.name, func(t *testing.T) { rcv, err := client.SendBid(context.Background(), &bidderapiv1.Bid{ diff --git a/p2p/pkg/rpc/debug/service.go b/p2p/pkg/rpc/debug/service.go index 8d70808d1..39a40dcab 100644 --- a/p2p/pkg/rpc/debug/service.go +++ b/p2p/pkg/rpc/debug/service.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/common" debugapiv1 "github.com/primev/mev-commit/p2p/gen/go/debugapi/v1" "github.com/primev/mev-commit/p2p/pkg/p2p" - "github.com/primev/mev-commit/p2p/pkg/store" "github.com/primev/mev-commit/p2p/pkg/topology" + "github.com/primev/mev-commit/x/contracts/txmonitor" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/structpb" @@ -37,7 +37,7 @@ func NewService( } type Store interface { - PendingTxns() ([]*store.TxnDetails, error) + PendingTxns() ([]*txmonitor.TxnDetails, error) } type Canceller interface { diff --git a/p2p/pkg/rpc/debug/service_test.go b/p2p/pkg/rpc/debug/service_test.go index c48a40663..4ca7ba717 100644 --- a/p2p/pkg/rpc/debug/service_test.go +++ b/p2p/pkg/rpc/debug/service_test.go @@ -9,15 +9,15 @@ import ( debugapiv1 "github.com/primev/mev-commit/p2p/gen/go/debugapi/v1" "github.com/primev/mev-commit/p2p/pkg/p2p" debugapi "github.com/primev/mev-commit/p2p/pkg/rpc/debug" - "github.com/primev/mev-commit/p2p/pkg/store" "github.com/primev/mev-commit/p2p/pkg/topology" + "github.com/primev/mev-commit/x/contracts/txmonitor" "github.com/stretchr/testify/assert" ) type mockStore struct{} -func (m *mockStore) PendingTxns() ([]*store.TxnDetails, error) { - return []*store.TxnDetails{ +func (m *mockStore) PendingTxns() ([]*txmonitor.TxnDetails, error) { + return []*txmonitor.TxnDetails{ { Hash: common.HexToHash("0x00001"), Nonce: 1, diff --git a/p2p/pkg/rpc/provider/service.go b/p2p/pkg/rpc/provider/service.go index 99b67bf32..194d847b7 100644 --- a/p2p/pkg/rpc/provider/service.go +++ b/p2p/pkg/rpc/provider/service.go @@ -42,9 +42,13 @@ type Service struct { type ProviderRegistryContract interface { RegisterAndStake(opts *bind.TransactOpts, blsPublicKey []byte) (*types.Transaction, error) - CheckStake(*bind.CallOpts, common.Address) (*big.Int, error) + GetProviderStake(*bind.CallOpts, common.Address) (*big.Int, error) MinStake(*bind.CallOpts) (*big.Int, error) ParseProviderRegistered(types.Log) (*providerregistry.ProviderregistryProviderRegistered, error) + ParseUnstake(types.Log) (*providerregistry.ProviderregistryUnstake, error) + ParseWithdraw(types.Log) (*providerregistry.ProviderregistryWithdraw, error) + Withdraw(opts *bind.TransactOpts) (*types.Transaction, error) + Unstake(opts *bind.TransactOpts) (*types.Transaction, error) } type Watcher interface { @@ -243,7 +247,7 @@ func (s *Service) GetStake( ctx context.Context, _ *providerapiv1.EmptyMessage, ) (*providerapiv1.StakeResponse, error) { - stakeAmount, err := s.registryContract.CheckStake(&bind.CallOpts{ + stakeAmount, err := s.registryContract.GetProviderStake(&bind.CallOpts{ Context: ctx, From: s.owner, }, s.owner) @@ -268,3 +272,71 @@ func (s *Service) GetMinStake( return &providerapiv1.StakeResponse{Amount: stakeAmount.String()}, nil } + +func (s *Service) WithdrawStake( + ctx context.Context, + _ *providerapiv1.EmptyMessage, +) (*providerapiv1.WithdrawalResponse, error) { + opts, err := s.optsGetter(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "getting transact opts: %v", err) + } + + tx, err := s.registryContract.Withdraw(opts) + if err != nil { + return nil, status.Errorf(codes.Internal, "withdrawing stake: %v", err) + } + + receipt, err := s.watcher.WaitForReceipt(ctx, tx) + if err != nil { + return nil, status.Errorf(codes.Internal, "waiting for receipt: %v", err) + } + + if receipt.Status != types.ReceiptStatusSuccessful { + return nil, status.Errorf(codes.Internal, "receipt status: %v", receipt.Status) + } + + for _, log := range receipt.Logs { + if withdrawal, err := s.registryContract.ParseWithdraw(*log); err == nil { + s.logger.Info("stake withdrawn", "amount", withdrawal.Amount) + return &providerapiv1.WithdrawalResponse{Amount: withdrawal.Amount.String()}, nil + } + } + + s.logger.Error("no withdrawal event found") + return nil, status.Error(codes.Internal, "no withdrawal event found") +} + +func (s *Service) Unstake( + ctx context.Context, + _ *providerapiv1.EmptyMessage, +) (*providerapiv1.EmptyMessage, error) { + opts, err := s.optsGetter(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "getting transact opts: %v", err) + } + + tx, err := s.registryContract.Unstake(opts) + if err != nil { + return nil, status.Errorf(codes.Internal, "requesting withdrawal: %v", err) + } + + receipt, err := s.watcher.WaitForReceipt(ctx, tx) + if err != nil { + return nil, status.Errorf(codes.Internal, "waiting for receipt: %v", err) + } + + if receipt.Status != types.ReceiptStatusSuccessful { + return nil, status.Errorf(codes.Internal, "receipt status: %v", receipt.Status) + } + + for _, log := range receipt.Logs { + if withdrawal, err := s.registryContract.ParseUnstake(*log); err == nil { + s.logger.Info("withdrawal requested", "timestamp", withdrawal.Timestamp) + return &providerapiv1.EmptyMessage{}, nil + } + } + + s.logger.Error("no withdrawal request event found") + return nil, status.Error(codes.Internal, "no withdrawal request event found") +} diff --git a/p2p/pkg/rpc/provider/service_test.go b/p2p/pkg/rpc/provider/service_test.go index 67c92222a..69eef7ac9 100644 --- a/p2p/pkg/rpc/provider/service_test.go +++ b/p2p/pkg/rpc/provider/service_test.go @@ -34,7 +34,7 @@ func (t *testRegistryContract) RegisterAndStake(opts *bind.TransactOpts, blsPubl return types.NewTransaction(1, common.Address{}, nil, 0, nil, nil), nil } -func (t *testRegistryContract) CheckStake(_ *bind.CallOpts, address common.Address) (*big.Int, error) { +func (t *testRegistryContract) GetProviderStake(_ *bind.CallOpts, address common.Address) (*big.Int, error) { return t.stake, nil } @@ -49,6 +49,28 @@ func (t *testRegistryContract) ParseProviderRegistered(log types.Log) (*provider }, nil } +func (t *testRegistryContract) ParseWithdraw(log types.Log) (*providerregistry.ProviderregistryWithdraw, error) { + return &providerregistry.ProviderregistryWithdraw{ + Provider: common.Address{}, + Amount: t.stake, + }, nil +} + +func (t *testRegistryContract) ParseUnstake(log types.Log) (*providerregistry.ProviderregistryUnstake, error) { + return &providerregistry.ProviderregistryUnstake{ + Provider: common.Address{}, + Timestamp: new(big.Int).SetInt64(time.Now().Unix()), + }, nil +} + +func (t *testRegistryContract) Unstake(opts *bind.TransactOpts) (*types.Transaction, error) { + return types.NewTransaction(1, common.Address{}, nil, 0, nil, nil), nil +} + +func (t *testRegistryContract) Withdraw(opts *bind.TransactOpts) (*types.Transaction, error) { + return types.NewTransaction(1, common.Address{}, nil, 0, nil, nil), nil +} + type testWatcher struct{} func (t *testWatcher) WaitForReceipt(ctx context.Context, tx *types.Transaction) (*types.Receipt, error) { @@ -406,3 +428,39 @@ func TestBidHandling(t *testing.T) { }) } } + +func TestWithdrawStakedAmount(t *testing.T) { + t.Parallel() + + client, _ := startServer(t) + + t.Run("withdraw stake", func(t *testing.T) { + _, err := client.RegisterStake(context.Background(), &providerapiv1.StakeRequest{ + Amount: "1000000000000000000", + BlsPublicKey: "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456", + }) + if err != nil { + t.Fatalf("error depositing stake: %v", err) + } + withdrawalResp, err := client.WithdrawStake(context.Background(), &providerapiv1.EmptyMessage{}) + if err != nil { + t.Fatalf("error withdrawing stake: %v", err) + } + if withdrawalResp.Amount != "1000000000000000000" { + t.Fatalf("expected amount to be 1000000000000000000, got %v", withdrawalResp.Amount) + } + }) +} + +func TestRequestWithdrawal(t *testing.T) { + t.Parallel() + + client, _ := startServer(t) + + t.Run("request withdrawal", func(t *testing.T) { + _, err := client.Unstake(context.Background(), &providerapiv1.EmptyMessage{}) + if err != nil { + t.Fatalf("error requesting withdrawal: %v", err) + } + }) +} diff --git a/p2p/pkg/signer/preconfencryptor/encryptor_test.go b/p2p/pkg/signer/preconfencryptor/encryptor_test.go index 60a369298..bfd2bcf15 100644 --- a/p2p/pkg/signer/preconfencryptor/encryptor_test.go +++ b/p2p/pkg/signer/preconfencryptor/encryptor_test.go @@ -12,8 +12,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" preconfpb "github.com/primev/mev-commit/p2p/gen/go/preconfirmation/v1" p2pcrypto "github.com/primev/mev-commit/p2p/pkg/crypto" + "github.com/primev/mev-commit/p2p/pkg/keysstore" "github.com/primev/mev-commit/p2p/pkg/signer/preconfencryptor" - "github.com/primev/mev-commit/p2p/pkg/store" + inmemstorage "github.com/primev/mev-commit/p2p/pkg/storage/inmem" mockkeysigner "github.com/primev/mev-commit/x/keysigner/mock" "github.com/stretchr/testify/assert" ) @@ -33,7 +34,7 @@ func TestBids(t *testing.T) { if err != nil { t.Fatal(err) } - bidderStore := store.NewStore() + bidderStore := keysstore.New(inmemstorage.New()) err = bidderStore.SetAESKey(address, aesKey) if err != nil { t.Fatal(err) @@ -49,7 +50,7 @@ func TestBids(t *testing.T) { t.Fatal(err) } - providerStore := store.NewStore() + providerStore := keysstore.New(inmemstorage.New()) err = providerStore.SetAESKey(address, aesKey) if err != nil { t.Fatal(err) @@ -87,7 +88,7 @@ func TestBids(t *testing.T) { } keySigner := mockkeysigner.NewMockKeySigner(bidderKey, crypto.PubkeyToAddress(bidderKey.PublicKey)) - bidderStore := store.NewStore() + bidderStore := keysstore.New(inmemstorage.New()) err = bidderStore.SetAESKey(crypto.PubkeyToAddress(bidderKey.PublicKey), aesKey) if err != nil { t.Fatal(err) @@ -103,7 +104,7 @@ func TestBids(t *testing.T) { bidderAddress := crypto.PubkeyToAddress(bidderKey.PublicKey) keySigner = mockkeysigner.NewMockKeySigner(providerKey, crypto.PubkeyToAddress(providerKey.PublicKey)) - providerStore := store.NewStore() + providerStore := keysstore.New(inmemstorage.New()) err = providerStore.SetAESKey(crypto.PubkeyToAddress(bidderKey.PublicKey), aesKey) if err != nil { t.Fatal(err) @@ -323,7 +324,7 @@ func BenchmarkConstructEncryptedBid(b *testing.B) { if err != nil { b.Fatal(err) } - bidderStore := store.NewStore() + bidderStore := keysstore.New(inmemstorage.New()) err = bidderStore.SetAESKey(address, aesKey) if err != nil { b.Fatal(err) @@ -363,7 +364,7 @@ func BenchmarkConstructEncryptedPreConfirmation(b *testing.B) { } keySigner := mockkeysigner.NewMockKeySigner(bidderKey, crypto.PubkeyToAddress(bidderKey.PublicKey)) - bidderStore := store.NewStore() + bidderStore := keysstore.New(inmemstorage.New()) err = bidderStore.SetAESKey(crypto.PubkeyToAddress(bidderKey.PublicKey), aesKey) if err != nil { b.Fatal(err) @@ -378,7 +379,7 @@ func BenchmarkConstructEncryptedPreConfirmation(b *testing.B) { } keySigner = mockkeysigner.NewMockKeySigner(providerKey, crypto.PubkeyToAddress(providerKey.PublicKey)) - providerStore := store.NewStore() + providerStore := keysstore.New(inmemstorage.New()) err = providerStore.SetAESKey(crypto.PubkeyToAddress(bidderKey.PublicKey), aesKey) if err != nil { b.Fatal(err) diff --git a/p2p/pkg/storage/inmem/inmem.go b/p2p/pkg/storage/inmem/inmem.go new file mode 100644 index 000000000..7ca6784ba --- /dev/null +++ b/p2p/pkg/storage/inmem/inmem.go @@ -0,0 +1,50 @@ +package inmemstorage + +import ( + "github.com/armon/go-radix" + "github.com/primev/mev-commit/p2p/pkg/storage" +) + +type inmemStorage struct { + Tree *radix.Tree +} + +func New() *inmemStorage { + return &inmemStorage{ + Tree: radix.New(), + } +} + +func (s *inmemStorage) Close() error { + return nil +} + +func (s *inmemStorage) Get(key string) ([]byte, error) { + v, found := s.Tree.Get(key) + if !found { + return nil, storage.ErrKeyNotFound + } + return v.([]byte), nil +} + +func (s *inmemStorage) Put(key string, value []byte) error { + _, _ = s.Tree.Insert(key, value) + return nil +} + +func (s *inmemStorage) Delete(key string) error { + _, _ = s.Tree.Delete(key) + return nil +} + +func (s *inmemStorage) DeletePrefix(prefix string) error { + _ = s.Tree.DeletePrefix(prefix) + return nil +} + +func (s *inmemStorage) WalkPrefix(prefix string, fn func(key string, val []byte) bool) error { + s.Tree.WalkPrefix(prefix, func(k string, v interface{}) bool { + return fn(k, v.([]byte)) + }) + return nil +} diff --git a/p2p/pkg/storage/inmem/inmem_test.go b/p2p/pkg/storage/inmem/inmem_test.go new file mode 100644 index 000000000..46869fdc2 --- /dev/null +++ b/p2p/pkg/storage/inmem/inmem_test.go @@ -0,0 +1,15 @@ +package inmemstorage_test + +import ( + "testing" + + "github.com/primev/mev-commit/p2p/pkg/storage" + inmemstorage "github.com/primev/mev-commit/p2p/pkg/storage/inmem" + storagetest "github.com/primev/mev-commit/p2p/pkg/storage/testing" +) + +func TestInmemStorage(t *testing.T) { + storagetest.RunStoreTests(t, func() storage.Storage { + return inmemstorage.New() + }) +} diff --git a/p2p/pkg/storage/pebble/pebble.go b/p2p/pkg/storage/pebble/pebble.go new file mode 100644 index 000000000..0d96bb148 --- /dev/null +++ b/p2p/pkg/storage/pebble/pebble.go @@ -0,0 +1,132 @@ +package pebblestorage + +import ( + "errors" + + "github.com/cockroachdb/pebble" + "github.com/primev/mev-commit/p2p/pkg/storage" +) + +type pebbleStorage struct { + db *pebble.DB +} + +func New(path string) (*pebbleStorage, error) { + db, err := pebble.Open(path, &pebble.Options{}) + if err != nil { + return nil, err + } + return &pebbleStorage{ + db: db, + }, nil +} + +func (s *pebbleStorage) Close() error { + return errors.Join(s.db.Flush(), s.db.Close()) +} + +func (s *pebbleStorage) Get(key string) ([]byte, error) { + buf, closer, err := s.db.Get([]byte(key)) + if err != nil { + if err == pebble.ErrNotFound { + return nil, storage.ErrKeyNotFound + } + return nil, err + } + + val := make([]byte, len(buf)) + copy(val, buf) + + _ = closer.Close() + + return val, nil +} + +func (s *pebbleStorage) WalkPrefix(prefix string, fn func(key string, val []byte) bool) error { + iter, err := s.db.NewIter(&pebble.IterOptions{ + LowerBound: []byte(prefix), + UpperBound: upperBound([]byte(prefix)), + }) + if err != nil { + return err + } + defer iter.Close() + + for iter.First(); iter.Valid(); iter.Next() { + if fn(string(iter.Key()), iter.Value()) { + break + } + } + return nil +} + +func (s *pebbleStorage) Put(key string, value []byte) error { + return s.db.Set([]byte(key), value, pebble.NoSync) +} + +func (s *pebbleStorage) Delete(key string) error { + return s.db.Delete([]byte(key), pebble.NoSync) +} + +func (s *pebbleStorage) DeletePrefix(prefix string) error { + batch := s.db.NewBatch() + defer batch.Close() + + err := batch.DeleteRange([]byte(prefix), upperBound([]byte(prefix)), nil) + if err != nil { + return err + } + + return batch.Commit(pebble.NoSync) +} + +func (s *pebbleStorage) Batch() storage.Batch { + return &pebbleBatch{ + batch: s.db.NewBatch(), + } +} + +type pebbleBatch struct { + batch *pebble.Batch +} + +func (b *pebbleBatch) Put(key string, value []byte) error { + return b.batch.Set([]byte(key), value, nil) +} + +func (b *pebbleBatch) Delete(key string) error { + return b.batch.Delete([]byte(key), nil) +} + +func (b *pebbleBatch) DeletePrefix(prefix string) error { + return b.batch.DeleteRange([]byte(prefix), upperBound([]byte(prefix)), pebble.NoSync) +} + +func (b *pebbleBatch) Write() error { + return b.batch.Commit(pebble.NoSync) +} + +func (b *pebbleBatch) Reset() { + b.batch.Reset() +} +func upperBound(prefix []byte) []byte { + // if the prefix is 0x01..., we want 0x02 as an upper bound. + // if the prefix is 0x0000ff..., we want 0x0001 as an upper bound. + // if the prefix is 0x0000ff01..., we want 0x0000ff02 as an upper bound. + // if the prefix is 0xffffff..., we don't want an upper bound. + // if the prefix is 0xff..., we don't want an upper bound. + // if the prefix is empty, we don't want an upper bound. + // basically, we want to find the last byte that can be lexicographically incremented. + var upper []byte + for i := len(prefix) - 1; i >= 0; i-- { + b := prefix[i] + if b == 0xff { + continue + } + upper = make([]byte, i+1) + copy(upper, prefix) + upper[i] = b + 1 + break + } + return upper +} diff --git a/p2p/pkg/storage/pebble/pebble_test.go b/p2p/pkg/storage/pebble/pebble_test.go new file mode 100644 index 000000000..794d678d4 --- /dev/null +++ b/p2p/pkg/storage/pebble/pebble_test.go @@ -0,0 +1,19 @@ +package pebblestorage_test + +import ( + "testing" + + "github.com/primev/mev-commit/p2p/pkg/storage" + pebblestorage "github.com/primev/mev-commit/p2p/pkg/storage/pebble" + storagetest "github.com/primev/mev-commit/p2p/pkg/storage/testing" +) + +func TestPebbleStore(t *testing.T) { + storagetest.RunStoreTests(t, func() storage.Storage { + st, err := pebblestorage.New(t.TempDir()) + if err != nil { + t.Fatal(err) + } + return st + }) +} diff --git a/p2p/pkg/storage/storage.go b/p2p/pkg/storage/storage.go new file mode 100644 index 000000000..87788f455 --- /dev/null +++ b/p2p/pkg/storage/storage.go @@ -0,0 +1,48 @@ +package storage + +import ( + "errors" + "io" +) + +var ( + // ErrKeyNotFound is returned when the key is not found. + ErrKeyNotFound = errors.New("key not found") +) + +type Reader interface { + // Get returns the value for the given key. + Get(key string) ([]byte, error) + // WalkPrefix walks the values for the given prefix. + WalkPrefix(prefix string, fn func(key string, val []byte) bool) error +} + +type Writer interface { + // Put puts the value for the given key. + Put(key string, value []byte) error + // Delete deletes the value for the given key. + Delete(key string) error + // DeletePrefix deletes all the values for the given prefix. + DeletePrefix(prefix string) error +} + +type Storage interface { + Reader + Writer + + io.Closer +} + +type Batcher interface { + // Batch returns a new batch. + Batch() Batch +} + +type Batch interface { + Writer + + // Write writes the batch to the storage. + Write() error + // Reset resets the batch. + Reset() +} diff --git a/p2p/pkg/storage/testing/testing.go b/p2p/pkg/storage/testing/testing.go new file mode 100644 index 000000000..16b6df975 --- /dev/null +++ b/p2p/pkg/storage/testing/testing.go @@ -0,0 +1,163 @@ +package storagetest + +import ( + "errors" + "testing" + + "github.com/primev/mev-commit/p2p/pkg/storage" +) + +func RunStoreTests(t *testing.T, factory func() storage.Storage) { + t.Helper() + + t.Run("PutAndGet", func(t *testing.T) { + TestPutAndGet(t, factory()) + }) + t.Run("Delete", func(t *testing.T) { + TestDelete(t, factory()) + }) + t.Run("DeletePrefix", func(t *testing.T) { + TestDeletePrefix(t, factory()) + }) + t.Run("WalkPrefix", func(t *testing.T) { + TestWalkPrefix(t, factory()) + }) + t.Run("BatchOperations", func(t *testing.T) { + TestBatchOperations(t, factory()) + }) +} + +func TestPutAndGet(t *testing.T, s storage.Storage) { + key := "testKey" + value := []byte("testValue") + + err := s.Put(key, value) + if err != nil { + t.Fatalf("Put failed: %v", err) + } + + retrievedValue, err := s.Get(key) + if err != nil { + t.Fatalf("Get failed: %v", err) + } + + if string(retrievedValue) != string(value) { + t.Errorf("Expected value %s, got %s", value, retrievedValue) + } +} + +func TestDelete(t *testing.T, s storage.Storage) { + key := "testKeyToDelete" + value := []byte("value") + + err := s.Put(key, value) + if err != nil { + t.Fatalf("Setup failed, Put returned error: %v", err) + } + + err = s.Delete(key) + if err != nil { + t.Fatalf("Delete failed: %v", err) + } + + _, err = s.Get(key) + if !errors.Is(err, storage.ErrKeyNotFound) { + t.Fatalf("Expected ErrKeyNotFound, got %v", err) + } +} + +func TestDeletePrefix(t *testing.T, s storage.Storage) { + prefix := "prefix/" + keys := []string{"prefix/key1", "prefix/key2"} + value := []byte("value") + + // Put keys with the prefix. + for _, key := range keys { + err := s.Put(key, value) + if err != nil { + t.Fatalf("Setup failed, Put returned error: %v", err) + } + } + + // Delete the prefix. + err := s.DeletePrefix(prefix) + if err != nil { + t.Fatalf("DeletePrefix failed: %v", err) + } + + // Verify keys are gone. + for _, key := range keys { + _, err := s.Get(key) + if !errors.Is(err, storage.ErrKeyNotFound) { + t.Fatalf("Expected ErrKeyNotFound for key %s, got %v", key, err) + } + } +} + +func TestWalkPrefix(t *testing.T, s storage.Storage) { + prefix := "walkPrefix/" + keys := map[string][]byte{ + "walkPrefix/key1": []byte("value1"), + "walkPrefix/key2": []byte("value2"), + } + + // Put keys with the prefix. + for key, value := range keys { + err := s.Put(key, value) + if err != nil { + t.Fatalf("Setup failed, Put returned error: %v", err) + } + } + + // Walk the prefix. + foundKeys := make(map[string]bool) + err := s.WalkPrefix(prefix, func(key string, val []byte) bool { + if expectedVal, ok := keys[key]; ok && string(val) == string(expectedVal) { + foundKeys[key] = true + } + return false + }) + if err != nil { + t.Fatalf("WalkPrefix failed: %v", err) + } + + // Verify all keys were found. + if len(foundKeys) != len(keys) { + t.Fatalf("WalkPrefix did not find all keys, found: %v", foundKeys) + } +} + +func TestBatchOperations(t *testing.T, s storage.Storage) { + if batcher, ok := s.(storage.Batcher); ok { + batch := batcher.Batch() + key := "batchKey" + value := []byte("batchValue") + + // Put in batch. + err := batch.Put(key, value) + if err != nil { + t.Fatalf("Batch Put failed: %v", err) + } + + // Write batch. + err = batch.Write() + if err != nil { + t.Fatalf("Batch Write failed: %v", err) + } + + // Verify key exists. + retrievedValue, err := s.Get(key) + if err != nil { + t.Fatalf("Get after batch write failed: %v", err) + } + if string(retrievedValue) != string(value) { + t.Errorf("Expected value %s, got %s", value, retrievedValue) + } + + // Reset and verify batch is empty or reset functionality works as expected. + // This might depend on the implementation details of the batch. + batch.Reset() + } else { + t.Skip("Storage does not implement Batcher interface") + } +} diff --git a/p2p/pkg/store/store.go b/p2p/pkg/store/store.go deleted file mode 100644 index 2b5bd531a..000000000 --- a/p2p/pkg/store/store.go +++ /dev/null @@ -1,376 +0,0 @@ -package store - -import ( - "bytes" - "context" - "crypto/ecdh" - "fmt" - "math/big" - "slices" - "strings" - "sync" - "time" - - "github.com/armon/go-radix" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/ecies" - preconfpb "github.com/primev/mev-commit/p2p/gen/go/preconfirmation/v1" -) - -const ( - commitmentNS = "cm/" - balanceNS = "bbs/" - aesKeysNS = "aes/" - - // provider related keys - eciesPrivateKeyNS = "ecies/" - nikePrivateKeyNS = "nike/" - - // txns related keys - txNS = "tx/" -) - -var ( - commitmentKey = func(blockNum int64, index []byte) string { - return fmt.Sprintf("%s%d/%s", commitmentNS, blockNum, string(index)) - } - blockCommitmentPrefix = func(blockNum int64) string { - return fmt.Sprintf("%s%d", commitmentNS, blockNum) - } - - balanceKey = func(window *big.Int, bidder common.Address) string { - return fmt.Sprintf("%s%s/%s", balanceNS, window, bidder) - } - blockBalanceKey = func(window *big.Int, bidder common.Address, blockNumber int64) string { - return fmt.Sprintf("%s%s/%s/%d", balanceNS, window, bidder, blockNumber) - } - balancePrefix = func(window *big.Int) string { - return fmt.Sprintf("%s%s", balanceNS, window) - } - - bidderAesKey = func(bidder common.Address) string { - return fmt.Sprintf("%s%s", aesKeysNS, bidder) - } - - txKey = func(txHash common.Hash) string { - return fmt.Sprintf("%s%s", txNS, txHash.Hex()) - } -) - -type Store struct { - mu sync.RWMutex - *radix.Tree -} - -type EncryptedPreConfirmationWithDecrypted struct { - *preconfpb.EncryptedPreConfirmation - *preconfpb.PreConfirmation - TxnHash common.Hash -} - -func NewStore() *Store { - return &Store{ - Tree: radix.New(), - } -} - -func (s *Store) LastBlock() (uint64, error) { - s.mu.RLock() - defer s.mu.RUnlock() - - val, ok := s.Tree.Get("last_block") - if !ok { - return 0, nil - } - return val.(uint64), nil -} - -func (s *Store) SetLastBlock(blockNum uint64) error { - s.mu.Lock() - defer s.mu.Unlock() - _, _ = s.Tree.Insert("last_block", blockNum) - return nil -} - -func (s *Store) AddCommitment(commitment *EncryptedPreConfirmationWithDecrypted) { - s.mu.Lock() - defer s.mu.Unlock() - - key := commitmentKey(commitment.Bid.BlockNumber, commitment.EncryptedPreConfirmation.Commitment) - _, _ = s.Tree.Insert(key, commitment) -} - -func (s *Store) GetCommitmentsByBlockNumber(blockNum int64) ([]*EncryptedPreConfirmationWithDecrypted, error) { - s.mu.RLock() - defer s.mu.RUnlock() - - blockCommitmentsKey := blockCommitmentPrefix(blockNum) - commitments := make([]*EncryptedPreConfirmationWithDecrypted, 0) - - s.Tree.WalkPrefix(blockCommitmentsKey, func(key string, value interface{}) bool { - commitments = append(commitments, value.(*EncryptedPreConfirmationWithDecrypted)) - return false - }) - return commitments, nil -} - -func (s *Store) DeleteCommitmentByBlockNumber(blockNum int64) error { - s.mu.Lock() - defer s.mu.Unlock() - - blockCommitmentsKey := blockCommitmentPrefix(blockNum) - _ = s.Tree.DeletePrefix(blockCommitmentsKey) - return nil -} - -func (s *Store) DeleteCommitmentByDigest(blockNum int64, digest [32]byte) error { - s.mu.Lock() - defer s.mu.Unlock() - - key := commitmentKey(blockNum, digest[:]) - _, _ = s.Tree.Delete(key) - return nil -} - -func (s *Store) SetCommitmentIndexByCommitmentDigest(cDigest, cIndex [32]byte) error { - s.mu.Lock() - defer s.mu.Unlock() - - s.Tree.WalkPrefix(commitmentNS, func(key string, value interface{}) bool { - commitment := value.(*EncryptedPreConfirmationWithDecrypted) - if bytes.Equal(commitment.EncryptedPreConfirmation.Commitment, cDigest[:]) { - commitment.EncryptedPreConfirmation.CommitmentIndex = cIndex[:] - return true - } - return false - }) - - return nil -} - -func (s *Store) SetAESKey(bidder common.Address, key []byte) error { - s.mu.Lock() - defer s.mu.Unlock() - - _, _ = s.Tree.Insert(bidderAesKey(bidder), key) - return nil -} - -func (s *Store) GetAESKey(bidder common.Address) ([]byte, error) { - s.mu.RLock() - defer s.mu.RUnlock() - - key := bidderAesKey(bidder) - val, ok := s.Tree.Get(key) - if !ok { - return nil, nil - } - return val.([]byte), nil -} - -func (s *Store) SetECIESPrivateKey(key *ecies.PrivateKey) error { - s.mu.Lock() - defer s.mu.Unlock() - - _, _ = s.Tree.Insert(eciesPrivateKeyNS, key) - return nil -} - -func (s *Store) GetECIESPrivateKey() (*ecies.PrivateKey, error) { - s.mu.RLock() - defer s.mu.RUnlock() - - val, ok := s.Tree.Get(eciesPrivateKeyNS) - if !ok { - return nil, nil - } - return val.(*ecies.PrivateKey), nil -} - -func (s *Store) SetNikePrivateKey(key *ecdh.PrivateKey) error { - s.mu.Lock() - defer s.mu.Unlock() - - _, _ = s.Tree.Insert(nikePrivateKeyNS, key) - return nil -} - -func (s *Store) GetNikePrivateKey() (*ecdh.PrivateKey, error) { - s.mu.RLock() - defer s.mu.RUnlock() - - val, ok := s.Tree.Get(nikePrivateKeyNS) - if !ok { - return nil, nil - } - return val.(*ecdh.PrivateKey), nil -} - -func (s *Store) SetBalance(bidder common.Address, windowNumber, depositedAmount *big.Int) error { - s.mu.Lock() - defer s.mu.Unlock() - - key := balanceKey(windowNumber, bidder) - _, _ = s.Tree.Insert(key, depositedAmount) - return nil -} - -func (s *Store) GetBalance(bidder common.Address, windowNumber *big.Int) (*big.Int, error) { - s.mu.RLock() - defer s.mu.RUnlock() - - key := balanceKey(windowNumber, bidder) - val, ok := s.Tree.Get(key) - if !ok { - return nil, nil - } - return val.(*big.Int), nil -} - -func (s *Store) ClearBalances(windowNumber *big.Int) ([]*big.Int, error) { - if windowNumber == nil || windowNumber.Cmp(big.NewInt(0)) == -1 { - return nil, nil - } - - s.mu.RLock() - windows := make([]*big.Int, 0) - s.Tree.WalkPrefix(balanceNS, func(key string, value interface{}) bool { - parts := strings.Split(key, "/") - if len(parts) != 3 { - return false - } - w, ok := new(big.Int).SetString(parts[1], 10) - if !ok { - return false - } - switch w.Cmp(windowNumber) { - case -1: - windows = append(windows, w) - case 0: - windows = append(windows, w) - return true - } - return false - }) - s.mu.RUnlock() - - s.mu.Lock() - for _, w := range windows { - key := balancePrefix(w) - _ = s.Tree.DeletePrefix(key) - } - s.mu.Unlock() - - return windows, nil -} - -func (s *Store) GetBalanceForBlock( - bidder common.Address, - window *big.Int, - blockNumber int64, -) (*big.Int, error) { - s.mu.RLock() - defer s.mu.RUnlock() - - key := blockBalanceKey(window, bidder, blockNumber) - val, ok := s.Tree.Get(key) - if !ok { - return nil, nil - } - return val.(*big.Int), nil -} - -func (s *Store) SetBalanceForBlock( - bidder common.Address, - window *big.Int, - amount *big.Int, - blockNumber int64, -) error { - s.mu.Lock() - defer s.mu.Unlock() - - key := blockBalanceKey(window, bidder, blockNumber) - _, _ = s.Tree.Insert(key, amount) - return nil -} - -func (s *Store) RefundBalanceForBlock( - bidder common.Address, - window *big.Int, - amount *big.Int, - blockNumber int64, -) error { - s.mu.Lock() - defer s.mu.Unlock() - - key := blockBalanceKey(window, bidder, blockNumber) - val, ok := s.Tree.Get(key) - if !ok { - _, _ = s.Tree.Insert(key, amount) - return nil - } - amount.Add(amount, val.(*big.Int)) - _, _ = s.Tree.Insert(key, amount) - return nil -} - -func (s *Store) Len() int { - s.mu.RLock() - defer s.mu.RUnlock() - - return s.Tree.Len() -} - -// Following are the methods to save and update the transaction details in the store. -// The store is used to keep track of the transactions that are sent to the blockchain and -// have not yet received the transaction receipt. These are used by the debug service -// to show the pending transactions and cancel them if needed. The store hooks up -// to the txmonitor package which allows a component to get notified when the transaction -// is sent to the blockchain and when the transaction receipt is received. As of now, -// the store is in-memory and doesn't persist the transaction details, so the update -// method is used to remove the transaction from the store. This will no longer be seen -// in the pending transactions list. -type TxnDetails struct { - Hash common.Hash - Nonce uint64 - Created int64 -} - -// Save implements the txmonitor.Saver interface. It saves the transaction hash and nonce in the store once -// the transaction is sent to the blockchain. -func (s *Store) Save(ctx context.Context, txHash common.Hash, nonce uint64) error { - s.mu.Lock() - defer s.mu.Unlock() - - _, _ = s.Tree.Insert(txKey(txHash), &TxnDetails{Hash: txHash, Nonce: nonce, Created: time.Now().Unix()}) - return nil -} - -// Update implements the txmonitor.Saver interface. It is called to update the status of the -// transaction once the monitor receives the transaction receipt. For the in-memory store, -// we don't need to update the but rather remove the transaction from the store as we dont -// need to keep track of it anymore. Once we implement a persistent store, we will need to -// update the status of the transaction and keep it in the store for future reference. -func (s *Store) Update(ctx context.Context, txHash common.Hash, status string) error { - s.mu.Lock() - defer s.mu.Unlock() - - _, _ = s.Tree.Delete(txKey(txHash)) - return nil -} - -func (s *Store) PendingTxns() ([]*TxnDetails, error) { - s.mu.RLock() - defer s.mu.RUnlock() - - txns := make([]*TxnDetails, 0) - s.Tree.WalkPrefix(txNS, func(key string, value interface{}) bool { - txns = append(txns, value.(*TxnDetails)) - return false - }) - - slices.SortFunc(txns, func(a, b *TxnDetails) int { - return int(a.Created - b.Created) - }) - return txns, nil -} diff --git a/p2p/pkg/store/store_test.go b/p2p/pkg/store/store_test.go deleted file mode 100644 index c656438ab..000000000 --- a/p2p/pkg/store/store_test.go +++ /dev/null @@ -1,322 +0,0 @@ -package store_test - -import ( - "bytes" - "context" - "crypto/ecdh" - "crypto/rand" - "math/big" - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" - preconfpb "github.com/primev/mev-commit/p2p/gen/go/preconfirmation/v1" - "github.com/primev/mev-commit/p2p/pkg/store" -) - -func TestStore(t *testing.T) { - t.Parallel() - - st := store.NewStore() - - t.Run("last block", func(t *testing.T) { - lastBlock, err := st.LastBlock() - if err != nil { - t.Fatal(err) - } - - if lastBlock != 0 { - t.Fatalf("expected 0, got %d", lastBlock) - } - - if err := st.SetLastBlock(10); err != nil { - t.Fatal(err) - } - - lastBlock, err = st.LastBlock() - if err != nil { - t.Fatal(err) - } - - if lastBlock != 10 { - t.Fatalf("expected 10, got %d", lastBlock) - } - }) - - t.Run("commitments", func(t *testing.T) { - for i := 1; i <= 10; i++ { - var blkNum int64 = 1 - if i > 5 { - blkNum = 2 - } - commitment := &store.EncryptedPreConfirmationWithDecrypted{ - EncryptedPreConfirmation: &preconfpb.EncryptedPreConfirmation{ - Commitment: common.BigToHash(big.NewInt(int64(i))).Bytes(), - }, - PreConfirmation: &preconfpb.PreConfirmation{ - Bid: &preconfpb.Bid{ - BlockNumber: blkNum, - }, - }, - } - - st.AddCommitment(commitment) - } - - for i := 1; i <= 10; i++ { - err := st.SetCommitmentIndexByCommitmentDigest( - common.BigToHash(big.NewInt(int64(i))), - common.BigToHash(big.NewInt(int64(i))), - ) - if err != nil { - t.Fatal("failed to set commitment index") - } - } - - commitments, err := st.GetCommitmentsByBlockNumber(1) - if err != nil { - t.Fatal(err) - } - - if len(commitments) != 5 { - t.Fatalf("expected 5, got %d", len(commitments)) - } - - for i := 1; i <= 5; i++ { - if !bytes.Equal(commitments[i-1].Commitment, common.BigToHash(big.NewInt(int64(i))).Bytes()) { - t.Fatalf("expected %d, got %s", i, commitments[i-1].Digest) - } - } - - err = st.DeleteCommitmentByBlockNumber(1) - if err != nil { - t.Fatal(err) - } - - commitments, err = st.GetCommitmentsByBlockNumber(1) - if err != nil { - t.Fatal(err) - } - - if len(commitments) != 0 { - t.Fatalf("expected 0, got %d", len(commitments)) - } - - for i := 6; i <= 10; i++ { - err := st.DeleteCommitmentByDigest(2, common.BigToHash(big.NewInt(int64(i)))) - if err != nil { - t.Fatal("failed to delete commitment") - } - } - - commitments, err = st.GetCommitmentsByBlockNumber(2) - if err != nil { - t.Fatal(err) - } - - if len(commitments) != 0 { - t.Fatalf("expected 0, got %d", len(commitments)) - } - }) - - t.Run("balances", func(t *testing.T) { - if err := st.SetBalance(common.HexToAddress("0x123"), big.NewInt(1), big.NewInt(10)); err != nil { - t.Fatal(err) - } - val, err := st.GetBalance(common.HexToAddress("0x123"), big.NewInt(1)) - if err != nil { - t.Fatal(err) - } - if val.Cmp(big.NewInt(10)) != 0 { - t.Fatalf("expected 10, got %s", val.String()) - } - - for i := 1; i <= 10; i++ { - err := st.SetBalanceForBlock(common.HexToAddress("0x123"), big.NewInt(1), big.NewInt(10), int64(i)) - if err != nil { - t.Fatal(err) - } - - val, err := st.GetBalanceForBlock(common.HexToAddress("0x123"), big.NewInt(1), int64(i)) - if err != nil { - t.Fatal(err) - } - if val.Cmp(big.NewInt(10)) != 0 { - t.Fatalf("expected 10, got %s", val.String()) - } - - err = st.RefundBalanceForBlock(common.HexToAddress("0x123"), big.NewInt(1), big.NewInt(10), int64(i)) - if err != nil { - t.Fatal(err) - } - - val, err = st.GetBalanceForBlock(common.HexToAddress("0x123"), big.NewInt(1), int64(i)) - if err != nil { - t.Fatal(err) - } - if val.Cmp(big.NewInt(20)) != 0 { - t.Fatalf("expected 20, got %s", val.String()) - } - } - - windows, err := st.ClearBalances(big.NewInt(12)) - if err != nil { - t.Fatal(err) - } - if len(windows) != 1 { - t.Fatalf("expected 1, got %d", len(windows)) - } - - for i := 1; i <= 10; i++ { - val, err := st.GetBalanceForBlock(common.HexToAddress("0x123"), big.NewInt(1), int64(i)) - if err != nil { - t.Fatal(err) - } - if val != nil { - t.Fatalf("expected nil, got %s", val.String()) - } - } - }) - - t.Run("AES keys", func(t *testing.T) { - bidder := common.HexToAddress("0x456") - key := []byte("my_secret_aes_key") - - // Set AES key - err := st.SetAESKey(bidder, key) - if err != nil { - t.Fatal(err) - } - - // Get AES key - retrievedKey, err := st.GetAESKey(bidder) - if err != nil { - t.Fatal(err) - } - if !bytes.Equal(retrievedKey, key) { - t.Fatalf("expected %s, got %s", key, retrievedKey) - } - - // Test non-existing key retrieval - nonExistentBidder := common.HexToAddress("0x789") - retrievedKey, err = st.GetAESKey(nonExistentBidder) - if err != nil { - t.Fatal(err) - } - if retrievedKey != nil { - t.Fatalf("expected nil, got %s", retrievedKey) - } - }) - - t.Run("ECIES keys", func(t *testing.T) { - // Generate a new ECIES private key - ecdsaKey, err := crypto.GenerateKey() - if err != nil { - t.Fatal(err) - } - eciesKey := ecies.ImportECDSA(ecdsaKey) - - // Set ECIES private key - err = st.SetECIESPrivateKey(eciesKey) - if err != nil { - t.Fatal(err) - } - - // Get ECIES private key - retrievedKey, err := st.GetECIESPrivateKey() - if err != nil { - t.Fatal(err) - } - if !eciesKey.ExportECDSA().Equal(retrievedKey.ExportECDSA()) { - t.Fatalf("expected %v, got %v", eciesKey, retrievedKey) - } - - // Ensure key retrieval when no key is set returns nil - st2 := store.NewStore() - retrievedKey, err = st2.GetECIESPrivateKey() - if err != nil { - t.Fatal(err) - } - if retrievedKey != nil { - t.Fatalf("expected nil, got %v", retrievedKey) - } - }) - - t.Run("Nike keys", func(t *testing.T) { - // Generate a new Nike private key - nikeCurve := ecdh.X25519() - nikePrivateKey, err := nikeCurve.GenerateKey(rand.Reader) - if err != nil { - t.Fatal(err) - } - - // Set Nike private key - err = st.SetNikePrivateKey(nikePrivateKey) - if err != nil { - t.Fatal(err) - } - - // Get Nike private key - retrievedKey, err := st.GetNikePrivateKey() - if err != nil { - t.Fatal(err) - } - if !bytes.Equal(nikePrivateKey.Bytes(), retrievedKey.Bytes()) { - t.Fatalf("expected %x, got %x", nikePrivateKey.Bytes(), retrievedKey.Bytes()) - } - - // Ensure key retrieval when no key is set returns nil - st2 := store.NewStore() - retrievedKey, err = st2.GetNikePrivateKey() - if err != nil { - t.Fatal(err) - } - if retrievedKey != nil { - t.Fatalf("expected nil, got %x", retrievedKey.Bytes()) - } - }) - - t.Run("txns", func(t *testing.T) { - for i := 1; i <= 10; i++ { - txHash := common.BigToHash(big.NewInt(int64(i))) - err := st.Save(context.Background(), txHash, uint64(i)) - if err != nil { - t.Fatal(err) - } - } - - txns, err := st.PendingTxns() - if err != nil { - t.Fatal(err) - } - - if len(txns) != 10 { - t.Fatalf("expected 10, got %d", len(txns)) - } - - for i := 1; i <= 10; i++ { - txHash := common.BigToHash(big.NewInt(int64(i))) - if txns[i-1].Hash.Cmp(txHash) != 0 { - t.Fatalf("expected %s, got %s", txHash, txns[i-1].Hash) - } - } - - for i := 1; i <= 10; i++ { - txHash := common.BigToHash(big.NewInt(int64(i))) - err := st.Update(context.Background(), txHash, "status") - if err != nil { - t.Fatal(err) - } - } - - txns, err = st.PendingTxns() - if err != nil { - t.Fatal(err) - } - - if len(txns) != 0 { - t.Fatalf("expected 0, got %d", len(txns)) - } - }) -} diff --git a/p2p/pkg/txnstore/export_test.go b/p2p/pkg/txnstore/export_test.go new file mode 100644 index 000000000..a497ad46f --- /dev/null +++ b/p2p/pkg/txnstore/export_test.go @@ -0,0 +1,3 @@ +package txnstore + +var TxKey = txKey diff --git a/p2p/pkg/txnstore/txnstore.go b/p2p/pkg/txnstore/txnstore.go new file mode 100644 index 000000000..6b86597d8 --- /dev/null +++ b/p2p/pkg/txnstore/txnstore.go @@ -0,0 +1,93 @@ +package txnstore + +import ( + "context" + "fmt" + "slices" + "sync" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/primev/mev-commit/p2p/pkg/storage" + "github.com/primev/mev-commit/x/contracts/txmonitor" + "github.com/vmihailenco/msgpack/v5" +) + +const ( + txNS = "tx/" +) + +var ( + txKey = func(txHash common.Hash) string { + return fmt.Sprintf("%s%s", txNS, txHash.Hex()) + } +) + +type Store struct { + mu sync.RWMutex + st storage.Storage +} + +func New(st storage.Storage) *Store { + return &Store{ + st: st, + } +} + +// Following are the methods to save and update the transaction details in the store. +// The store is used to keep track of the transactions that are sent to the blockchain and +// have not yet received the transaction receipt. These are used by the debug service +// to show the pending transactions and cancel them if needed. The store hooks up +// to the txmonitor package which allows a component to get notified when the transaction +// is sent to the blockchain and when the transaction receipt is received. As of now, +// we do not persist the transaction details, so the update method is used to remove the +// transaction from the store. This will no longer be seen in the pending transactions list. +// Save implements the txmonitor.Saver interface. It saves the transaction hash and nonce in the store once +// the transaction is sent to the blockchain. +func (s *Store) Save(ctx context.Context, txHash common.Hash, nonce uint64) error { + s.mu.Lock() + defer s.mu.Unlock() + + buf, err := msgpack.Marshal(&txmonitor.TxnDetails{Hash: txHash, Nonce: nonce, Created: time.Now().Unix()}) + if err != nil { + return err + } + + return s.st.Put(txKey(txHash), buf) +} + +// Update implements the txmonitor.Saver interface. It is called to update the status of the +// transaction once the monitor receives the transaction receipt. For the in-memory store, +// we don't need to update the but rather remove the transaction from the store as we dont +// need to keep track of it anymore. Once we implement a persistent store, we will need to +// update the status of the transaction and keep it in the store for future reference. +func (s *Store) Update(ctx context.Context, txHash common.Hash, status string) error { + s.mu.Lock() + defer s.mu.Unlock() + + return s.st.Delete(txKey(txHash)) +} + +func (s *Store) PendingTxns() ([]*txmonitor.TxnDetails, error) { + s.mu.RLock() + defer s.mu.RUnlock() + + txns := make([]*txmonitor.TxnDetails, 0) + err := s.st.WalkPrefix(txNS, func(key string, value []byte) bool { + txn := new(txmonitor.TxnDetails) + err := msgpack.Unmarshal(value, txn) + if err != nil { + return false + } + txns = append(txns, txn) + return false + }) + if err != nil { + return nil, err + } + + slices.SortFunc(txns, func(a, b *txmonitor.TxnDetails) int { + return int(a.Created - b.Created) + }) + return txns, nil +} diff --git a/p2p/pkg/txnstore/txnstore_test.go b/p2p/pkg/txnstore/txnstore_test.go new file mode 100644 index 000000000..eb32a7168 --- /dev/null +++ b/p2p/pkg/txnstore/txnstore_test.go @@ -0,0 +1,143 @@ +package txnstore_test + +import ( + "context" + "testing" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/primev/mev-commit/p2p/pkg/storage" + inmem "github.com/primev/mev-commit/p2p/pkg/storage/inmem" + "github.com/primev/mev-commit/p2p/pkg/txnstore" + "github.com/primev/mev-commit/x/contracts/txmonitor" + "github.com/vmihailenco/msgpack/v5" +) + +func TestStore_Save(t *testing.T) { + st := inmem.New() + store := txnstore.New(st) + + txHash := common.HexToHash("0x1234567890abcdef") + nonce := uint64(123) + err := store.Save(context.Background(), txHash, nonce) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + // Verify that the transaction details are saved in the store + var txnDetails txmonitor.TxnDetails + buf, err := st.Get(txnstore.TxKey(txHash)) + if err != nil { + t.Errorf("failed to get transaction details from store: %v", err) + } + if err := msgpack.Unmarshal(buf, &txnDetails); err != nil { + t.Errorf("failed to decode transaction details: %v", err) + } + if txnDetails.Hash != txHash { + t.Errorf("unexpected transaction hash: got %s, want %s", txnDetails.Hash.Hex(), txHash.Hex()) + } + if txnDetails.Nonce != nonce { + t.Errorf("unexpected nonce: got %d, want %d", txnDetails.Nonce, nonce) + } +} + +func TestStore_Update(t *testing.T) { + st := inmem.New() + store := txnstore.New(st) + + txHash := common.HexToHash("0x1234567890abcdef") + nonce := uint64(123) + err := store.Save(context.Background(), txHash, nonce) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + err = store.Update(context.Background(), txHash, "completed") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + // Verify that the transaction details are removed from the store + _, err = st.Get(txnstore.TxKey(txHash)) + if err != storage.ErrKeyNotFound { + t.Errorf("expected transaction details to be removed from store, got: %v", err) + } +} + +func TestStore_PendingTxns(t *testing.T) { + st := inmem.New() + store := txnstore.New(st) + + // Save some pending transactions in the store + txHash1 := common.HexToHash("0x1234567890abcdef") + nonce1 := uint64(123) + err := store.Save(context.Background(), txHash1, nonce1) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + txHash2 := common.HexToHash("0xabcdef1234567890") + nonce2 := uint64(456) + err = store.Save(context.Background(), txHash2, nonce2) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + // Retrieve the pending transactions from the store + pendingTxns, err := store.PendingTxns() + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + // Verify the number of pending transactions + if len(pendingTxns) != 2 { + t.Errorf("unexpected number of pending transactions: got %d, want %d", len(pendingTxns), 2) + } + + // Verify the details of the pending transactions + if pendingTxns[0].Hash != txHash1 { + t.Errorf("unexpected transaction hash: got %s, want %s", pendingTxns[0].Hash.Hex(), txHash1.Hex()) + } + if pendingTxns[0].Nonce != nonce1 { + t.Errorf("unexpected nonce: got %d, want %d", pendingTxns[0].Nonce, nonce1) + } + if pendingTxns[1].Hash != txHash2 { + t.Errorf("unexpected transaction hash: got %s, want %s", pendingTxns[1].Hash.Hex(), txHash2.Hex()) + } + if pendingTxns[1].Nonce != nonce2 { + t.Errorf("unexpected nonce: got %d, want %d", pendingTxns[1].Nonce, nonce2) + } +} + +func TestStore_PendingTxns_SortedByCreated(t *testing.T) { + st := inmem.New() + store := txnstore.New(st) + + // Save some pending transactions in the store with different creation times + txHash1 := common.HexToHash("0x1234567890abcdef") + nonce1 := uint64(123) + err := store.Save(context.Background(), txHash1, nonce1) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + time.Sleep(100 * time.Millisecond) + + txHash2 := common.HexToHash("0xabcdef1234567890") + nonce2 := uint64(456) + err = store.Save(context.Background(), txHash2, nonce2) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + // Retrieve the pending transactions from the store + pendingTxns, err := store.PendingTxns() + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + // Verify that the pending transactions are sorted by creation time + if pendingTxns[0].Created > pendingTxns[1].Created { + t.Errorf("pending transactions are not sorted by creation time") + } +} diff --git a/p2p/rpc/bidderapi/v1/bidderapi.proto b/p2p/rpc/bidderapi/v1/bidderapi.proto index 5ad785350..c5aac054b 100644 --- a/p2p/rpc/bidderapi/v1/bidderapi.proto +++ b/p2p/rpc/bidderapi/v1/bidderapi.proto @@ -287,7 +287,7 @@ message Bid { }, (buf.validate.field).cel = { id: "tx_hashes", message: "tx_hashes must be a valid array of transaction hashes.", - expression: "this.all(r, r.matches('^[a-fA-F0-9]{64}$')) && size(this) > 0" + expression: "this.all(r, r.matches('^(0x)?[a-fA-F0-9]{64}$')) && size(this) > 0" }]; string amount = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Amount of ETH that the bidder is willing to pay to the provider for including the transaction in the block." @@ -323,7 +323,7 @@ message Bid { }, (buf.validate.field).cel = { id: "reverting_tx_hashes", message: "reverting_tx_hashes must be an array of valid transaction hashes.", - expression: "this.all(r, r.matches('^[a-fA-F0-9]{64}$'))" + expression: "this.all(r, r.matches('^(0x)?[a-fA-F0-9]{64}$'))" }]; }; diff --git a/p2p/rpc/providerapi/v1/providerapi.proto b/p2p/rpc/providerapi/v1/providerapi.proto index 089b979f3..c57042de3 100644 --- a/p2p/rpc/providerapi/v1/providerapi.proto +++ b/p2p/rpc/providerapi/v1/providerapi.proto @@ -53,6 +53,18 @@ service Provider { rpc GetMinStake(EmptyMessage) returns (StakeResponse) { option (google.api.http) = {get: "/v1/provider/get_min_stake"}; } + // WithdrawStake + // + // WithdrawStake is called by the provider to withdraw its stake from the provider registry. + rpc WithdrawStake(EmptyMessage) returns (WithdrawalResponse) { + option (google.api.http) = {post: "/v1/provider/withdraw_stake"}; + } + // Unstake + // + // Unstake is called by the provider to request a unstake from the provider registry. + rpc Unstake(EmptyMessage) returns (EmptyMessage) { + option (google.api.http) = {post: "/v1/provider/unstake"}; + } } message StakeRequest { @@ -94,6 +106,17 @@ message StakeResponse { string bls_public_key = 2; }; +message WithdrawalResponse { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: { + title: "Withdrawal response" + description: "Withdrawal amount for provider in the provider registry." + } + example: "{\"amount\": \"1000000000000000000\"}" + }; + string amount = 1; +}; + message EmptyMessage {}; message Bid { diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 000000000..2a564c488 --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,11 @@ +## Describe your changes + +## Issue ticket number and link + +Fixes # (issue) + +## Checklist before requesting a review + +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] I have made corresponding changes to the documentation +- [ ] I have tested this code by deploying the infrastructure and ensuring that commitments are being settled diff --git a/static/primev-logo.png b/static/primev-logo.png index a1c4ebaf5..7b8c98860 100644 Binary files a/static/primev-logo.png and b/static/primev-logo.png differ diff --git a/x/contracts/txmonitor/txmonitor.go b/x/contracts/txmonitor/txmonitor.go index 575e4ed85..7e8d82558 100644 --- a/x/contracts/txmonitor/txmonitor.go +++ b/x/contracts/txmonitor/txmonitor.go @@ -26,9 +26,16 @@ var ( ErrMonitorClosed = errors.New("monitor was closed") ) +type TxnDetails struct { + Hash common.Hash + Nonce uint64 + Created int64 +} + type Saver interface { Save(ctx context.Context, txHash common.Hash, nonce uint64) error Update(ctx context.Context, txHash common.Hash, status string) error + PendingTxns() ([]*TxnDetails, error) } type EVMHelper interface { @@ -92,6 +99,15 @@ func New( blockUpdate: make(chan waitCheck), } + pending, err := saver.PendingTxns() + if err != nil { + logger.Error("failed to get pending transactions", "err", err) + } + + for _, txn := range pending { + m.WatchTx(txn.Hash, txn.Nonce) + } + return m } @@ -389,3 +405,7 @@ func (noopSaver) Save(ctx context.Context, txHash common.Hash, nonce uint64) err func (noopSaver) Update(ctx context.Context, txHash common.Hash, status string) error { return nil } + +func (noopSaver) PendingTxns() ([]*TxnDetails, error) { + return nil, nil +} diff --git a/x/contracts/txmonitor/txmonitor_test.go b/x/contracts/txmonitor/txmonitor_test.go index b08494345..5bcddc2d2 100644 --- a/x/contracts/txmonitor/txmonitor_test.go +++ b/x/contracts/txmonitor/txmonitor_test.go @@ -184,3 +184,7 @@ func (t *testSaver) Update(ctx context.Context, txHash common.Hash, status strin t.mu.Unlock() return nil } + +func (t *testSaver) PendingTxns() ([]*txmonitor.TxnDetails, error) { + return nil, nil +} diff --git a/x/go.mod b/x/go.mod index 2fd82df0b..71f5bb5be 100644 --- a/x/go.mod +++ b/x/go.mod @@ -7,6 +7,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/primev/mev-commit/contracts-abi v0.0.1 github.com/prometheus/client_golang v1.19.1 + google.golang.org/grpc v1.64.0 ) require ( @@ -15,7 +16,9 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect @@ -28,20 +31,21 @@ require ( github.com/gorilla/websocket v1.5.3 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/go-sysconf v0.3.13 // indirect github.com/tklauser/numcpus v0.7.0 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/tools v0.21.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/tools v0.23.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/x/go.sum b/x/go.sum index 9915b48fc..4bce3055f 100644 --- a/x/go.sum +++ b/x/go.sum @@ -1,5 +1,5 @@ -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= @@ -16,16 +16,18 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOF github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= @@ -58,8 +60,8 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= +github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= @@ -92,8 +94,8 @@ github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -106,8 +108,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= @@ -115,6 +117,8 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -125,14 +129,14 @@ github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQ github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -157,27 +161,29 @@ github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/x/health/health.go b/x/health/health.go new file mode 100644 index 000000000..68e91c055 --- /dev/null +++ b/x/health/health.go @@ -0,0 +1,73 @@ +package health + +import ( + "fmt" + + "google.golang.org/grpc/connectivity" +) + +type HealthCheck interface { + // Check checks the health of the service. + Check() error +} + +type Health interface { + // Register registers a health check. + Register(HealthCheck) + // Health returns the health of the service. + Health() error +} + +type HealthCheckFunc func() error + +func (h HealthCheckFunc) Check() error { + return h() +} + +// CloseChannelHealthCheck returns a health check that checks if the channel is closed. +func CloseChannelHealthCheck(desc string, ch <-chan struct{}) HealthCheck { + return HealthCheckFunc(func() error { + select { + case <-ch: + return fmt.Errorf("%s: closed", desc) + default: + return nil + } + }) +} + +// GrpcClientConn is an interface that represents the methods we need from grpc.ClientConn. +type GrpcClientConn interface { + GetState() connectivity.State +} + +// GrpcHealthCheck returns a health check that checks the state of the gRPC connection. +func GrpcGatewayHealthCheck(conn GrpcClientConn) HealthCheck { + return HealthCheckFunc(func() error { + if conn.GetState() == connectivity.TransientFailure { + return fmt.Errorf("grpc gateway: %s", conn.GetState()) + } + return nil + }) +} + +func New() Health { + return &health{} +} + +type health struct { + checks []HealthCheck +} + +func (h *health) Register(check HealthCheck) { + h.checks = append(h.checks, check) +} + +func (h *health) Health() error { + for _, check := range h.checks { + if err := check.Check(); err != nil { + return err + } + } + return nil +} diff --git a/x/health/health_test.go b/x/health/health_test.go new file mode 100644 index 000000000..ff36cab36 --- /dev/null +++ b/x/health/health_test.go @@ -0,0 +1,130 @@ +package health_test + +import ( + "fmt" + "testing" + + "github.com/primev/mev-commit/x/health" + "google.golang.org/grpc/connectivity" +) + +func TestCloseChannelHealthCheck(t *testing.T) { + t.Parallel() + + t.Run("ClosedChannel", func(t *testing.T) { + ch := make(chan struct{}) + close(ch) + + check := health.CloseChannelHealthCheck("test", ch) + err := check.Check() + if err == nil { + t.Error("expected error, got nil") + } else if err.Error() != "test: closed" { + t.Errorf("expected error message 'test: closed', got '%s'", err.Error()) + } + }) + + t.Run("OpenChannel", func(t *testing.T) { + ch := make(chan struct{}) + + check := health.CloseChannelHealthCheck("test", ch) + err := check.Check() + if err != nil { + t.Errorf("expected no error, got '%s'", err.Error()) + } + }) +} + +// MockGrpcClientConn is a mock implementation of the GrpcClientConn interface. +type MockGrpcClientConn struct { + State connectivity.State +} + +func (m *MockGrpcClientConn) GetState() connectivity.State { + return m.State +} + +func TestGrpcGatewayHealthCheck(t *testing.T) { + t.Parallel() + + t.Run("NotReady", func(t *testing.T) { + conn := &MockGrpcClientConn{State: connectivity.TransientFailure} + + check := health.GrpcGatewayHealthCheck(conn) + err := check.Check() + if err == nil { + t.Error("expected error, got nil") + } else if err.Error() != fmt.Sprintf("grpc gateway: %s", conn.GetState()) { + t.Errorf("expected error message 'grpc gateway: Connecting', got '%s'", err.Error()) + } + }) + + t.Run("Ready", func(t *testing.T) { + conn := &MockGrpcClientConn{State: connectivity.Ready} + + check := health.GrpcGatewayHealthCheck(conn) + err := check.Check() + if err != nil { + t.Errorf("expected no error, got '%s'", err.Error()) + } + }) +} + +func TestHealth(t *testing.T) { + t.Parallel() + + t.Run("AllChecksPass", func(t *testing.T) { + h := health.New() + + check1 := func() error { return nil } + check2 := func() error { return nil } + + h.Register(health.HealthCheckFunc(check1)) + h.Register(health.HealthCheckFunc(check2)) + + err := h.Health() + if err != nil { + t.Errorf("expected no error, got '%s'", err.Error()) + } + }) + + t.Run("FirstCheckFails", func(t *testing.T) { + h := health.New() + + check1 := func() error { return nil } + check2 := func() error { return healthCheckError("check2 failed") } + + h.Register(health.HealthCheckFunc(check1)) + h.Register(health.HealthCheckFunc(check2)) + + err := h.Health() + if err == nil { + t.Error("expected error, got nil") + } else if err.Error() != "check2 failed" { + t.Errorf("expected error message 'check2 failed', got '%s'", err.Error()) + } + }) + + t.Run("SecondCheckFails", func(t *testing.T) { + h := health.New() + + check1 := func() error { return healthCheckError("check1 failed") } + check2 := func() error { return nil } + + h.Register(health.HealthCheckFunc(check1)) + h.Register(health.HealthCheckFunc(check2)) + + err := h.Health() + if err == nil { + t.Error("expected error, got nil") + } else if err.Error() != "check1 failed" { + t.Errorf("expected error message 'check1 failed', got '%s'", err.Error()) + } + }) +} + +type healthCheckError string + +func (e healthCheckError) Error() string { + return string(e) +} diff --git a/x/util/util.go b/x/util/util.go index 55f92a652..725a10d38 100644 --- a/x/util/util.go +++ b/x/util/util.go @@ -5,6 +5,8 @@ import ( "io" "log/slog" "math/big" + "os" + "path/filepath" "strings" ) @@ -70,3 +72,20 @@ func NewLogger(lvl, logFmt, tags string, sink io.Writer) (*slog.Logger, error) { return logger.With(args...), nil } + +func ResolveFilePath(path string) (string, error) { + if path == "" { + return "", fmt.Errorf("path is empty") + } + + if path[0] == '~' { + home, err := os.UserHomeDir() + if err != nil { + return "", err + } + + return filepath.Join(home, path[1:]), nil + } + + return path, nil +}