diff --git a/.env.example b/.env.example index 152145d2..1b089723 100644 --- a/.env.example +++ b/.env.example @@ -35,7 +35,7 @@ TF_VAR_BOR_ARCHIVE_VOLUME_TYPE_GCP=pd-balanced # type of EBS volume for Bor arch TF_VAR_ERIGON_ARCHIVE_VOLUME_TYPE_GCP=pd-balanced # type of EBS volume for Erigon archive nodes (default is pd-balanced) # Terraform variables - Common for both AWS and GCP -TF_VAR_VM_NAME=polygon-user # default "polygon-user". It can be any string, used to discriminate between instances +TF_VAR_VM_NAME=polygon-user # It can be any string, used to discriminate between instances TF_VAR_DOCKERIZED=no # default "no", otherwise only one VM is created and the Polygon devnet will run in docker containers TF_VAR_BOR_DISK_SIZE_GB=20 # size of the disk in GB for Bor client (default is 20GB) TF_VAR_ERIGON_DISK_SIZE_GB=20 # size of the disk in GB for Erigon client (default is 20GB) @@ -56,28 +56,28 @@ NETWORK= # mention "mumbai", "mainnet" or leave empty if spinning up a local dev HEIMDALL_SEEDS=e72c0466a02ea43b2198bd3a9454b87a3ef0d77e@54.147.31.250:26656,b302d1ddb21102e794b524d05152a7834da05bd1@34.226.134.117:26656 # Heimdall seeds to be added in config.toml (when running a mainnet/mumbai node ) BOR_CHAIN_ID= # bor chainID (leave empty to get a random one) HEIMDALL_CHAIN_ID= # heimdall chainID (leave empty to get a random one) -SPRINT_SIZE=64 # sprint size (number of blocks for each bor sprint) +SPRINT_SIZE=16 # sprint size (number of blocks for each bor sprint) SPRINT_SIZE_BLOCK_NUMBER=0 # comma separated values defining the block heights of bor where sprint length must change BLOCK_NUMBER=0 # comma separated values defining the block heights of bor where block time must change BLOCK_TIME=2 # comma separated values defining the block times for the relative BLOCK_NUMBERs -BOR_REPO="https://github.com/maticnetwork/bor.git" # repo of bor project +BOR_REPO="https://github.com/0xPolygon/bor.git" # repo of bor project # BOR_REPO="https://:@github.com//.git" # example of private repo URL BOR_BRANCH=develop # bor branch defining the version to be used in the devnet -ERIGON_REPO="https://github.com/ledgerwatch/erigon.git" # repo of Erigon project +ERIGON_REPO="https://github.com/erigontech/erigon" # repo of Erigon project ERIGON_BRANCH=main # Erigon branch defining the version to be used in the devnet -HEIMDALL_REPO="https://github.com/maticnetwork/heimdall.git" # repo of heimdall project +HEIMDALL_REPO="https://github.com/0xPolygon/heimdall-v2.git" # repo of heimdall project HEIMDALL_BRANCH=develop # heimdall branch defining the version to be used in the devnet -CONTRACTS_REPO="https://github.com/maticnetwork/contracts.git" # repo of contracts project -CONTRACTS_BRANCH=mardizzone/node-16 # contracts branch defining the version to be used in the devnet. To use node v16.x, please stick with it -GENESIS_CONTRACTS_REPO="https://github.com/maticnetwork/genesis-contracts.git" # repo of genesis-contracts project -GENESIS_CONTRACTS_BRANCH=master# Genesis contracts branch defining the version to be used in the devnet -MATIC_CLI_REPO="https://github.com/maticnetwork/matic-cli.git" # repo of matic-cli to run a specific version remotely using express-cli +CONTRACTS_REPO="https://github.com/0xPolygon/pos-contracts.git" # repo of contracts project +CONTRACTS_BRANCH=anvil-pos # contracts branch defining the version to be used in the devnet. To use anvil, please stick with it +GENESIS_CONTRACTS_REPO="https://github.com/0xPolygon/genesis-contracts.git" # repo of genesis-contracts project +GENESIS_CONTRACTS_BRANCH=master # Genesis contracts branch defining the version to be used in the devnet +MATIC_CLI_REPO="https://github.com/0xPolygon/matic-cli.git" # repo of matic-cli to run a specific version remotely using express-cli MATIC_CLI_BRANCH=master # matic-cli branch used on the remote machines to start the environment DEVNET_BOR_USERS=ubuntu,ubuntu,ubuntu # users' names of VMs for all the nodes (comma separated). Its length must be equal to "TF_VAR_BOR_VALIDATOR_COUNT + TF_VAR_BOR_SENTRY_COUNT + TF_VAR_BOR_ARCHIVE_COUNT" DEVNET_BOR_FLAGS=config,config,config # Specifies how bor should be started ('config', or 'cli'), by providing cli flags, or by using toml config file (length of DEVNET_BOR_FLAGS should match the length of DEVNET_BOR_USERS) DEVNET_ERIGON_USERS= # users' names of VMs for all the nodes (comma separated). Its length must be equal to "TF_VAR_ERIGON_VALIDATOR_COUNT + TF_VAR_ERIGON_SENTRY_COUNT + TF_VAR_ERIGON_ARCHIVE_COUNT" -BOR_DOCKER_BUILD_CONTEXT="https://github.com/maticnetwork/bor.git#develop" # docker build context for bor. Used in docker setup (TF_VAR_DOCKERIZED=yes) -HEIMDALL_DOCKER_BUILD_CONTEXT="https://github.com/maticnetwork/heimdall.git#develop" # docker build context for heimdall. Used in docker setup (TF_VAR_DOCKERIZED=yes) +BOR_DOCKER_BUILD_CONTEXT="https://github.com/0xPolygon/bor.git#develop" # docker build context for bor. Used in docker setup (TF_VAR_DOCKERIZED=yes) +HEIMDALL_DOCKER_BUILD_CONTEXT="https://github.com/0xPolygon/heimdall-v2.git#develop" # docker build context for heimdall. Used in docker setup (TF_VAR_DOCKERIZED=yes) VERBOSE=true # if set to true will print logs also from remote machines DD_API_KEY=DATADOG_API_KEY # Datadog API key diff --git a/.github/e2e-docker-config.yml b/.github/e2e-docker-config.yml index 0b06d165..f4d6302e 100644 --- a/.github/e2e-docker-config.yml +++ b/.github/e2e-docker-config.yml @@ -2,7 +2,9 @@ defaultStake: 10000 defaultFee: 2000 borChainId: 15001 heimdallChainId: heimdall-15001 -contractsBranch: mardizzone/node-16 +heimdallRepo: https://github.com/0xPolygon/heimdall-v2.git +contractsRepo: https://github.com/0xPolygon/pos-contracts.git +contractsBranch: anvil-pos genesisContractsBranch: master sprintSize: - '64' @@ -16,11 +18,12 @@ numOfBorArchiveNodes: 0 numOfErigonValidators: 0 numOfErigonSentries: 0 numOfErigonArchiveNodes: 0 -ethURL: http://ganache:9545 +ethURL: http://anvil:9545 ethHostUser: ubuntu devnetType: docker -borDockerBuildContext: 'https://github.com/maticnetwork/bor.git#develop' -heimdallDockerBuildContext: 'https://github.com/maticnetwork/heimdall.git#develop' +borDockerBuildContext: 'https://github.com/0xPolygon/bor.git#develop' +heimdallDockerBuildContext: 'https://github.com/0xPolygon/heimdall-v2.git#develop' sprintSizeBlockNumber: - '0' devnetBorFlags: config,config,config +mnemonic: 'clock radar mass judge dismiss just intact mind resemble fringe diary casino' diff --git a/.github/integration-tests/bor_health.sh b/.github/integration-tests/bor_health.sh index 46999209..db466eb7 100644 --- a/.github/integration-tests/bor_health.sh +++ b/.github/integration-tests/bor_health.sh @@ -1,8 +1,7 @@ #!/bin/bash set -e -while true -do +while true; do peers=$(docker exec bor0 bash -c "bor attach /var/lib/bor/data/bor.ipc -exec 'admin.peers'") block=$(docker exec bor0 bash -c "bor attach /var/lib/bor/data/bor.ipc -exec 'eth.blockNumber'") @@ -11,5 +10,5 @@ do fi done -echo "$peers" -echo "$block" +echo "Peers: $peers" +echo "Block number: $block" diff --git a/.github/integration-tests/fund_ganache_accounts.sh b/.github/integration-tests/fund_ganache_accounts.sh deleted file mode 100644 index 40daaedd..00000000 --- a/.github/integration-tests/fund_ganache_accounts.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -host='localhost' - -echo "Transferring 1 ETH from ganache account[0] to all others..." - -signersFile="matic-cli/devnet/devnet/signer-dump.json" -signersDump=$(jq . $signersFile) -signersLength=$(jq '. | length' $signersFile) - -rootChainWeb3="http://${host}:9545" - -for ((i = 1; i < signersLength; i++)); do - to_address=$(echo "$signersDump" | jq -r ".[$i].address") - from_address=$(echo "$signersDump" | jq -r ".[0].address") - txReceipt=$(curl $rootChainWeb3 -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"to":"'"$to_address"'","from":"'"$from_address"'","value":"0xDE0B6B3A7640000"}],"id":1}' -H "Content-Type: application/json") - txHash=$(echo "$txReceipt" | jq -r '.result') - echo "Funds transferred from $from_address to $to_address with txHash: $txHash" -done diff --git a/.github/integration-tests/smoke_test.sh b/.github/integration-tests/smoke_test.sh index 5ef75568..2fd7d6c5 100644 --- a/.github/integration-tests/smoke_test.sh +++ b/.github/integration-tests/smoke_test.sh @@ -8,8 +8,7 @@ checkpointFound="false" SECONDS=0 start_time=$SECONDS -while true -do +while true; do balance=$(docker exec bor0 bash -c "bor attach /var/lib/bor/data/bor.ipc -exec 'Math.round(web3.fromWei(eth.getBalance(eth.accounts[0])))'") @@ -18,27 +17,27 @@ do exit 1 fi - if (( balance > balanceInit )); then + if ((balance > balanceInit)); then if [ $stateSyncFound != "true" ]; then - stateSyncTime=$(( SECONDS - start_time )) + stateSyncTime=$((SECONDS - start_time)) stateSyncFound="true" fi fi - checkpointID=$(curl -sL http://localhost:1317/checkpoints/latest | jq .result.id) + checkpointID=$(curl -sL http://localhost:1317/checkpoints/latest | jq .checkpoint.id) if [ "$checkpointID" != "null" ]; then if [ $checkpointFound != "true" ]; then - checkpointTime=$(( SECONDS - start_time )) + checkpointTime=$((SECONDS - start_time)) checkpointFound="true" fi fi - if [ $stateSyncFound == "true" ] && [ $checkpointFound == "true" ]; then + if [ $stateSyncFound == "true" ] && [ $checkpointFound == "true" ]; then break fi done echo "Both state sync and checkpoint went through. All tests have passed!" -echo "Time taken for state sync: $(printf '%02dm:%02ds\n' $((stateSyncTime%3600/60)) $((stateSyncTime%60)))" -echo "Time taken for checkpoint: $(printf '%02dm:%02ds\n' $((checkpointTime%3600/60)) $((checkpointTime%60)))" +echo "Time taken for state sync: $(printf '%02dm:%02ds\n' $((stateSyncTime % 3600 / 60)) $((stateSyncTime % 60)))" +echo "Time taken for checkpoint: $(printf '%02dm:%02ds\n' $((checkpointTime % 3600 / 60)) $((checkpointTime % 60)))" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73f72305..30e08cbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,12 +52,17 @@ jobs: if: (github.event.action != 'closed' || github.event.pull_request.merged == true) strategy: matrix: - os: [ubuntu-20.04] # list of os: https://github.com/actions/virtual-environments + os: [ubuntu-22.04] # list of os: https://github.com/actions/virtual-environments runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: path: matic-cli + - uses: boonya/gh-action-name-generator@v1 + id: generator + with: + length: 2 + style: lowerCase - name: Create .env file working-directory: matic-cli @@ -65,7 +70,7 @@ jobs: GITHUB_HEAD_REF: ${{ github.head_ref || github.ref_name }} run: | cp .env.example .env - sed -i 's,YOUR_IDENTIFIER,matic-cli-ci,' .env + sed -i 's,polygon-user,${{steps.generator.outputs.name}},' .env sed -i 's,gcp-key,matic-cli-ci-key,' .env sed -i 's,/absolute/path/to/your/,/home/runner/work/matic-cli/matic-cli/matic-cli/gcp/,' .env sed -i 's,YOUR_PROJECT_ID,prj-polygonlabs-pos-v1-dev,' .env @@ -125,13 +130,19 @@ jobs: ../../bin/express-cli.js --send-state-sync timeout 20m ../../bin/express-cli.js --monitor exit + - name: Run e2e module tests for Heimdall + working-directory: matic-cli/deployments/devnet-1 + run: | + timeout 5m ../../bin/express-cli.js --send-auth-bank-tests + timeout 10m ../../bin/express-cli.js --send-gov-tests + - name: Run smart contracts events tests working-directory: matic-cli/deployments/devnet-1 run: | timeout 5m ../../bin/express-cli.js --send-staked-event 1 timeout 5m ../../bin/express-cli.js --send-stakeupdate-event 1 - timeout 5m ../../bin/express-cli.js --send-topupfee-event 1 - timeout 10m ../../bin/express-cli.js --send-unstakeinit-event 1 + timeout 15m ../../bin/express-cli.js --send-topupfee-event 1 + timeout 15m ../../bin/express-cli.js --send-unstakeinit-event 1 - name: Destroy devnet if: always() @@ -139,92 +150,3 @@ jobs: run: | echo "Running --destroy" ../../bin/express-cli.js --destroy - - e2e-docker: - permissions: - id-token: write - contents: write - if: (github.event.action != 'closed' || github.event.pull_request.merged == true) - strategy: - matrix: - os: [ubuntu-20.04] # list of os: https://github.com/actions/virtual-environments - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - with: - path: matic-cli - - - uses: actions/setup-go@v5 - with: - go-version: 1.22.x - - - name: Install dependencies on Linux - if: runner.os == 'Linux' - run: | - sudo apt update - sudo apt install build-essential - curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash - sudo snap install solc - sudo apt install python2 jq curl - sudo ln -sf /usr/bin/python2 /usr/bin/python - - - name: Setup node - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - - name: Bootstrap devnet - run: | - cd matic-cli - npm install --prefer-offline --no-audit --progress=false - mkdir devnet - cd devnet - ../bin/matic-cli.js setup devnet -c ../../matic-cli/.github/e2e-docker-config.yml - - - name: Launch devnet - run: | - cd matic-cli/devnet - bash docker-ganache-start.sh - bash docker-heimdall-start-all.sh - bash docker-bor-setup.sh - bash docker-bor-start-all.sh - cd - - timeout 2m bash matic-cli/.github/integration-tests/bor_health.sh - cd - - bash ganache-deployment-bor.sh - bash ganache-deployment-sync.sh - - - name: Run smoke tests - run: | - echo "Funding ganache accounts..." - timeout 10m bash matic-cli/.github/integration-tests/fund_ganache_accounts.sh - echo "Deposit 100 matic for each account to bor network" - cd matic-cli/devnet/code/contracts - npm run truffle exec scripts/deposit.js -- --network development $(jq -r .root.tokens.MaticToken contractAddresses.json) 100000000000000000000 - cd - - timeout 60m bash matic-cli/.github/integration-tests/smoke_test.sh - - - name: Upload logs - if: always() - uses: actions/upload-artifact@v4.4.0 - with: - name: logs_${{ github.run_id }} - path: | - matic-cli/devnet/logs - - - name: Package code and chain data - if: always() - run: | - cd matic-cli/devnet - docker compose down --remove-orphans - cd - - mkdir -p ${{ github.run_id }}/matic-cli - sudo mv matic-cli/devnet ${{ github.run_id }}/matic-cli - sudo tar czf code.tar.gz ${{ github.run_id }} - - - name: Upload code and chain data - if: always() - uses: actions/upload-artifact@v4.4.0 - with: - name: code_${{ github.run_id }} - path: code.tar.gz diff --git a/.gitignore b/.gitignore index 13097265..48aaaa7d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,7 @@ signer-dump.json /configs/devnet/remote-setup-config.yaml .dccache -.vscode \ No newline at end of file +.vscode + +util-scripts/migration/* +util-scripts/bor/backfill-state-sync-txs/bin/* diff --git a/.gitmodules b/.gitmodules index f50abec4..6e0ac590 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "tests/rpc-tests/RPC-testdata"] path = tests/rpc-tests/RPC-testdata - url = https://github.com/maticnetwork/RPC-testdata + url = https://github.com/0xPolygon/RPC-testdata diff --git a/README.md b/README.md index f6d41ce8..86b90220 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ The `express-cli` also comes with additional utility commands, listed below. Som - `../../bin/express-cli.js --cleanup` - - Cleans up `ganache`, `bor`, `heimdall` and `bridge`, redeploys all the contracts and restarts all the services + - Cleans up `anvil`, `bor`, `heimdall` and `bridge`, redeploys all the contracts and restarts all the services The `express-cli` also provides additional testing commands, listed here. - `../../bin/express-cli.js --send-state-sync` @@ -222,6 +222,14 @@ The `express-cli` also comes with additional utility commands, listed below. Som - Create a `UnstakeInit` transaction on the remote network and removes the validator from validator-set. `validatorID` can be used to specify the validator to be removed. If not specified, the first validator will be removed. +- `../../bin/express-cli.js --send-gov-tests` + + - Runs end-to-end tests for gov module of Heimdall. + +- `../../bin/express-cli.js --send-auth-bank-tests` + + - Runs end-to-end tests for auth and bank module of Heimdall. + - ` ../../bin/express-cli.js --monitor [exit]` - Monitors the reception of state-syncs and checkpoints to make sure the whole network is in a healthy state. @@ -234,7 +242,7 @@ The `express-cli` also comes with additional utility commands, listed below. Som - ` ../../bin/express-cli.js --instances-start` - - Start the (previously stopped) VM instances associated with the deployed devnet. Also, it starts all services, such as ganache, heimdall, and bor + - Start the (previously stopped) VM instances associated with the deployed devnet. Also, it starts all services, such as anvil, heimdall, and bor - `../../bin/express-cli.js --stress [fund]` @@ -280,21 +288,21 @@ The `express-cli` also comes with additional utility commands, listed below. Som - `../../bin/express-cli.js --shadow-fork [blockNumber]` - - Run (mumbai/mainnet) nodes in shadow mode. Please note that there might be an offset of ~3-4 blocks from [block] number + - Run (mumbai/amoy/mainnet) nodes in shadow mode. Please note that there might be an offset of ~3-4 blocks from [block] number specified when restarting the (shadow) node. Currently only works with remote setup (no docker support). - `../../bin/express-cli.js --rpc-test` - Requires both `RPC_URL` and `MNEMONIC` set - - `MNEMONIC` need funds on its first derivation account (m/44'/60'/0'/0/1) to deploy a small contract + - `MNEMONIC` need funds on its first derivation account (m/44'/60'/0'/0/0) to deploy a small contract - Execute a suite of RPC tests against the provided RPC URL, agnostic to the environment. The tests are capable of running on any network, including devnet, testnet (e.g., Amoy/Mumbai), and mainnet, with the only requirement being that the necessary funds are available in the corresponding account on the network - `../../bin/express-cli.js --relay` - Relay transactions from testnet or mainnet to shadow node running in the devnet. -- `../../bin/express-cli.js --fund-ganache-accounts` - - Transfers 10 eth to all the ganache accounts. +- `../../bin/express-cli.js --fund-anvil-accounts` + - Transfers 10 eth to all the anvil accounts. Note: to allow `express-cli` to clone private repos, make sure the git configs in the `.env` file looks like the following (example for `BOR_REPO`) @@ -311,7 +319,7 @@ The `express-cli` can also be used to perform few simulation based tests for the `matic-cli` has to be installed on a `ubuntu` VM (_host_) and - through a config file - it will point to other VMs' IPs (_remotes_). -- Host machine will run a Polygon node (`bor` and `heimdall`) and a layer 1 node (`ganache`) +- Host machine will run a Polygon node (`bor` and `heimdall`) and a layer 1 node (`anvil`) - Remote machines will only run a Polygon node each ### Requirements @@ -329,7 +337,7 @@ Please, make sure to install the following software/packages on the VMs. - Go 1.18+ (_host_ and _remotes_) ```bash - wget https://raw.githubusercontent.com/maticnetwork/node-ansible/master/go-install.sh \ + wget https://raw.githubusercontent.com/0xPolygon/node-ansible/master/go-install.sh \ && bash go-install.sh --remove \ && bash go-install.sh ``` @@ -349,7 +357,7 @@ Please, make sure to install the following software/packages on the VMs. ```bash curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash \ - && source /home/ubuntu/.bashrc \ + && source ~/.bashrc \ && nvm install 18.19.0 \ && node --version ``` @@ -360,22 +368,25 @@ Please, make sure to install the following software/packages on the VMs. sudo apt update --yes && sudo apt install --yes npm ``` -- Python 2 (only _host_) +- Python 3 (only _host_) ```bash - sudo apt install python2 --yes && alias python="/usr/bin/python2" + sudo apt install python3 python3-pip --yes && alias python="/usr/bin/python3" ``` -- Solc v0.5.16 (only _host_) +- Solc v0.5.17 and 0.6.12 (only _host_) ```bash - sudo snap install solc + sudo pip install solc-select + solc-select install 0.5.17 + solc-select install 0.6.12 + solc-select use 0.5.17 ``` -- Ganache CLI (only _host_) +- Anvil CLI (only _host_) ```bash - npm install --global ganache + curl -L https://foundry.paradigm.xyz | bash && export PATH="$HOME/.foundry/bin:$PATH" >> ~/.bashrc && source ~/.bashrc && foundryup ``` #### **MacOS** @@ -389,7 +400,7 @@ Please, make sure to install the following software/packages on the VMs. - Go 1.18+ (_host_ and _remotes_) ```zsh - curl -O https://raw.githubusercontent.com/maticnetwork/node-ansible/master/go-install.sh + curl -O https://raw.githubusercontent.com/0xPolygon/node-ansible/master/go-install.sh bash go-install.sh --remove bash go-install.sh ``` @@ -412,29 +423,30 @@ Please, make sure to install the following software/packages on the VMs. && node --version ``` -- Python 2 (only _host_) +- Python 3 (only _host_) ```zsh brew install pyenv - pyenv install 2.7.18 - pyenv global 2.7.18 - python --version + pyenv install 3.13.2 + pyenv global 3.13.2 + python3 --version + pyenv exec python3 -m ensurepip --default-pip + python3 -m pip install --upgrade pip ``` -- Solc v0.5.16 (only _host_) +- Solc v0.5.17 and 0.6.12 (only _host_) ```zsh - brew tap ethereum/ethereum - brew install solc-select + pip3 install solc-select solc-select install 0.5.17 + solc-select install 0.6.12 solc-select use 0.5.17 - solc --version ``` -- Ganache CLI (only _host_) +- Anvil CLI (only _host_) ```zsh - npm install --global ganache + curl -L https://foundry.paradigm.xyz | bash && export PATH="$HOME/.foundry/bin:$PATH" >> ~/.bashrc && source ~/.bashrc && foundryup ``` ### Usage @@ -443,13 +455,15 @@ On the _host_ machine, please run ```bash cd \ - && git clone https://github.com/maticnetwork/matic-cli.git \ + && git clone https://github.com/0xPolygon/matic-cli.git \ && cd matic-cli \ && npm install ``` #### Local dockerized network +Install the required software on your machine (see [Requirements](#requirements-1)). + Adjust the [docker configs](configs/devnet/docker-setup-config.yaml) based on your setup, and run ```bash @@ -468,8 +482,20 @@ DONE Devnet is ready Once the setup is done, use the aggregated script for local docker deployment ```bash -chmod +x ../docker_devnet.sh -../docker_devnet.sh +bash ../util-scripts/docker/devnet_setup.sh +``` + +To verify the deployment, run the smoke test to ensure everything is working properly. The script usually takes around 6mins to complete. + +```bash +bash ../util-scripts/docker/smoke_test.sh +``` + +To add funds to the signer's account you can execute the following script. +This step is optional, as all existing signers already have sufficient funds. + +```bash +bash ../util-scripts/docker/fund_anvil_accounts.sh ``` Logs will be stored under `logs/` folder @@ -481,7 +507,7 @@ Note: in case of docker setup, we have provided [some additional scripts](src/se Adjust the [remote configs](configs/devnet/remote-setup-config.yaml) and run ```bash -../bin/matic-cli.js setup devnet --config ../configs/devnet/remote-setup-config.yaml +../bin/matic-cli.js setup devnet --config ../configs/devnet/remote-setup-config.yaml | tee setup.log ``` Alternatively, this step can be executed interactively with @@ -500,12 +526,12 @@ In this case, the stack is already running, you would just need to deploy/sync s - Deploy contracts on Child chain ```bash - bash ganache-deployment-bor.sh + bash anvil-deployment-bor.sh ``` - Sync contract addresses to Main chain ```bash - bash ganache-deployment-sync.sh + bash anvil-deployment-sync.sh ``` #### Clean setup @@ -514,7 +540,11 @@ Stop all services, remove the `matic-cli/devnet` folder, and you can start the p #### Notes -1. The ganache URL hostname will be used for ganache `http://:9545` +Install the required software on your machine (see [Requirements](#requirements-1)). + +Adjust the [docker configs](configs/devnet/docker-setup-config.yaml) based on your setup, and run + +1. The anvil URL hostname will be used for anvil `http://:9545` 2. Make sure that the _host_ machine has access to remote machines for transferring the data To persist ssh key for remote access, please run: ```bash diff --git a/configs/README.md b/configs/README.md index 909daf23..28d398af 100644 --- a/configs/README.md +++ b/configs/README.md @@ -7,7 +7,7 @@ For `mati-cli`, the configs are directly used to spin the network up. ## Usage ```bash -matic-cli setup devnet --config path/to/config.yaml +matic-cli setup devnet --config path/to/config.yaml | tee setup.log ``` ## Option details with examples @@ -47,7 +47,7 @@ numOfNonValidators: 0 devnetType: remote # URL to Ethereum RPC -ethURL: http://ganache:9545 +ethURL: http://anvil:9545 # Remote user for Ethereum RPC. Only effective when devnetType is `remote`. ethHostUser: ubuntu @@ -72,23 +72,23 @@ devnetHeimdallUsers: - ubuntu - ubuntu -# Branch of bor to use. Repository: https://github.com/maticnetwork/bor -borBranch: c5569e4da9ebe0ce4e63aec571966c71234f7cfc # todo change to develop once https://polygon.atlassian.net/browse/POS-979 is solved +# Branch of bor to use. Repository: https://github.com/0xPolygon/bor +borBranch: develop -# Branch of Heimdall to use. Repository: https://github.com/maticnetwork/heimdall +# Branch of Heimdall to use. Repository: https://github.com/0xPolygon/heimdall-v2 heimdallBranch: develop -# Branch of contract to use. Repository: https://github.com/maticnetwork/contracts -contractsBranch: mardizzone/node-upgrade # todo change to master once contracts team merges the PR +# Branch of contract to use. Repository: https://github.com/0xPolygon/pos-contracts +contractsBranch: anvil-pos -# Branch of contract to use. Repository: https://github.com/maticnetwork/genesis-contracts -genesisContractsBranch: mardizzone/node-upgrade # todo change to master once contracts team merges the PR +# Branch of contract to use. Repository: https://github.com/0xPolygon/genesis-contracts +genesisContractsBranch: master # Docker build context for bor. Used in docker setup. When specified, borBranch will be ignored. -borDockerBuildContext: 'https://github.com/maticnetwork/bor.git#c5569e4da9ebe0ce4e63aec571966c71234f7cfc' # todo change to develop once https://polygon.atlassian.net/browse/POS-979 is solved" +borDockerBuildContext: 'https://github.com/0xPolygon/bor.git#develop' # Docker build context for heimdall. Used in docker setup. When specified, heimdallBranch will be ignored. -heimdallDockerBuildContext: 'https://github.com/maticnetwork/heimdall.git#develop' +heimdallDockerBuildContext: 'https://github.com/0xPolygon/heimdall-v2.git#develop' # Datadog api key required to setup datadog traces and metrics for the node. DD_API_KEY: # Datadog API key diff --git a/configs/devnet/docker-setup-config.yaml b/configs/devnet/docker-setup-config.yaml index 68195da9..791d4629 100755 --- a/configs/devnet/docker-setup-config.yaml +++ b/configs/devnet/docker-setup-config.yaml @@ -1,14 +1,14 @@ # Repositories -borRepo: https://github.com/maticnetwork/bor.git +borRepo: https://github.com/0xPolygon/bor.git borBranch: develop -heimdallRepo: https://github.com/maticnetwork/heimdall.git +heimdallRepo: https://github.com/0xPolygon/heimdall-v2.git heimdallBranch: develop -contractsRepo: https://github.com/maticnetwork/contracts.git -contractsBranch: mardizzone/node-16 +contractsRepo: https://github.com/0xPolygon/pos-contracts.git +contractsBranch: anvil-pos -genesisContractsRepo: https://github.com/maticnetwork/genesis-contracts.git +genesisContractsRepo: https://github.com/0xPolygon/genesis-contracts.git genesisContractsBranch: master # Defaults @@ -17,26 +17,33 @@ defaultStake: 10000 defaultFee: 2000 # L1 -ethURL: http://ganacheURL:9545 # use localhost for local deployments +ethURL: http://anvil:9545 # use localhost for local deployments ethHostUser: ubuntu +# Misc +mnemonic: 'clock radar mass judge dismiss just intact mind resemble fringe diary casino' + # Heimdall -heimdallChainId: heimdall-4052 -heimdallDockerBuildContext: https://github.com/maticnetwork/heimdall.git#develop +heimdallChainId: heimdall-15005 +heimdallDockerBuildContext: https://github.com/0xPolygon/heimdall-v2.git#develop # Bor borChainId: 15005 -sprintSize: 64 -sprintSizeBlockNumber: 0 -blockNumber: '0' +borDockerBuildContext: https://github.com/0xPolygon/bor.git#develop + blockTime: '2' -numOfBorValidators: 1 +blockNumber: '0' + +sprintSize: '16' +sprintSizeBlockNumber: '0' + +# Bor +numOfBorValidators: 3 numOfBorSentries: 1 numOfBorArchiveNodes: 0 -borDockerBuildContext: https://github.com/maticnetwork/bor.git#develop -devnetBorUsers: ubuntu,ubuntu -devnetBorHosts: ["ec2-xx-xxx-xx-xxx.eu-west-1.compute.amazonaws.com"] # use localhost for local deployments -devnetBorFlags: config,config + +devnetBorUsers: ubuntu,ubuntu,ubuntu,ubuntu +devnetBorFlags: config,config,config,config # Erigon numOfErigonValidators: 0 diff --git a/configs/devnet/remote-setup-config.yaml b/configs/devnet/remote-setup-config.yaml index bde50e2f..309aa150 100755 --- a/configs/devnet/remote-setup-config.yaml +++ b/configs/devnet/remote-setup-config.yaml @@ -1,28 +1,39 @@ +devnetType: remote defaultStake: 10000 defaultFee: 2000 + borChainId: 15005 -heimdallChainId: heimdall-4052 -borRepo: https://github.com/maticnetwork/bor.git +heimdallChainId: heimdall-15005 + +borRepo: https://github.com/0xPolygon/bor.git borBranch: develop -heimdallRepo: https://github.com/maticnetwork/heimdall.git + +heimdallRepo: https://github.com/0xPolygon/heimdall-v2.git heimdallBranch: develop -contractsRepo: https://github.com/maticnetwork/contracts.git -contractsBranch: mardizzone/node-16 -genesisContractsRepo: https://github.com/maticnetwork/genesis-contracts.git + +contractsRepo: https://github.com/0xPolygon/pos-contracts.git +contractsBranch: anvil-pos + +genesisContractsRepo: https://github.com/0xPolygon/genesis-contracts.git genesisContractsBranch: master -sprintSize: 64 -sprintSizeBlockNumber: 0 -blockNumber: '0' + blockTime: '2' +blockNumber: '0' + +sprintSize: '64' +sprintSizeBlockNumber: '0' + numOfBorValidators: 1 numOfBorSentries: 1 numOfBorArchiveNodes: 0 -numOfErigonValidators: 1 -numOfErigonSentries: 1 + +numOfErigonValidators: 0 +numOfErigonSentries: 0 numOfErigonArchiveNodes: 0 + ethURL: http://ec2-xx-xxx-xxx-xx.eu-west-1.compute.amazonaws.com:9545 ethHostUser: ubuntu -devnetType: remote + devnetBorHosts: - ec2-xx-xxx-xxx-xx.eu-west-1.compute.amazonaws.com - ec2-yy-yyy-yyy-yy.eu-west-1.compute.amazonaws.com @@ -38,5 +49,8 @@ devnetHeimdallUsers: devnetBorFlags: - config - config -borDockerBuildContext: https://github.com/maticnetwork/bor.git#develop -heimdallDockerBuildContext: https://github.com/maticnetwork/heimdall.git#develop + +borDockerBuildContext: https://github.com/0xPolygon/bor.git#develop +heimdallDockerBuildContext: https://github.com/0xPolygon/heimdall-v2.git#develop + +mnemonic: 'clock radar mass judge dismiss just intact mind resemble fringe diary casino' diff --git a/package-lock.json b/package-lock.json index f14c3be6..f9f5ebfe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "@maticnetwork/matic-cli", - "version": "0.10.0", + "name": "@0xPolygon/matic-cli", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@maticnetwork/matic-cli", - "version": "0.10.0", + "name": "@0xPolygon/matic-cli", + "version": "1.0.0", "license": "MIT", "dependencies": { "@ethereumjs/tx": "^4.1.1", @@ -25,9 +25,9 @@ "eth-crypto": "^2.4.0", "ethereumjs-util": "^7.1.5", "ethereumjs-wallet": "^1.0.2", + "ethers": "^6.13.5", "execa": "^1.0.0", "fs-extra": "^10.1.0", - "ganache": "7.9.1", "inquirer": "^6.2.2", "js-yaml": "^4.1.0", "listr2": "^4.0.5", @@ -35,6 +35,7 @@ "node-fetch": "^2.6.7", "nunjucks": "^3.2.1", "pkg-install": "^1.0.0", + "secp256k1": "^5.0.1", "shelljs": "^0.8.5", "truffle-privatekey-provider": "^1.5.0", "web3": "^1.8.2", @@ -63,6 +64,11 @@ "node": ">=0.10.0" } }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -76,12 +82,14 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -411,17 +419,19 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -449,35 +459,26 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz", - "integrity": "sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", + "license": "MIT", "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.5", - "@babel/types": "^7.23.5" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "node_modules/@babel/parser": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@babel/types": "^7.26.10" }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", - "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1697,13 +1698,14 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" @@ -1730,13 +1732,13 @@ } }, "node_modules/@babel/types": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", - "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2312,6 +2314,26 @@ "ws": "7.4.6" } }, + "node_modules/@ethersproject/providers/node_modules/ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/@ethersproject/random": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", @@ -2659,6 +2681,20 @@ "@types/node": "*" } }, + "node_modules/@metamask/eth-sig-util/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/@metamask/eth-sig-util/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -2695,6 +2731,25 @@ "rlp": "^2.2.3" } }, + "node_modules/@metamask/eth-sig-util/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/@metamask/eth-sig-util/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@metamask/safe-event-emitter": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz", @@ -3375,6 +3430,20 @@ "@scure/bip39": "1.1.0" } }, + "node_modules/@truffle/hdwallet/node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@types/bn.js": { "version": "5.1.5", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", @@ -3430,11 +3499,11 @@ } }, "node_modules/@types/node": { - "version": "20.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", - "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/pbkdf2": { @@ -3809,9 +3878,13 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -3853,9 +3926,10 @@ "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" }, "node_modules/axios": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", - "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz", + "integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -3943,9 +4017,10 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "license": "MIT", "dependencies": { "safe-buffer": "^5.0.1" } @@ -4115,9 +4190,10 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4336,15 +4412,44 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" }, "engines": { "node": ">= 0.4" @@ -4959,6 +5064,20 @@ "node": ">=0.10" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -5174,12 +5293,10 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -5192,6 +5309,18 @@ "node": ">= 0.4" } }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", @@ -6001,6 +6130,53 @@ "@types/node": "*" } }, + "node_modules/eth-crypto/node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, "node_modules/eth-crypto/node_modules/node-addon-api": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", @@ -6106,6 +6282,20 @@ "safe-event-emitter": "^1.0.1" } }, + "node_modules/eth-json-rpc-middleware/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/eth-json-rpc-middleware/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -6151,6 +6341,25 @@ "safe-event-emitter": "^1.0.1" } }, + "node_modules/eth-json-rpc-middleware/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/eth-json-rpc-middleware/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/eth-lib": { "version": "0.1.29", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", @@ -6206,6 +6415,20 @@ "ethereumjs-util": "^5.1.1" } }, + "node_modules/eth-sig-util/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/eth-sig-util/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -6242,6 +6465,25 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/eth-sig-util/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/eth-sig-util/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ethereum-bloom-filters": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", @@ -6288,6 +6530,20 @@ "@types/node": "*" } }, + "node_modules/ethereumjs-abi/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/ethereumjs-abi/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -6324,6 +6580,25 @@ "rlp": "^2.2.3" } }, + "node_modules/ethereumjs-abi/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/ethereumjs-abi/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ethereumjs-account": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", @@ -6334,7 +6609,21 @@ "safe-buffer": "^5.1.1" } }, - "node_modules/ethereumjs-account/node_modules/ethereum-cryptography": { + "node_modules/ethereumjs-account/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/ethereumjs-account/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", @@ -6370,6 +6659,25 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/ethereumjs-account/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/ethereumjs-account/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ethereumjs-block": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", @@ -6383,6 +6691,20 @@ "merkle-patricia-tree": "^2.1.2" } }, + "node_modules/ethereumjs-block/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/ethereumjs-block/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -6419,6 +6741,25 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/ethereumjs-block/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/ethereumjs-block/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ethereumjs-common": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", @@ -6435,6 +6776,20 @@ "ethereumjs-util": "^5.0.0" } }, + "node_modules/ethereumjs-tx/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/ethereumjs-tx/node_modules/ethereum-common": { "version": "0.0.18", "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", @@ -6476,6 +6831,25 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/ethereumjs-tx/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/ethereumjs-tx/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ethereumjs-util": { "version": "7.1.5", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", @@ -6496,6 +6870,25 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, + "node_modules/ethereumjs-util/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/ethereumjs-util/node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" + }, "node_modules/ethereumjs-util/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -6518,6 +6911,25 @@ "setimmediate": "^1.0.5" } }, + "node_modules/ethereumjs-util/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/ethereumjs-util/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ethereumjs-vm": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", @@ -6545,6 +6957,20 @@ "@types/node": "*" } }, + "node_modules/ethereumjs-vm/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/ethereumjs-vm/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -6618,6 +7044,25 @@ "rlp": "^2.2.3" } }, + "node_modules/ethereumjs-vm/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/ethereumjs-vm/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ethereumjs-wallet": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz", @@ -6633,6 +7078,20 @@ "uuid": "^8.3.2" } }, + "node_modules/ethereumjs-wallet/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/ethereumjs-wallet/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -6655,6 +7114,25 @@ "setimmediate": "^1.0.5" } }, + "node_modules/ethereumjs-wallet/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/ethereumjs-wallet/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ethereumjs-wallet/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -6664,13 +7142,13 @@ } }, "node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "version": "6.13.5", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.5.tgz", + "integrity": "sha512-+knKNieu5EKRThQJWwqaJ10a6HE9sSehGeqWN65//wE7j47ZpFhKAnHB/JJFibwwg61I/koxaPsXbXpD/skNOQ==", "funding": [ { "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + "url": "https://github.com/sponsors/ethers-io/" }, { "type": "individual", @@ -6678,38 +7156,50 @@ } ], "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ethers/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, + "node_modules/ethers/node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + }, + "node_modules/ethers/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + }, "node_modules/ethjs-unit": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", @@ -7128,11 +7618,18 @@ } }, "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", "dependencies": { - "is-callable": "^1.1.3" + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/forever-agent": { @@ -7191,662 +7688,57 @@ } }, "node_modules/fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", - "dependencies": { - "minipass": "^2.6.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ganache": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/ganache/-/ganache-7.9.1.tgz", - "integrity": "sha512-Tqhd4J3cpiLeYTD6ek/zlchSB107IVPMIm4ypyg+xz1sdkeALUnYYZnmY4Bdjqj3i6QwtlZPCu7U4qKy7HlWTA==", - "bundleDependencies": [ - "@trufflesuite/bigint-buffer", - "keccak", - "leveldown", - "secp256k1" - ], - "hasShrinkwrap": true, - "dependencies": { - "@trufflesuite/bigint-buffer": "1.1.10", - "@trufflesuite/uws-js-unofficial": "20.30.0-unofficial.0", - "@types/bn.js": "^5.1.0", - "@types/lru-cache": "5.1.1", - "@types/seedrandom": "3.0.1", - "abstract-level": "1.0.3", - "abstract-leveldown": "7.2.0", - "async-eventemitter": "0.2.4", - "emittery": "0.10.0", - "keccak": "3.0.2", - "leveldown": "6.1.0", - "secp256k1": "4.0.3" - }, - "bin": { - "ganache": "dist/node/cli.js", - "ganache-cli": "dist/node/cli.js" - }, - "optionalDependencies": { - "bufferutil": "4.0.5", - "utf-8-validate": "5.0.7" - } - }, - "node_modules/ganache/node_modules/@trufflesuite/bigint-buffer": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.10.tgz", - "integrity": "sha512-pYIQC5EcMmID74t26GCC67946mgTJFiLXOT/BYozgrd4UEY2JHEGLhWi9cMiQCt5BSqFEvKkCHNnoj82SRjiEw==", - "hasInstallScript": true, - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "node-gyp-build": "4.4.0" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/ganache/node_modules/@trufflesuite/bigint-buffer/node_modules/node-gyp-build": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.4.0.tgz", - "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==", - "inBundle": true, - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/ganache/node_modules/@trufflesuite/uws-js-unofficial": { - "version": "20.30.0-unofficial.0", - "resolved": "https://registry.npmjs.org/@trufflesuite/uws-js-unofficial/-/uws-js-unofficial-20.30.0-unofficial.0.tgz", - "integrity": "sha512-r5X0aOQcuT6pLwTRLD+mPnAM/nlKtvIK4Z+My++A8tTOR0qTjNRx8UB8jzRj3D+p9PMAp5LnpCUUGmz7/TppwA==", - "dependencies": { - "ws": "8.13.0" - }, - "optionalDependencies": { - "bufferutil": "4.0.7", - "utf-8-validate": "6.0.3" - } - }, - "node_modules/ganache/node_modules/@trufflesuite/uws-js-unofficial/node_modules/bufferutil": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", - "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/ganache/node_modules/@trufflesuite/uws-js-unofficial/node_modules/utf-8-validate": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.3.tgz", - "integrity": "sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/ganache/node_modules/@trufflesuite/uws-js-unofficial/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/ganache/node_modules/@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/ganache/node_modules/@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==" - }, - "node_modules/ganache/node_modules/@types/node": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz", - "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==" - }, - "node_modules/ganache/node_modules/@types/seedrandom": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-3.0.1.tgz", - "integrity": "sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw==" - }, - "node_modules/ganache/node_modules/abstract-level": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", - "dependencies": { - "buffer": "^6.0.3", - "catering": "^2.1.0", - "is-buffer": "^2.0.5", - "level-supports": "^4.0.0", - "level-transcoder": "^1.0.1", - "module-error": "^1.0.1", - "queue-microtask": "^1.2.3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/ganache/node_modules/abstract-level/node_modules/level-supports": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", - "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/ganache/node_modules/abstract-leveldown": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz", - "integrity": "sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==", - "inBundle": true, - "license": "MIT", - "dependencies": { - "buffer": "^6.0.3", - "catering": "^2.0.0", - "is-buffer": "^2.0.5", - "level-concat-iterator": "^3.0.0", - "level-supports": "^2.0.1", - "queue-microtask": "^1.2.3" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ganache/node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/ganache/node_modules/async-eventemitter": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", - "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", - "dependencies": { - "async": "^2.4.0" - } - }, - "node_modules/ganache/node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "inBundle": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/ganache/node_modules/bufferutil": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz", - "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/ganache/node_modules/catering": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", - "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ganache/node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "inBundle": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/ganache/node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "inBundle": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/emittery": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz", - "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/ganache/node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/ganache/node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "inBundle": true, - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/ganache/node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "BSD-3-Clause" - }, - "node_modules/ganache/node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "inBundle": true, - "license": "ISC" - }, - "node_modules/ganache/node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/ganache/node_modules/keccak": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz", - "integrity": "sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==", - "hasInstallScript": true, - "inBundle": true, - "license": "MIT", - "dependencies": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/ganache/node_modules/level-concat-iterator": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz", - "integrity": "sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==", - "inBundle": true, - "license": "MIT", - "dependencies": { - "catering": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ganache/node_modules/level-supports": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-2.1.0.tgz", - "integrity": "sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/ganache/node_modules/level-transcoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", - "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", - "dependencies": { - "buffer": "^6.0.3", - "module-error": "^1.0.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/ganache/node_modules/leveldown": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz", - "integrity": "sha512-8C7oJDT44JXxh04aSSsfcMI8YiaGRhOFI9/pMEL7nWJLVsWajDPTRxsSHTM2WcTVY5nXM+SuRHzPPi0GbnDX+w==", - "hasInstallScript": true, - "inBundle": true, - "license": "MIT", - "dependencies": { - "abstract-leveldown": "^7.2.0", - "napi-macros": "~2.0.0", - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/ganache/node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/ganache/node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "inBundle": true, - "license": "ISC" - }, - "node_modules/ganache/node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "inBundle": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/module-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", - "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/ganache/node_modules/napi-macros": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", - "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", - "inBundle": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "inBundle": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/node-gyp-build": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", - "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", - "inBundle": true, - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/ganache/node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/ganache/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", - "hasInstallScript": true, - "inBundle": true, - "license": "MIT", - "dependencies": { - "elliptic": "^6.5.4", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - }, - "engines": { - "node": ">=10.0.0" + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dependencies": { + "minipass": "^2.6.0" } }, - "node_modules/ganache/node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "inBundle": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ganache/node_modules/utf-8-validate": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz", - "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==", - "hasInstallScript": true, - "optional": true, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, "dependencies": { - "node-gyp-build": "^4.3.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { - "node": ">=6.14.2" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ganache/node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "inBundle": true, - "license": "MIT" + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gensync": { "version": "1.0.0-beta.2", @@ -7857,15 +7749,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -7874,6 +7772,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -7972,11 +7883,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8082,6 +7994,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -8090,9 +8003,10 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8101,11 +8015,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -8137,9 +8052,10 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -8674,11 +8590,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -8735,7 +8652,8 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", @@ -9342,6 +9260,15 @@ "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==" }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -9414,6 +9341,20 @@ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==" }, + "node_modules/merkle-patricia-tree/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/merkle-patricia-tree/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -9450,6 +9391,11 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/merkle-patricia-tree/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, "node_modules/merkle-patricia-tree/node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -9469,6 +9415,20 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/merkle-patricia-tree/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/merkle-patricia-tree/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -10143,20 +10103,53 @@ "license": "MIT" }, "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz", + "integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==", + "license": "MIT", "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "create-hash": "~1.1.3", + "create-hmac": "^1.1.7", + "ripemd160": "=2.0.1", + "safe-buffer": "^5.2.1", + "sha.js": "^2.4.11", + "to-buffer": "^1.2.0" }, "engines": { "node": ">=0.12" } }, + "node_modules/pbkdf2/node_modules/create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==", + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "sha.js": "^2.4.0" + } + }, + "node_modules/pbkdf2/node_modules/hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1" + } + }, + "node_modules/pbkdf2/node_modules/ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==", + "license": "MIT", + "dependencies": { + "hash-base": "^2.0.0", + "inherits": "^2.0.1" + } + }, "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -10190,6 +10183,15 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-11.15.54.tgz", "integrity": "sha512-1RWYiq+5UfozGsU6MwJyFX6BtktcT10XRjvcAQmskCtMcW3tPske88lM/nHv7BQG1w9KBXI1zPGuu5PnNCX14g==" }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/precond": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", @@ -10824,19 +10826,38 @@ "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, "node_modules/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.1.tgz", + "integrity": "sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==", "hasInstallScript": true, "dependencies": { - "elliptic": "^6.5.4", - "node-addon-api": "^2.0.0", + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", "node-gyp-build": "^4.2.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/secp256k1/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/secp256k1/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, "node_modules/semaphore": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", @@ -11557,14 +11578,26 @@ "node": ">=0.6.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "node_modules/to-buffer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", + "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==", + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, "engines": { - "node": ">=4" + "node": ">= 0.4" } }, + "node_modules/to-buffer/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -11599,6 +11632,20 @@ "web3-provider-engine": "^15.0.12" } }, + "node_modules/truffle-privatekey-provider/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/truffle-privatekey-provider/node_modules/eth-json-rpc-infura": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-4.1.0.tgz", @@ -11686,6 +11733,11 @@ "safe-event-emitter": "^1.0.1" } }, + "node_modules/truffle-privatekey-provider/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, "node_modules/truffle-privatekey-provider/node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -11705,6 +11757,20 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/truffle-privatekey-provider/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/truffle-privatekey-provider/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -11840,14 +11906,14 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", - "dev": true, + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -11933,9 +11999,9 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", @@ -12528,6 +12594,20 @@ "node": ">=10.0.0" } }, + "node_modules/web3-provider-engine/node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/web3-provider-engine/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -12564,6 +12644,11 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/web3-provider-engine/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, "node_modules/web3-provider-engine/node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -12583,6 +12668,20 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/web3-provider-engine/node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/web3-provider-engine/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -12763,15 +12862,18 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -12852,15 +12954,15 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { diff --git a/package.json b/package.json index 8b6dfb5f..ba078675 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@maticnetwork/matic-cli", - "version": "0.10.0", - "description": "Testing toolkit to setup, manage and operate Polygon networks", + "name": "@0xPolygon/matic-cli", + "version": "1.0.0", + "description": "Testing toolkit to setup, manage and operate Polygon PoS networks", "type": "module", "publishConfig": { "access": "public" @@ -38,9 +38,9 @@ "eth-crypto": "^2.4.0", "ethereumjs-util": "^7.1.5", "ethereumjs-wallet": "^1.0.2", + "ethers": "^6.13.5", "execa": "^1.0.0", "fs-extra": "^10.1.0", - "ganache": "7.9.1", "inquirer": "^6.2.2", "js-yaml": "^4.1.0", "listr2": "^4.0.5", @@ -48,6 +48,7 @@ "node-fetch": "^2.6.7", "nunjucks": "^3.2.1", "pkg-install": "^1.0.0", + "secp256k1": "^5.0.1", "shelljs": "^0.8.5", "truffle-privatekey-provider": "^1.5.0", "web3": "^1.8.2", diff --git a/src/cli.js b/src/cli.js index 3c4478f5..8fd7d4a0 100644 --- a/src/cli.js +++ b/src/cli.js @@ -1,7 +1,9 @@ import { program } from 'commander' import setupPrograms from './setup/index.js' -import pkg from '../package.json' assert { type: 'json' } +const pkg = await import('../package.json', { + assert: { type: 'json' } +}).then((module) => module.default) const setupCmd = program .version(pkg.version) diff --git a/src/express-cli.js b/src/express-cli.js index 272357e9..00511320 100644 --- a/src/express-cli.js +++ b/src/express-cli.js @@ -42,9 +42,13 @@ import { relay } from './express/commands/relay.js' import { keypairAdd } from './express/commands/keypair-add.js' import { keypairDestroy } from './express/commands/keypair-destroy.js' import { constants } from './express/common/constants.js' +import { sendAuthAndBankTestsCommand } from './express/commands/auth-bank-tests.js' +import { sendGovTestsCommand } from './express/commands/gov-tests.js' +import { fundAnvilAccounts } from './express/common/anvil-utils.js' -import pkg from '../package.json' assert { type: 'json' } -import { fundGanacheAccounts } from './express/common/ganache-utils.js' +const pkg = await import('../package.json', { + assert: { type: 'json' } +}).then((module) => module.default) function checkCloudProvider(provider, _) { const supportedClouds = [constants.cloud.AWS, constants.cloud.GCP] @@ -163,7 +167,12 @@ program ) .option('-relay, --relay', 'Relay transaction to shadow node') .option('-rpc, --rpc-test', 'Run the rpc test command') - .option('-fga, --fund-ganache-accounts', 'Add funds to ganache accounts') + .option('-fga, --fund-anvil-accounts', 'Add funds to the anvil accounts') + .option( + '-auth-bank, --send-auth-bank-tests', + 'Run auth and bank module tests for Heimdall' + ) + .option('-gov, --send-gov-tests', 'Run gov module tests for Heimdall') .version(pkg.version) export async function cli() { @@ -645,14 +654,32 @@ export async function cli() { 'β›” This command is only available for non-dockerized devnets. Make sure to target such environment...' ) await startRpcTest() - } else if (options.fundGanacheAccounts) { - console.log('πŸ“Command --fund-ganache-accounts') + } else if (options.fundAnvilAccounts) { + console.log('πŸ“Command --fund-anvil-accounts') + if (!checkDir(false)) { + console.log( + '❌ The command is not called from the appropriate devnet directory!' + ) + process.exit(1) + } + await fundAnvilAccounts() + } else if (options.sendGovTests) { + console.log('πŸ“Command --send-gov-tests') + if (!checkDir(false)) { + console.log( + '❌ The command is not called from the appropriate devnet directory!' + ) + process.exit(1) + } + await sendGovTestsCommand() + } else if (options.sendAuthBankTests) { + console.log('πŸ“Command --send-auth-bank-tests') if (!checkDir(false)) { console.log( '❌ The command is not called from the appropriate devnet directory!' ) process.exit(1) } - await fundGanacheAccounts() + await sendAuthAndBankTestsCommand() } } diff --git a/src/express/commands/auth-bank-tests.js b/src/express/commands/auth-bank-tests.js new file mode 100644 index 00000000..a938793a --- /dev/null +++ b/src/express/commands/auth-bank-tests.js @@ -0,0 +1,227 @@ +import { loadDevnetConfig } from '../common/config-utils.js' +import { timer } from '../common/time-utils.js' +import { + runSshCommand, + runSshCommandWithReturn, + maxRetries +} from '../common/remote-worker.js' +import { getProposalCount, getProposalStatus } from './gov-tests.js' +import { + updateAuthParamsMetadata, + updateAuthParamsProposal +} from '../common/proposals.js' +import { + importValidatorKeysOnHost, + fetchBalance +} from '../common/heimdall-utils.js' +import dotenv from 'dotenv' + +export async function sendAuthAndBankTestsCommand() { + dotenv.config({ path: `${process.cwd()}/.env` }) + const devnetType = + process.env.TF_VAR_DOCKERIZED === 'yes' ? 'docker' : 'remote' + + const doc = await loadDevnetConfig(devnetType) + let machine0 + + // Only use validator nodes for validator actions. + const borValidatorCount = + doc.numOfBorValidators || + Number(process.env.TF_VAR_BOR_VALIDATOR_COUNT) || + 0 + const borValidatorHosts = Array.isArray(doc.devnetBorHosts) + ? doc.devnetBorHosts.slice(0, borValidatorCount) + : [] + + if (borValidatorCount > 0 && borValidatorHosts.length > 0) { + machine0 = borValidatorHosts[0] + console.log('πŸ“Monitoring the first bor validator node', machine0) + } else { + console.log( + 'πŸ“No validator nodes to monitor, please check your configs! Exiting...' + ) + process.exit(1) + } + + // Import validator keys only on validator nodes + if (Array.isArray(borValidatorHosts) && borValidatorHosts.length > 0) { + for (const machine of borValidatorHosts) { + await importValidatorKeysOnHost(machine, doc.ethHostUser) + } + } + console.log('πŸ“Validator keys imported on all validator hosts') + + console.log('πŸ“Writing draft_metadata.json on primary host:', machine0) + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + `echo '${updateAuthParamsMetadata}' > ~/draft_metadata.json`, + maxRetries + ) + console.log(`βœ… draft_metadata.json saved on host ${machine0}`) + + console.log('πŸ“Writing draft_proposal.json on primary host:', machine0) + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + `echo '${updateAuthParamsProposal}' > ~/draft_proposal.json`, + maxRetries + ) + console.log(`βœ… draft_proposal.json saved on host ${machine0}`) + + const chainId = await runSshCommandWithReturn( + `${doc.ethHostUser}@${machine0}`, + "jq -r '.chain_id' /var/lib/heimdall/config/genesis.json", + maxRetries + ) + console.log('Chain ID:', chainId.trim()) + + console.log('πŸ“ Fetching auth params BEFORE proposal submission') + const beforeParams = await getAuthParams(doc, machine0) + const afterParams = { + max_memo_characters: '512', + tx_sig_limit: '1', + tx_size_cost_per_byte: '20', + sig_verify_cost_ed25519: '600', + sig_verify_cost_secp256k1: '1100', + max_tx_gas: '10000000', + tx_fees: '10000000000000000' + } + + const allMatchBefore = Object.entries(afterParams).every( + ([k, v]) => String(beforeParams[k]) === v + ) + + if (allMatchBefore) { + throw new Error( + '🚨 Auth params already match the expected values BEFORE proposal aborting' + ) + } else { + console.log('βœ… Auth params differ BEFORE update, as expected') + } + + // Check proposal count before submission + const beforeCount = await getProposalCount(doc, machine0) + console.log('πŸ” Proposals before submission:', beforeCount) + + const submitProposalCommand = `printf 'test-test\\n' | heimdalld tx gov submit-proposal draft_proposal.json --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + submitProposalCommand, + maxRetries + ) + + await timer(10000) + + // Check proposal count after submission + const afterCount = await getProposalCount(doc, machine0) + console.log('πŸ” Proposals after submission:', afterCount) + + if (afterCount > beforeCount) { + console.log('βœ… Proposal submitted successfully') + } else { + console.log('❌ Proposal submission failed') + } + + console.log(`πŸ“Depositing 200 POL to proposal #${afterCount}`) + const depositCommand = `printf 'test-test\\n' | heimdalld tx gov deposit ${afterCount} 200000000000000000000pol --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + for (const machine of borValidatorHosts) { + await runSshCommand( + `${doc.ethHostUser}@${machine}`, + depositCommand, + maxRetries + ) + console.log(`βœ… Deposit command executed on validator host ${machine}`) + await timer(5000) + } + + console.log( + `πŸ“ Casting YES vote on proposal #${afterCount} from each validator…` + ) + for (const machine of borValidatorHosts) { + const voteCommand = `printf 'test-test\\n' | heimdalld tx gov vote ${afterCount} yes --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + await runSshCommand( + `${doc.ethHostUser}@${machine}`, + voteCommand, + maxRetries + ) + console.log(`βœ… Vote command executed on validator host ${machine}`) + await timer(5000) + } + + await timer(75000) // Wait for 75 secs + console.log('πŸ“Checking proposal status…') + + // Check proposal status + const status = await getProposalStatus(doc, machine0, afterCount) + if (status === 'PROPOSAL_STATUS_PASSED') { + console.log('βœ… Proposal passed successfully') + } else { + console.error(`❌ Proposal status: ${status}`) + } + + console.log('βœ… auth.MsgUpdateParam Testcase passed') + + console.log('πŸ“ Verifying auth params updated') + const ok = await verifyAuthParamsUpdate(doc, machine0) + console.log('πŸ” Auth params match expected:', ok) + if (!ok) throw new Error('Auth params update verification failed') + + console.log('βœ… Auth module param update test succeeded') + + // Bank Send Test + const randomAddress = await runSshCommandWithReturn( + `${doc.ethHostUser}@${machine0}`, + "printf 'test-test\\n' | heimdalld keys add random --home /var/lib/heimdall --no-backup --output json 2>/dev/null | awk '/^{/,/}$/p' | jq -r .address", + maxRetries + ) + console.log('Random address generated:', randomAddress.trim()) + + const sendAmount = '1000000000000000000pol' + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + `printf 'test-test\\n' | heimdalld tx bank send test ${randomAddress} ${sendAmount} --home /var/lib/heimdall --chain-id ${chainId.trim()} -y`, + maxRetries + ) + + console.log(`βœ… Sent ${sendAmount} from test to random`) + await timer(10000) + + const balance = await fetchBalance( + doc.ethHostUser, + machine0, + randomAddress.trim() + ) + + if (balance === sendAmount.replace('pol', '')) { + console.log('βœ… Bank send test passed') + } else { + console.error( + '❌ Bank send test failed, expected:', + sendAmount, + 'got:', + balance + ) + } +} + +async function getAuthParams(doc, machine) { + const out = await runSshCommandWithReturn( + `${doc.ethHostUser}@${machine}`, + 'curl -s localhost:1317/cosmos/auth/v1beta1/params', + maxRetries + ) + return JSON.parse(out).params +} + +async function verifyAuthParamsUpdate(doc, machine) { + const current = await getAuthParams(doc, machine) + const expected = { + max_memo_characters: '512', + tx_sig_limit: '1', + tx_size_cost_per_byte: '20', + sig_verify_cost_ed25519: '600', + sig_verify_cost_secp256k1: '1100', + max_tx_gas: '10000000', + tx_fees: '10000000000000000' + } + return Object.entries(expected).every(([k, v]) => String(current[k]) === v) +} diff --git a/src/express/commands/cleanup.js b/src/express/commands/cleanup.js index c85410b9..96e4ece1 100644 --- a/src/express/commands/cleanup.js +++ b/src/express/commands/cleanup.js @@ -6,7 +6,6 @@ import { import { maxRetries, runSshCommand } from '../common/remote-worker.js' import { timer } from '../common/time-utils.js' import dotenv from 'dotenv' -import { fundGanacheAccounts } from '../common/ganache-utils.js' export async function cleanup() { dotenv.config({ path: `${process.cwd()}/.env` }) @@ -16,7 +15,6 @@ export async function cleanup() { await cleanupServices(doc) await startServices(doc) await deployBorContractsAndStateSync(doc) - await fundGanacheAccounts(doc) } export async function stopServices(doc) { @@ -61,9 +59,9 @@ export async function stopServices(doc) { let command const stopServiceTasks = nodeIps.map(async (ip) => { if (isHostMap.get(ip)) { - console.log('πŸ“Stopping ganache on machine ' + ip + ' ...') + console.log('πŸ“Stopping anvil on machine ' + ip + ' ...') command = - 'sudo systemctl stop ganache.service || echo "ganache not running on current machine..."' + 'sudo systemctl stop anvil.service || echo "anvil not running on current machine..."' await runSshCommand(ip, command, maxRetries) } @@ -127,25 +125,12 @@ async function cleanupServices(doc) { let command const cleanupServicesTasks = nodeIps.map(async (ip) => { if (isHostMap.get(ip)) { - console.log('πŸ“Cleaning up ganache on machine ' + ip + ' ...') + console.log('πŸ“Cleaning up anvil on machine ' + ip + ' ...') command = - 'rm -rf ~/data/ganache-db && rm -rf ~/matic-cli/devnet/data/ganache-db' + 'rm -rf ~/data/anvil-db && rm -rf ~/matic-cli/devnet/data/anvil-db' await runSshCommand(ip, command, maxRetries) } - console.log('πŸ“Cleaning up heimdall on machine ' + ip + ' ...') - command = 'heimdalld unsafe-reset-all --home /var/lib/heimdall' - await runSshCommand(ip, command, maxRetries) - - console.log('πŸ“Purging queue for heimdall bridge on machine ' + ip + ' ...') - command = 'heimdalld heimdall-bridge --home /var/lib/heimdall purge-queue' - await runSshCommand(ip, command, maxRetries) - - console.log('πŸ“Resetting heimdall bridge on machine ' + ip + ' ...') - command = - 'heimdalld heimdall-bridge --home /var/lib/heimdall unsafe-reset-all' - await runSshCommand(ip, command, maxRetries) - console.log('πŸ“Cleaning up bridge storage on machine ' + ip + ' ...') command = 'rm -rf /var/lib/heimdall/bridge' await runSshCommand(ip, command, maxRetries) @@ -202,16 +187,22 @@ async function startServices(doc) { let command const startServicesTasks = nodeIps.map(async (ip) => { if (isHostMap.get(ip)) { - console.log('πŸ“Running ganache in machine ' + ip + ' ...') - command = 'sudo systemctl start ganache.service' + console.log('πŸ“Running anvil in machine ' + ip + ' ...') + command = 'sudo systemctl start anvil.service' + await runSshCommand(ip, command, maxRetries) + + console.log( + 'πŸ“Deploying main net contracts dependencies on machine ' + ip + ' ...' + ) + command = 'cd ~/matic-cli/devnet && bash anvil-deploy-dependencies.sh' await runSshCommand(ip, command, maxRetries) console.log('πŸ“Deploying main net contracts on machine ' + ip + ' ...') - command = 'cd ~/matic-cli/devnet && bash ganache-deployment.sh' + command = 'cd ~/matic-cli/devnet && bash anvil-deployment.sh' await runSshCommand(ip, command, maxRetries) console.log('πŸ“Setting up validators on machine ' + ip + ' ...') - command = 'cd ~/matic-cli/devnet && bash ganache-stake.sh' + command = 'cd ~/matic-cli/devnet && bash anvil-stake.sh' await runSshCommand(ip, command, maxRetries) } @@ -259,11 +250,11 @@ async function deployBorContractsAndStateSync(doc) { console.log('πŸ“Deploying contracts for bor on machine ' + ip + ' ...') await timer(60000) - let command = 'cd ~/matic-cli/devnet && bash ganache-deployment-bor.sh' + let command = 'cd ~/matic-cli/devnet && bash anvil-deployment-bor.sh' await runSshCommand(ip, command, maxRetries) console.log('πŸ“Deploying state-sync contracts on machine ' + ip + ' ...') await timer(60000) - command = 'cd ~/matic-cli/devnet && bash ganache-deployment-sync.sh' + command = 'cd ~/matic-cli/devnet && bash anvil-deployment-sync.sh' await runSshCommand(ip, command, maxRetries) } diff --git a/src/express/commands/cloud-instances-start.js b/src/express/commands/cloud-instances-start.js index e2455d71..a11b5745 100644 --- a/src/express/commands/cloud-instances-start.js +++ b/src/express/commands/cloud-instances-start.js @@ -10,16 +10,16 @@ import dotenv from 'dotenv' import shell from 'shelljs' -async function startGanache(doc) { +async function startAnvil(doc) { let ip if (doc.numOfBorValidators === 0) { ip = `${doc.ethHostUser}@${doc.devnetErigonHosts[0]}` } else { ip = `${doc.ethHostUser}@${doc.devnetBorHosts[0]}` } - console.log('πŸ“Running ganache in machine ' + ip + ' ...') + console.log('πŸ“Running anvil in machine ' + ip + ' ...') const command = - 'sudo systemctl start ganache.service || echo "ganache not running on current machine..."' + 'sudo systemctl start anvil.service || echo "anvil not running on current machine..."' await runSshCommand(ip, command, maxRetries) } @@ -58,7 +58,7 @@ export async function startInstances() { if (devnetType === 'remote') { console.log('πŸ“Waiting 30s before restarting all services...') await timer(30000) - await startGanache(doc) + await startAnvil(doc) await restartAll(true) } else { console.log('πŸ“Waiting 20s to ensure instances are started...') diff --git a/src/express/commands/gov-tests.js b/src/express/commands/gov-tests.js new file mode 100644 index 00000000..72afeef5 --- /dev/null +++ b/src/express/commands/gov-tests.js @@ -0,0 +1,401 @@ +import { loadDevnetConfig } from '../common/config-utils.js' +import { timer } from '../common/time-utils.js' +import { + runSshCommand, + runSshCommandWithReturn, + maxRetries +} from '../common/remote-worker.js' +import { + testMetadata, + testProposal, + expeditedMetadata, + expeditedProposal, + updateGovParamsMetadata, + updateGovParamsProposal +} from '../common/proposals.js' +import { importValidatorKeysOnHost } from '../common/heimdall-utils.js' +import dotenv from 'dotenv' + +export async function sendGovTestsCommand() { + dotenv.config({ path: `${process.cwd()}/.env` }) + const devnetType = + process.env.TF_VAR_DOCKERIZED === 'yes' ? 'docker' : 'remote' + + const doc = await loadDevnetConfig(devnetType) + let machine0 + + // Only use validator nodes for validator actions. + const borValidatorCount = + doc.numOfBorValidators || + Number(process.env.TF_VAR_BOR_VALIDATOR_COUNT) || + 0 + const borValidatorHosts = Array.isArray(doc.devnetBorHosts) + ? doc.devnetBorHosts.slice(0, borValidatorCount) + : [] + + if (borValidatorCount > 0 && borValidatorHosts.length > 0) { + machine0 = borValidatorHosts[0] + console.log('πŸ“Monitoring the first bor validator node', machine0) + } else { + console.log( + 'πŸ“No validator nodes to monitor, please check your configs! Exiting...' + ) + process.exit(1) + } + + // Import validator keys only on validator nodes + if (Array.isArray(borValidatorHosts) && borValidatorHosts.length > 0) { + for (const machine of borValidatorHosts) { + await importValidatorKeysOnHost(machine, doc.ethHostUser) + } + } + console.log('πŸ“Validator keys imported on all validator hosts') + + console.log('πŸ“Writing draft_metadata.json on primary host:', machine0) + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + `echo '${testMetadata}' > ~/draft_metadata.json`, + maxRetries + ) + console.log(`βœ… draft_metadata.json saved on host ${machine0}`) + + console.log('πŸ“Writing draft_proposal.json on primary host:', machine0) + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + `echo '${testProposal}' > ~/draft_proposal.json`, + maxRetries + ) + console.log(`βœ… draft_proposal.json saved on host ${machine0}`) + + const chainId = await runSshCommandWithReturn( + `${doc.ethHostUser}@${machine0}`, + "jq -r '.chain_id' /var/lib/heimdall/config/genesis.json", + maxRetries + ) + console.log('Chain ID:', chainId.trim()) + + console.log('πŸ“ PROPOSAL_STATUS_PASSED Testcase') + + // Check proposal count before submission + let beforeCount = await getProposalCount(doc, machine0) + console.log('πŸ” Proposals before submission:', beforeCount) + + const submitProposalCommand = `printf 'test-test\\n' | heimdalld tx gov submit-proposal draft_proposal.json --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + submitProposalCommand, + maxRetries + ) + + await timer(5000) + + // Check proposal count after submission + let afterCount = await getProposalCount(doc, machine0) + console.log('πŸ” Proposals after submission:', afterCount) + + if (afterCount > beforeCount) { + console.log('βœ… Proposal submitted successfully') + } else { + console.log('❌ Proposal submission failed') + } + + console.log(`πŸ“Depositing 200 POL to proposal #${afterCount}`) + let depositCommand = `printf 'test-test\\n' | heimdalld tx gov deposit ${afterCount} 200000000000000000000pol --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + for (const machine of borValidatorHosts) { + await runSshCommand( + `${doc.ethHostUser}@${machine}`, + depositCommand, + maxRetries + ) + console.log(`βœ… Deposit command executed on host ${machine}`) + await timer(3000) + } + + console.log( + `πŸ“ Casting YES vote on proposal #${afterCount} from each validator…` + ) + for (const machine of borValidatorHosts) { + const voteCommand = `printf 'test-test\\n' | heimdalld tx gov vote ${afterCount} yes --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + await runSshCommand( + `${doc.ethHostUser}@${machine}`, + voteCommand, + maxRetries + ) + console.log(`βœ… Vote command executed on host ${machine}`) + await timer(3000) + } + + await timer(60000) // Wait for 1 minute + console.log('πŸ“Checking proposal status…') + + // Check proposal status + let status = await getProposalStatus(doc, machine0, afterCount) + if (status === 'PROPOSAL_STATUS_PASSED') { + console.log('βœ… Proposal passed successfully') + } else { + console.error(`❌ Proposal status: ${status}`) + } + + console.log('βœ… PROPOSAL_STATUS_PASSED Testcase passed') + + console.log('πŸ“ PROPOSAL_STATUS_REJECTED Testcase') + + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + submitProposalCommand, + maxRetries + ) + + await timer(5000) + + // Check proposal count after submission + afterCount = await getProposalCount(doc, machine0) + console.log('πŸ” Proposals after submission:', afterCount) + + if (afterCount > beforeCount) { + console.log('βœ… Proposal submitted successfully') + } else { + console.log('❌ Proposal submission failed') + } + + console.log(`πŸ“Depositing 200 POL to proposal #${afterCount}`) + depositCommand = `printf 'test-test\\n' | heimdalld tx gov deposit ${afterCount} 200000000000000000000pol --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + for (const machine of borValidatorHosts) { + await runSshCommand( + `${doc.ethHostUser}@${machine}`, + depositCommand, + maxRetries + ) + console.log(`βœ… Deposit command executed on host ${machine}`) + await timer(3000) + } + + console.log( + `πŸ“ Casting NO vote on proposal #${afterCount} from each validator…` + ) + for (const machine of borValidatorHosts) { + const voteCommand = `printf 'test-test\\n' | heimdalld tx gov vote ${afterCount} no --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + await runSshCommand( + `${doc.ethHostUser}@${machine}`, + voteCommand, + maxRetries + ) + console.log(`βœ… Vote command executed on host ${machine}`) + await timer(3000) + } + + await timer(60000) // Wait for 1 minute + console.log('πŸ“Checking proposal status…') + + // Check proposal status + status = await getProposalStatus(doc, machine0, afterCount) + if (status === 'PROPOSAL_STATUS_REJECTED') { + console.log('βœ… Proposal rejected successfully') + } else { + console.error(`❌ Proposal status: ${status}`) + } + + console.log('βœ… PROPOSAL_STATUS_REJECTED Testcase passed') + + console.log('πŸ“ EXPEDITED_PROPOSAL Testcase') + + console.log('πŸ“Writing expedited draft_metadata.json on host:', machine0) + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + `echo '${expeditedMetadata}' > ~/expedited_metadata.json`, + maxRetries + ) + console.log(`βœ… expedited_metadata.json saved on host ${machine0}`) + + console.log('πŸ“Writing expedited draft_proposal.json on host:', machine0) + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + `echo '${expeditedProposal}' > ~/expedited_proposal.json`, + maxRetries + ) + console.log(`βœ… expedited_proposal.json saved on host ${machine0}`) + + // Check proposal count before submission + beforeCount = await getProposalCount(doc, machine0) + console.log('πŸ” Proposals before expedited submission:', beforeCount) + + const submitExpedited = `printf 'test-test\\n' | heimdalld tx gov submit-proposal expedited_proposal.json --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + submitExpedited, + maxRetries + ) + + await timer(5000) + + // Check proposal count after submission + afterCount = await getProposalCount(doc, machine0) + console.log('πŸ” Proposals after expedited submission:', afterCount) + + if (afterCount > beforeCount) { + console.log('βœ… Expedited proposal submitted successfully') + } else { + console.log('❌ Expedited proposal submission failed') + } + + console.log(`πŸ“Depositing 500 POL to expedited proposal #${afterCount}`) + const expeditedDeposit = `printf 'test-test\\n' | heimdalld tx gov deposit ${afterCount} 500000000000000000000pol --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + for (const machine of borValidatorHosts) { + await runSshCommand( + `${doc.ethHostUser}@${machine}`, + expeditedDeposit, + maxRetries + ) + console.log(`βœ… Expedited deposit executed on host ${machine}`) + await timer(3000) + } + + console.log(`πŸ“Casting YES vote on expedited proposal #${afterCount}`) + for (const machine of borValidatorHosts) { + const voteCmd = `printf 'test-test\\n' | heimdalld tx gov vote ${afterCount} yes --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + await runSshCommand(`${doc.ethHostUser}@${machine}`, voteCmd, maxRetries) + console.log(`βœ… Vote on expedited proposal executed on host ${machine}`) + await timer(2000) + } + + await timer(60000) // Wait for 1 minute + console.log('πŸ“Checking expedited proposal status…') + + status = await getProposalStatus(doc, machine0, afterCount) + if (status === 'PROPOSAL_STATUS_PASSED') { + console.log('βœ… Expedited proposal passed successfully') + } else { + console.error(`❌ Expedited proposal status: ${status}`) + } + + console.log('πŸ“ gov.MsgUpdateParam Testcase') + + console.log('πŸ“Writing draft_metadata.json on primary host:', machine0) + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + `echo '${updateGovParamsMetadata}' > ~/draft_metadata.json`, + maxRetries + ) + console.log(`βœ… draft_metadata.json saved on host ${machine0}`) + + console.log('πŸ“Writing draft_proposal.json on primary host:', machine0) + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + `echo '${updateGovParamsProposal}' > ~/draft_proposal.json`, + maxRetries + ) + console.log(`βœ… draft_proposal.json saved on host ${machine0}`) + + // Check proposal count before submission + beforeCount = await getProposalCount(doc, machine0) + console.log('πŸ” Proposals before submission:', beforeCount) + + await runSshCommand( + `${doc.ethHostUser}@${machine0}`, + submitProposalCommand, + maxRetries + ) + + await timer(5000) + + // Check proposal count after submission + afterCount = await getProposalCount(doc, machine0) + console.log('πŸ” Proposals after submission:', afterCount) + + if (afterCount > beforeCount) { + console.log('βœ… Proposal submitted successfully') + } else { + console.log('❌ Proposal submission failed') + } + + console.log(`πŸ“Depositing 200 POL to proposal #${afterCount}`) + depositCommand = `printf 'test-test\\n' | heimdalld tx gov deposit ${afterCount} 200000000000000000000pol --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + for (const machine of borValidatorHosts) { + await runSshCommand( + `${doc.ethHostUser}@${machine}`, + depositCommand, + maxRetries + ) + console.log(`βœ… Deposit command executed on host ${machine}`) + await timer(3000) + } + + console.log( + `πŸ“ Casting YES vote on proposal #${afterCount} from each validator…` + ) + for (const machine of borValidatorHosts) { + const voteCommand = `printf 'test-test\\n' | heimdalld tx gov vote ${afterCount} yes --from test --home /var/lib/heimdall/ --chain-id ${chainId.trim()} -y` + await runSshCommand( + `${doc.ethHostUser}@${machine}`, + voteCommand, + maxRetries + ) + console.log(`βœ… Vote command executed on host ${machine}`) + await timer(2000) + } + + await timer(60000) // Wait for 1 minute + console.log('πŸ“Checking proposal status…') + + // Check proposal status + status = await getProposalStatus(doc, machine0, afterCount) + if (status === 'PROPOSAL_STATUS_PASSED') { + console.log('βœ… Proposal passed successfully') + } else { + console.error(`❌ Proposal status: ${status}`) + } + + console.log('βœ… gov.MsgUpdateParam Testcase passed') + + console.log('πŸ“Verifying if voting_period has been updated to 75s...') + + const isVotingPeriodUpdated = await verifyVotingPeriodUpdate(doc, machine0) + + if (isVotingPeriodUpdated) { + console.log('βœ… voting_period successfully updated to 75s') + } else { + console.error('❌ voting_period update failed or mismatch detected') + } +} + +export async function getProposalCount(doc, machine) { + const cmd = 'curl -s localhost:1317/cosmos/gov/v1/proposals' + const out = await runSshCommandWithReturn( + `${doc.ethHostUser}@${machine}`, + cmd, + maxRetries + ) + const outObj = JSON.parse(out) + return outObj.pagination.total +} + +export async function getProposalStatus(doc, machine, proposalId) { + const cmd = `curl -s localhost:1317/cosmos/gov/v1/proposals/${proposalId}` + const out = await runSshCommandWithReturn( + `${doc.ethHostUser}@${machine}`, + cmd, + maxRetries + ) + const obj = JSON.parse(out) + return obj.proposal.status +} + +async function verifyVotingPeriodUpdate(doc, machine) { + try { + const cmd = 'curl -s localhost:1317/cosmos/gov/v1/params/voting' + const out = await runSshCommandWithReturn( + `${doc.ethHostUser}@${machine}`, + cmd, + maxRetries + ) + const obj = JSON.parse(out) + const currentVotingPeriod = obj.voting_params?.voting_period || '' + + console.log(`πŸ” Current voting_period from chain: ${currentVotingPeriod}`) + + return currentVotingPeriod === '75s' + } catch (error) { + console.error('❌ Error verifying voting_period:', error.message) + return false + } +} diff --git a/src/express/commands/monitor.js b/src/express/commands/monitor.js index 3a2b9dca..1c723d0f 100644 --- a/src/express/commands/monitor.js +++ b/src/express/commands/monitor.js @@ -52,45 +52,43 @@ async function checkCheckpoint(ip) { const url = `http://${ip}:1317/checkpoints/count` const response = await fetch(url) const responseJson = await response.json() - if (responseJson.result) { - if (responseJson.result.result) { - return responseJson.result.result - } + if (responseJson.ack_count) { + return responseJson.ack_count } return 0 } export async function checkLatestMilestone(ip) { - const url = `http://${ip}:1317/milestone/latest` + const url = `http://${ip}:1317/milestones/latest` const response = await fetch(url) return await response.json() } async function checkStateSyncTx(ip, id) { - const url = `http://${ip}:1317/clerk/event-record/${id}` + const url = `http://${ip}:1317/clerk/event-records/${id}` const response = await fetch(url) const responseJson = await response.json() if (responseJson.error) { return undefined } else { - if (responseJson.result) { - return responseJson.result + if (responseJson.record) { + return responseJson.record } } return undefined } -async function getStateSyncTxList(ip, startTime, endTime) { - const url = `http://${ip}:1317/clerk/event-record/list?from-time=${startTime}&to-time=${endTime}&page=1&limit=200` +async function getStateSyncTxList(ip) { + const url = `http://${ip}:1317/clerk/event-records/list?page=1&limit=50` const response = await fetch(url) const responseJson = await response.json() if (responseJson.error) { return undefined } else { - if (responseJson.result) { - return responseJson.result + if (responseJson.event_records) { + return responseJson.event_records } } @@ -100,7 +98,7 @@ async function getStateSyncTxList(ip, startTime, endTime) { async function lastStateIdFromBor(ip) { const web3 = new Web3(`http://${ip}:8545`) - const StateReceiverContract = await new web3.eth.Contract( + const StateReceiverContract = new web3.eth.Contract( lastStateIdABI, stateReceiverAddress ) @@ -110,7 +108,7 @@ async function lastStateIdFromBor(ip) { async function getLatestCheckpointFromRootChain(ip, rootChainProxyAddress) { const web3 = new Web3(`http://${ip}:9545`) - const RootChainContract = await new web3.eth.Contract( + const RootChainContract = new web3.eth.Contract( currentHeaderBlockABI, rootChainProxyAddress ) @@ -140,7 +138,7 @@ export async function monitor(exitWhenDone) { console.log('πŸ“Checking for StateSyncs && Checkpoints') - const src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/contracts/contractAddresses.json` + const src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/pos-contracts/contractAddresses.json` const dest = './contractAddresses.json' await runScpCommand(src, dest, maxRetries) @@ -152,15 +150,12 @@ export async function monitor(exitWhenDone) { // noinspection InfiniteLoopJS while (true) { - await timer(1000) + await timer(5000) console.log() const checkpointCount = await checkCheckpoint(machine0) if (checkpointCount > 0) { - console.log( - 'πŸ“Checkpoint found on Heimdall βœ… ; Count: ', - checkpointCount - ) + console.log('πŸ“Checkpoint found on Heimdall βœ…; Count:', checkpointCount) } else { console.log('πŸ“Awaiting Checkpoint on Heimdall 🚌') } @@ -171,7 +166,7 @@ export async function monitor(exitWhenDone) { ) if (checkpointCountFromRootChain > 0) { console.log( - 'πŸ“Checkpoint found on Root chain βœ… ; Count: ', + 'πŸ“Checkpoint found on Root chain βœ…; Count:', checkpointCountFromRootChain ) } else { @@ -180,25 +175,17 @@ export async function monitor(exitWhenDone) { const firstStateSyncTx = await checkStateSyncTx(machine0, 1) let stateSyncTxList - let lastStateID + let lastStateSyncTxID if (firstStateSyncTx) { - const timeOfFirstStateSyncTx = firstStateSyncTx.record_time - const firstEpochTime = parseInt( - new Date(timeOfFirstStateSyncTx).getTime() / 1000 - ) - const currentEpochTime = parseInt(new Date().getTime() / 1000) - stateSyncTxList = await getStateSyncTxList( - machine0, - firstEpochTime, - currentEpochTime - ) + stateSyncTxList = await getStateSyncTxList(machine0) if (stateSyncTxList) { - lastStateID = stateSyncTxList.length - const lastStateSyncTxHash = stateSyncTxList[lastStateID - 1].tx_hash + lastStateSyncTxID = stateSyncTxList.length + const lastStateSyncTxHash = + stateSyncTxList[lastStateSyncTxID - 1].tx_hash console.log( - 'πŸ“StateSyncs found on Heimdall βœ… ; Count: ', - lastStateID, - ' ; Last Tx Hash: ', + 'πŸ“StateSyncs found on Heimdall βœ…; Count:', + lastStateSyncTxID, + '; Last Tx Hash:', lastStateSyncTxHash ) } @@ -206,19 +193,19 @@ export async function monitor(exitWhenDone) { console.log('πŸ“Awaiting StateSync 🚌') } - const lastStateId = await lastStateIdFromBor(machine0) - if (lastStateId) { - console.log('πŸ“LastStateId on Bor: ', lastStateId) + const lastStateIDFromBor = await lastStateIdFromBor(machine0) + if (lastStateIDFromBor) { + console.log('πŸ“LastStateId on Bor:', lastStateIDFromBor) } else { - console.log('πŸ“Unable to fetch LastStateId ') + console.log('πŸ“Unable to fetch LastStateId') } if ( exitWhenDone === true && - lastStateId && - lastStateID > 0 && + checkpointCount > 0 && checkpointCountFromRootChain > 0 && - checkpointCount > 0 + lastStateSyncTxID > 0 && + lastStateIDFromBor > 0 ) { console.log('πŸ“All checks executed successfully') process.exit(0) diff --git a/src/express/commands/relay.js b/src/express/commands/relay.js index f5d63755..da3fdffb 100644 --- a/src/express/commands/relay.js +++ b/src/express/commands/relay.js @@ -92,7 +92,7 @@ export async function relay() { const polygonProviderUrl = process.env.NETWORK === 'mainnet' ? 'https://polygon-rpc.com' - : 'https://rpc-mumbai.maticvigil.com' + : 'https://rpc-amoy.polygon.technology' const relayTasks = providers.map(async (p, i) => { await relayTxs(p, providerToNodeIp.get(p), polygonProviderUrl, i) diff --git a/src/express/commands/send-signer-change.js b/src/express/commands/send-signer-change.js index e2464204..fc497167 100644 --- a/src/express/commands/send-signer-change.js +++ b/src/express/commands/send-signer-change.js @@ -1,14 +1,12 @@ import { loadDevnetConfig } from '../common/config-utils.js' -import Web3 from 'web3' -import { getSignedTx } from '../common/tx-utils.js' import { timer } from '../common/time-utils.js' import Wallet from 'ethereumjs-wallet' -import stakeManagerABI from '../../abi/StakeManagerABI.json' assert { type: 'json' } import { isValidatorIdCorrect } from '../common/validators-utils.js' import { runScpCommand, + runSshCommand, runSshCommandWithReturn, maxRetries } from '../common/remote-worker.js' @@ -48,13 +46,12 @@ export async function sendSignerChangeEvent(validatorID) { } validatorID = Number(validatorID) - const rootChainWeb3 = new Web3(`http://${machine0}:9545`) let src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/devnet/signer-dump.json` let dest = './signer-dump.json' await runScpCommand(src, dest, maxRetries) - src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/contracts/contractAddresses.json` + src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/pos-contracts/contractAddresses.json` dest = './contractAddresses.json' await runScpCommand(src, dest, maxRetries) @@ -68,12 +65,6 @@ export async function sendSignerChangeEvent(validatorID) { fs.readFileSync(`${process.cwd()}/signer-dump.json`, 'utf8') ) const pkey = signerDump[validatorID - 1].priv_key - const validatorAccount = signerDump[validatorID - 1].address - - const stakeManagerContract = new rootChainWeb3.eth.Contract( - stakeManagerABI, - StakeManagerProxyAddress - ) const oldSigner = await getValidatorSigner(doc, machine0, validatorID) console.log('OldValidatorSigner', oldSigner) @@ -87,21 +78,11 @@ export async function sendSignerChangeEvent(validatorID) { console.log('NewValidatorAddr', newAccAddr, newAccPubKey) console.log('NewValidatorPrivKey', wallet.getPrivateKeyString()) - const tx = stakeManagerContract.methods.updateSigner( - validatorID, - newAccPubKey - ) - const signedTx = await getSignedTx( - rootChainWeb3, - StakeManagerProxyAddress, - tx, - validatorAccount, - pkey - ) - const Receipt = await rootChainWeb3.eth.sendSignedTransaction( - signedTx.rawTransaction - ) - console.log('UpdateSigner Receipt', Receipt.transactionHash) + console.log('Public key : ', newAccPubKey) + + console.log('πŸ“ Changing Signer.....') + const command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${StakeManagerProxyAddress} "updateSigner(uint256,bytes)" ${validatorID} ${newAccPubKey} --rpc-url http://localhost:9545 --private-key ${pkey}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) let newSigner = await getValidatorSigner(doc, machine0, validatorID) @@ -119,12 +100,12 @@ export async function sendSignerChangeEvent(validatorID) { } async function getValidatorSigner(doc, machine0, validatorID) { - const command = `curl localhost:1317/staking/validator/${validatorID}` + const command = `curl localhost:1317/stake/validator/${validatorID}` const out = await runSshCommandWithReturn( `${doc.ethHostUser}@${machine0}`, command, maxRetries ) const outObj = JSON.parse(out) - return outObj.result.signer + return outObj.validator.signer } diff --git a/src/express/commands/send-stake-update.js b/src/express/commands/send-stake-update.js index 57a41120..fc32324d 100644 --- a/src/express/commands/send-stake-update.js +++ b/src/express/commands/send-stake-update.js @@ -6,6 +6,7 @@ import { isValidatorIdCorrect } from '../common/validators-utils.js' import { runScpCommand, + runSshCommand, runSshCommandWithReturn, maxRetries } from '../common/remote-worker.js' @@ -13,8 +14,9 @@ import { import dotenv from 'dotenv' import fs from 'fs-extra' -import stakeManagerABI from '../../abi/StakeManagerABI.json' assert { type: 'json' } -import ERC20ABI from '../../abi/ERC20ABI.json' assert { type: 'json' } +const ERC20ABI = await import('../../abi/ERC20ABI.json', { + assert: { type: 'json' } +}).then((module) => module.default) export async function sendStakeUpdateEvent(validatorID) { dotenv.config({ path: `${process.cwd()}/.env` }) @@ -53,7 +55,7 @@ export async function sendStakeUpdateEvent(validatorID) { let dest = './signer-dump.json' await runScpCommand(src, dest, maxRetries) - src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/contracts/contractAddresses.json` + src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/pos-contracts/contractAddresses.json` dest = './contractAddresses.json' await runScpCommand(src, dest, maxRetries) @@ -63,7 +65,7 @@ export async function sendStakeUpdateEvent(validatorID) { const StakeManagerProxyAddress = contractAddresses.root.StakeManagerProxy - const MaticTokenAddr = contractAddresses.root.tokens.TestToken + const MaticTokenAddr = contractAddresses.root.tokens.MaticToken const MaticTokenContract = new rootChainWeb3.eth.Contract( ERC20ABI, MaticTokenAddr @@ -74,17 +76,11 @@ export async function sendStakeUpdateEvent(validatorID) { ) const pkey = signerDump[validatorID - 1].priv_key const validatorAccount = signerDump[validatorID - 1].address - - const stakeManagerContract = new rootChainWeb3.eth.Contract( - stakeManagerABI, - StakeManagerProxyAddress - ) - - let tx = MaticTokenContract.methods.approve( + const tx = MaticTokenContract.methods.approve( StakeManagerProxyAddress, rootChainWeb3.utils.toWei('1000') ) - let signedTx = await getSignedTx( + const signedTx = await getSignedTx( rootChainWeb3, MaticTokenAddr, tx, @@ -102,22 +98,14 @@ export async function sendStakeUpdateEvent(validatorID) { console.log('Old Validator Power: ' + oldValidatorPower) // Adding 100 MATIC stake - tx = stakeManagerContract.methods.restake( - validatorID, - rootChainWeb3.utils.toWei('100'), - false - ) - signedTx = await getSignedTx( - rootChainWeb3, - StakeManagerProxyAddress, - tx, - validatorAccount, - pkey - ) - const Receipt = await rootChainWeb3.eth.sendSignedTransaction( - signedTx.rawTransaction - ) - console.log('Restake Receipt txHash: ' + Receipt.transactionHash) + let command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${MaticTokenAddr} "transfer(address,uint256)" ${validatorAccount} 100000000000000000000 --rpc-url http://localhost:9545 --private-key ${signerDump[0].priv_key}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) + + command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${MaticTokenAddr} "approve(address,uint256)" ${StakeManagerProxyAddress} 100000000000000000000 --rpc-url http://localhost:9545 --private-key ${pkey}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) + + command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${StakeManagerProxyAddress} "restakePOL(uint256,uint256,bool)" ${validatorID} 100000000000000000000 false --rpc-url http://localhost:9545 --private-key ${pkey}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) let newValidatorPower = await getValidatorPower(doc, machine0, validatorID) @@ -135,12 +123,12 @@ export async function sendStakeUpdateEvent(validatorID) { } async function getValidatorPower(doc, machine0, validatorID) { - const command = `curl localhost:1317/staking/validator/${validatorID}` + const command = `curl localhost:1317/stake/validator/${validatorID}` const out = await runSshCommandWithReturn( `${doc.ethHostUser}@${machine0}`, command, maxRetries ) const outObj = JSON.parse(out) - return outObj.result.power + return outObj.validator.voting_power } diff --git a/src/express/commands/send-staked-event.js b/src/express/commands/send-staked-event.js index 8b08e8f5..4a9155de 100644 --- a/src/express/commands/send-staked-event.js +++ b/src/express/commands/send-staked-event.js @@ -2,20 +2,18 @@ import { loadDevnetConfig } from '../common/config-utils.js' import Web3 from 'web3' import Wallet from 'ethereumjs-wallet' import { timer } from '../common/time-utils.js' -import { getSignedTx } from '../common/tx-utils.js' import { isValidatorIdCorrect } from '../common/validators-utils.js' import { runScpCommand, runSshCommandWithReturn, - maxRetries + maxRetries, + runSshCommand } from '../common/remote-worker.js' import dotenv from 'dotenv' import fs from 'fs-extra' -import stakeManagerABI from '../../abi/StakeManagerABI.json' assert { type: 'json' } -import ERC20ABI from '../../abi/ERC20ABI.json' assert { type: 'json' } const { hdkey } = Wallet export async function sendStakedEvent(validatorID) { @@ -55,7 +53,7 @@ export async function sendStakedEvent(validatorID) { let dest = './signer-dump.json' await runScpCommand(src, dest, maxRetries) - src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/contracts/contractAddresses.json` + src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/pos-contracts/contractAddresses.json` dest = './contractAddresses.json' await runScpCommand(src, dest, maxRetries) @@ -65,11 +63,7 @@ export async function sendStakedEvent(validatorID) { const StakeManagerProxyAddress = contractAddresses.root.StakeManagerProxy - const MaticTokenAddr = contractAddresses.root.tokens.TestToken - const MaticTokenContract = new rootChainWeb3.eth.Contract( - ERC20ABI, - MaticTokenAddr - ) + const MaticTokenAddr = contractAddresses.root.tokens.MaticToken const signerDump = JSON.parse( fs.readFileSync(`${process.cwd()}/signer-dump.json`, 'utf8') @@ -79,60 +73,31 @@ export async function sendStakedEvent(validatorID) { const stakeAmount = rootChainWeb3.utils.toWei('12') const heimdallFee = rootChainWeb3.utils.toWei('12') - const stakeManagerContract = new rootChainWeb3.eth.Contract( - stakeManagerABI, - StakeManagerProxyAddress - ) - - let tx = MaticTokenContract.methods.approve( - StakeManagerProxyAddress, - rootChainWeb3.utils.toWei('50') - ) - let signedTx = await getSignedTx( - rootChainWeb3, - MaticTokenAddr, - tx, - validatorAccount, - pkey - ) - - const approvalReceipt = await rootChainWeb3.eth.sendSignedTransaction( - signedTx.rawTransaction - ) - console.log('Approval Receipt txHash: ' + approvalReceipt.transactionHash) - const RandomSeed = 'random' + Math.random() const newAccPrivKey = hdkey.fromMasterSeed(RandomSeed)._hdkey._privateKey const wallet = Wallet.default.fromPrivateKey(newAccPrivKey) const newAccAddr = wallet.getAddressString() const newAccPubKey = wallet.getPublicKeyString() - console.log('NewValidatorAddr', newAccAddr, newAccPubKey) - console.log('NewValidatorPrivKey', wallet.getPrivateKeyString()) + console.log('πŸ“ Sending Matic Tokens to validators account') + let command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${MaticTokenAddr} "transfer(address,uint256)" ${validatorAccount} 100000000000000000000 --rpc-url http://localhost:9545 --private-key ${signerDump[0].priv_key}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) - tx = stakeManagerContract.methods.stakeFor( - newAccAddr, - stakeAmount, - heimdallFee, - false, - newAccPubKey - ) - signedTx = await getSignedTx( - rootChainWeb3, - StakeManagerProxyAddress, - tx, - validatorAccount, - pkey - ) + console.log('Waiting 12 secs for token transaction to be processed') + await timer(12000) + + command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${MaticTokenAddr} "approve(address,uint256)" ${StakeManagerProxyAddress} 1000000000000000000000 --rpc-url http://localhost:9545 --private-key ${pkey}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) + + console.log('Waiting 12 secs for Matic Token approval') + await timer(12000) + + command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${StakeManagerProxyAddress} "stakeForPOL(address,uint256,uint256,bool,bytes)" ${newAccAddr} ${stakeAmount} ${heimdallFee} false ${newAccPubKey} --rpc-url http://localhost:9545 --private-key ${pkey}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) const oldValidatorsCount = await checkValidatorsLength(doc, machine0) console.log('oldValidatorsCount : ', oldValidatorsCount) - const receipt = await rootChainWeb3.eth.sendSignedTransaction( - signedTx.rawTransaction - ) - console.log('StakeFor Receipt txHash : ' + receipt.transactionHash) - let newValidatorsCount = await checkValidatorsLength(doc, machine0) while (parseInt(newValidatorsCount) !== parseInt(oldValidatorsCount) + 1) { @@ -149,12 +114,12 @@ export async function sendStakedEvent(validatorID) { } export async function checkValidatorsLength(doc, machine0) { - const command = 'curl localhost:1317/staking/validator-set' + const command = 'curl localhost:1317/stake/validators-set' const out = await runSshCommandWithReturn( `${doc.ethHostUser}@${machine0}`, command, maxRetries ) const outObj = JSON.parse(out) - return outObj.result.validators.length + return outObj.validator_set.validators.length } diff --git a/src/express/commands/send-state-sync.js b/src/express/commands/send-state-sync.js index c85108de..e3ed803f 100644 --- a/src/express/commands/send-state-sync.js +++ b/src/express/commands/send-state-sync.js @@ -29,8 +29,16 @@ export async function sendStateSyncTx() { process.exit(1) } - const src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/contracts/contractAddresses.json` - const dest = './contractAddresses.json' + let src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/devnet/signer-dump.json` + let dest = './signer-dump.json' + await runScpCommand(src, dest, maxRetries) + + const signerDump = JSON.parse( + fs.readFileSync(`${process.cwd()}/signer-dump.json`, 'utf8') + ) + + src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/pos-contracts/contractAddresses.json` + dest = './contractAddresses.json' await runScpCommand(src, dest, maxRetries) const contractAddresses = JSON.parse( @@ -40,7 +48,8 @@ export async function sendStateSyncTx() { const MaticToken = contractAddresses.root.tokens.MaticToken console.log('πŸ“Sending StateSync Tx') - const command = `cd ~/matic-cli/devnet/code/contracts && npm run truffle exec scripts/deposit.js -- --network development ${MaticToken} 100000000000000000000` + + const command = `export PATH="$HOME/.foundry/bin:$PATH" && cd ~/matic-cli/devnet/code/pos-contracts && forge script scripts/matic-cli-scripts/Deposit.s.sol:MaticDeposit --legacy --rpc-url http://localhost:9545 --private-key ${signerDump[0].priv_key} --broadcast --sig "run(address,address,uint256)" ${signerDump[0].address} ${MaticToken} 100000000000000000000` await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) console.log( diff --git a/src/express/commands/send-topupfee.js b/src/express/commands/send-topupfee.js index 22c41190..c67a9332 100644 --- a/src/express/commands/send-topupfee.js +++ b/src/express/commands/send-topupfee.js @@ -1,21 +1,19 @@ import { loadDevnetConfig } from '../common/config-utils.js' -import Web3 from 'web3' import { timer } from '../common/time-utils.js' -import { getSignedTx } from '../common/tx-utils.js' import { isValidatorIdCorrect } from '../common/validators-utils.js' - import { runScpCommand, + runSshCommand, runSshCommandWithReturn, maxRetries } from '../common/remote-worker.js' - +import { + importValidatorKeysOnHost, + fetchBalance +} from '../common/heimdall-utils.js' import dotenv from 'dotenv' import fs from 'fs-extra' -import stakeManagerABI from '../../abi/StakeManagerABI.json' assert { type: 'json' } -import ERC20ABI from '../../abi/ERC20ABI.json' assert { type: 'json' } - export async function sendTopUpFeeEvent(validatorID) { dotenv.config({ path: `${process.cwd()}/.env` }) const devnetType = @@ -35,6 +33,16 @@ export async function sendTopUpFeeEvent(validatorID) { ) process.exit(1) } + + // Only use validator nodes for validator actions. + const borValidatorCount = + doc.numOfBorValidators || + Number(process.env.TF_VAR_BOR_VALIDATOR_COUNT) || + 0 + const borValidatorHosts = Array.isArray(doc.devnetBorHosts) + ? doc.devnetBorHosts.slice(0, borValidatorCount) + : [] + if (doc.numOfBorValidators > 0) { machine0 = doc.devnetBorHosts[0] console.log('πŸ“Monitoring the first node', doc.devnetBorHosts[0]) @@ -47,13 +55,12 @@ export async function sendTopUpFeeEvent(validatorID) { } validatorID = Number(validatorID) - const rootChainWeb3 = new Web3(`http://${machine0}:9545`) let src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/devnet/signer-dump.json` let dest = './signer-dump.json' await runScpCommand(src, dest, maxRetries) - src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/contracts/contractAddresses.json` + src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/pos-contracts/contractAddresses.json` dest = './contractAddresses.json' await runScpCommand(src, dest, maxRetries) @@ -63,96 +70,107 @@ export async function sendTopUpFeeEvent(validatorID) { const StakeManagerProxyAddress = contractAddresses.root.StakeManagerProxy - const MaticTokenAddr = contractAddresses.root.tokens.TestToken - const MaticTokenContract = new rootChainWeb3.eth.Contract( - ERC20ABI, - MaticTokenAddr - ) + const MaticTokenAddr = contractAddresses.root.tokens.MaticToken const signerDump = JSON.parse( fs.readFileSync(`${process.cwd()}/signer-dump.json`, 'utf8') ) const pkey = signerDump[validatorID - 1].priv_key const validatorAccount = signerDump[validatorID - 1].address + console.log(validatorAccount) - const stakeManagerContract = new rootChainWeb3.eth.Contract( - stakeManagerABI, - StakeManagerProxyAddress - ) + console.log('πŸ“Sending Matic Tokens to validators account') + let command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${MaticTokenAddr} "transfer(address,uint256)" ${validatorAccount} 100000000000000000000 --rpc-url http://localhost:9545 --private-key ${signerDump[0].priv_key}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) - let tx = MaticTokenContract.methods.approve( - StakeManagerProxyAddress, - rootChainWeb3.utils.toWei('1000') - ) - let signedTx = await getSignedTx( - rootChainWeb3, - MaticTokenAddr, - tx, - validatorAccount, - pkey - ) - const approvalReceipt = await rootChainWeb3.eth.sendSignedTransaction( - signedTx.rawTransaction - ) - console.log( - '\n\nApproval Receipt txHash: ' + approvalReceipt.transactionHash - ) + console.log('πŸ“Waiting 5 secs for token transaction to be processed') + await timer(5000) - // Adding 100 MATIC stake - tx = stakeManagerContract.methods.topUpForFee( - validatorAccount, - rootChainWeb3.utils.toWei('100') - ) + command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${MaticTokenAddr} "approve(address,uint256)" ${StakeManagerProxyAddress} 100000000000000000000 --rpc-url http://localhost:9545 --private-key ${pkey}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) - const oldValidatorBalance = await getValidatorBalance( - doc, + const oldValidatorBalance = await fetchBalance( + doc.ethHostUser, machine0, validatorAccount ) - console.log('Old Validator Balance: ' + oldValidatorBalance) - - signedTx = await getSignedTx( - rootChainWeb3, - StakeManagerProxyAddress, - tx, - validatorAccount, - pkey - ) - const Receipt = await rootChainWeb3.eth.sendSignedTransaction( - signedTx.rawTransaction - ) - console.log('TopUpForFee Receipt txHash: ' + Receipt.transactionHash) + console.log('Waiting 5 secs for Matic Token Approval') + await timer(5000) - let newValidatorBalance = await getValidatorBalance( - doc, + console.log('Old Validator Balance:' + oldValidatorBalance) + command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${StakeManagerProxyAddress} "topUpForFee(address,uint256)" ${validatorAccount} 10000000000000000000 --rpc-url http://localhost:9545 --private-key ${pkey}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) + + let newValidatorBalance = await fetchBalance( + doc.ethHostUser, machine0, validatorAccount ) - while (parseInt(newValidatorBalance) <= parseInt(oldValidatorBalance)) { - console.log('Waiting 3 secs for topupfee') - await timer(3000) // waiting 3 secs - newValidatorBalance = await getValidatorBalance( - doc, + while (BigInt(newValidatorBalance) <= BigInt(oldValidatorBalance)) { + console.log('Waiting 5 secs for topupfee') + await timer(5000) + newValidatorBalance = await fetchBalance( + doc.ethHostUser, machine0, validatorAccount ) - console.log('newValidatorBalance : ', newValidatorBalance) + console.log('newValidatorBalance:', newValidatorBalance) } console.log('βœ… Topup Done') console.log( 'βœ… TopUpFee event Sent from Rootchain and Received and processed on Heimdall' ) -} -async function getValidatorBalance(doc, machine0, valAddr) { - const command = `curl http://localhost:1317/bank/balances/${valAddr}` - const out = await runSshCommandWithReturn( + machine0 = borValidatorHosts[0] + if (Array.isArray(borValidatorHosts) && borValidatorHosts.length > 0) { + for (const machine of borValidatorHosts) { + await importValidatorKeysOnHost(machine, doc.ethHostUser) + } + } + console.log('πŸ“Validator keys imported on all hosts') + + // --- Withdraw Fee Logic --- + const chainId = await runSshCommandWithReturn( `${doc.ethHostUser}@${machine0}`, - command, + "jq -r '.chain_id' /var/lib/heimdall/config/genesis.json", maxRetries ) - const outObj = JSON.parse(out) - return outObj.result[0].amount + console.log('Chain ID:', chainId.trim()) + + const balanceBeforeWithdraw = BigInt( + await fetchBalance(doc.ethHostUser, machine0, validatorAccount) + ) + console.log('Balance before withdraw:', balanceBeforeWithdraw) + + const withdrawAmount = '1000000000000000000' + console.log('πŸ“Withdrawing fee:', withdrawAmount) + const withdrawCmd = ` + printf 'test-test\\n' | heimdalld tx topup withdraw-fee ${validatorAccount} ${withdrawAmount} \ + --from test \ + --chain-id ${chainId.trim()} \ + --home /var/lib/heimdall \ + -y + ` + .trim() + .replace(/\s+/g, ' ') + await runSshCommand(`${doc.ethHostUser}@${machine0}`, withdrawCmd, maxRetries) + console.log('βœ… Withdraw transaction submitted') + + let balanceAfterWithdraw = BigInt( + await fetchBalance(doc.ethHostUser, machine0, validatorAccount) + ) + while (balanceAfterWithdraw >= balanceBeforeWithdraw) { + console.log('Waiting 5 secs for topupfee') + await timer(5000) + balanceAfterWithdraw = await fetchBalance( + doc.ethHostUser, + machine0, + validatorAccount + ) + console.log('balanceAfterWithdraw:', balanceAfterWithdraw) + } + console.log('Balance after withdraw:', balanceAfterWithdraw) + console.log('βœ… Withdraw successful') } diff --git a/src/express/commands/send-unstake-init.js b/src/express/commands/send-unstake-init.js index 927b2e02..1c864aee 100644 --- a/src/express/commands/send-unstake-init.js +++ b/src/express/commands/send-unstake-init.js @@ -1,17 +1,17 @@ import { loadDevnetConfig } from '../common/config-utils.js' -import Web3 from 'web3' -import { getSignedTx } from '../common/tx-utils.js' import { timer } from '../common/time-utils.js' import { checkValidatorsLength } from './send-staked-event.js' import { isValidatorIdCorrect } from '../common/validators-utils.js' -import { runScpCommand, maxRetries } from '../common/remote-worker.js' +import { + runScpCommand, + maxRetries, + runSshCommand +} from '../common/remote-worker.js' import dotenv from 'dotenv' import fs from 'fs-extra' -import stakeManagerABI from '../../abi/StakeManagerABI.json' assert { type: 'json' } - export async function sendUnstakeInitEvent(validatorID) { dotenv.config({ path: `${process.cwd()}/.env` }) const devnetType = @@ -45,13 +45,12 @@ export async function sendUnstakeInitEvent(validatorID) { } validatorID = Number(validatorID) - const rootChainWeb3 = new Web3(`http://${machine0}:9545`) let src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/devnet/signer-dump.json` let dest = './signer-dump.json' await runScpCommand(src, dest, maxRetries) - src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/contracts/contractAddresses.json` + src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/code/pos-contracts/contractAddresses.json` dest = './contractAddresses.json' await runScpCommand(src, dest, maxRetries) @@ -65,36 +64,18 @@ export async function sendUnstakeInitEvent(validatorID) { fs.readFileSync(`${process.cwd()}/signer-dump.json`, 'utf8') ) const pkey = signerDump[validatorID - 1].priv_key - const validatorAccount = signerDump[validatorID - 1].address - const validatorIDForTest = validatorID.toString() - - const stakeManagerContract = new rootChainWeb3.eth.Contract( - stakeManagerABI, - StakeManagerProxyAddress - ) - const tx = stakeManagerContract.methods.unstake(validatorIDForTest) - const signedTx = await getSignedTx( - rootChainWeb3, - StakeManagerProxyAddress, - tx, - validatorAccount, - pkey - ) + const command = `export PATH="$HOME/.foundry/bin:$PATH" && cast send ${StakeManagerProxyAddress} "unstakePOL(uint256)" ${validatorID} --rpc-url http://localhost:9545 --private-key ${pkey}` + await runSshCommand(`${doc.ethHostUser}@${machine0}`, command, maxRetries) const oldValidatorsCount = await checkValidatorsLength(doc, machine0) console.log('oldValidatorsCount : ', oldValidatorsCount) - const Receipt = await rootChainWeb3.eth.sendSignedTransaction( - signedTx.rawTransaction - ) - console.log('Unstake Receipt', Receipt.transactionHash) - let newValidatorsCount = await checkValidatorsLength(doc, machine0) while (parseInt(newValidatorsCount) !== parseInt(oldValidatorsCount) - 1) { - console.log('Waiting 3 secs for validator to be removed') - await timer(3000) // waiting 3 secs + console.log('Waiting 5 secs for validator to be removed') + await timer(5000) newValidatorsCount = await checkValidatorsLength(doc, machine0) console.log('newValidatorsCount : ', newValidatorsCount) } diff --git a/src/express/commands/setup-ethstats-backend.js b/src/express/commands/setup-ethstats-backend.js index 53b12004..abb457a7 100644 --- a/src/express/commands/setup-ethstats-backend.js +++ b/src/express/commands/setup-ethstats-backend.js @@ -43,7 +43,7 @@ export async function setupEthstats() { await runSshCommand(`${user0}@${host0}`, command, maxRetries) console.log('πŸ“Cloning ethstats-backend') - command = 'git clone https://github.com/maticnetwork/ethstats-backend.git' + command = 'git clone https://github.com/0xPolygon/ethstats-backend.git' await runSshCommand(`${user0}@${host0}`, command, maxRetries) console.log('πŸ“Installing ethstats-backend deps') @@ -51,7 +51,7 @@ export async function setupEthstats() { await runSshCommand(`${user0}@${host0}`, command, maxRetries) console.log('πŸ“Cloning ethstats-frontend') - command = 'git clone https://github.com/maticnetwork/reorgs-frontend.git' + command = 'git clone https://github.com/0xPolygon/reorgs-frontend.git' await runSshCommand(`${user0}@${host0}`, command, maxRetries) console.log('πŸ“Installing ethstats-frontend deps') diff --git a/src/express/commands/shadow.js b/src/express/commands/shadow.js index 5edcbdbd..797ae351 100644 --- a/src/express/commands/shadow.js +++ b/src/express/commands/shadow.js @@ -52,8 +52,8 @@ export async function shadow(targetBlock) { const shadowGenesisLocation = '/var/lib/bor/shadow-genesis.json' const startScriptLocation = '~/node/bor-start.sh' const launchFolder = - process.env.NETWORK === 'mainnet' ? 'mainnet-v1' : 'testnet-v4' - const genesisCmd = `curl -o ${shadowGenesisLocation} https://raw.githubusercontent.com/maticnetwork/launch/master/${launchFolder}/sentry/validator/bor/genesis.json` + process.env.NETWORK === 'mainnet' ? 'mainnet-v1' : 'amoy-v1' + const genesisCmd = `curl -o ${shadowGenesisLocation} https://raw.githubusercontent.com/0xPolygon/launch/master/${launchFolder}/sentry/validator/bor/genesis.json` shadowBorChainId = process.env.SHADOW_CHAIN_ID if (!shadowBorChainId) { diff --git a/src/express/commands/start.js b/src/express/commands/start.js index a9c93d27..313f6892 100644 --- a/src/express/commands/start.js +++ b/src/express/commands/start.js @@ -20,7 +20,6 @@ import fs from 'fs' import shell from 'shelljs' import dotenv from 'dotenv' -import { fundGanacheAccounts } from '../common/ganache-utils.js' async function terraformApply(devnetId) { console.log('πŸ“Executing terraform apply...') @@ -133,12 +132,17 @@ async function installCommonPackages(ip) { command = 'sudo apt install build-essential -y' await runSshCommand(ip, command, maxRetries) + console.log('πŸ“Configuring locale ...') + command = + 'sudo locale-gen en_US.UTF-8 && sudo update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8' + await runSshCommand(ip, command, maxRetries) + console.log('πŸ“Installing jq...') command = 'sudo apt install jq -y' await runSshCommand(ip, command, maxRetries) console.log('πŸ“Installing go...') - command = `wget -nc https://raw.githubusercontent.com/maticnetwork/node-ansible/master/go-install.sh && + command = `wget -nc https://raw.githubusercontent.com/0xPolygon/node-ansible/master/go-install.sh && bash go-install.sh --remove && bash go-install.sh && source ~/.bashrc` @@ -167,12 +171,18 @@ async function installHostSpecificPackages(ip) { nvm install 18.19.0` await runSshCommand(ip, command, maxRetries) - console.log('πŸ“Installing solc...') - command = 'sudo snap install solc' + console.log('πŸ“Installing python3...') + command = + 'sudo apt install python3 python3-pip -y && alias python="/usr/bin/python3"' + await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Installing solc-select...') + command = 'sudo pip install solc-select' await runSshCommand(ip, command, maxRetries) - console.log('πŸ“Installing python2...') - command = 'sudo apt install python2 -y && alias python="/usr/bin/python2"' + console.log('πŸ“Installing solc versions...') + command = + 'solc-select install 0.5.17 && solc-select install 0.6.12 && solc-select use 0.5.17' await runSshCommand(ip, command, maxRetries) console.log('πŸ“Installing nodejs and npm...') @@ -183,10 +193,16 @@ async function installHostSpecificPackages(ip) { command = `sudo ln -sf ~/.nvm/versions/node/v18.19.0/bin/npm /usr/bin/npm && sudo ln -sf ~/.nvm/versions/node/v18.19.0/bin/node /usr/bin/node && sudo ln -sf ~/.nvm/versions/node/v18.19.0/bin/npx /usr/bin/npx` + await runSshCommand(ip, command, maxRetries) - console.log('πŸ“Installing ganache...') - command = 'sudo npm install -g ganache -y' + console.log('πŸ“Installing anvil...') + command = + 'curl -L https://foundry.paradigm.xyz | bash && export PATH="$HOME/.foundry/bin:$PATH" >> ~/.bashrc && source ~/.bashrc && foundryup' + await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Checking anvil...') + command = 'export PATH="$HOME/.foundry/bin:$PATH" && forge --version' await runSshCommand(ip, command, maxRetries) } @@ -284,9 +300,9 @@ async function eventuallyCleanupPreviousDevnet(ips, devnetType, devnetId) { let command = 'sudo rm -rf ~/matic-cli/devnet' await runSshCommand(ip, command, maxRetries) - console.log('πŸ“Stopping ganache (if present) on machine ' + ip + ' ...') + console.log('πŸ“Stopping anvil (if present) on machine ' + ip + ' ...') command = - "sudo systemctl stop ganache.service || echo 'ganache not running on current machine...'" + "sudo systemctl stop anvil.service || echo 'anvil not running on current machine...'" await runSshCommand(ip, command, maxRetries) } console.log('πŸ“Stopping heimdall (if present) on machine ' + ip + ' ...') @@ -355,8 +371,8 @@ async function runDockerSetupWithMaticCLI(ips, devnetId) { 'cd ~/matic-cli/devnet && ../bin/matic-cli.js setup devnet -c ../configs/devnet/docker-setup-config.yaml' await runSshCommand(ip, command, maxRetries) - console.log('πŸ“Starting ganache...') - command = 'cd ~/matic-cli/devnet && bash docker-ganache-start.sh' + console.log('πŸ“Starting anvil...') + command = 'cd ~/matic-cli/devnet && bash docker-anvil-start.sh' await runSshCommand(ip, command, maxRetries) console.log('πŸ“Starting heimdall...') @@ -374,12 +390,12 @@ async function runDockerSetupWithMaticCLI(ips, devnetId) { if (!process.env.NETWORK) { await timer(60000) console.log('πŸ“Deploying contracts for bor...') - command = 'cd ~/matic-cli/devnet && bash ganache-deployment-bor.sh' + command = 'cd ~/matic-cli/devnet && bash anvil-deployment-bor.sh' await runSshCommand(ip, command, maxRetries) await timer(60000) console.log('πŸ“Deploying state-sync contracts...') - command = 'cd ~/matic-cli/devnet && bash ganache-deployment-sync.sh' + command = 'cd ~/matic-cli/devnet && bash anvil-deployment-sync.sh' await runSshCommand(ip, command, maxRetries) } @@ -424,12 +440,12 @@ async function runRemoteSetupWithMaticCLI(ips, devnetId) { if (!process.env.NETWORK) { console.log('πŸ“Deploying contracts for bor on machine ' + ip + ' ...') await timer(60000) - command = 'cd ~/matic-cli/devnet && bash ganache-deployment-bor.sh' + command = 'cd ~/matic-cli/devnet && bash anvil-deployment-bor.sh' await runSshCommand(ip, command, maxRetries) console.log('πŸ“Deploying state-sync contracts on machine ' + ip + ' ...') await timer(60000) - command = 'cd ~/matic-cli/devnet && bash ganache-deployment-sync.sh' + command = 'cd ~/matic-cli/devnet && bash anvil-deployment-sync.sh' await runSshCommand(ip, command, maxRetries) } } @@ -486,13 +502,4 @@ export async function start() { } else { await runRemoteSetupWithMaticCLI(dnsIps, devnetId) } - - const doc = await yaml.load( - fs.readFileSync( - `../../deployments/devnet-${devnetId}/${devnetType}-setup-config.yaml`, - 'utf8' - ) - ) - - await fundGanacheAccounts(doc) } diff --git a/src/express/commands/update.js b/src/express/commands/update.js index 09d5c256..41b2b05f 100644 --- a/src/express/commands/update.js +++ b/src/express/commands/update.js @@ -30,6 +30,16 @@ export async function pullAndRestartBor(ip, i, isPull) { console.log('πŸ“Installing bor...') command = 'cd ~/matic-cli/devnet/code/bor && make bor' await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Moving new bor binary...') + command = + 'sudo cp ~/matic-cli/devnet/code/bor/build/bin/bor /usr/bin/ || echo "new bor binary could not be copied"' + await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Moving new heimdall binary...') + command = + 'sudo cp ~/matic-cli/devnet/code/bor/build/bin/bor ~/go/bin/ || echo "new bor binary could not be copied"' + await runSshCommand(ip, command, maxRetries) } else { console.log('πŸ“Cloning bor repo...') command = `cd ~ && git clone ${borRepo} || (cd ~/bor; git fetch)` @@ -44,6 +54,16 @@ export async function pullAndRestartBor(ip, i, isPull) { console.log('πŸ“Installing bor...') command = 'cd ~/bor && make bor' await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Moving new bor binary...') + command = + 'sudo cp ~/bor/build/bin/bor /usr/bin/ || echo "new bor binary could not be copied"' + await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Moving new heimdall binary...') + command = + 'sudo cp ~/bor/build/bin/bor ~/go/bin/ || echo "new bor binary could not be copied"' + await runSshCommand(ip, command, maxRetries) } } @@ -122,15 +142,25 @@ export async function pullAndRestartHeimdall(doc, ip, i, isPull) { heimdallBranch + ' ...' ) - command = `cd ~/matic-cli/devnet/code/heimdall && git fetch && git checkout ${heimdallBranch} && git pull origin ${heimdallBranch} ` + command = `cd ~/matic-cli/devnet/code/heimdall-v2 && git fetch && git checkout ${heimdallBranch} && git pull origin ${heimdallBranch} ` await runSshCommand(ip, command, maxRetries) console.log('πŸ“Installing heimdall...') - command = 'cd ~/matic-cli/devnet/code/heimdall && make install' + command = 'cd ~/matic-cli/devnet/code/heimdall-v2 && make build' + await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Moving new heimdall binary...') + command = + 'sudo cp ~/matic-cli/devnet/code/heimdall-v2/build/heimdalld /usr/bin/ || echo "new heimdalld binary could not be copied"' + await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Moving new heimdall binary...') + command = + 'sudo cp ~/matic-cli/devnet/code/heimdall-v2/build/heimdalld ~/go/bin/ || echo "new heimdalld binary could not be copied"' await runSshCommand(ip, command, maxRetries) } else { console.log('πŸ“Cloning heimdall repo...') - command = `cd ~ && git clone ${heimdallRepo} || (cd ~/heimdall; git fetch)` + command = `cd ~ && git clone ${heimdallRepo} || (cd ~/heimdall-v2; git fetch)` await runSshCommand(ip, command, maxRetries) console.log( @@ -138,11 +168,21 @@ export async function pullAndRestartHeimdall(doc, ip, i, isPull) { heimdallBranch + ' ...' ) - command = `cd ~/heimdall && git fetch && git checkout ${heimdallBranch} && git pull origin ${heimdallBranch} ` + command = `cd ~/heimdall-v2 && git fetch && git checkout ${heimdallBranch} && git pull origin ${heimdallBranch} ` await runSshCommand(ip, command, maxRetries) console.log('πŸ“Installing heimdall...') - command = 'cd ~/heimdall && make install' + command = 'cd ~/heimdall-v2 && make build' + await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Moving new heimdall binary...') + command = + 'sudo cp ~/heimdall-v2/build/heimdalld /usr/bin/ || echo "new heimdalld binary could not be copied"' + await runSshCommand(ip, command, maxRetries) + + console.log('πŸ“Moving new heimdall binary...') + command = + 'sudo cp ~/heimdall-v2/build/heimdalld ~/go/bin/ || echo "new heimdalld binary could not be copied"' await runSshCommand(ip, command, maxRetries) } } diff --git a/src/express/common/ganache-utils.js b/src/express/common/anvil-utils.js similarity index 60% rename from src/express/common/ganache-utils.js rename to src/express/common/anvil-utils.js index 3c9c3786..23aa4aa3 100644 --- a/src/express/common/ganache-utils.js +++ b/src/express/common/anvil-utils.js @@ -3,17 +3,13 @@ import { loadDevnetConfig } from '../common/config-utils.js' import { maxRetries, runScpCommand } from './remote-worker.js' import Web3 from 'web3' import dotenv from 'dotenv' +import { createAccountsFromMnemonics } from '../../lib/utils.js' const EthAmount = '10' const borProdChainIds = [137, 8001, 8002] // mainnet, mumbai, amoy -// Since we might reset and restart ganache multiple times during the setup, -// and considered that ganache is no longer maintained, plus -// it is affected by this issue https://github.com/trufflesuite/ganache/issues/4404 -// we implemented this workaround waiting for a migration to hardhat -// (see internal issue https://polygon.atlassian.net/browse/POS-1869) -export async function fundGanacheAccounts(doc) { +export async function fundAnvilAccounts(doc) { let machine0 const devnetType = process.env.TF_VAR_DOCKERIZED === 'yes' ? 'docker' : 'remote' @@ -26,8 +22,8 @@ export async function fundGanacheAccounts(doc) { } if (borProdChainIds.includes(doc.borChainId)) { - console.log('πŸ“Fund ganache accounts only works for devnet') - console.log('πŸ“Skipping in case of mainnet, mumbai or amoy') + console.log('πŸ“Funding anvil accounts only works for the devnet') + console.log('πŸ“Skipping in case of mainnet or amoy') return } @@ -35,7 +31,8 @@ export async function fundGanacheAccounts(doc) { ? (machine0 = doc.devnetBorHosts[0]) : (machine0 = doc.devnetErigonHosts[0]) - console.log('πŸ“Transferring funds from ganache account[0] to others...') + console.log('πŸ“Transferring 10 ETH from anvil account[0] to all others...') + const src = `${doc.ethHostUser}@${machine0}:~/matic-cli/devnet/devnet/signer-dump.json` const dest = './signer-dump.json' await runScpCommand(src, dest, maxRetries) @@ -46,15 +43,35 @@ export async function fundGanacheAccounts(doc) { const rootChainWeb3 = new Web3(`http://${machine0}:9545`) - for (let i = 1; i < signerDump.length; i++) { + const mnemonic = process.env.MNEMONIC + if (!mnemonic) { + console.error( + '❌ Error: MNEMONIC is not set. Please set it in the environment variables.' + ) + process.exit(1) + } + + const accounts = createAccountsFromMnemonics(mnemonic, 3) + const anvilAccount = accounts[1] + + const account = rootChainWeb3.eth.accounts.privateKeyToAccount( + anvilAccount.privateKey + ) + rootChainWeb3.eth.accounts.wallet.add(account) + + // Set default account + rootChainWeb3.eth.defaultAccount = account.address + + for (let i = 0; i < signerDump.length; i++) { const txReceipt = await rootChainWeb3.eth.sendTransaction({ + from: account.address, to: signerDump[i].address, - from: signerDump[0].address, + gas: 21000, value: rootChainWeb3.utils.toWei(EthAmount, 'ether') }) console.log( 'πŸ“Funds transferred from ' + - signerDump[0].address + + account.address + ' to ' + signerDump[i].address + ' with txHash ' + diff --git a/src/express/common/config-utils.js b/src/express/common/config-utils.js index bb4cccc7..099cde8e 100644 --- a/src/express/common/config-utils.js +++ b/src/express/common/config-utils.js @@ -201,37 +201,37 @@ function validateEnvVars(cloud) { BLOCK_TIME: validStr({ default: '3,2' }), DEVNET_BOR_FLAGS: validStr({ default: 'config,cli' }), BOR_REPO: validStr({ - default: 'https://github.com/maticnetwork/bor.git' + default: 'https://github.com/0xPolygon/bor.git' }), BOR_BRANCH: validStr({ default: 'develop' }), ERIGON_REPO: validStr({ - default: 'https://github.com/ledgerwatch/erigon.git' + default: 'https://github.com/erigontech/erigon.git' }), ERIGON_BRANCH: validStr({ default: 'main' }), HEIMDALL_REPO: validStr({ - default: 'https://github.com/maticnetwork/heimdall.git' + default: 'https://github.com/0xPolygon/heimdall-v2.git' }), HEIMDALL_BRANCH: validStr({ default: 'develop' }), CONTRACTS_REPO: validStr({ - default: 'https://github.com/maticnetwork/contracts.git' + default: 'https://github.com/0xPolygon/pos-contracts.git' }), CONTRACTS_BRANCH: validStr({ default: 'master' }), GENESIS_CONTRACTS_REPO: validStr({ - default: 'https://github.com/maticnetwork/genesis-contracts.git' + default: 'https://github.com/0xPolygon/genesis-contracts.git' }), GENESIS_CONTRACTS_BRANCH: validStr({ default: 'master' }), MATIC_CLI_REPO: validStr({ - default: 'https://github.com/maticnetwork/matic-cli.git' + default: 'https://github.com/0xPolygon/matic-cli.git' }), MATIC_CLI_BRANCH: validStr({ default: 'master' }), INSTANCES_IDS: validStr({ default: 'i-02a1f3a2884c9edbc,i-03b2d4b3014a4becd' }), BOR_DOCKER_BUILD_CONTEXT: url({ - default: 'https://github.com/maticnetwork/bor.git#develop' + default: 'https://github.com/0xPolygon/bor.git#develop' }), HEIMDALL_DOCKER_BUILD_CONTEXT: url({ - default: 'https://github.com/maticnetwork/heimdall.git#develop' + default: 'https://github.com/0xPolygon/heimdall-v2.git#develop' }), VERBOSE: bool({ default: true }), DD_API_KEY: validStr({ default: 'DATADOG_API_KEY' }), @@ -476,10 +476,13 @@ function setCommonConfigs(doc) { setConfigValue('network', process.env.NETWORK, doc) if (process.env.NETWORK === 'mainnet') { borChainId = 137 - heimdallChainId = 'heimdall-137' + heimdallChainId = 'heimdallv2-137' } else if (process.env.NETWORK === 'mumbai') { borChainId = 80001 - heimdallChainId = 'heimdall-80001' + heimdallChainId = 'heimdallv2-80001' + } else if (process.env.NETWORK === 'amoy') { + borChainId = 80002 + heimdallChainId = 'heimdallv2-80002' } } else if (!process.env.BOR_CHAIN_ID && !process.env.HEIMDALL_CHAIN_ID) { borChainId = Math.floor(Math.random() * 10000 + 1000) @@ -511,6 +514,7 @@ function setCommonConfigs(doc) { } setConfigValue('borChainId', borChainId, doc) + setConfigValue('mnemonic', process.env.MNEMONIC, doc) setConfigValue('heimdallChainId', heimdallChainId, doc) setConfigList('sprintSize', process.env.SPRINT_SIZE, doc) setConfigList( @@ -853,7 +857,7 @@ export async function editMaticCliDockerYAMLConfig() { setCommonConfigs(doc) setEthHostUser('ubuntu', doc) setConfigValue('devnetType', 'docker', doc) - setEthURL('ganache', doc) + setEthURL('anvil', doc) fs.writeFile( `${process.cwd()}/docker-setup-config.yaml`, diff --git a/src/express/common/heimdall-utils.js b/src/express/common/heimdall-utils.js new file mode 100644 index 00000000..392a2fed --- /dev/null +++ b/src/express/common/heimdall-utils.js @@ -0,0 +1,67 @@ +import { + runSshCommandWithReturn, + runSshCommandWithoutExit, + maxRetries +} from './remote-worker.js' + +export async function importValidatorKeysOnHost(host, user) { + console.log(`πŸ“Processing host: ${host}`) + try { + // Fetch base64-encoded private key + const base64Key = await runSshCommandWithReturn( + `${user}@${host}`, + "jq -r '.priv_key.value' /var/lib/heimdall/config/priv_validator_key.json", + maxRetries + ) + // Convert to hex + const hexKey = await runSshCommandWithReturn( + `${user}@${host}`, + `echo "${base64Key.trim()}" | base64 -d | xxd -p -c 256`, + maxRetries + ) + console.log('πŸ“Importing validator private key into Heimdall keyring') + // 3) import into heimdalld keyring + try { + await runSshCommandWithoutExit( + `${user}@${host}`, + `printf $'test-test\\ntest-test\\n' | heimdalld keys import-hex test ${hexKey.trim()} --home /var/lib/heimdall`, + 1 + ) + console.log(`βœ… Validator private key imported on host ${host}`) + } catch { + console.log(`❌ Key import error on host ${host} (might already exist)`) + } + } catch (err) { + console.error( + `❌ Failed fetching/importing key on host ${host}:`, + err.message + ) + } +} + +export async function fetchBalance(user, host, address) { + const out = await runSshCommandWithReturn( + `${user}@${host}`, + `curl -s localhost:1317/cosmos/bank/v1beta1/balances/${address}`, + maxRetries + ) + const balance = JSON.parse(out).balances[0].amount + return balance +} + +export async function assertBalanceDecreased( + user, + host, + validatorAddr, + beforeBalance +) { + const afterBalance = await fetchBalance(user, host, validatorAddr) + if (afterBalance >= beforeBalance) { + throw new Error( + `🚨 Balance did not decrease on ${host}: before=${beforeBalance}, after=${afterBalance}` + ) + } + console.log( + `βœ… Balance on ${host} decreased: ${beforeBalance} β†’ ${afterBalance}` + ) +} diff --git a/src/express/common/milestone-utils.js b/src/express/common/milestone-utils.js index 65d0c3b8..1e7c25a9 100644 --- a/src/express/common/milestone-utils.js +++ b/src/express/common/milestone-utils.js @@ -417,11 +417,11 @@ export async function fetchLatestMilestone( } milestone = await checkLatestMilestone(host) - if (milestone.result) { + if (milestone.milestone) { // Check against last milestone (if present) if it's immediate next one or not if (lastMilestone) { if ( - Number(milestone.result.start_block) === + Number(milestone.milestone.start_block) === Number(lastMilestone.end_block) + 1 ) { break @@ -434,13 +434,13 @@ export async function fetchLatestMilestone( } else { console.log( `πŸ“Invalid milestone received. Response: ${JSON.stringify( - milestone.result + milestone.milestone )}, count: ${count}` ) } } - const latestMilestone = milestone.result + const latestMilestone = milestone.milestone console.log( `πŸ“Got milestone from heimdall. Start block: ${Number( latestMilestone.start_block diff --git a/src/express/common/proposals.js b/src/express/common/proposals.js new file mode 100644 index 00000000..95a0abc8 --- /dev/null +++ b/src/express/common/proposals.js @@ -0,0 +1,111 @@ +export const testMetadata = `{ + "title": "Test", + "authors": ["Test Author"], + "summary": "This is a test proposal.", + "details": "This is a test proposal.", + "proposal_forum_url": "https://forum.polygon.technology/test", + "vote_option_context": "This is a test proposal." +}` + +export const testProposal = `{ + "metadata": "ipfs://test", + "deposit": "100000000000000000000pol", + "title": "Test", + "summary": "This is a test proposal.", + "expedited": false +}` + +// Expedited text proposal +export const expeditedMetadata = `{ + "title": "Expedited Test", + "authors": ["Test Author"], + "summary": "This is an expedited test proposal.", + "details": "This is an expedited test proposal.", + "proposal_forum_url": "https://forum.polygon.technology/expedited-test", + "vote_option_context": "Expedited deposit: 500 POL" +}` + +export const expeditedProposal = `{ + "metadata": "ipfs://test-expedited", + "deposit": "100000000000000000000pol", + "title": "Expedited Test", + "summary": "This is an expedited test proposal.", + "expedited": true +}` + +// gov.MsgUpdateParams proposal +export const updateGovParamsMetadata = `{ + "title": "Change voting period.", + "authors": ["Test Author"], + "summary": "Change voting period.", + "details": "Change voting period.", + "proposal_forum_url": "https://forum.polygon.technology/test", + "vote_option_context": "This is a test proposal to change the voting period." +}` + +export const updateGovParamsProposal = `{ + "messages": [ + { + "@type": "/cosmos.gov.v1.MsgUpdateParams", + "authority": "0x7b5fe22b5446f7c62ea27b8bd71cef94e03f3df2", + "params": { + "min_deposit": [{ "amount": "100000000000000000000", "denom": "pol" }], + "max_deposit_period": "172800s", + "voting_period": "75s", + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000", + "min_initial_deposit_ratio": "0.000000000000000000", + "proposal_cancel_ratio": "0.500000000000000000", + "proposal_cancel_dest": "", + "expedited_voting_period": "50s", + "expedited_threshold": "0.667000000000000000", + "expedited_min_deposit": [ + { "amount": "500000000000000000000", "denom": "pol" } + ], + "burn_vote_quorum": false, + "burn_proposal_deposit_prevote": false, + "burn_vote_veto": true, + "min_deposit_ratio": "0.010000000000000000" + } + } + ], + "metadata": "ipfs://CID", + "deposit": "1000000000000000000pol", + "title": "Change voting period to 75 secs.", + "summary": "Change voting period to 75 secs.", + "expedited": false +}` + +// JSON content for auth.MsgUpdateParams proposal +export const updateAuthParamsMetadata = `{ + "title": "Test Proposal.", + "authors": ["Test Author"], + "summary": "Test Proposal", + "details": "Test Proposal", + "proposal_forum_url": "https://forum.polygon.technology/test", + "vote_option_context": "This is a test proposal to change the auth params." +}` + +export const updateAuthParamsProposal = `{ + "messages": [ + { + "@type": "/cosmos.auth.v1beta1.MsgUpdateParams", + "authority": "0x7b5fe22b5446f7c62ea27b8bd71cef94e03f3df2", + "params": { + "max_memo_characters": "512", + "tx_sig_limit": "1", + "tx_size_cost_per_byte": "20", + "sig_verify_cost_ed25519": "600", + "sig_verify_cost_secp256k1": "1100", + "max_tx_gas": "10000000", + "tx_fees": "10000000000000000" + } + } + ], + "metadata": "ipfs://test", + "deposit": "1000000000000000000pol", + "title": "Change auth params.", + "summary": "Change auth params.", + "expedited": false +}` diff --git a/src/lib/utils.js b/src/lib/utils.js index 79e5c40c..649b86c9 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -7,6 +7,7 @@ import Web3 from 'web3' import nunjucks from 'nunjucks' import ethCrypto from 'eth-crypto' import { bufferToHex, privateToPublic, toBuffer } from 'ethereumjs-util' +import { ethers } from 'ethers' // // Add custom nunjucks filters @@ -95,6 +96,17 @@ export function getKeystoreFile(privateKeyString, password) { } } +// creating a wallet using mnemonics from anvil +export function createAccountsFromMnemonics(mnemonics, totalAccounts) { + const accounts = [] + for (let i = 0; i < totalAccounts; i++) { + const mn = ethers.Mnemonic.fromPhrase(mnemonics) + const account = ethers.HDNodeWallet.fromMnemonic(mn, `m/44'/60'/0'/0/${i}`) + + accounts.push(account) + } + return accounts +} // return new generated private key export function getNewPrivateKey() { return web3.eth.accounts.create() diff --git a/src/setup/anvil/index.js b/src/setup/anvil/index.js new file mode 100644 index 00000000..d038f60b --- /dev/null +++ b/src/setup/anvil/index.js @@ -0,0 +1,201 @@ +import { Listr } from 'listr2' +import chalk from 'chalk' +import path from 'path' +import execa from 'execa' +import fs from 'fs-extra' + +import { loadConfig } from '../config.js' +import { + processTemplateFiles, + createAccountsFromMnemonics +} from '../../lib/utils.js' +import { getDefaultBranch } from '../helper.js' +import { Contracts } from '../contracts/index.js' +import { getRemoteStdio } from '../../express/common/remote-worker.js' + +export class Anvil { + constructor(config, options = {}) { + this.config = config + this.mnemonic = config.mnemonic + this.deployerAccount = createAccountsFromMnemonics(this.mnemonic, 1) + this.deployerPrivateKey = this.deployerAccount[0].privateKey + + this.dbName = options.dbName || 'anvil-db' + this.serverPort = options.serverPort || 9545 + + // Contracts setup + this.contracts = new Contracts(config, { + repositoryBranch: options.contractsBranch + }) + } + + get name() { + return 'anvil' + } + + get taskTitle() { + return 'Setup contracts on Anvil' + } + + get dbDir() { + return path.join(this.config.dataDir, this.dbName) + } + + async print() { + console.log( + chalk.gray('Anvil db path') + ': ' + chalk.bold.green(this.dbDir) + ) + } + + async getStakeTasks() { + return new Listr( + [ + { + title: 'Stake', + task: () => + execa('bash', ['anvil-stake.sh'], { + cwd: this.config.targetDirectory, + stdio: getRemoteStdio(), + env: { + ...process.env, + + PATH: `${process.env.HOME}/.foundry/bin:${process.env.PATH}` + } + }) + } + ], + { exitOnError: true } + ) + } + + async getContractDeploymentTasks() { + let server = null + + return new Listr( + [ + { + title: 'Reset Anvil', + task: () => fs.remove(this.dbDir) + }, + { + title: 'Start Anvil', + task: () => { + server = execa( + 'anvil', + [ + '--port', + `${this.serverPort}`, + '--balance', + '1000000000000000', + '--gas-limit', + '1000000000000', + '--gas-price', + '1', + '--accounts', + '10', + '--mnemonic', + `${this.mnemonic}`, + '--code-size-limit', + '10000000000', + '--verbosity', + '--state', + `${this.dbDir}` + ], + { + stdio: 'inherit', + env: { + ...process.env, + PATH: `${process.env.HOME}/.foundry/bin:${process.env.PATH}` + } + } + ) + } + }, + { + title: 'Deploy dependencies', + task: () => + execa('bash', ['anvil-deploy-dependencies.sh'], { + cwd: this.config.targetDirectory, + stdio: getRemoteStdio() + }) + }, + { + title: 'Deploy contracts on Main chain', + task: () => + execa('bash', ['anvil-deployment.sh'], { + cwd: this.config.targetDirectory, + stdio: getRemoteStdio() + }) + }, + { + title: 'Setup validators', + task: () => this.getStakeTasks() + }, + { + title: 'Stop Anvil', + task: () => server?.kill('SIGINT') + } + ], + { exitOnError: true } + ) + } + + async getTasks() { + return new Listr( + [ + ...this.contracts.cloneRepositoryTasks(), + ...this.contracts.compileTasks(), + { + title: 'Process scripts', + task: async () => { + const templateDir = path.resolve( + new URL(import.meta.url).pathname, + '../templates' + ) + + await fs.copy(templateDir, this.config.targetDirectory) + await processTemplateFiles(this.config.targetDirectory, { + obj: this + }) + } + }, + { + title: 'Deploy contracts Anvil.....', + task: () => this.getContractDeploymentTasks() + }, + ...this.contracts.prepareContractAddressesTasks() + ], + { exitOnError: true } + ) + } +} + +async function setupAnvil(config) { + const anvil = new Anvil(config, { + contractsBranch: config.contractsBranch + }) + + const tasks = await anvil.getTasks() + await tasks.run() + + console.log('%s Anvil snapshot is ready', chalk.green.bold('DONE')) + + await config.print() + await anvil.print() +} + +export default async function (command) { + const config = await loadConfig({ + targetDirectory: command.parent.directory, + fileName: command.parent.config, + interactive: command.parent.interactive + }) + + await config.loadChainIds() + await config.loadAccounts() + + const answers = await getDefaultBranch(config) + config.set(answers) + + await setupAnvil(config) +} diff --git a/src/setup/ganache/templates/GANACHE_README.sh.njk b/src/setup/anvil/templates/ANVIL_README.md.njk similarity index 58% rename from src/setup/ganache/templates/GANACHE_README.sh.njk rename to src/setup/anvil/templates/ANVIL_README.md.njk index e24a7c27..7a047be1 100644 --- a/src/setup/ganache/templates/GANACHE_README.sh.njk +++ b/src/setup/anvil/templates/ANVIL_README.md.njk @@ -1,14 +1,14 @@ -### Ganache +### Anvil By default, contracts are deployed. Contract addresses json: {{ obj.contracts.contractAddressesPath }} -Ganache DB path: {{ obj.dbDir }} +Anvil DB path: {{ obj.dbDir }} -**To start ganache** +**To start anvil** ```bash -bash ganache-start.sh +bash anvil-start.sh ``` ##### Setup @@ -18,25 +18,25 @@ Note that, by default, it doesn't need to setup. **To clean current setup** ```bash -bash ganache-clean.sh +bash anvil-clean.sh ``` -**To start ganache** +**To start anvil** ```bash -bash ganache-start.sh +bash anvil-start.sh ``` -**To deploy on ganache** +**To deploy on anvil** ```bash -bash ganache-deployment.sh +bash anvil-deployment.sh ``` **To stake with default address** ```bash -bash ganache-stake.sh +bash anvil-stake.sh ``` -This will stake {{ obj.config.defaultStake }} tokens for {{ obj.config.primaryAccount.address }} \ No newline at end of file +This will stake {{ obj.config.defaultStake }} tokens for {{ obj.config.primaryAccount.address }} diff --git a/src/setup/ganache/templates/ganache-clean.sh.njk b/src/setup/anvil/templates/anvil-clean.sh.njk similarity index 100% rename from src/setup/ganache/templates/ganache-clean.sh.njk rename to src/setup/anvil/templates/anvil-clean.sh.njk diff --git a/src/setup/anvil/templates/anvil-deploy-dependencies.sh.njk b/src/setup/anvil/templates/anvil-deploy-dependencies.sh.njk new file mode 100644 index 00000000..d9d7fd99 --- /dev/null +++ b/src/setup/anvil/templates/anvil-deploy-dependencies.sh.njk @@ -0,0 +1,30 @@ +#!/usr/bin/env sh + +set -x + +# private key to deploy contracts +export ANVIL_ACC={{ obj.deployerPrivateKey }} +export PRIVATE_KEY={{ obj.config.primaryAccount.privateKey }} +export MNEMONIC={{ obj.config.primaryAccount.privateKey }} + +# export heimdall id +export HEIMDALL_ID={{ obj.config.heimdallChainId }} + +export DIR={{ obj.contracts.repositoryDir }} + +export SERVER_PORT={{ obj.serverPort }} + +# cd matic contracts repo +cd {{ obj.contracts.repositoryDir }} + +export PATH="$HOME/.foundry/bin:$PATH" + +sleep 5 + +forge create --rpc-url http://localhost:$SERVER_PORT --private-key $ANVIL_ACC contracts/common/lib/Common.sol:Common --broadcast +forge create --rpc-url http://localhost:$SERVER_PORT --private-key $ANVIL_ACC contracts/root/predicates/TransferWithSigUtils.sol:TransferWithSigUtils --broadcast + +{% for acc in obj.config.accounts %} +cast send --rpc-url http://localhost:$SERVER_PORT --private-key $ANVIL_ACC {{ acc.address }} --value 10000ether +sleep 5 +{% endfor %} diff --git a/src/setup/ganache/templates/ganache-deployment-bor.sh.njk b/src/setup/anvil/templates/anvil-deployment-bor.sh.njk similarity index 53% rename from src/setup/ganache/templates/ganache-deployment-bor.sh.njk rename to src/setup/anvil/templates/anvil-deployment-bor.sh.njk index 9a8c8307..4b037856 100644 --- a/src/setup/ganache/templates/ganache-deployment-bor.sh.njk +++ b/src/setup/anvil/templates/anvil-deployment-bor.sh.njk @@ -9,8 +9,13 @@ export MNEMONIC={{ obj.config.primaryAccount.privateKey }} # export heimdall id export HEIMDALL_ID={{ obj.config.heimdallChainId }} +export DIR={{ obj.contracts.repositoryDir }} + # cd matic contracts repo cd {{ obj.contracts.repositoryDir }} -# bor contracts are deployed on child chain -npm run truffle:migrate:dev:bor -- --reset -f 5 --to 5 --compile-none +export PATH="$HOME/.foundry/bin:$PATH" + +sleep 5 + +forge script scripts/deployment-scripts/childContractDeployment.s.sol:ChildContractDeploymentScript --legacy --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --broadcast diff --git a/src/setup/ganache/templates/ganache-deployment-sync.sh.njk b/src/setup/anvil/templates/anvil-deployment-sync.sh.njk similarity index 50% rename from src/setup/ganache/templates/ganache-deployment-sync.sh.njk rename to src/setup/anvil/templates/anvil-deployment-sync.sh.njk index c19d8ee1..7ef1f757 100644 --- a/src/setup/ganache/templates/ganache-deployment-sync.sh.njk +++ b/src/setup/anvil/templates/anvil-deployment-sync.sh.njk @@ -9,8 +9,15 @@ export MNEMONIC={{ obj.config.primaryAccount.privateKey }} # export heimdall id export HEIMDALL_ID={{ obj.config.heimdallChainId }} +export DIR={{ obj.contracts.repositoryDir }} + +export SERVER_PORT={{ obj.serverPort }} + # cd matic contracts repo cd {{ obj.contracts.repositoryDir }} -# root contracts are deployed on base chain -npm run truffle:migrate:dev -- -f 6 --to 6 --compile-none +export PATH="$HOME/.foundry/bin:$PATH" + +sleep 5 + +forge script scripts/deployment-scripts/syncChildStateToRoot.s.sol:SyncChildStateToRootScript --legacy --rpc-url http://localhost:$SERVER_PORT --private-key $PRIVATE_KEY --broadcast diff --git a/src/setup/anvil/templates/anvil-deployment.sh.njk b/src/setup/anvil/templates/anvil-deployment.sh.njk new file mode 100644 index 00000000..645e24b6 --- /dev/null +++ b/src/setup/anvil/templates/anvil-deployment.sh.njk @@ -0,0 +1,31 @@ +#!/usr/bin/env sh + +set -x + +# private key to deploy contracts +export PRIVATE_KEY={{ obj.config.primaryAccount.privateKey }} +export MNEMONIC={{ obj.config.primaryAccount.privateKey }} + +# export heimdall id +export HEIMDALL_ID={{ obj.config.heimdallChainId }} + +export DIR={{ obj.contracts.repositoryDir }} + +export SERVER_PORT={{ obj.serverPort }} + +# cd matic contracts repo +cd {{ obj.contracts.repositoryDir }} + +echo "DEPLOYER_PRIVATE_KEY=$PRIVATE_KEY" >>.env +echo "HEIMDALL_ID='$HEIMDALL_ID'" >>.env + +export PATH="$HOME/.foundry/bin:$PATH" + +sleep 5 + +# bor contracts are deployed on child chain +forge script scripts/deployment-scripts/deployContracts.s.sol:DeploymentScript --legacy --rpc-url http://localhost:$SERVER_PORT --private-key $PRIVATE_KEY --broadcast + +forge script scripts/deployment-scripts/drainStakeManager.s.sol:DrainStakeManagerDeployment --legacy --rpc-url http://localhost:$SERVER_PORT --private-key $PRIVATE_KEY --broadcast + +forge script scripts/deployment-scripts/initializeState.s.sol:InitializeStateScript --legacy --rpc-url http://localhost:$SERVER_PORT --private-key $PRIVATE_KEY --broadcast diff --git a/src/setup/anvil/templates/anvil-stake.sh.njk b/src/setup/anvil/templates/anvil-stake.sh.njk new file mode 100644 index 00000000..6ac34ee7 --- /dev/null +++ b/src/setup/anvil/templates/anvil-stake.sh.njk @@ -0,0 +1,21 @@ +#!/usr/bin/env sh + +set -x + +# Set up default stake and fee values +PRIVATE_KEY={{ obj.config.primaryAccount.privateKey }} +STAKE={{ obj.config.defaultStake }} +FEE={{ obj.config.defaultFee }} + +export SERVER_PORT={{ obj.serverPort }} + +# Navigate to the matic contracts directory +cd {{ obj.contracts.repositoryDir }} + +sleep 5 + +# Loop over accounts and run the stake script for each +{% for acc in obj.config.accounts %} +forge script scripts/matic-cli-scripts/stake.s.sol:MaticStake --legacy --rpc-url http://localhost:$SERVER_PORT --private-key $PRIVATE_KEY --broadcast --sig "run(address,bytes,uint256,uint256)" {{ acc.address }} {{ acc.pub_key }} 10000000000000000000000 2000000000000000000000 +sleep 5 +{% endfor %} diff --git a/src/setup/anvil/templates/anvil-start.sh.njk b/src/setup/anvil/templates/anvil-start.sh.njk new file mode 100644 index 00000000..43de607d --- /dev/null +++ b/src/setup/anvil/templates/anvil-start.sh.njk @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +set -x + +export PATH="$HOME/.foundry/bin:$PATH" + +DATA_DIR={{ obj.dbDir }} +MNEMONIC="{{ obj.mnemonic }}" + +anvil \ + --port 9545 \ + --host 0.0.0.0 \ + --balance 1000000000000000 \ + --gas-limit 1000000000000 \ + --gas-price 1 \ + --code-size-limit 10000000000 \ + --state $DATA_DIR \ + --verbosity \ + --mnemonic "$MNEMONIC" \ + --block-time 1 diff --git a/src/setup/bor/index.js b/src/setup/bor/index.js index 7371d34b..880da219 100644 --- a/src/setup/bor/index.js +++ b/src/setup/bor/index.js @@ -30,7 +30,7 @@ export class Bor { this.repositoryName = 'bor' this.repositoryBranch = options.repositoryBranch || 'develop' this.repositoryUrl = - options.repositoryUrl || 'https://github.com/maticnetwork/bor' + options.repositoryUrl || 'https://github.com/0xPolygon/bor' this.genesis = new Genesis(config) } diff --git a/src/setup/bor/templates/bor-start.sh.njk b/src/setup/bor/templates/bor-start.sh.njk index f9996707..6b64491f 100644 --- a/src/setup/bor/templates/bor-start.sh.njk +++ b/src/setup/bor/templates/bor-start.sh.njk @@ -41,4 +41,5 @@ $BUILD_DIR/bor --datadir $BOR_DATA_DIR \ --maxpeers 200 \ --metrics \ --pprof --pprof.port 7071 --pprof.addr '0.0.0.0' \ + --bor.logs true \ --mine diff --git a/src/setup/contracts/index.js b/src/setup/contracts/index.js index 532fd3ce..b8fbba5c 100644 --- a/src/setup/contracts/index.js +++ b/src/setup/contracts/index.js @@ -11,10 +11,10 @@ export class Contracts { constructor(config, options = {}) { this.config = config - this.repositoryName = 'contracts' + this.repositoryName = 'pos-contracts' this.repositoryUrl = - options.repositoryUrl || 'https://github.com/maticnetwork/contracts' - this.repositoryBranch = options.repositoryBranch || 'master' + options.repositoryUrl || 'https://github.com/0xPolygon/pos-contracts' + this.repositoryBranch = options.repositoryBranch || 'anvil-pos' } get name() { @@ -66,7 +66,7 @@ export class Contracts { }) }, { - title: 'Process templates', + title: 'Process contracts templates', task: () => execa( 'npm', @@ -84,12 +84,27 @@ export class Contracts { ) }, { - title: 'Compile matic contracts', + title: 'Generate contracts interfaces', task: () => - execa('npm', ['run', 'truffle:compile'], { + execa('npm', ['run', 'generate:interfaces'], { + env: { + ...process.env, + PATH: `${process.env.HOME}/.foundry/bin:${process.env.PATH}` + }, cwd: this.repositoryDir, stdio: getRemoteStdio() }) + }, + { + title: 'Compile matic contracts', + task: () => + execa('forge', ['build'], { + env: { + ...process.env, + PATH: `${process.env.HOME}/.foundry/bin:${process.env.PATH}` + }, + stdio: getRemoteStdio() + }) } ] } diff --git a/src/setup/devnet/index.js b/src/setup/devnet/index.js index 321d0ef0..c18fac4f 100644 --- a/src/setup/devnet/index.js +++ b/src/setup/devnet/index.js @@ -11,7 +11,7 @@ import { bufferToHex, privateToPublic, toBuffer } from 'ethereumjs-util' import { Heimdall } from '../heimdall/index.js' import { Bor } from '../bor/index.js' -import { Ganache } from '../ganache/index.js' +import { Anvil } from '../anvil/index.js' import { Genesis } from '../genesis/index.js' import { getDefaultBranch } from '../helper.js' import { @@ -94,7 +94,7 @@ export class Devnet { } heimdallAppConfigFilePath(index) { - return path.join(this.heimdallDir(index), 'config', 'heimdall-config.toml') + return path.join(this.heimdallDir(index), 'config', 'app.toml') } borDir(index) { @@ -247,7 +247,7 @@ export class Devnet { return [ enodeTask, { - title: 'Process Heimdall configs', + title: 'Process Heimdall app configs', task: async () => { // set heimdall for (let i = 0; i < this.totalBorNodes; i++) { @@ -262,7 +262,7 @@ export class Devnet { ) .replace( /bor_grpc_flag[ ]*=[ ]*".*"/gi, - 'bor_grpc_flag = "true"' + 'bor_grpc_flag = "false"' ) .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, @@ -284,6 +284,20 @@ export class Devnet { } } }, + { + title: 'Process Heimdall configs', + task: async () => { + // set heimdall + for (let i = 0; i < this.totalBorNodes; i++) { + fileReplacer(this.heimdallConfigFilePath(i)) + .replace( + /laddr[ ]*=[ ]*"tcp:\/\/127\.0\.0\.1:26657"/gi, + 'laddr = "tcp://0.0.0.0:26657"' + ) + .save() + } + } + }, { title: 'Process contract addresses', task: () => { @@ -294,8 +308,8 @@ export class Devnet { for (let i = 0; i < this.totalBorNodes; i++) { fileReplacer(this.heimdallGenesisFilePath(i)) .replace( - /"matic_token_address":[ ]*".*"/gi, - `"matic_token_address": "${rootContracts.tokens.TestToken}"` + /"pol_token_address":[ ]*".*"/gi, + `"pol_token_address": "${rootContracts.tokens.MaticToken}"` ) .replace( /"staking_manager_address":[ ]*".*"/gi, @@ -313,6 +327,8 @@ export class Devnet { /"state_sender_address":[ ]*".*"/gi, `"state_sender_address": "${rootContracts.StateSender}"` ) + .replace(/"voting_period"\s*:\s*".*"/g, '"voting_period": "60s"') + .replace(/"expedited_voting_period"\s*:\s*".*"/g, '"expedited_voting_period": "50s"') .save() } }, @@ -321,7 +337,7 @@ export class Devnet { } }, { - title: 'Process templates', + title: 'Process njk templates', task: async () => { const templateDir = path.resolve( new URL(import.meta.url).pathname, @@ -336,20 +352,20 @@ export class Devnet { // TODO: Uncomment when finalized for docker setup // if (this.config.network) { - // const chain = this.config.network - // for (let i = 0; i < this.totalBorNodes; i++) { - // fileReplacer(this.borGenesisFilePath(i)) - // .replace( - // /NODE_DIR\/genesis.json/gi, + // const chain = this.config.network + // for (let i = 0; i < this.totalBorNodes; i++) { + // fileReplacer(this.borGenesisFilePath(i)) + // .replace( + // /NODE_DIR\/genesis.json/gi, // `${chain}` - // ) - // .save() - // } + // ) + // .save() + // } // } // process template files await processTemplateFiles(this.config.targetDirectory, { obj: this, - ganache: this.ganache + anvil: this.anvil }) for (let i = 0; i < this.totalBorNodes; i++) { @@ -382,7 +398,7 @@ export class Devnet { ) .replace( /bor_grpc_flag[ ]*=[ ]*".*"/gi, - 'bor_grpc_flag = "true"' + 'bor_grpc_flag = "false"' ) .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, @@ -406,8 +422,8 @@ export class Devnet { for (let i = 0; i < this.totalNodes; i++) { fileReplacer(this.heimdallGenesisFilePath(i)) .replace( - /"matic_token_address":[ ]*".*"/gi, - `"matic_token_address": "${rootContracts.tokens.TestToken}"` + /"pol_token_address":[ ]*".*"/gi, + `"pol_token_address": "${rootContracts.tokens.MaticToken}"` ) .replace( /"staking_manager_address":[ ]*".*"/gi, @@ -425,6 +441,8 @@ export class Devnet { /"state_sender_address":[ ]*".*"/gi, `"state_sender_address": "${rootContracts.StateSender}"` ) + .replace(/"voting_period"\s*:\s*".*"/g, '"voting_period": "60s"') + .replace(/"expedited_voting_period"\s*:\s*".*"/g, '"expedited_voting_period": "50s"') .save() } }, @@ -433,7 +451,7 @@ export class Devnet { } }, { - title: 'Process templates', + title: 'Process njk templates', task: async () => { const templateDir = path.resolve( new URL(import.meta.url).pathname, @@ -684,10 +702,9 @@ export class Devnet { if (this.config.devnetBorHosts === undefined || this.config.devnetErigonHosts === undefined) { return } - // copy the Ganache files to the first node - - const ganacheURL = new URL(this.config.ethURL) - const ganacheUser = this.config.ethHostUser + // copy the Anvil files to the first node + const anvilURL = new URL(this.config.ethURL) + const anvilUser = this.config.ethHostUser if (!this.config.network) { await execa( @@ -699,8 +716,8 @@ export class Devnet { 'UserKnownHostsFile=/dev/null', '-i', '~/cert.pem', - `${this.config.targetDirectory}/ganache-start.sh`, - `${ganacheUser}@${ganacheURL.hostname}:~/ganache-start.sh` + `${this.config.targetDirectory}/anvil-start.sh`, + `${anvilUser}@${anvilURL.hostname}:~/anvil-start.sh` ], { stdio: getRemoteStdio() } ) @@ -716,7 +733,7 @@ export class Devnet { '-i', '~/cert.pem', `${this.config.targetDirectory}/data`, - `${ganacheUser}@${ganacheURL.hostname}:~/data` + `${anvilUser}@${anvilURL.hostname}:~/data` ], { stdio: getRemoteStdio() } ) @@ -753,7 +770,7 @@ export class Devnet { '-o', 'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null', '-i', '~/cert.pem', `${this.config.devnetBorUsers[i]}@${this.config.devnetBorHosts[i]}`, - 'sudo mv ~/ganache.service /lib/systemd/system/' + 'sudo mv ~/anvil.service /lib/systemd/system/' ], { stdio: getRemoteStdio() }) } await execa('ssh', [ @@ -827,7 +844,7 @@ export class Devnet { '-o', 'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null', '-i', '~/cert.pem', `${this.config.devnetErigonUsers[i]}@${this.config.devnetErigonHosts[i]}`, - 'sudo mv ~/ganache.service /lib/systemd/system/' + 'sudo mv ~/anvil.service /lib/systemd/system/' ], { stdio: getRemoteStdio() }) } await execa('ssh', [ @@ -887,27 +904,12 @@ export class Devnet { 'UserKnownHostsFile=/dev/null', '-i', '~/cert.pem', - `${this.config.targetDirectory}/code/heimdall/build/heimdalld`, + `${this.config.targetDirectory}/code/heimdall-v2/build/heimdalld`, `${this.config.devnetBorUsers[i]}@${this.config.devnetBorHosts[i]}:~/go/bin/heimdalld` ], { stdio: getRemoteStdio() } ) - await execa( - 'scp', - [ - '-o', - 'StrictHostKeyChecking=no', - '-o', - 'UserKnownHostsFile=/dev/null', - '-i', - '~/cert.pem', - `${this.config.targetDirectory}/code/heimdall/build/heimdallcli`, - `${this.config.devnetBorUsers[i]}@${this.config.devnetBorHosts[i]}:~/go/bin/heimdallcli` - ], - { stdio: getRemoteStdio() } - ) - let nodeDir = `${this.testnetDir}/node${i}/` if (i >= this.config.numOfBorValidators) { nodeDir = `${this.testnetDir}/node${i + this.config.numOfErigonValidators}/` @@ -940,9 +942,15 @@ export class Devnet { '-i', '~/cert.pem', `${this.config.devnetBorUsers[i]}@${this.config.devnetBorHosts[i]}`, - 'sudo systemctl start ganache.service' + 'sudo systemctl start anvil.service' ], - { stdio: getRemoteStdio() } + { + stdio: getRemoteStdio(), + env: { + ...process.env, + PATH: `${process.env.HOME}/.foundry/bin:${process.env.PATH}` + } + } ) } @@ -1024,7 +1032,22 @@ export class Devnet { '-i', '~/cert.pem', `${this.config.devnetBorUsers[i]}@${this.config.devnetBorHosts[i]}`, - 'sudo ln -sf ~/go/bin/heimdalld /usr/bin/heimdalld' + 'sudo cp ~/go/bin/heimdalld /usr/bin/heimdalld && sudo chmod +x /usr/bin/heimdalld' + ], + { stdio: getRemoteStdio() } + ) + + await execa( + 'ssh', + [ + '-o', + 'StrictHostKeyChecking=no', + '-o', + 'UserKnownHostsFile=/dev/null', + '-i', + '~/cert.pem', + `${this.config.devnetBorUsers[i]}@${this.config.devnetBorHosts[i]}`, + 'sudo cp ~/go/bin/bor /usr/bin/bor && sudo chmod +x /usr/bin/bor' ], { stdio: getRemoteStdio() } ) @@ -1095,27 +1118,12 @@ export class Devnet { 'UserKnownHostsFile=/dev/null', '-i', '~/cert.pem', - `${this.config.targetDirectory}/code/heimdall/build/heimdalld`, + `${this.config.targetDirectory}/code/heimdall-v2/build/heimdalld`, `${this.config.devnetErigonUsers[i]}@${this.config.devnetErigonHosts[i]}:~/go/bin/heimdalld` ], { stdio: getRemoteStdio() } ) - await execa( - 'scp', - [ - '-o', - 'StrictHostKeyChecking=no', - '-o', - 'UserKnownHostsFile=/dev/null', - '-i', - '~/cert.pem', - `${this.config.targetDirectory}/code/heimdall/build/heimdallcli`, - `${this.config.devnetErigonUsers[i]}@${this.config.devnetErigonHosts[i]}:~/go/bin/heimdallcli` - ], - { stdio: getRemoteStdio() } - ) - let nodeDir = `${this.testnetDir}/node${j}/` if (i < this.config.numOfErigonValidators) { nodeDir = `${this.testnetDir}/node${this.config.numOfBorValidators + i}/` @@ -1148,7 +1156,7 @@ export class Devnet { '-i', '~/cert.pem', `${this.config.devnetErigonUsers[i]}@${this.config.devnetErigonHosts[i]}`, - 'sudo systemctl start ganache.service' + 'sudo systemctl start anvil.service' ], { stdio: getRemoteStdio() } ) @@ -1203,11 +1211,40 @@ export class Devnet { '-i', '~/cert.pem', `${this.config.devnetErigonUsers[i]}@${this.config.devnetErigonHosts[i]}`, - 'sudo ln -sf ~/go/bin/heimdalld /usr/bin/heimdalld' + 'sudo cp ~/go/bin/heimdalld /usr/bin/heimdalld && sudo chmod +x /usr/bin/heimdalld' + ], + { stdio: getRemoteStdio() } + ) + + await execa( + 'ssh', + [ + '-o', + 'StrictHostKeyChecking=no', + '-o', + 'UserKnownHostsFile=/dev/null', + '-i', + '~/cert.pem', + `${this.config.devnetBorUsers[i]}@${this.config.devnetBorHosts[i]}`, + 'sudo cp ~/go/bin/bor /usr/bin/bor && sudo chmod +x /usr/bin/bor' ], { stdio: getRemoteStdio() } ) + await execa( + 'ssh', + [ + '-o', + 'StrictHostKeyChecking=no', + '-o', + 'UserKnownHostsFile=/dev/null', + '-i', + '~/cert.pem', + `${this.config.devnetBorUsers[i]}@${this.config.devnetBorHosts[i]}`, + 'sudo cp ~/go/bin/bor /usr/bin/bor && sudo chmod +x /usr/bin/bor'], + { stdio: getRemoteStdio() } + ) + await execa( 'ssh', [ @@ -1309,7 +1346,7 @@ export class Devnet { }) await execa(`${heimdall.heimdalldCmd}`, [ - 'init', `--chain=${this.config.network}`, `--home=${this.heimdallDir(i)}` + 'init', `--chain-id=${this.config.network}`, `--home=${this.heimdallDir(i)}` ], { stdio: getRemoteStdio(), cwd: this.config.targetDirectory }) } } @@ -1321,6 +1358,10 @@ export class Devnet { return `${this.config.devnetHeimdallHosts[index]}:` }) .replace(/moniker.+=.+/gi, `moniker = "heimdall${i}"`) + .replace( + /laddr[ ]*=[ ]*"tcp:\/\/127\.0\.0\.1:26657"/gi, + 'laddr = "tcp://0.0.0.0:26657"' + ) .save() if (this.config.network) { @@ -1338,6 +1379,8 @@ export class Devnet { /"bor_chain_id"[ ]*:[ ]*".*"/gi, `"bor_chain_id": "${this.config.borChainId}"` ) + .replace(/"voting_period"\s*:\s*".*"/g, '"voting_period": "60s"') + .replace(/"expedited_voting_period"\s*:\s*".*"/g, '"expedited_voting_period": "50s"') .save() } } @@ -1388,18 +1431,35 @@ export class Devnet { // set genesis addresses this.config.genesisAddresses = genesisAddresses - // setup accounts from signer dump data (based on number of validators) + // signerDumpData contains an uncompressed public key that was not generated by a web3.js account, + // but is required for anvil-stake.sh to perform staking. + // We remove the '04' prefix from the uncompressed public key + // (as it is not needed) and associate the modified key with each web3.js account object. this.config.accounts = this.signerDumpData .slice(0, this.config.numOfBorValidators) .map((s) => { - return getAccountFromPrivateKey(s.priv_key) + const account = getAccountFromPrivateKey(s.priv_key) + + // Extract key from the format 'PubKeySecp256k1{04...}' + const match = s.pub_key.match(/{(.*)}/) + let sanitizedPubKey = s.pub_key + + if (match) { + const keyWithPrefix = match[1] // Extract the key inside braces + sanitizedPubKey = keyWithPrefix.startsWith('04') + ? '0x' + keyWithPrefix.slice(2) // Remove '04' and add '0x' + : '0x' + keyWithPrefix + } + + return { ...account, pub_key: sanitizedPubKey } }) if (this.config.numOfErigonValidators > 0) { const erigonAccounts = this.signerDumpData .slice(this.config.numOfBorValidators, this.config.numOfBorValidators + this.config.numOfErigonValidators) .map((s) => { - return getAccountFromPrivateKey(s.priv_key) + const account = getAccountFromPrivateKey(s.priv_key) + return { ...account, pub_key: s.pub_key } }) erigonAccounts.forEach((acc) => { @@ -1434,7 +1494,7 @@ export class Devnet { } async getTasks() { - const ganache = this.ganache + const anvil = this.anvil const heimdall = this.heimdall const bor = this.bor const genesis = this.genesis @@ -1573,9 +1633,9 @@ export class Devnet { } }, { - title: ganache.taskTitle, + title: anvil.taskTitle, task: () => { - return ganache.getTasks() + return anvil.getTasks() }, enabled: () => { return (this.config.devnetType === 'docker' || 'remote') && !this.config.network @@ -1629,7 +1689,7 @@ export class Devnet { async function setupDevnet(config) { const devnet = new Devnet(config) - devnet.ganache = new Ganache(config, { + devnet.anvil = new Anvil(config, { contractsBranch: config.contractsBranch }) devnet.bor = new Bor(config, { @@ -1788,7 +1848,7 @@ export default async function (command) { type: 'input', name: 'ethURL', message: 'Please enter ETH url', - default: 'http://ganache:9545' + default: 'http://anvil:9545' }) } diff --git a/src/setup/devnet/templates/docker/README.md b/src/setup/devnet/templates/docker/README.md index ee522d23..0fa7eb52 100644 --- a/src/setup/devnet/templates/docker/README.md +++ b/src/setup/devnet/templates/docker/README.md @@ -41,7 +41,7 @@ $ cat devnet/devnet/node0/bor/privatekey.txt After starting the chains and deploying contracts on the child chain, you can retrieve the contract addresses. ```bash -$ cat devnet/code/contracts/contractAddresses.json +$ cat devnet/code/pos-contracts/contractAddresses.json { "root": { "Registry": "0xB39aA4E9646Fd9C50ee8C871Fe345569C4D5D04A", diff --git a/src/setup/devnet/templates/docker/docker-anvil-start.sh.njk b/src/setup/devnet/templates/docker/docker-anvil-start.sh.njk new file mode 100644 index 00000000..fb4d2afd --- /dev/null +++ b/src/setup/devnet/templates/docker/docker-anvil-start.sh.njk @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +set -x + +DATA_DIR=anvil-db +export MNEMONIC="{{ obj.config.mnemonic }}" + +docker compose run -d --service-ports --name anvil anvil --block-time 1 --state /data/$DATA_DIR --accounts 10 --gas-limit 1000000000000 --gas-price 1 --code-size-limit 10000000000 --port 9545 --host 0.0.0.0 --verbosity --mnemonic "$MNEMONIC" diff --git a/src/setup/devnet/templates/docker/docker-bor-config.toml.njk b/src/setup/devnet/templates/docker/docker-bor-config.toml.njk index 7ce09dfb..6b82179a 100644 --- a/src/setup/devnet/templates/docker/docker-bor-config.toml.njk +++ b/src/setup/devnet/templates/docker/docker-bor-config.toml.njk @@ -11,7 +11,7 @@ keystore = "/var/lib/bor/keystore" "rpc.returndatalimit" = 100000 syncmode = "full" gcmode = "full" -snapshot = true +# snapshot = false "bor.logs" = true ethstats = "" devfakeauthor = false @@ -181,6 +181,9 @@ devfakeauthor = false period = 0 gaslimit = 11500000 +[state] + scheme = "path" + [parallelevm] enable = true procs = 8 diff --git a/src/setup/devnet/templates/docker/docker-bor-setup.sh.njk b/src/setup/devnet/templates/docker/docker-bor-setup.sh.njk index cb41d45b..3037b89a 100644 --- a/src/setup/devnet/templates/docker/docker-bor-setup.sh.njk +++ b/src/setup/devnet/templates/docker/docker-bor-setup.sh.njk @@ -2,11 +2,6 @@ set -x -# TODO - revisit this when static-nodes.json is outdated -# # copy static nodes from json to toml -# STATICNODES=$(cat $NODE_DIR/static-nodes.json) -# sed -i "s%.*static-nodes =.*%static-nodes = $(echo $STATICNODES)%g" $NODE_DIR/config.toml - for i in {0..{{ obj.totalNodes - 1 }}} do NODE_DIR=/var/lib/bor diff --git a/src/setup/devnet/templates/docker/docker-bor-start.sh.njk b/src/setup/devnet/templates/docker/docker-bor-start.sh.njk index 93f1eee5..588be199 100644 --- a/src/setup/devnet/templates/docker/docker-bor-start.sh.njk +++ b/src/setup/devnet/templates/docker/docker-bor-start.sh.njk @@ -21,6 +21,7 @@ bor server \ --datadir $DATA_DIR \ --port 30303 \ --bor.heimdall http://heimdall$INDEX:1317 \ + --bor.heimdallWS ws://heimdall$INDEX:26657/websocket \ --http --http.addr '0.0.0.0' \ --ws --ws.addr '0.0.0.0' --ws.port 8546 --ws.api 'eth,txpool,net,web3,bor' \ --http.vhosts '*' \ @@ -30,12 +31,14 @@ bor server \ --ipcpath $DATA_DIR/bor.ipc \ --http.api 'personal,eth,net,web3,txpool,miner,admin,bor,debug' \ --bor.logs=true \ + --state.scheme="path" \ --syncmode 'full' \ --miner.gaslimit '2000000000' \ --txpool.nolocals \ --txpool.accountslots '128' \ --txpool.globalslots '20000' \ --txpool.lifetime '0h16m0s' \ + --parallelevm.enable=true \ --unlock $ADDRESS \ --miner.etherbase $ADDRESS \ --disable-bor-wallet=false \ diff --git a/src/setup/devnet/templates/docker/docker-compose.yml.njk b/src/setup/devnet/templates/docker/docker-compose.yml.njk index 381bee4b..f183ef23 100644 --- a/src/setup/devnet/templates/docker/docker-compose.yml.njk +++ b/src/setup/devnet/templates/docker/docker-compose.yml.njk @@ -1,5 +1,3 @@ -version: "3.3" - networks: devnet-network: driver: bridge @@ -8,15 +6,15 @@ networks: - subnet: 172.20.1.0/24 services: - ganache: - image: "trufflesuite/ganache:latest" - container_name: ganache + anvil: + image: ghcr.io/foundry-rs/foundry:v1.2.3 networks: - devnet-network volumes: - ./data:/data ports: - "9545:9545" + entrypoint: ["anvil"] {% for node in range(0, obj.totalNodes) %} rabbit{{ node }}: @@ -36,13 +34,16 @@ services: image: local/heimdall {% endif %} {% else %} - image: "maticnetwork/heimdall:{{ obj.config.heimdallBranch }}" + image: "0xpolygon/heimdall-v2:{{ obj.config.heimdallBranch }}" {% endif %} container_name: heimdall{{ node }} depends_on: - rabbit{{ node }} networks: - devnet-network + environment: + - NO_COLOR=1 + - TERM=dumb volumes: - ./devnet/node{{ node }}/heimdalld:/var/lib/heimdall - ./logs/node{{ node }}/heimdall:/heimdall/logs @@ -63,7 +64,7 @@ services: image: local/bor {% endif %} {% else %} - image: "maticnetwork/bor:{{ obj.config.borBranch }}" + image: "0xpolygon/bor:{{ obj.config.borBranch }}" {% endif %} container_name: bor{{ node }} diff --git a/src/setup/devnet/templates/docker/docker-ganache-start.sh.njk b/src/setup/devnet/templates/docker/docker-ganache-start.sh.njk deleted file mode 100644 index 5240f657..00000000 --- a/src/setup/devnet/templates/docker/docker-ganache-start.sh.njk +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh - -set -x - -DATA_DIR={{ ganache.dbName }} - -docker compose run -d --service-ports --name ganache ganache \ - --chain.hardfork istanbul \ - --miner.blockTime 1 \ - --database.dbPath /data/$DATA_DIR \ - --wallet.accounts {% for acc in obj.config.accounts %}"{{ acc.privateKey }}, 1000000000000000000000" {% endfor %} \ - --miner.blockGasLimit 0xfffffffff \ - --miner.defaultGasPrice 0x1 \ - --chain.allowUnlimitedContractSize true \ - --server.port 9545 \ - --server.host 0.0.0.0 diff --git a/src/setup/devnet/templates/docker/docker-heimdall-start.sh.njk b/src/setup/devnet/templates/docker/docker-heimdall-start.sh.njk index a37f006a..be211f14 100644 --- a/src/setup/devnet/templates/docker/docker-heimdall-start.sh.njk +++ b/src/setup/devnet/templates/docker/docker-heimdall-start.sh.njk @@ -5,7 +5,6 @@ INDEX=$1 docker compose run -d --service-ports --name heimdall$INDEX --entrypoint bash heimdall$INDEX -c " mkdir -p /heimdall/logs && touch /heimdall/logs/heimdalld.log & sleep 60 && heimdalld start --home /var/lib/heimdall \ - --chain=/var/lib/heimdall/config/genesis.json \ --bridge --all \ --rest-server > /heimdall/logs/heimdalld.log 2>&1 & sleep 10 && tail -f /heimdall/logs/heimdalld.log diff --git a/src/setup/devnet/templates/remote/bor-service-host.sh b/src/setup/devnet/templates/remote/bor-service-host.sh index 0046c763..f85882ca 100644 --- a/src/setup/devnet/templates/remote/bor-service-host.sh +++ b/src/setup/devnet/templates/remote/bor-service-host.sh @@ -17,13 +17,13 @@ cat > metadata < ganache.service < anvil.service < heimdalld.service < heimdalld-rest-server.service < heimdalld-bridge.service < heimdalld.service < heimdalld-rest-server.service < heimdalld-bridge.service < metadata < ganache.service < anvil.service < heimdalld.service < heimdalld-rest-server.service < heimdalld-bridge.service < heimdalld.service < heimdalld-rest-server.service < heimdalld-bridge.service < - execa('bash', ['ganache-stake.sh'], { - cwd: this.config.targetDirectory, - stdio: getRemoteStdio() - }) - } - ], - { - exitOnError: true - } - ) - } - - async getContractDeploymentTasks() { - // server - let server = null - - return new Listr( - [ - { - title: 'Reset ganache', - task: () => { - return fs.remove(this.dbDir) - } - }, - { - title: 'Start ganache', - task: () => { - server = ganache.server({ - wallet: { - accounts: [ - { - balance: '0xfffffffffffffffffffffffffffffffffffffffffffff', - secretKey: this.config.primaryAccount.privateKey - } - ] - }, - miner: { - defaultGasPrice: '0x1', - blockGasLimit: '0xfffffffff' - }, - chain: { - allowUnlimitedContractSize: true - }, - database: { - dbPath: this.dbDir - }, - port: this.serverPort - }) - - return server.listen(this.serverPort) - } - }, - { - title: 'Deploy contracts on Main chain', - task: () => - execa('bash', ['ganache-deployment.sh'], { - cwd: this.config.targetDirectory, - stdio: getRemoteStdio() - }) - }, - { - title: 'Setup validators', - task: () => { - return this.getStakeTasks() - } - }, - { - title: 'Stop ganache', - task: () => { - if (!server) { - return - } - - return server.close() - } - } - ], - { - exitOnError: true - } - ) - } - - async getTasks() { - return new Listr( - [ - ...this.contracts.cloneRepositoryTasks(), - ...this.contracts.compileTasks(), - { - title: 'Process scripts', - task: async () => { - const templateDir = path.resolve( - new URL(import.meta.url).pathname, - '../templates' - ) - - // copy all templates to target directory - await fs.copy(templateDir, this.config.targetDirectory) - - // process all njk templates - await processTemplateFiles(this.config.targetDirectory, { - obj: this - }) - } - }, - { - title: 'Deploy contracts', - task: () => this.getContractDeploymentTasks() // get contact deployment tasks - }, - ...this.contracts.prepareContractAddressesTasks() // prepare contract addresses and load in config - ], - { - exitOnError: true - } - ) - } -} - -async function setupGanache(config) { - const ganache = new Ganache(config, { - contractsBranch: config.contractsBranch - }) - - // get ganache tasks - const tasks = await ganache.getTasks() - - await tasks.run() - console.log('%s Ganache snapshot is ready', chalk.green.bold('DONE')) - - // print details - await config.print() - await ganache.print() -} - -export default async function (command) { - // configuration - const config = await loadConfig({ - targetDirectory: command.parent.directory, - fileName: command.parent.config, - interactive: command.parent.interactive - }) - await config.loadChainIds() - await config.loadAccounts() - - // load branch - const answers = await getDefaultBranch(config) - config.set(answers) - - // start ganache - await setupGanache(config) -} diff --git a/src/setup/ganache/templates/ganache-deployment.sh.njk b/src/setup/ganache/templates/ganache-deployment.sh.njk deleted file mode 100644 index 4f4e2fd5..00000000 --- a/src/setup/ganache/templates/ganache-deployment.sh.njk +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh - -set -x - -# private key to deploy contracts -export PRIVATE_KEY={{ obj.config.primaryAccount.privateKey }} -export MNEMONIC={{ obj.config.primaryAccount.privateKey }} - -# export heimdall id -export HEIMDALL_ID={{ obj.config.heimdallChainId }} - -# cd matic contracts repo -cd {{ obj.contracts.repositoryDir }} - -# root contracts are deployed on base chain -npm run truffle:migrate:dev -- --reset --to 4 --compile-none diff --git a/src/setup/ganache/templates/ganache-stake.sh.njk b/src/setup/ganache/templates/ganache-stake.sh.njk deleted file mode 100644 index 0a9dde69..00000000 --- a/src/setup/ganache/templates/ganache-stake.sh.njk +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env sh - -set -x - -# stake -STAKE={{ obj.config.defaultStake }} - -# fee -FEE={{ obj.config.defaultFee }} - -# cd matic contracts -cd {{ obj.contracts.repositoryDir }} - -# root contracts are deployed on base chain -{% for acc in obj.config.accounts %} -npm run truffle exec scripts/stake.js -- --network development {{ acc.address }} {{ acc.privateKey | publicKey }} $STAKE $FEE -sleep 10 -{% endfor %} diff --git a/src/setup/ganache/templates/ganache-start.sh.njk b/src/setup/ganache/templates/ganache-start.sh.njk deleted file mode 100644 index 49f3f36a..00000000 --- a/src/setup/ganache/templates/ganache-start.sh.njk +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh - -set -x - -DATA_DIR={{ obj.dbDir }} - -ganache \ - --chain.hardfork istanbul \ - --miner.blockTime 1 \ - --database.dbPath $DATA_DIR \ - --wallet.accounts {% for acc in obj.config.accounts %}"{{ acc.privateKey }}, 1000000000000000000000" {% endfor %} \ - --miner.blockGasLimit 8000000 \ - --miner.defaultGasPrice 0x1 \ - --chain.allowUnlimitedContractSize true \ - --server.port 9545 \ - --server.host 0.0.0.0 diff --git a/src/setup/genesis/index.js b/src/setup/genesis/index.js index 360a8a8a..12e4fe75 100644 --- a/src/setup/genesis/index.js +++ b/src/setup/genesis/index.js @@ -20,11 +20,9 @@ export class Genesis { this.config = config this.repositoryName = this.name - this.repositoryBranch = - options.repositoryBranch || 'mardizzone/node-upgrade' + this.repositoryBranch = options.repositoryBranch || 'master' this.repositoryUrl = - options.repositoryUrl || - 'https://github.com/maticnetwork/genesis-contracts' + options.repositoryUrl || 'https://github.com/0xPolygon/genesis-contracts' this.maticContractsRepository = 'matic-contracts' } @@ -106,7 +104,7 @@ export class Genesis { }) }, { - title: 'Process templates', + title: 'Process genesis contracts templates', task: () => execa( 'npm', @@ -123,11 +121,22 @@ export class Genesis { } ) }, + + { + title: 'Adding forge to path', + task: () => + execa('bash', ['-c', 'export PATH="$HOME/.foundry/bin:$PATH"'], { + stdio: getRemoteStdio() + }) + }, { title: 'Compile matic-contracts', task: () => - execa('npm', ['run', 'truffle:compile'], { - cwd: this.maticContractDir, + execa('forge', ['build'], { + env: { + ...process.env, + PATH: `${process.env.HOME}/.foundry/bin:${process.env.PATH}` + }, stdio: getRemoteStdio() }) }, diff --git a/src/setup/heimdall/index.js b/src/setup/heimdall/index.js index 81adc47c..3679b747 100644 --- a/src/setup/heimdall/index.js +++ b/src/setup/heimdall/index.js @@ -15,7 +15,7 @@ import { processTemplateFiles } from '../../lib/utils.js' import { getDefaultBranch } from '../helper.js' -import { Ganache } from '../ganache/index.js' +import { Anvil } from '../anvil/index.js' import { getRemoteStdio } from '../../express/common/remote-worker.js' export class Heimdall { @@ -25,18 +25,18 @@ export class Heimdall { this.repositoryName = this.name this.repositoryBranch = options.repositoryBranch || 'develop' this.repositoryUrl = - options.repositoryUrl || 'https://github.com/maticnetwork/heimdall' + options.repositoryUrl || 'https://github.com/0xPolygon/heimdall-v2' this.dockerContext = options.dockerContext || - 'https://github.com/maticnetwork/heimdall.git#develop' + 'https://github.com/0xPolygon/heimdall-v2.git#develop' } get name() { - return 'heimdall' + return 'heimdall-v2' } get taskTitle() { - return 'Setup heimdall' + return 'Setup heimdall-v2' } get validatorKeyFile() { @@ -72,7 +72,7 @@ export class Heimdall { } get heimdallDataDir() { - return path.join(this.config.dataDir, this.name) + return path.join(this.config.dataDir, 'heimdall-v2') } get heimdallConfigDir() { @@ -84,7 +84,11 @@ export class Heimdall { } get heimdallAppConfigFilePath() { - return path.join(this.heimdallConfigDir, 'heimdall-config.toml') + return path.join(this.heimdallConfigDir, 'app.toml') + } + + get heimdallConfigFilePath() { + return path.join(this.heimdallConfigDir, 'config.toml') } get heimdallValidatorKeyFilePath() { @@ -128,7 +132,7 @@ export class Heimdall { return execa( this.heimdalldCmd, [ - 'generate-validatorkey', + 'generate-validator-key', this.config.primaryAccount.privateKey, '--home', this.heimdallDataDir @@ -188,6 +192,11 @@ export class Heimdall { /"user":[ ]*".*"/gi, `"user": "${this.config.primaryAccount.address}"` ) + .replace(/"voting_period"\s*:\s*".*"/g, '"voting_period": "60s"') + .replace( + /"expedited_voting_period"\s*:\s*".*"/g, + '"expedited_voting_period": "50s"' + ) .save() } }, @@ -199,8 +208,8 @@ export class Heimdall { fileReplacer(this.heimdallGenesisFilePath) .replace( - /"matic_token_address":[ ]*".*"/gi, - `"matic_token_address": "${rootContracts.tokens.TestToken}"` + /"pol_token_address":[ ]*".*"/gi, + `"pol_token_address": "${rootContracts.tokens.MaticToken}"` ) .replace( /"staking_manager_address":[ ]*".*"/gi, @@ -302,7 +311,7 @@ export class Heimdall { } }, { - title: 'Process heimdall config file', + title: 'Process heimdall app config file', task: () => { fileReplacer(this.heimdallAppConfigFilePath) .replace( @@ -313,7 +322,10 @@ export class Heimdall { /bor_rpc_url[ ]*=[ ]*".*"/gi, 'bor_rpc_url = "http://localhost:8545"' ) - .replace(/bor_grpc_flag[ ]*=[ ]*".*"/gi, 'bor_grpc_flag = "true"') + .replace( + /bor_grpc_flag[ ]*=[ ]*".*"/gi, + 'bor_grpc_flag = "false"' + ) .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, 'bor_grpc_url = "localhost:3131"' @@ -321,6 +333,17 @@ export class Heimdall { .save() } }, + { + title: 'Process heimdall config file', + task: () => { + fileReplacer(this.heimdallConfigFilePath) + .replace( + /laddr[ ]*=[ ]*"tcp:\/\/127\.0\.0\.1:26657"/gi, + 'laddr = "tcp://0.0.0.0:26657"' + ) + .save() + } + }, { title: 'Copy template scripts', task: async () => { @@ -347,7 +370,7 @@ export class Heimdall { } async function setupHeimdall(config) { - const ganache = new Ganache(config, { + const anvil = new Anvil(config, { contractsBranch: config.contractsBranch }) const heimdall = new Heimdall(config, { @@ -360,9 +383,9 @@ async function setupHeimdall(config) { const tasks = new Listr( [ { - title: ganache.taskTitle, + title: anvil.taskTitle, task: () => { - return ganache.getTasks() + return anvil.getTasks() } }, { @@ -382,7 +405,7 @@ async function setupHeimdall(config) { // print details await config.print() - await ganache.print() + await anvil.print() await heimdall.print() return true diff --git a/src/setup/heimdall/templates/HEIMDALL_README.sh.njk b/src/setup/heimdall/templates/HEIMDALL_README.sh.njk index 247626d4..0f3a33ee 100644 --- a/src/setup/heimdall/templates/HEIMDALL_README.sh.njk +++ b/src/setup/heimdall/templates/HEIMDALL_README.sh.njk @@ -10,4 +10,4 @@ To clean every heimdall data and setup again: ``` bash heimdall-clean.sh -``` \ No newline at end of file +``` diff --git a/src/setup/heimdall/templates/heimdall-clean.sh.njk b/src/setup/heimdall/templates/heimdall-clean.sh.njk deleted file mode 100644 index a6a556ad..00000000 --- a/src/setup/heimdall/templates/heimdall-clean.sh.njk +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh - -set -x - -HEIMDALL_HOME_DIR={{ obj.heimdallDataDir }} -BUILD_DIR={{ obj.buildDir }} - -$BUILD_DIR/heimdalld --home $HEIMDALL_HOME_DIR unsafe-reset-all -$BUILD_DIR/heimdalld heimdall-bridge --home $HEIMDALL_HOME_DIR purge-queue -rm -rf $HEIMDALL_HOME_DIR/bridge diff --git a/src/setup/heimdall/templates/heimdall-start.sh.njk b/src/setup/heimdall/templates/heimdall-start.sh.njk index 750f138c..442d901e 100644 --- a/src/setup/heimdall/templates/heimdall-start.sh.njk +++ b/src/setup/heimdall/templates/heimdall-start.sh.njk @@ -5,4 +5,4 @@ set -x HEIMDALL_HOME_DIR={{ obj.heimdallDataDir }} BUILD_DIR={{ obj.buildDir }} -$BUILD_DIR/heimdalld --home $HEIMDALL_HOME_DIR start --chain=$HEIMDALL_HOME_DIR/config/genesis.json --bridge --all --rest-server +$BUILD_DIR/heimdalld --home $HEIMDALL_HOME_DIR start --bridge --all --rest-server diff --git a/src/setup/index.js b/src/setup/index.js index db913db4..99273fb0 100644 --- a/src/setup/index.js +++ b/src/setup/index.js @@ -4,7 +4,7 @@ import heimdall from './heimdall/index.js' import genesis from './genesis/index.js' import bor from './bor/index.js' import localnet from './localnet/index.js' -import ganache from './ganache/index.js' +import anvil from './anvil/index.js' import devnet from './devnet/index.js' // @@ -19,8 +19,8 @@ genesisCmd.action(genesis) const borCmd = new Command('bor') borCmd.action(bor) -const ganacheCmd = new Command('ganache') -ganacheCmd.action(ganache) +const anvilCmd = new Command('anvil') +anvilCmd.action(anvil) const localnetCmd = new Command('localnet') localnetCmd.action(localnet) @@ -32,7 +32,7 @@ export default [ heimdallCmd, genesisCmd, borCmd, - ganacheCmd, + anvilCmd, localnetCmd, devnetCmd ] diff --git a/src/setup/localnet/index.js b/src/setup/localnet/index.js index 1f99ee78..1c2567d8 100644 --- a/src/setup/localnet/index.js +++ b/src/setup/localnet/index.js @@ -10,36 +10,36 @@ import { loadConfig } from '../config.js' import { Genesis } from '../genesis/index.js' import { Heimdall } from '../heimdall/index.js' -import { Ganache } from '../ganache/index.js' +import { Anvil } from '../anvil/index.js' import { Bor } from '../bor/index.js' import { processTemplateFiles } from '../../lib/utils.js' async function setupLocalnet(config) { - const ganache = new Ganache(config, { + const anvil = new Anvil(config, { contractsBranch: config.contractsBranch }) const bor = new Bor(config, { - repositoryUrl: config.borRepo || 'https://github.com/maticnetwork/bor', + repositoryUrl: config.borRepo || 'https://github.com/0xPolygon/bor', repositoryBranch: config.borBranch || 'develop' }) const heimdall = new Heimdall(config, { repositoryUrl: - config.heimdallRepo || 'https://github.com/maticnetwork/heimdall', + config.heimdallRepo || 'https://github.com/0xPolygon/heimdall-v2', repositoryBranch: config.heimdallBranch || 'develop' }) const genesis = new Genesis(config, { repositoryUrl: config.genesisContractsRepo || - 'https://github.com/maticnetwork/genesis-contracts', + 'https://github.com/0xPolygon/genesis-contracts', repositoryBranch: config.genesisContractsBranch || 'master' }) const tasks = new Listr( [ { - title: ganache.taskTitle, + title: anvil.taskTitle, task: () => { - return ganache.getTasks() + return anvil.getTasks() } }, { diff --git a/src/setup/localnet/templates/LOCALNET_README.sh.njk b/src/setup/localnet/templates/LOCALNET_README.sh.njk index 4d8b5928..7632f1b0 100644 --- a/src/setup/localnet/templates/LOCALNET_README.sh.njk +++ b/src/setup/localnet/templates/LOCALNET_README.sh.njk @@ -4,4 +4,4 @@ The local-net creates local development setup. There are three components to sta Bor: BOR_README.md Heimdall: HEIMDALL_README.md -Ganache contracts: GANACHE_README.md \ No newline at end of file +Anvil contracts: ANVIL_README.md diff --git a/terraform/variables/common_vars.tf b/terraform/variables/common_vars.tf index 4830f0c6..91dbf41b 100644 --- a/terraform/variables/common_vars.tf +++ b/terraform/variables/common_vars.tf @@ -73,11 +73,11 @@ variable "PORTS_IN" { // 1317: heimdall // 8545: bor https // 8546: bor rpc websockets - // 9545: ganache + // 9545: anvil // 1337: // 26656: heimdall comms // 8080: hasura console // 3000: ethstats-frontend dashboard // 8000: ethstats-backend collector default = [22, 80, 443, 30303, 1317, 8545, 9545, 1337, 8546, 26656, 8080, 3000, 8000] -} \ No newline at end of file +} diff --git a/tests/rpc-tests/go.mod b/tests/rpc-tests/go.mod index 832af975..42ae3f03 100644 --- a/tests/rpc-tests/go.mod +++ b/tests/rpc-tests/go.mod @@ -1,97 +1,209 @@ module rpc-tests -go 1.23.2 +go 1.24.4 require ( - github.com/ethereum/go-ethereum v1.14.13 + github.com/ethereum/go-ethereum v1.15.0 github.com/miguelmota/go-ethereum-hdwallet v0.1.2 ) require ( - github.com/BurntSushi/toml v1.4.0 // indirect - github.com/DataDog/zstd v1.5.2 // indirect + cosmossdk.io/api v0.7.5 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/core v0.11.1 // indirect + cosmossdk.io/depinject v1.0.0 // indirect + cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/log v1.4.1 // indirect + cosmossdk.io/math v1.4.0 // indirect + cosmossdk.io/store v1.1.1 // indirect + cosmossdk.io/x/tx v0.13.7 // indirect + filippo.io/edwards25519 v1.0.0 // indirect + github.com/0xPolygon/crand v1.0.3 // indirect + github.com/0xPolygon/heimdall-v2 v0.2.16-beta.0.20250806140653-d58ce649f932 // indirect + github.com/0xPolygon/polyproto v0.0.7 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/JekaMas/workerpool v1.1.8 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.13.0 // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/bits-and-blooms/bitset v1.22.0 // indirect github.com/btcsuite/btcd v0.22.1 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect + github.com/cenkalti/backoff/v4 v4.3.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-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/pebble v1.1.2 // 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/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect - github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect + github.com/cometbft/cometbft v0.38.17 // indirect + github.com/cometbft/cometbft-db v0.14.1 // indirect + github.com/consensys/bavard v0.1.27 // indirect + github.com/consensys/gnark-crypto v0.16.0 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/cosmos/cosmos-sdk v0.50.13 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/gogoproto v1.7.0 // indirect + github.com/cosmos/iavl v1.2.0 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect + github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect + github.com/dgraph-io/badger/v4 v4.2.0 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.7.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/ethereum/c-kzg-4844 v1.0.0 // indirect - github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect + github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect + github.com/ethereum/go-verkle v0.2.2 // indirect + github.com/fatih/color v1.17.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gammazero/deque v0.2.1 // indirect - github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-kit/kit v0.13.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/gofrs/flock v0.8.1 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gofrs/flock v0.12.1 // indirect + github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.2.4 // indirect + github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/golang/mock v1.6.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/google/btree v1.1.3 // indirect + github.com/google/flatbuffers v2.0.8+incompatible // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/gorilla/websocket v1.5.2 // indirect + github.com/gorilla/handlers v1.5.2 // indirect + github.com/gorilla/mux v1.8.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/heimdalr/dag v1.4.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.3.1 // indirect + github.com/holiman/uint256 v1.3.2 // indirect + github.com/huandu/skiplist v1.2.0 // indirect github.com/huin/goupnp v1.3.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/maticnetwork/crand v1.0.2 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect + github.com/pion/dtls/v2 v2.2.7 // indirect + github.com/pion/logging v0.2.2 // indirect + github.com/pion/stun/v2 v2.0.0 // indirect + github.com/pion/transport/v2 v2.2.1 // indirect + github.com/pion/transport/v3 v3.0.1 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.62.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sasha-s/go-deadlock v0.3.5 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/status-im/keycard-go v0.3.2 // indirect - github.com/supranational/blst v0.3.13 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - github.com/tklauser/go-sysconf v0.3.11 // indirect - github.com/tklauser/numcpus v0.6.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/stretchr/testify v1.10.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + github.com/supranational/blst v0.3.14 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/xsleonard/go-merkle v1.1.0 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect - golang.org/x/crypto v0.31.0 // indirect - golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect - golang.org/x/net v0.33.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/sys v0.28.0 // indirect - golang.org/x/text v0.21.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect + go.opencensus.io v0.24.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.36.0 // indirect + golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect + golang.org/x/net v0.38.0 // indirect + golang.org/x/sync v0.12.0 // indirect + golang.org/x/sys v0.31.0 // indirect + golang.org/x/term v0.30.0 // indirect + golang.org/x/text v0.23.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250207221924-e9438ea467c6 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250124145028-65684f501c47 // indirect + google.golang.org/grpc v1.70.0 // indirect + google.golang.org/protobuf v1.36.5 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.1 // indirect + nhooyr.io/websocket v1.8.7 // indirect + pgregory.net/rapid v1.1.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) -replace github.com/ethereum/go-ethereum => github.com/maticnetwork/bor v1.5.5 +replace ( + github.com/btcsuite/btcd/btcec => github.com/btcsuite/btcd/btcec v0.22.1 + github.com/cometbft/cometbft => github.com/0xPolygon/cometbft v0.2.1-polygon + github.com/cosmos/cosmos-sdk => github.com/0xPolygon/cosmos-sdk v0.2.3-polygon + github.com/ethereum/go-ethereum => github.com/0xPolygon/bor v1.14.14-0.20250806140936-f4cfc74fb080 +) diff --git a/tests/rpc-tests/go.sum b/tests/rpc-tests/go.sum index 6352845e..9116b3a3 100644 --- a/tests/rpc-tests/go.sum +++ b/tests/rpc-tests/go.sum @@ -1,25 +1,99 @@ -github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.6 h1:CygEwABxbwFmqgLINBb3WGVwzaN4yRgB9ZtIGQzhRNQ= +cosmossdk.io/client/v2 v2.0.0-beta.6/go.mod h1:4p0P6o0ro+FizakJUYS9SeM94RNbv0thLmkHRw5o5as= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= +cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= +cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050= +cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= +cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= +cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= +cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= +cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +github.com/0xPolygon/bor v1.14.14-0.20250806140936-f4cfc74fb080 h1:+u+JCF+pDnDYJfG8q3myqQaygMyFYTJF7rLSHg3ThtM= +github.com/0xPolygon/bor v1.14.14-0.20250806140936-f4cfc74fb080/go.mod h1:JOsEL8dNeCd8fy8rE8X8kIORxPrM2o2Ub9WV1i+TNwU= +github.com/0xPolygon/cometbft v0.2.1-polygon h1:nUQdqsEJ+/nhuTmOpPRtparnS5CX8AAGmFXO/7kgSag= +github.com/0xPolygon/cometbft v0.2.1-polygon/go.mod h1:65PwuxvivN0GbqxcMLQ2ze5hCXvZQrR8/ds/jOBg4f8= +github.com/0xPolygon/cosmos-sdk v0.2.3-polygon h1:wfYCZTD20gEuAZ9dQ6R3bqHpvd5oB07kb0mhKroBkkw= +github.com/0xPolygon/cosmos-sdk v0.2.3-polygon/go.mod h1:2SHt2bxDFWjQy+oipIMJHMyyiAYCPzSdEgcPGKfI08s= +github.com/0xPolygon/crand v1.0.3 h1:BYYflmgLhmGPEgqtopG4muq6wV6DOkwD8uPymNz5WeQ= +github.com/0xPolygon/crand v1.0.3/go.mod h1:km4366oC7EVFl1xNUCwzxUXNM10swZqd8LZ0E5SgbAE= +github.com/0xPolygon/heimdall-v2 v0.2.16-beta.0.20250806140653-d58ce649f932 h1:EdJvr+Aq/AjFX0orVOVpgayFQH2h/Veh+6RuMwd37uI= +github.com/0xPolygon/heimdall-v2 v0.2.16-beta.0.20250806140653-d58ce649f932/go.mod h1:bjPFHwnFdLk64wWO8ioPjzcM6xqwFB8l7kmg8TB2ZRw= +github.com/0xPolygon/polyproto v0.0.7 h1:Ody+kFyCRK4QXRPXbsP5pdxKrDgwAAXtFB8NPgaIxRs= +github.com/0xPolygon/polyproto v0.0.7/go.mod h1:2Iw93k2LismvckKKeXQITuhJH9vLbqOa212AMskH6no= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= +github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/JekaMas/workerpool v1.1.8 h1:IbDbTITrDgt1xAzdzTS9aLk4Q/4dCsjUOopiyFkDFZ4= github.com/JekaMas/workerpool v1.1.8/go.mod h1:IoDWPpwMcA27qbuugZKeBslDrgX09lVmksuh9sjzbhc= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= -github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4= +github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= -github.com/btcsuite/btcd/btcec/v2 v2.3.3 h1:6+iXlDKE8RMtKsvK0gshlXIuPbyWM/h84Ensb7o3sC0= -github.com/btcsuite/btcd/btcec/v2 v2.3.3/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= @@ -31,11 +105,39 @@ github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVa github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= +github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cbergoon/merkletree v0.2.0 h1:Bttqr3OuoiZEo4ed1L7fTasHka9II+BF9fhBfbNEEoQ= +github.com/cbergoon/merkletree v0.2.0/go.mod h1:5c15eckUgiucMGDOCanvalj/yJnD+KAZj1qyJtRW5aM= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= 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= @@ -44,21 +146,56 @@ github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/e github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/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 v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= -github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/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= -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/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLRPrZhHjHxufI8+2UG/i25QG92j0Er9p6I= -github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= -github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= -github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz3DlerQ= +github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= +github.com/consensys/bavard v0.1.27 h1:j6hKUrGAy/H+gpNrpLU3I26n1yc+VMGmd6ID5+gAhOs= +github.com/consensys/bavard v0.1.27/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= +github.com/consensys/gnark-crypto v0.16.0 h1:8Dl4eYmUWK9WmlP1Bj6je688gBRJCJbT8Mw4KoTAawo= +github.com/consensys/gnark-crypto v0.16.0/go.mod h1:Ke3j06ndtPTVvo++PhGNgvm+lgpLvzbcE2MqljY7diU= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= +github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI= +github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= +github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4= +github.com/crate-crypto/go-kzg-4844 v1.1.0/go.mod h1:JolLjpSff1tCCJKaJx4psrlEdlXuJEC996PL3tTAFks= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -66,18 +203,62 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= +github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= -github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 h1:8NfxH2iXvJ60YRB8ChToFTUzl8awsc3cJ8CbLjGIl/A= -github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +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.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ethereum/c-kzg-4844/v2 v2.1.0 h1:gQropX9YFBhl3g4HYhwE70zq3IHFRgbbNPw0Shwzf5w= +github.com/ethereum/c-kzg-4844/v2 v2.1.0/go.mod h1:TC48kOKjJKPbN7C++qIgt0TJzZ70QznYR7Ob+WXl57E= +github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8= +github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/ferranbt/fastssz v0.1.2 h1:Dky6dXlngF6Qjc+EfDipAkE83N5I5DE68bY6O0VLNPk= +github.com/ferranbt/fastssz v0.1.2/go.mod h1:X5UPrE2u1UJjxHA8X54u04SBwdAQjG2sFtWs39YxyWs= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0= @@ -86,251 +267,933 @@ github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8x github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= 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.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -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-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 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-ole/go-ole v1.2.6/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/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM= +github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +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/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 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.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= +github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= +github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 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.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +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.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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.4.3/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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= +github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +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.3/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-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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 v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= 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/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/websocket v1.5.2 h1:qoW6V1GT3aZxybsbC6oLnailWnB+qTMVwMreOso9XUw= -github.com/gorilla/websocket v1.5.2/go.mod h1:0n9H61RBAcf5/38py2MCYbxzPIY9rOkpvvMT24Rqs30= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +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/graph-gophers/graphql-go v1.5.0 h1:fDqblo50TEpD0LY7RXk/LFVYEVqo3+tXMNMPSVXA1yc= +github.com/graph-gophers/graphql-go v1.5.0/go.mod h1:YtmJZDLbF1YYNrlNAuiO5zAStUWc3XZT07iGsVqe1Os= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.14 h1:uKDeyuOhWhT1r5CiMTjdVY4Aoxdxs6EtwgTGnlosyp4= +github.com/hashicorp/go-bexpr v0.1.14/go.mod h1:gN7hRKB3s7yT+YvTdnhZVLTENejvhlkZ8UE4YVBS+Q8= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/heimdalr/dag v1.4.0 h1:zG3JA4RDVLc55k3AXAgfwa+EgBNZ0TkfOO3C29Ucpmg= github.com/heimdalr/dag v1.4.0/go.mod h1:OCh6ghKmU0hPjtwMqWBoNxPmtRioKd1xSu7Zs4sbIqM= +github.com/holiman/billy v0.0.0-20240322075458-72a4e81ec6da h1:8qEhdMGSUx67L2s5aGQinJhOwLfIRKLRBHPQq8m6WxE= +github.com/holiman/billy v0.0.0-20240322075458-72a4e81ec6da/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.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= -github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= +github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb-client-go/v2 v2.13.0 h1:ioBbLmR5NMbAjP4UVA5r9b5xGjpABD7j65pI8kFphDM= +github.com/influxdata/influxdb-client-go/v2 v2.13.0/go.mod h1:k+spCbt9hcvqvUiz0sr5D8LolXHqAAOfPw9v/RIRHl4= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 h1:vilfsDSy7TDxedi9gyBkMvAirat/oRcL0lFdJBf6tdM= +github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= 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/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +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/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 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/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/maticnetwork/bor v1.5.5 h1:lFWgs9Jgxv2x6MqsvV6HDCsIuPWABYVfJm1bPWGHED4= -github.com/maticnetwork/bor v1.5.5/go.mod h1:oKRrn3rmA2hVx/WLsTiIOM7HY/Qrl8HGvhZivaRLvh0= -github.com/maticnetwork/crand v1.0.2 h1:Af0tAivC8zrxXDpGWNWVT/0s1fOz8w0eRbahZgURS8I= -github.com/maticnetwork/crand v1.0.2/go.mod h1:/NRNL3bj2eYdqpWmoIP5puxndTpi0XRxpj5ZKxfHjyg= +github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= +github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/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.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +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.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +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.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miguelmota/go-ethereum-hdwallet v0.1.2 h1:mz9LO6V7QCRkLYb0AH17t5R8KeqCe3E+hx9YXpmZeXA= github.com/miguelmota/go-ethereum-hdwallet v0.1.2/go.mod h1:fdNwFSoBFVBPnU0xpOd6l2ueqsPSH/Gch5kIvSvTGk8= +github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= +github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= +github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.1 h1:ZhBBeX8tSlRpu/FFhXH4RC4OJzFlqsQhoHZAz4x7TIw= +github.com/mitchellh/pointerstructure v1.2.1/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= 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 h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= 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/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +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/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +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/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= +github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= 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.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw= +github.com/peterh/liner v1.2.2/go.mod h1:xFwJyiKIXJZUKItq5dGHZSTBRAuG/CpeNpWLyiNRNwI= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= 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/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= +github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= +github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= +github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= +github.com/pion/stun/v2 v2.0.0 h1:A5+wXKLAypxQri59+tmQKVs7+l6mMM+3d+eER9ifRU0= +github.com/pion/stun/v2 v2.0.0/go.mod h1:22qRSh08fSEttYUmJZGlriq9+03jtVmXNODgLccj8GQ= +github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c= +github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= +github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM= +github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +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/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/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.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +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/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= +github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 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/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +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 v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= +github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/status-im/keycard-go v0.3.2 h1:YusIF/bHx6YZis8UTOJrpZFnTs4IkRBdmJXqdiXkpFE= -github.com/status-im/keycard-go v0.3.2/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +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/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +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.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk= -github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= -github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= -github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= -github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= +github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= 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.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= +github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/xsleonard/go-merkle v1.1.0 h1:fHe1fuhJjGH22ZzVTAH0jqHLhTGhOq3wQjJN+8P0jQg= github.com/xsleonard/go-merkle v1.1.0/go.mod h1:cW4z+UZ/4f2n9IJgIiyDCdYguchoDyDAPmpuOWGxdGg= 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= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= +go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= +go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= +go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +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-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA= +golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/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.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/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-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/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-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 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-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/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.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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-20181221193216-37e7f081c4d4/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/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/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-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/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-20210809222454-d867a43fc93e/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-20211025201205-69cdffdb9359/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-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.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.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 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= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= 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.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190312170243-e65039ee4138/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-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/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-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/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/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 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20250207221924-e9438ea467c6 h1:L9JNMl/plZH9wmzQUHleO/ZZDSN+9Gh41wPczNy+5Fk= +google.golang.org/genproto/googleapis/api v0.0.0-20250207221924-e9438ea467c6/go.mod h1:iYONQfRdizDB8JJBybql13nArx91jcUk7zCXEsOofM4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250124145028-65684f501c47 h1:91mG8dNTpkC0uChJUQ9zCiRqx3GEEFOWaRZ0mI6Oj2I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250124145028-65684f501c47/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= 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.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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-20200902074654-038fdea0a05b/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/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +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/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/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-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= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +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= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= +nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tests/rpc-tests/main.go b/tests/rpc-tests/main.go index a7024ea1..0876ccef 100644 --- a/tests/rpc-tests/main.go +++ b/tests/rpc-tests/main.go @@ -13,6 +13,7 @@ import ( "math/big" "math/rand" "net/http" + "os" testcontract "rpc-tests/contracts" "strconv" "strings" @@ -53,10 +54,9 @@ type ResponseMap struct { chainId *big.Int mostRecentBlockNumber *big.Int mostRecentBlockHash common.Hash - mostRecentBlockTotalDifficulty *big.Int mostRecentBlockParentHash common.Hash currentProposerAddress common.Address - accounts Accounts + account Account gasPrice *big.Int stateSyncTxHash common.Hash stateSyncBlockNumber *big.Int @@ -127,6 +127,8 @@ type BatchTestCase []TestCase type FailedTestCase struct { Err error Key string + Req Request + Res Response } type SignTransactionResult struct { Raw hexutil.Bytes `json:"raw"` @@ -158,17 +160,21 @@ type accountResult struct { var ( rpcURL = flag.String("rpc-url", "", "RPC Url to be tested") mnemonic = flag.String("mnemonic", "", "mnemonic to be used on transactions") + privKey = flag.String("priv-key", "", "privKey to be used on transactions") filterTests = flag.Bool("filter-test", false, "True if want to include filter tests (recommended just when there is no load balancer)") + logReqRes = flag.Bool("log-req-res", false, "True if want to log requests and responses)") ) func main() { flag.Parse() - if *mnemonic == "" { - fmt.Println("Invalid mnemonic flag") + if *mnemonic == "" && *privKey == "" { + fmt.Println("Must provide either mnemonic or privKey") + os.Exit(1) return } if *rpcURL == "" { fmt.Println("Invalid rpcURL flag") + os.Exit(1) return } @@ -177,9 +183,16 @@ func main() { rm := ResponseMap{} mapRequestIdToKey := make(map[int]string) var failedTestCases []FailedTestCase - rm.accounts = generateAccountsUsingMnemonic(*mnemonic, 10) - rm.expectedGasToCreateTransaction = big.NewInt(358270) + if *mnemonic != "" { + rm.account = generateAccountsUsingMnemonic(*mnemonic, 1)[0] + } else { + acc, _ := generateAccountUsingPrivKey(*privKey) + rm.account = *acc + } + + rm.expectedGasToCreateTransaction = big.NewInt(354658) rm.expectedValueToStoreInContract = big.NewInt(30) + rm.expectedKeyToStoreInContract = "key" rm.expectedSlot0Value = big.NewInt(42) // first variable set on contract // Test cases are grouped into batches when there are no dependencies between them. @@ -197,6 +210,7 @@ func main() { mapTestCases["eth_feeHistory"], mapTestCases["eth_gasPrice"], mapTestCases["eth_getBalance"], + }, { mapTestCases["eth_getTransactionCount"], mapTestCases["eth_maxPriorityFeePerGas"], mapTestCases["eth_syncing"], @@ -257,6 +271,7 @@ func main() { for _, testCaseBatch := range testCaseBatches { // Preparing Request requests := make([]Request, 0) + mapRequests := make(map[int]Request) countTestCases += len(testCaseBatch) for _, testCase := range testCaseBatch { req, err := testCase.PrepareRequest(&rm) @@ -269,6 +284,7 @@ func main() { } mapRequestIdToKey[req.ID] = testCase.Key + mapRequests[req.ID] = *req requests = append(requests, *req) } @@ -282,24 +298,40 @@ func main() { for _, response := range responses { key := mapRequestIdToKey[response.ID] if response.Error != nil { - failedTestCases = append(failedTestCases, FailedTestCase{Key: key, Err: fmt.Errorf("request error; message: %s | code: %d", response.Error.Message, response.Error.Code)}) + failedTestCases = append(failedTestCases, FailedTestCase{Key: key, Err: fmt.Errorf("request error; message: %s | code: %d", response.Error.Message, response.Error.Code), Req: mapRequests[response.ID], Res: response}) continue } err := mapTestCases[key].HandleResponse(&rm, response) if err != nil { - failedTestCases = append(failedTestCases, FailedTestCase{Key: key, Err: err}) + failedTestCases = append(failedTestCases, FailedTestCase{Key: key, Err: err, Req: mapRequests[response.ID], Res: response}) } } } - fmt.Printf("All Tests Executed | Success: (%d/%d) | Duration: %s\n", countTestCases-len(failedTestCases), countTestCases, time.Since(timeStart)) + passedTests := countTestCases - len(failedTestCases) + duration := time.Since(timeStart) + + fmt.Println("════════════════════════════════════════") + fmt.Println("πŸš€ All Tests Executed!") + fmt.Printf("βœ… Success: %d/%d tests passed\n", passedTests, countTestCases) + fmt.Printf("βŒ› Duration: %s\n", duration) + fmt.Println("════════════════════════════════════════") if len(failedTestCases) > 0 { - fmt.Println("Failed Tests Cases:") - } - for _, failedTestCase := range failedTestCases { - fmt.Printf("\tkey: %s | err:%s\n", failedTestCase.Key, failedTestCase.Err) + fmt.Printf("\n\n") + fmt.Println("❌ Failed Test Cases:") + for _, failedTestCase := range failedTestCases { + fmt.Printf("\n πŸ”Ž Test Case Key: %s\n", failedTestCase.Key) + fmt.Printf(" 🚫 Error: %s\n", failedTestCase.Err) + if *logReqRes { + request, _ := json.Marshal(failedTestCase.Req) + response, _ := json.Marshal(failedTestCase.Res) + fmt.Printf(" πŸ“€ Request: %s\n", string(request)) + fmt.Printf(" πŸ“₯ Response: %s\n", string(response)) + } + } + os.Exit(1) } } @@ -380,7 +412,7 @@ func generateAccountsUsingMnemonic(MNEMONIC string, N int) (accounts Accounts) { log.Fatal(err) } - for i := 1; i <= N; i++ { + for i := 0; i <= N; i++ { var derivPath = "m/44'/60'/0'/0/" + strconv.Itoa(i) path := hdwallet.MustParseDerivationPath(derivPath) account, err := wallet.Derive(path, false) @@ -397,6 +429,32 @@ func generateAccountsUsingMnemonic(MNEMONIC string, N int) (accounts Accounts) { return accounts } +// generateAccountUsingPrivKey creates an Account from a hex-encoded private key string. +func generateAccountUsingPrivKey(hexKey string) (*Account, error) { + if strings.HasPrefix(hexKey, "0x") || strings.HasPrefix(hexKey, "0X") { + hexKey = hexKey[2:] + } + + privateKey, err := crypto.HexToECDSA(hexKey) + if err != nil { + return nil, fmt.Errorf("failed to convert hex to ECDSA private key: %w", err) + } + + publicKey := privateKey.Public() + publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) + if !ok { + return nil, errors.New("cannot assert type: publicKey is not of type *ecdsa.PublicKey") + } + + address := crypto.PubkeyToAddress(*publicKeyECDSA) + + return &Account{ + key: privateKey, + addr: address, + nonce: big.NewInt(0), + }, nil +} + func hexStringToBigInt(hexString string) (*big.Int, error) { // Remove the "0x" prefix if present if len(hexString) >= 2 && hexString[:2] == "0x" { @@ -420,7 +478,7 @@ func validateBlock(block map[string]interface{}) error { // Validate specific required fields requiredFields := []string{ "baseFeePerGas", "difficulty", "gasLimit", "gasUsed", - "hash", "number", "timestamp", "parentHash", "totalDifficulty", "miner", + "hash", "number", "timestamp", "parentHash", "miner", } for _, field := range requiredFields { @@ -451,16 +509,6 @@ func validateBlock(block map[string]interface{}) error { return err } - // Validate "totalDifficulty" (must be greater than zero) - if err := validateHexBigInt(block["totalDifficulty"], "totalDifficulty", func(value *big.Int) error { - if value.Cmp(big.NewInt(0)) <= 0 { - return errors.New("totalDifficulty must be greater than zero") - } - return nil - }); err != nil { - return err - } - // Validate "miner" address length (must be 42 characters for Ethereum addresses) if miner, ok := block["miner"].(string); !ok || len(miner) != 42 { return fmt.Errorf("invalid miner address length: %s", miner) @@ -515,8 +563,7 @@ func validateHeader(header map[string]interface{}) error { "baseFeePerGas", "difficulty", "extraData", "gasLimit", "gasUsed", "hash", "logsBloom", "miner", "mixHash", "nonce", "number", "parentHash", "receiptsRoot", - "sha3Uncles", "stateRoot", "timestamp", "totalDifficulty", - "transactionsRoot", + "sha3Uncles", "stateRoot", "timestamp", "transactionsRoot", } for _, field := range requiredFields { @@ -961,7 +1008,7 @@ var testCases = []TestCase{ { Key: "eth_getTransactionCount", PrepareRequest: func(rm *ResponseMap) (*Request, error) { - return NewRequest("eth_getTransactionCount", []interface{}{rm.accounts[0].addr, "latest"}), nil + return NewRequest("eth_getTransactionCount", []interface{}{rm.account.addr, "latest"}), nil }, HandleResponse: func(rm *ResponseMap, resp Response) error { parsed, err := parseResponse[string](resp.Result) @@ -974,7 +1021,7 @@ var testCases = []TestCase{ } // set nonce for accounts[0] - rm.accounts[0].nonce = intValue + rm.account.nonce = intValue return nil }, }, @@ -1038,10 +1085,8 @@ var testCases = []TestCase{ } blockHash, _ := (*block)["hash"].(string) parentHash, _ := (*block)["parentHash"].(string) - totalDifficulty, _ := (*block)["totalDifficulty"].(string) rm.mostRecentBlockHash = common.HexToHash(blockHash) rm.mostRecentBlockParentHash = common.HexToHash(parentHash) - rm.mostRecentBlockTotalDifficulty, _ = hexStringToBigInt(totalDifficulty) return nil }, }, @@ -1060,11 +1105,6 @@ var testCases = []TestCase{ if err != nil { return err } - totalDifficultyHex, _ := (*block)["totalDifficulty"].(string) - totalDifficulty, _ := hexStringToBigInt(totalDifficultyHex) - if rm.mostRecentBlockTotalDifficulty.Cmp(totalDifficulty) <= 0 { - return fmt.Errorf("parent block must always have less total difficulty than child block") - } return nil }, }, @@ -1105,7 +1145,7 @@ var testCases = []TestCase{ { Key: "eth_getBalance", PrepareRequest: func(rm *ResponseMap) (*Request, error) { - return NewRequest("eth_getBalance", []interface{}{rm.accounts[0].addr, "latest"}), nil + return NewRequest("eth_getBalance", []interface{}{rm.account.addr, "latest"}), nil }, HandleResponse: func(rm *ResponseMap, resp Response) error { parsed, err := parseResponse[string](resp.Result) @@ -1301,7 +1341,7 @@ var testCases = []TestCase{ { Key: "Create Transaction Scenario: eth_estimateGas", PrepareRequest: func(rm *ResponseMap) (*Request, error) { - txParams := prepareEstimateGasRequest(rm.accounts[0], generateInputForDeployTestContract(rm.expectedKeyToStoreInContract, rm.expectedValueToStoreInContract)) + txParams := prepareEstimateGasRequest(rm.account, generateInputForDeployTestContract(rm.expectedKeyToStoreInContract, rm.expectedValueToStoreInContract)) return NewRequest("eth_estimateGas", []interface{}{txParams}), nil }, HandleResponse: func(rm *ResponseMap, resp Response) error { @@ -1314,7 +1354,13 @@ var testCases = []TestCase{ return err } - if (*estimatedGas).Cmp(rm.expectedGasToCreateTransaction) != 0 { + upperBound := new(big.Int).Add(rm.expectedGasToCreateTransaction, big.NewInt(5000)) + upperBoundCmp := (*estimatedGas).Cmp(upperBound) + + lowerBound := new(big.Int).Sub(rm.expectedGasToCreateTransaction, big.NewInt(5000)) + lowerBoundCmp := (*estimatedGas).Cmp(lowerBound) + // gas estimation may vary accross environments + if !(upperBoundCmp == -1 && lowerBoundCmp == 1) { return fmt.Errorf("invalid gas estimation: expected %s but actual is %s ", rm.expectedGasToCreateTransaction, estimatedGas) } return nil @@ -1422,7 +1468,7 @@ var testCases = []TestCase{ { Key: "Create Transaction Scenario: eth_fillTransaction", PrepareRequest: func(rm *ResponseMap) (*Request, error) { - txParams := prepareEstimateGasRequest(rm.accounts[0], generateInputForDeployTestContract(rm.expectedKeyToStoreInContract, rm.expectedValueToStoreInContract)) + txParams := prepareEstimateGasRequest(rm.account, generateInputForDeployTestContract(rm.expectedKeyToStoreInContract, rm.expectedValueToStoreInContract)) return NewRequest("eth_fillTransaction", []interface{}{txParams}), nil }, HandleResponse: func(rm *ResponseMap, resp Response) error { @@ -1433,8 +1479,8 @@ var testCases = []TestCase{ if transactionResult.Tx.ChainId().Cmp(rm.chainId) != 0 { return fmt.Errorf("invalid chainid: expect %d received %d", rm.chainId, transactionResult.Tx.ChainId()) } - if transactionResult.Tx.Nonce() != rm.accounts[0].nonce.Uint64() { - return fmt.Errorf("invalid nonce: expect %d received %d", rm.accounts[0].nonce.Uint64(), transactionResult.Tx.Nonce()) + if transactionResult.Tx.Nonce() != rm.account.nonce.Uint64() { + return fmt.Errorf("invalid nonce: expect %d received %d", rm.account.nonce.Uint64(), transactionResult.Tx.Nonce()) } return nil @@ -1450,6 +1496,9 @@ var testCases = []TestCase{ address := common.HexToAddress("0x0000000000000000000000000000000000001001") fromBlock := new(big.Int).Sub(rm.mostRecentBlockNumber, big.NewInt(30000)) + if fromBlock.Cmp(big.NewInt(0)) == -1 { + fromBlock = big.NewInt(0) + } // Create the filter object filter := map[string]interface{}{ "address": address.Hex(), @@ -1491,17 +1540,18 @@ var testCases = []TestCase{ if err != nil { return err } - err = validateStateSyncTxReceipt(*stateSyncTxReceipt) - if err != nil { - return err - } - txIndexHexStringWithoutPrefix := (*stateSyncTxReceipt)["transactionIndex"].(string)[2:] txIndex, err := strconv.ParseInt(txIndexHexStringWithoutPrefix, 16, 0) if err != nil { return fmt.Errorf("error converting hex to int:%s", err) } rm.stateSyncTxIndex = int(txIndex) + + err = validateStateSyncTxReceipt(*stateSyncTxReceipt) + if err != nil { + return err + } + return nil }, }, @@ -1603,14 +1653,13 @@ var testCases = []TestCase{ if err != nil { return err } + rm.stateSyncExpectedBlockTransactionCount = len(*txReceipts) err = handleGetStateSyncBlockReceipts(rm, "eth_getBlockReceipts", txReceipts) if err != nil { return err } - rm.stateSyncExpectedBlockTransactionCount = len(*txReceipts) - return nil }, }, @@ -1662,11 +1711,11 @@ var testCases = []TestCase{ Key: "Create Transaction Scenario: eth_sendRawTransaction", PrepareRequest: func(rm *ResponseMap) (*Request, error) { rm.expectedRawTx = generateRawTransaction( - rm.accounts[0].nonce.Uint64(), + rm.account.nonce.Uint64(), rm.expectedGasToCreateTransaction.Uint64(), rm.gasPrice, generateInputForDeployTestContract(rm.expectedKeyToStoreInContract, rm.expectedValueToStoreInContract), - rm.accounts[0].key, rm.chainId) + rm.account.key, rm.chainId) return NewRequest("eth_sendRawTransaction", []interface{}{rm.expectedRawTx}), nil @@ -1678,8 +1727,8 @@ var testCases = []TestCase{ } rm.pushedTxHash = *txHash - // sleeps 10 seconds to wait until tx is available for next request - time.Sleep(10 * time.Second) + // sleeps 30 seconds to wait until tx is available for next request + time.Sleep(30 * time.Second) return nil }, }, @@ -1687,7 +1736,7 @@ var testCases = []TestCase{ Key: "Create Transaction Scenario: eth_createAccessList", PrepareRequest: func(rm *ResponseMap) (*Request, error) { return NewRequest("eth_createAccessList", - []interface{}{prepareEstimateGasRequest(rm.accounts[0], generateInputForDeployTestContract(rm.expectedKeyToStoreInContract, rm.expectedValueToStoreInContract))}), + []interface{}{prepareEstimateGasRequest(rm.account, generateInputForDeployTestContract(rm.expectedKeyToStoreInContract, rm.expectedValueToStoreInContract))}), nil }, HandleResponse: func(rm *ResponseMap, resp Response) error { @@ -1789,7 +1838,7 @@ var testCases = []TestCase{ "data": fmt.Sprintf("0x%s", hex.EncodeToString(generateInputForCallGetValue(rm.expectedKeyToStoreInContract))), } return NewRequest("eth_call", - []interface{}{txParams}), + []interface{}{txParams, fmt.Sprintf("0x%x", rm.pushedTxBlockNumber)}), nil }, HandleResponse: func(rm *ResponseMap, resp Response) error { @@ -1872,7 +1921,7 @@ var testCases = []TestCase{ Key: "Create Transaction Scenario: eth_getProof", PrepareRequest: func(rm *ResponseMap) (*Request, error) { return NewRequest("eth_getProof", - []interface{}{rm.pushedTxDeployedContractAddress, []string{"0x0"}, "latest"}), + []interface{}{rm.pushedTxDeployedContractAddress, []string{"0x0000000000000000000000000000000000000000000000000000000000000000"}, "latest"}), nil }, HandleResponse: func(rm *ResponseMap, resp Response) error { diff --git a/tests/stress-test/go.mod b/tests/stress-test/go.mod index 1c825c98..13a84847 100644 --- a/tests/stress-test/go.mod +++ b/tests/stress-test/go.mod @@ -34,10 +34,10 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect - golang.org/x/crypto v0.31.0 // indirect + golang.org/x/crypto v0.35.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.28.0 // indirect + golang.org/x/sys v0.30.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/tests/stress-test/go.sum b/tests/stress-test/go.sum index 37d5e48f..45b124f8 100644 --- a/tests/stress-test/go.sum +++ b/tests/stress-test/go.sum @@ -183,8 +183,8 @@ golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -200,11 +200,11 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc 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.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.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.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= 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= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/util-scripts/bor/backfill-state-sync-txs/Makefile b/util-scripts/bor/backfill-state-sync-txs/Makefile new file mode 100644 index 00000000..c842c4ee --- /dev/null +++ b/util-scripts/bor/backfill-state-sync-txs/Makefile @@ -0,0 +1,4 @@ +build: + mkdir -p ./bin/ + go build -o ./bin + @echo "Done building." diff --git a/util-scripts/bor/backfill-state-sync-txs/db.go b/util-scripts/bor/backfill-state-sync-txs/db.go new file mode 100644 index 00000000..bfcecd93 --- /dev/null +++ b/util-scripts/bor/backfill-state-sync-txs/db.go @@ -0,0 +1,33 @@ +package main + +import ( + "encoding/json" + "fmt" + "io" + "os" +) + +// WriteMissingStateSyncTransactions reads the missing StateSyncTxs from file and write on the data path +func WriteMissingStateSyncTransactions(dataPath string, txFile string) { + // Open the file for reading + file, err := os.Open(txFile) + if err != nil { + fmt.Errorf("failed to open file %s: %w", txFile, err) + } + defer file.Close() + + // Read all bytes from the file + data, err := io.ReadAll(file) + if err != nil { + fmt.Errorf("failed to read file %s: %w", txFile, err) + } + + // Unmarshal JSON into the same struct type + var instructions []WriteInstruction + if err := json.Unmarshal(data, &instructions); err != nil { + fmt.Errorf("failed to unmarshal JSON: %w", err) + } + + fmt.Printf("Found %d instructions to write on db", len(instructions)) + DebugWriteKey(dataPath, instructions) +} diff --git a/util-scripts/bor/backfill-state-sync-txs/debug.go b/util-scripts/bor/backfill-state-sync-txs/debug.go new file mode 100644 index 00000000..c5ee294c --- /dev/null +++ b/util-scripts/bor/backfill-state-sync-txs/debug.go @@ -0,0 +1,245 @@ +package main + +import ( + "context" + "encoding/binary" + "encoding/hex" + "fmt" + "log" + "path/filepath" + + "github.com/cockroachdb/pebble" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" + "github.com/ethereum/go-ethereum/rpc" +) + +type ReceiptJustLogs struct { + Logs []*types.Log `json:"logs" gencodec:"required"` +} + +var ( + borTxLookupPrefix = []byte(borTxLookupPrefixStr) + borReceiptPrefix = []byte("matic-bor-receipt-") // borReceiptPrefix + number + block hash -> bor block receipt + +) + +const ( + borTxLookupPrefixStr = "matic-bor-tx-lookup-" +) + +// DebugEncodeBorReceiptKey encodes a bor receipt key for debugging (empty implementation) +func DebugEncodeBorReceiptKey(number uint64, blockHashString string, shouldPrint bool) string { + blockHashString = blockHashString[2:] + hash := common.HexToHash(blockHashString) + enc := make([]byte, 8) + binary.BigEndian.PutUint64(enc, number) + + bytesKey := append(append(borReceiptPrefix, enc...), hash.Bytes()...) + output := fmt.Sprintf("0x%s", common.Bytes2Hex(bytesKey)) + if shouldPrint { + fmt.Println(output) + } + return output + +} + +// DebugEncodeBorTxLookupEntry encodes a bor transaction lookup entry for debugging (empty implementation) +func DebugEncodeBorTxLookupEntry(hashString string, shouldPrint bool) string { + hashString = hashString[2:] + + hash := common.HexToHash(hashString) + bytesKey := append(borTxLookupPrefix, hash.Bytes()...) + + output := fmt.Sprintf("0x%s", common.Bytes2Hex(bytesKey)) + if shouldPrint { + fmt.Println(output) + } + return output +} + +// DebugEncodeBorReceiptValue queries the TX receipt by hash and hex encode it encodes the recept to byte value to be stored on db +func DebugEncodeBorReceiptValue(hashString string, remoteRPCUrl string, shouldPrint bool) string { + hashString = hashString[2:] + txHash := common.HexToHash(hashString) + + ctx := context.Background() + // Connect to the RPC server + client, err := rpc.DialContext(ctx, remoteRPCUrl) + if err != nil { + fmt.Printf("failed to connect to RPC %s: %w\n", remoteRPCUrl, err) + return "" + } + defer client.Close() + + // Prepare the variable to hold the parsed receipt + var receiptJustLogs *ReceiptJustLogs + + // Call eth_getTransactionReceipt and unmarshal into the Receipt struct + err = client.CallContext(ctx, &receiptJustLogs, "eth_getTransactionReceipt", txHash) + if err != nil { + fmt.Printf("failed to get receipt for %s: %w\n", txHash, err) + return "" + } + if shouldPrint { + fmt.Printf("%d\n\n", len(receiptJustLogs.Logs)) + } + + bytes, err := rlp.EncodeToBytes(&types.ReceiptForStorage{ + Status: types.ReceiptStatusSuccessful, // make receipt status successful + Logs: receiptJustLogs.Logs, + }) + if err != nil { + fmt.Printf("Failed to encode bor receipt", "err", err) + } + + output := fmt.Sprintf("0x%s", common.Bytes2Hex(bytes)) + if shouldPrint { + fmt.Printf("\n\nEncoded Bor Receipt:\n\n%s\n", output) + } + return output +} + +// DebugDeleteKey deletes a key in the data store for debugging (empty implementation) +func DebugDeleteKey(dataPath string, key string) { + key = key[2:] + + // Path to Pebble database (chaindata) under the data directory + dbPath := filepath.Join(dataPath, "bor", "chaindata") + db, err := pebble.Open(dbPath, &pebble.Options{}) + if err != nil { + log.Fatalf("Failed to open Pebble DB at %s: %v", dbPath, err) + } + defer db.Close() + + // Decode hex-encoded key + keyBytes, err := hex.DecodeString(key) + if err != nil { + log.Fatalf("Invalid hex key %s: %v", key, err) + } + + // Read value + err = Delete(db, keyBytes) + if err != nil { + if err == pebble.ErrNotFound { + fmt.Printf("Key %s not found in database\n", key) + return + } + log.Fatalf("Error deleting key %s: %v", key, err) + } + fmt.Printf("Successfully deleted the key\n") +} + +// DebugReadKey reads a key from the offline Pebble database. +func DebugReadKey(dataPath string, key string) { + key = key[2:] + + // Path to Pebble database (chaindata) under the data directory + dbPath := filepath.Join(dataPath, "bor", "chaindata") + db, err := pebble.Open(dbPath, &pebble.Options{}) + if err != nil { + log.Fatalf("Failed to open Pebble DB at %s: %v", dbPath, err) + } + defer db.Close() + + // Decode hex-encoded key + keyBytes, err := hex.DecodeString(key) + if err != nil { + log.Fatalf("Invalid hex key %s: %v", key, err) + } + + // Read value + value, err := Get(db, keyBytes) + if err != nil { + if err == pebble.ErrNotFound { + fmt.Printf("Key %s not found in database\n", key) + return + } + log.Fatalf("Error reading key %s: %v", key, err) + } + + // Print value in hex + fmt.Printf("\n\nValue found on key:\n0x%x\n", value) +} + +func DebugWriteKey(dataPath string, writeInstructions []WriteInstruction) { + + // Path to Pebble database (chaindata) under the data directory + dbPath := filepath.Join(dataPath, "bor", "chaindata") + db, err := pebble.Open(dbPath, &pebble.Options{}) + if err != nil { + log.Fatalf("Failed to open Pebble DB at %s: %v", dbPath, err) + } + defer db.Close() + + batch := db.NewBatch() + for _, instruction := range writeInstructions { + key := instruction.Key + value := instruction.Value + + key = key[2:] + value = value[2:] + + // Decode hex-encoded key + keyBytes, err := hex.DecodeString(key) + if err != nil { + log.Fatalf("Invalid hex key %s: %v", key, err) + } + + // Decode hex-encoded key + valueBytes, err := hex.DecodeString(value) + if err != nil { + log.Fatalf("Invalid hex value %s: %v", key, err) + } + + // Read value + err = PutBatch(batch, keyBytes, valueBytes) + if err != nil { + if err == pebble.ErrNotFound { + fmt.Printf("Key %s not found in database\n", key) + return + } + log.Fatalf("Error reading key %s: %v", key, err) + } + } + + if err := WriteBatch(batch); err != nil { + log.Fatalf("Error writing keys: %v", err) + } + + // Print value in hex + fmt.Printf("Successfully write the keys\n") +} + +func Get(db *pebble.DB, key []byte) ([]byte, error) { + dat, closer, err := db.Get(key) + if err != nil { + return nil, err + } + + ret := make([]byte, len(dat)) + copy(ret, dat) + if err = closer.Close(); err != nil { + return nil, err + } + return ret, nil +} + +// Put inserts the given value into the key-value store. +func Put(db *pebble.DB, key []byte, value []byte) error { + return db.Set(key, value, pebble.Sync) +} + +func PutBatch(batch *pebble.Batch, key []byte, value []byte) error { + return batch.Set(key, value, nil) +} + +func WriteBatch(batch *pebble.Batch) error { + return batch.Commit(pebble.Sync) +} + +// Delete removes the key from the key-value store. +func Delete(db *pebble.DB, key []byte) error { + return db.Delete(key, pebble.Sync) +} diff --git a/util-scripts/bor/backfill-state-sync-txs/finder.go b/util-scripts/bor/backfill-state-sync-txs/finder.go new file mode 100644 index 00000000..9db69516 --- /dev/null +++ b/util-scripts/bor/backfill-state-sync-txs/finder.go @@ -0,0 +1,621 @@ +package main + +import ( + "encoding/json" + "errors" + "fmt" + "log" + "math/big" + "net/http" + "os" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" + + "context" + + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" + "github.com/ethereum/go-ethereum/rpc" + + "github.com/ethereum/go-ethereum/common" +) + +/* + +This script gets all the blocks in which state sync txns are present on Matic pos mainnnet chain from polygonscan. It then checks if there are any difference between the no of txns in these blocks on local node vs remote rpc url and reports such occurrences. + +Mainnet API for getting all state sync txs: +https://api.polygonscan.com/api?module=account&action=txlist&address=0x0000000000000000000000000000000000000000&startblock=1&endblock=99999999&page=1&offset=1000&sort=asc&apikey=YourApiKeyToken + + +https://api.polygonscan.com/api?module=account&action=txlist&address=0x0000000000000000000000000000000000000000&startblock=1&endblock=1000&page=1&offset=1000&sort=asc + + + +1. Get all state sync txs in a block range from polygonscan +2. For these txs, check if we have these txs in our localhost bor rpc +3. If no, append output to a file + +*/ + +type PolygonScanResponse struct { + Status string `json:"status"` + Message string `json:"message"` + Result []struct { + BlockNumber string `json:"blockNumber"` + TimeStamp string `json:"timeStamp"` + Hash string `json:"hash"` + Nonce string `json:"nonce"` + BlockHash string `json:"blockHash"` + TransactionIndex string `json:"transactionIndex"` + From string `json:"from"` + To string `json:"to"` + Value string `json:"value"` + Gas string `json:"gas"` + GasPrice string `json:"gasPrice"` + IsError string `json:"isError"` + TxreceiptStatus string `json:"txreceipt_status"` + Input string `json:"input"` + ContractAddress string `json:"contractAddress"` + CumulativeGasUsed string `json:"cumulativeGasUsed"` + GasUsed string `json:"gasUsed"` + Confirmations string `json:"confirmations"` + } `json:"result"` +} + +type Tx struct { + BlockNumber uint64 + BlockHash string + Hash string + StateSyncId string +} + +type TxResponse struct { + Jsonrpc string `json:"jsonrpc"` + ID int `json:"id"` + Result *TxResponseResult `json:"result"` +} + +type TxResponseResult struct { + BlockHash string `json:"blockHash"` + BlockNumber string `json:"blockNumber"` + From string `json:"from"` + Gas string `json:"gas"` + GasPrice string `json:"gasPrice"` + Hash string `json:"hash"` + Input string `json:"input"` + Nonce string `json:"nonce"` + To string `json:"to"` + TransactionIndex string `json:"transactionIndex"` + Value string `json:"value"` + Type string `json:"type"` + V string `json:"v"` + R string `json:"r"` + S string `json:"s"` +} + +type WriteInstruction struct { + Key string `json:"key"` + Value string `json:"value"` +} + +var psCount int +var missingTxs int + +func getStateSyncTxns(ctx context.Context, client *rpc.Client, start, end int, remoteRPCUrl string) ([]Tx, error) { + var txs []Tx + + filter := map[string]interface{}{ + "fromBlock": hexutil.Uint64(start), + "toBlock": hexutil.Uint64(end), + "address": common.HexToAddress("0x0000000000000000000000000000000000001001"), + "topics": [][]common.Hash{{common.HexToHash("0x5a22725590b0a51c923940223f7458512164b1113359a735e86e7f27f44791ee")}}, + } + + var logs []types.Log + if err := client.CallContext(ctx, &logs, "eth_getLogs", filter); err != nil { + return nil, fmt.Errorf("eth_getLogs failed for range (%d,%d): %w", start, end, err) + } + + fmt.Printf("Got records: %d on range(%d, %d)\n", len(logs), start, end) + for _, log := range logs { + txs = append(txs, Tx{ + BlockNumber: log.BlockNumber, + Hash: log.TxHash.Hex(), + BlockHash: log.BlockHash.Hex(), + StateSyncId: log.Topics[1].Hex(), + }) + psCount++ + } + return txs, nil +} + +func PrettyPrint(i interface{}) string { + s, _ := json.MarshalIndent(i, "", "\t") + return string(s) +} + +func FindAllStateSyncTransactions(startBlock, endBlock, interval, batchSize, concurrency uint64, remoteRPCUrl, outputFile string) { + var writeInstructions []WriteInstruction + + file, err := os.OpenFile(outputFile, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o755) + if err != nil { + log.Fatalf("failed to open output file: %v", err) + } + defer file.Close() + + results, err := CheckAllStateSyncTxs(startBlock, endBlock, interval, concurrency, remoteRPCUrl) + if err != nil { + log.Fatalf("error on interval: %v", err) + } + + // Dedup txs and build lookup entries (no RPC needed) + txInserted := make(map[string]struct{}, len(results)) + unique := make([]Tx, 0, len(results)) + for _, tx := range results { + if _, ok := txInserted[tx.Hash]; ok { + continue + } + txInserted[tx.Hash] = struct{}{} + unique = append(unique, tx) + + lookupKey := DebugEncodeBorTxLookupEntry(tx.Hash, false) + lookupValue := fmt.Sprintf("0x%s", common.Bytes2Hex(big.NewInt(0).SetUint64(tx.BlockNumber).Bytes())) + writeInstructions = append(writeInstructions, WriteInstruction{Key: lookupKey, Value: lookupValue}) + } + + // Single RPC client reused across all batches/workers + ctx := context.Background() + client, err := rpc.DialContext(ctx, remoteRPCUrl) + if err != nil { + log.Fatalf("failed to connect to RPC %s: %v", remoteRPCUrl, err) + } + defer client.Close() + + if batchSize <= 0 { + batchSize = 100 + } + // reuse the incoming concurrency param for workers + workerCount := int(concurrency) + if workerCount <= 0 { + workerCount = 8 + } + + // Batched + concurrent receipt fetch+encode + receiptWIs, err := batchedReceipts(ctx, client, unique, int(batchSize), workerCount, false) + if err != nil { + // non-fatal in case some receipts succeeded; choose fatal if you prefer strictness + log.Printf("warnings during batched receipts: %v", err) + } + + // Merge: lookups (already added) + receipt write instructions + writeInstructions = append(writeInstructions, receiptWIs...) + + fmt.Println("Total no of records: ", len(writeInstructions)) + fmt.Println() + + b, err := json.MarshalIndent(writeInstructions, "", " ") + if err != nil { + log.Fatalf("json.MarshalIndent failed: %v", err) + } + if _, err := file.Write(b); err != nil { + log.Fatalf("failed writing output: %v", err) + } + fmt.Println("Data Successfully written: ", outputFile) +} + +// batchedReceipts fetches receipts for txs in batches, concurrently. +func batchedReceipts( + ctx context.Context, + client *rpc.Client, + txs []Tx, + batchSize int, + concurrency int, + shouldPrint bool, +) ([]WriteInstruction, error) { + + type job struct { + chunk []Tx + } + jobs := make(chan job, concurrency*2) + out := make(chan []WriteInstruction, concurrency*2) + errs := make(chan error, concurrency) + + chunks := chunkTxs(txs, batchSize) + totalJobs := len(chunks) + + worker := func() { + defer func() { + // drain panics + if r := recover(); r != nil { + errs <- fmt.Errorf("worker panic: %v", r) + } + }() + + for j := range jobs { + chunk := j.chunk + elems := make([]rpc.BatchElem, len(chunk)) + results := make([]*ReceiptJustLogs, len(chunk)) + + for i, tx := range chunk { + // normalize hash (remove 0x if present) + h := strings.TrimPrefix(tx.Hash, "0x") + txHash := common.HexToHash(h) + results[i] = &ReceiptJustLogs{} + + elems[i] = rpc.BatchElem{ + Method: "eth_getTransactionReceipt", + Args: []interface{}{txHash}, + Result: results[i], + } + } + + // Do one batched call for the chunk + callCtx, cancel := context.WithTimeout(ctx, 30*time.Second) + err := client.BatchCallContext(callCtx, elems) + cancel() + if err != nil { + errs <- fmt.Errorf("batch call failed (%d items): %w", len(chunk), err) + continue + } + + // Build write instructions for every successful element + var wi []WriteInstruction + for i, el := range elems { + tx := chunk[i] + if el.Error != nil { + // upstream might rate-limit or skip unknown receipt; skip but report + errs <- fmt.Errorf("receipt error for %s: %v", tx.Hash, el.Error) + continue + } + // Result is already unmarshaled into results[i] + rjl := results[i] + if rjl == nil || rjl.Logs == nil { + // missing/unknown receipt; skip + continue + } + + // Encode as Bor receipt value (Status forced to successful) + bytes, encErr := rlp.EncodeToBytes(&types.ReceiptForStorage{ + Status: types.ReceiptStatusSuccessful, + Logs: rjl.Logs, + }) + if encErr != nil { + errs <- fmt.Errorf("RLP encode failed for %s: %v", tx.Hash, encErr) + continue + } + + receiptKey := DebugEncodeBorReceiptKey(tx.BlockNumber, tx.BlockHash, false) + receiptValue := fmt.Sprintf("0x%s", common.Bytes2Hex(bytes)) + wi = append(wi, WriteInstruction{Key: receiptKey, Value: receiptValue}) + + if shouldPrint { + fmt.Printf("tx %s -> %d logs\n", tx.Hash, len(rjl.Logs)) + } + } + out <- wi + } + } + + // start workers + var wg sync.WaitGroup + for w := 0; w < concurrency; w++ { + wg.Add(1) + go func() { + defer wg.Done() + worker() + }() + } + + // feed jobs + go func() { + defer close(jobs) + for _, c := range chunks { + jobs <- job{chunk: c} + } + }() + + // close out when workers finish + go func() { + wg.Wait() + close(out) + close(errs) + }() + + // collect results; aggregate errors but don’t fail hard unless you want to + var all []WriteInstruction + var firstErr error + var completed int64 + start := time.Now() + + for out != nil || errs != nil { + select { + case wi, ok := <-out: + if !ok { + out = nil + continue + } + all = append(all, wi...) + // --- progress + ETA --- + done := atomic.AddInt64(&completed, 1) + elapsed := time.Since(start) + remaining := totalJobs - int(done) + + var eta time.Duration + if done > 0 && remaining > 0 { + avgPer := elapsed / time.Duration(done) + eta = time.Duration(remaining) * avgPer + } + + pct := float64(done) / float64(totalJobs) * 100 + log.Printf("progress: %d/%d (%.1f%%), eta: %s", + done, totalJobs, pct, formatETA(eta)) + + case e, ok := <-errs: + if !ok { + errs = nil + continue + } + // keep the first error to surface; others just log + if firstErr == nil { + firstErr = e + } else { + log.Printf("batch worker error: %v", e) + } + } + } + return all, firstErr +} + +// split into a matrix first so we can know totalJobs +func chunkTxs(txs []Tx, batchSize int) [][]Tx { + if batchSize <= 0 { + batchSize = 100 + } + n := len(txs) + if n == 0 { + return nil + } + chunks := make([][]Tx, 0, (n+batchSize-1)/batchSize) + for i := 0; i < n; i += batchSize { + end := i + batchSize + if end > n { + end = n + } + chunks = append(chunks, txs[i:end]) + } + return chunks +} + +// Add this near your other types. +type MissedInterval struct { + Start, End uint64 // missing range [Start..End] + PrevID, NextID uint64 // the neighbors we DID see + PrevBlock, NextBlock uint64 // blocks of those neighbors +} + +// Pretty-printer for the intervals. +func printMissedIntervals(intervals []MissedInterval) { + // Count total missing ids. + var total uint64 + for _, m := range intervals { + total += (m.End - m.Start + 1) + } + + if len(intervals) == 0 { + fmt.Println("Missed State Syncs: none βœ…") + return + } + + fmt.Printf("Missed State Syncs: %d id(s) across %d interval(s)\n\n", total, len(intervals)) + for _, m := range intervals { + if m.Start == m.End { + // Single missing id + fmt.Printf("#%d (prev: #%d @ block %d, next: #%d @ block %d)\n", + m.Start, m.PrevID, m.PrevBlock, m.NextID, m.NextBlock) + } else { + // Range + fmt.Printf("%d–%d (prev: #%d @ block %d, next: #%d @ block %d)\n", + m.Start, m.End, m.PrevID, m.PrevBlock, m.NextID, m.NextBlock) + } + } +} + +// Replace your CheckAllStateSyncTxs with this version. +func CheckAllStateSyncTxs(startBlock, endBlock, interval, concurrency uint64, remoteRPCUrl string) ([]Tx, error) { + results, err := concurrentFetchAllStateSyncTxs(startBlock, endBlock, interval, int(concurrency), remoteRPCUrl) + if err != nil { + return nil, err + } + + // We'll collect everything to preserve original output context. + var alltxs []Tx + + // We detect gaps on the fly, keeping track of the last seen StateSyncId and its block. + var intervals []MissedInterval + var prevID uint64 + var prevBlock uint64 + var havePrev bool + + for i := 0; i < len(results); i++ { + txs := results[i] + alltxs = append(alltxs, txs...) + + for _, tx := range txs { + val, _ := strconv.ParseUint(tx.StateSyncId[2:], 16, 64) + + // Only report gaps after we've seen at least one id. + if havePrev && val > prevID+1 { + intervals = append(intervals, MissedInterval{ + Start: prevID + 1, + End: val - 1, + PrevID: prevID, + NextID: val, + PrevBlock: prevBlock, + NextBlock: tx.BlockNumber, + }) + } + + prevID = val + prevBlock = tx.BlockNumber + havePrev = true + } + } + + fmt.Printf("Total amount of txs in the range: %d\n", len(alltxs)) + if len(alltxs) > 0 { + fmt.Printf("First StateSyncId: %s @ block %d\n", alltxs[0].StateSyncId, alltxs[0].BlockNumber) + last := alltxs[len(alltxs)-1] + fmt.Printf("Last StateSyncId: %s @ block %d\n", last.StateSyncId, last.BlockNumber) + } else { + fmt.Println("First/Last StateSyncId: (no transactions found in range)") + } + + fmt.Println() + printMissedIntervals(intervals) + + if len(intervals) > 0 { + return nil, errors.New("no consecutive interval") + } + return alltxs, nil +} + +func NewRPCClientWithHTTPTimeout(ctx context.Context, url string, timeout time.Duration) (*rpc.Client, error) { + tr := &http.Transport{ + MaxIdleConns: 64, + IdleConnTimeout: 90 * time.Second, + } + httpClient := &http.Client{ + Transport: tr, + Timeout: timeout, // <- global per-request timeout at HTTP layer + } + return rpc.DialOptions(ctx, url, rpc.WithHTTPClient(httpClient)) +} + +func concurrentFetchAllStateSyncTxs(startBlock, endBlock, interval uint64, concurrency int, remoteRPCUrl string) ([][]Tx, error) { + ranges := makeRanges(startBlock, endBlock, interval) + total := len(ranges) + if total == 0 { + return nil, nil + } + + results := make([][]Tx, total) + if concurrency < 1 { + concurrency = 1 + } + + type idxRange struct { + i int + from, to uint64 + } + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client, err := NewRPCClientWithHTTPTimeout(ctx, remoteRPCUrl, 30*time.Second) + if err != nil { + log.Fatalf("failed to connect to RPC %s: %v", remoteRPCUrl, err) + } + defer client.Close() + + jobs := make(chan idxRange) + + var completed int64 + start := time.Now() + + var wg sync.WaitGroup + errOnce := &sync.Once{} + var retErr error + + wg.Add(concurrency) + for w := 0; w < concurrency; w++ { + go func(worker int) { + defer wg.Done() + for j := range jobs { + // Respect global cancellation. + select { + case <-ctx.Done(): + return + default: + } + + txs, err := getStateSyncTxns(ctx, client, int(j.from), int(j.to), remoteRPCUrl) + if err != nil { + // First error wins: log and cancel everyone. + errOnce.Do(func() { + retErr = fmt.Errorf("code stopped: worker %d failed for range (%d,%d): %w", worker, j.from, j.to, err) + log.Printf("%v", retErr) + cancel() + }) + return + } + results[j.i] = txs + + // Progress / ETA + done := atomic.AddInt64(&completed, 1) + elapsed := time.Since(start) + remaining := total - int(done) + + var eta time.Duration + if done > 0 && remaining > 0 { + avgPer := elapsed / time.Duration(done) + eta = time.Duration(remaining) * avgPer + } + pct := float64(done) / float64(total) * 100 + log.Printf("progress: %d/%d (%.1f%%), eta: %s", done, total, pct, formatETA(eta)) + } + }(w) + } + + for i, r := range ranges { + select { + case <-ctx.Done(): + break + default: + jobs <- idxRange{i: i, from: r[0], to: r[1]} + } + } + close(jobs) + wg.Wait() + + if retErr != nil { + return nil, retErr + } + return results, nil +} + +// Helper to format durations as HH:MM:SS +func formatETA(d time.Duration) string { + if d <= 0 { + return "00:00:00" + } + h := int(d.Hours()) + m := int(d.Minutes()) % 60 + s := int(d.Seconds()) % 60 + return fmt.Sprintf("%02d:%02d:%02d", h, m, s) +} + +func makeRanges(startBlock, endBlock, interval uint64) [][2]uint64 { + if interval == 0 { + interval = 1 + } + var out [][2]uint64 + for s := startBlock; s <= endBlock; { + // Use inclusive upper bound and cap to endBlock + to := s + interval - 1 + if to > endBlock { + to = endBlock + } + out = append(out, [2]uint64{s, to}) + + if to == endBlock { + break + } + s = to + 1 + } + return out +} diff --git a/util-scripts/bor/backfill-state-sync-txs/go.mod b/util-scripts/bor/backfill-state-sync-txs/go.mod new file mode 100644 index 00000000..4153544e --- /dev/null +++ b/util-scripts/bor/backfill-state-sync-txs/go.mod @@ -0,0 +1,56 @@ +module backfill-state-sync-txs + +go 1.24.3 + +require ( + github.com/cockroachdb/pebble v1.1.5 + github.com/ethereum/go-ethereum v1.16.1 +) + +require ( + github.com/DataDog/zstd v1.4.5 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/StackExchange/wmi v1.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bits-and-blooms/bitset v1.20.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-20240606204812-0bbfbd93a7ce // 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/gnark-crypto v0.18.0 // indirect + github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect + github.com/ethereum/go-verkle v0.2.2 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/gorilla/websocket v1.4.2 // indirect + github.com/holiman/uint256 v1.3.2 // indirect + github.com/klauspost/compress v1.16.0 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_golang v1.15.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.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/supranational/blst v0.3.14 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + golang.org/x/crypto v0.36.0 // indirect + golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect + golang.org/x/sync v0.12.0 // indirect + golang.org/x/sys v0.31.0 // indirect + golang.org/x/text v0.23.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect +) diff --git a/util-scripts/bor/backfill-state-sync-txs/go.sum b/util-scripts/bor/backfill-state-sync-txs/go.sum new file mode 100644 index 00000000..10f5cb9e --- /dev/null +++ b/util-scripts/bor/backfill-state-sync-txs/go.sum @@ -0,0 +1,176 @@ +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +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.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= +github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= +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.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3MdfoPyRVU= +github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +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/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-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/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 v1.1.5 h1:5AAWCBWbat0uE0blr8qzufZP5tBjkRyy/jWe1QWLnvw= +github.com/cockroachdb/pebble v1.1.5/go.mod h1:17wO9el1YEigxkP/YtV8NtCivQDgoCyBg5c4VR/eOWo= +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/gnark-crypto v0.18.0 h1:vIye/FqI50VeAr0B3dx+YjeIvmc3LWz4yEfbWBpTUf0= +github.com/consensys/gnark-crypto v0.18.0/go.mod h1:L3mXGFTe1ZN+RSJ+CLjUt9x7PNdx8ubaYfDROyp2Z8c= +github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI= +github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +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.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/ethereum/c-kzg-4844/v2 v2.1.0 h1:gQropX9YFBhl3g4HYhwE70zq3IHFRgbbNPw0Shwzf5w= +github.com/ethereum/c-kzg-4844/v2 v2.1.0/go.mod h1:TC48kOKjJKPbN7C++qIgt0TJzZ70QznYR7Ob+WXl57E= +github.com/ethereum/go-ethereum v1.16.1 h1:7684NfKCb1+IChudzdKyZJ12l1Tq4ybPZOITiCDXqCk= +github.com/ethereum/go-ethereum v1.16.1/go.mod h1:ngYIvmMAYdo4sGW9cGzLvSsPGhDOOzL0jK5S5iXpj0g= +github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8= +github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= +github.com/ferranbt/fastssz v0.1.2 h1:Dky6dXlngF6Qjc+EfDipAkE83N5I5DE68bY6O0VLNPk= +github.com/ferranbt/fastssz v0.1.2/go.mod h1:X5UPrE2u1UJjxHA8X54u04SBwdAQjG2sFtWs39YxyWs= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +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-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/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= +github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +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.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +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= +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/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= +github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= +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/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +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.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.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= +github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= +github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +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.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +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/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/sync v0.0.0-20181221193216-37e7f081c4d4/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.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/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-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +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.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +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/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/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/util-scripts/bor/backfill-state-sync-txs/main.go b/util-scripts/bor/backfill-state-sync-txs/main.go new file mode 100644 index 00000000..604748ed --- /dev/null +++ b/util-scripts/bor/backfill-state-sync-txs/main.go @@ -0,0 +1,136 @@ +package main + +import ( + "flag" + "fmt" + "os" +) + +func main() { + if len(os.Args) < 2 { + fmt.Println("Expected a subcommand: 'find-all-state-sync-tx', 'write-missing-state-sync-tx', 'debug-delete-key', 'debug-read-key', 'debug-write-key','debug-encode-bor-receipt-key', 'debug-check-all-state-sync-tx', or 'debug-encode-bor-tx-lookup-entry'.") + os.Exit(1) + } + + switch os.Args[1] { + case "find-all-state-sync-tx": + findCmd := flag.NewFlagSet("find-all-state-sync-tx", flag.ExitOnError) + startBlock := findCmd.Uint64("start-block", 0, "Start block number") + endBlock := findCmd.Uint64("end-block", 0, "End block number") + interval := findCmd.Uint64("interval", 0, "Block Interval for queries") + batchSize := findCmd.Uint64("batch-size", 0, "RPC Batch size for receipt retrieval") + concurrency := findCmd.Uint64("concurrency", 1, "Concurrency limit") + remoteRPC := findCmd.String("remote-rpc", "", "Source-of-truth RPC URL") + outputFile := findCmd.String("output-file", "", "Path to output file") + findCmd.Parse(os.Args[2:]) + + if *remoteRPC == "" || *outputFile == "" { + findCmd.Usage() + os.Exit(1) + } + FindAllStateSyncTransactions(*startBlock, *endBlock, *interval, *batchSize, *concurrency, *remoteRPC, *outputFile) + + case "write-missing-state-sync-tx": + writeCmd := flag.NewFlagSet("write-missing-state-sync-tx", flag.ExitOnError) + dataPath := writeCmd.String("data-path", "", "Path to data directory") + txFile := writeCmd.String("state-missing-transactions-file", "", "File containing missing transactions") + writeCmd.Parse(os.Args[2:]) + + if *dataPath == "" || *txFile == "" { + writeCmd.Usage() + os.Exit(1) + } + WriteMissingStateSyncTransactions(*dataPath, *txFile) + + case "debug-delete-key": + delCmd := flag.NewFlagSet("debug-delete-key", flag.ExitOnError) + dataPath := delCmd.String("data-path", "", "Path to data directory") + key := delCmd.String("key", "", "Hex-encoded key") + delCmd.Parse(os.Args[2:]) + + if *dataPath == "" || *key == "" { + delCmd.Usage() + os.Exit(1) + } + DebugDeleteKey(*dataPath, *key) + + case "debug-read-key": + readCmd := flag.NewFlagSet("debug-read-key", flag.ExitOnError) + dataPath := readCmd.String("data-path", "", "Path to data directory") + key := readCmd.String("key", "", "Hex-encoded key") + readCmd.Parse(os.Args[2:]) + + if *dataPath == "" || *key == "" { + readCmd.Usage() + os.Exit(1) + } + DebugReadKey(*dataPath, *key) + + case "debug-write-key": + writeCmd := flag.NewFlagSet("debug-write-key", flag.ExitOnError) + dataPath := writeCmd.String("data-path", "", "Path to data directory") + key := writeCmd.String("key", "", "Hex-encoded key") + value := writeCmd.String("value", "", "Hex-encoded value") + writeCmd.Parse(os.Args[2:]) + + if *dataPath == "" || *key == "" || *value == "" { + writeCmd.Usage() + os.Exit(1) + } + DebugWriteKey(*dataPath, []WriteInstruction{{Key: *key, Value: *value}}) + + case "debug-encode-bor-receipt-key": + recCmd := flag.NewFlagSet("debug-encode-bor-receipt-key", flag.ExitOnError) + number := recCmd.Uint64("number", 0, "Block number") + hash := recCmd.String("hash", "", "Block hash") + recCmd.Parse(os.Args[2:]) + + if *hash == "" { + recCmd.Usage() + os.Exit(1) + } + DebugEncodeBorReceiptKey(*number, *hash, true) + + case "debug-encode-bor-tx-lookup-entry": + txCmd := flag.NewFlagSet("debug-encode-bor-tx-lookup-entry", flag.ExitOnError) + hash := txCmd.String("hash", "", "Transaction hash") + txCmd.Parse(os.Args[2:]) + + if *hash == "" { + txCmd.Usage() + os.Exit(1) + } + DebugEncodeBorTxLookupEntry(*hash, true) + + case "debug-encode-bor-receipt-value": + receiptValueCmd := flag.NewFlagSet("debug-encode-bor-receipt-value", flag.ExitOnError) + hash := receiptValueCmd.String("hash", "", "Transaction hash") + remoteRPC := receiptValueCmd.String("remote-rpc", "", "RPC Server") + receiptValueCmd.Parse(os.Args[2:]) + + if *hash == "" { + receiptValueCmd.Usage() + os.Exit(1) + } + DebugEncodeBorReceiptValue(*hash, *remoteRPC, true) + + case "debug-check-all-state-sync-tx": + checkAllStateSyncCmd := flag.NewFlagSet("debug-check-all-state-sync-tx", flag.ExitOnError) + startBlock := checkAllStateSyncCmd.Uint64("start-block", 0, "Start block number") + endBlock := checkAllStateSyncCmd.Uint64("end-block", 0, "End block number") + interval := checkAllStateSyncCmd.Uint64("interval", 0, "Block Interval for queries") + concurrency := checkAllStateSyncCmd.Uint64("concurrency", 1, "Concurrency calls") + remoteRPC := checkAllStateSyncCmd.String("remote-rpc", "", "Source-of-truth RPC URL") + checkAllStateSyncCmd.Parse(os.Args[2:]) + + if *remoteRPC == "" { + checkAllStateSyncCmd.Usage() + os.Exit(1) + } + CheckAllStateSyncTxs(*startBlock, *endBlock, *interval, *concurrency, *remoteRPC) + + default: + fmt.Printf("Unknown subcommand: %s\n", os.Args[1]) + os.Exit(1) + } +} diff --git a/util-scripts/bor/backfill-state-sync-txs/readme.md b/util-scripts/bor/backfill-state-sync-txs/readme.md new file mode 100644 index 00000000..48f1cf33 --- /dev/null +++ b/util-scripts/bor/backfill-state-sync-txs/readme.md @@ -0,0 +1,66 @@ +## Backfill State Sync Tx Tools + +### Debug Methods + +"" must be the same one set on the bor's config as datadir. + +1. debug-read-key + Input + +``` +./bin/backfill-state-sync-txs debug-read-key --data-path "" --key 0x6d617469632d626f722d74782d6c6f6f6b75702da51758acfc662beb5e297f78210ddf2b4026b83bd4f154850dba4cabf610eded +``` + +2. debug-delete-key + Input + +``` +./bin/backfill-state-sync-txs debug-delete-key --data-path "" --key 0x6d617469632d626f722d74782d6c6f6f6b75702da51758acfc662beb5e297f78210ddf2b4026b83bd4f154850dba4cabf610eded +``` + +3. debug-write-key + +Input + +``` +./bin/backfill-state-sync-txs debug-write-key --data-path "" --key 0x6d617469632d626f722d74782d6c6f6f6b75702da51758acfc662beb5e297f78210ddf2b4026b83bd4f154850dba4cabf610eded --value 0x000000000000000000000000000000000000000000000000000000000000000000000000 +``` + +4. debug-encode-bor-receipt-key + +Input + +``` +./bin/backfill-state-sync-txs debug-encode-bor-receipt-key --number 74667488 --hash 0x38623e33fa0f94dd9276b7d44ea589608085b56c8fc87950612562b09e18b896 +``` + +5. debug-encode-bor-tx-lookup-entry + +Input + +``` +./bin/backfill-state-sync-txs debug-encode-bor-tx-lookup-entry --hash 0xc048ab4888a7d0c044b85e3371b775efbeb7a7b9d93a1d229ee1b039150c3289 +``` + +6. debug-encode-bor-receipt-value + +Input + +``` +./bin/backfill-state-sync-txs debug-encode-bor-receipt-value --hash 0x38623e33fa0f94dd9276b7d44ea589608085b56c8fc87950612562b09e18b896 --remote-rpc localhost:8545 +``` + +7. write-missing-state-sync-tx + +Input + +``` +./bin/backfill-state-sync-txs write-missing-state-sync-tx --data-path "" --state-missing-transactions-file "./dump_instructions.json" +``` + +8. find-all-state-sync-tx + Input + +``` +./bin/backfill-state-sync-txs find-all-state-sync-tx --start-block "" --end-block "" --interval "" --remote-rpc "" --output-file "" +``` diff --git a/util-scripts/bor/calculators/README.md b/util-scripts/bor/calculators/README.md new file mode 100644 index 00000000..55a656a4 --- /dev/null +++ b/util-scripts/bor/calculators/README.md @@ -0,0 +1,45 @@ +# πŸ› οΈ Bor Calculators + +## πŸ” What's Inside + +| Script | Description | +| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `avg_blocktime/main.go` | Calculates the average block time over the last 40k, 280k, 560k, and 1.12M blocks on the Bor chain. Useful for chain health monitoring and block production analysis. | +| `hf_block/main.go` | Predicts the block height corresponding to a future target UTC time given an assumed average block time for the Bor chain (e.g. planning for hard forks or upgrades). | + +--- + +## πŸš€ Quick Start + +### Example 1: Calculate Bor Average Block Times + +```bash +cd avg_blocktime +go run main.go +# OR +go run main.go [-rpc=] +# Example: +go run main.go -rpc="https://polygon-rpc.com" +``` + +This script + +- Fetches the latest block height and timestamp from Bor RPC +- For each lookback (40k, 280k, 560k, 1.12M blocks), fetches a past block +- Prints elapsed time (days/hours/minutes/seconds) and average block time in seconds + +### Example 2: Predict Bor Block Height at a Future Time + +```bash +cd hf_block +go run main.go -target= -avg="AVG_SECONDS" [-rpc=] +# Example: +go run main.go-target="2025-10-07T14:00:00Z" -avg=2.156 +``` + +This script + +- Fetches the latest block height and timestamp from Bor RPC +- Uses a configurable target UTC timestamp and average block time +- Calculates how many blocks fit in the delta between now and target +- Prints the predicted block height and time delta diff --git a/util-scripts/bor/calculators/avg_blocktime/main.go b/util-scripts/bor/calculators/avg_blocktime/main.go new file mode 100644 index 00000000..18351d9e --- /dev/null +++ b/util-scripts/bor/calculators/avg_blocktime/main.go @@ -0,0 +1,145 @@ +package main + +import ( + "bor_calculators/utils" + "context" + "flag" + "fmt" + "math" + "net/http" + "os" +) + +func main() { + rpcURL := flag.String("rpc", utils.DefaultRPC, "Polygon (Bor) JSON-RPC endpoint") + flag.Parse() + + client := &http.Client{Timeout: utils.HttpTimeout} + ctx := context.Background() + + // 1) latest block n + n, err := utils.GetLatestBlockNumber(ctx, client, *rpcURL) + if err != nil { + _, _ = fmt.Fprintf(os.Stderr, "error: get latest block number: %v\n", err) + os.Exit(1) + } + + // 2) targets {n, n-40000, n-280000, n-560000, n-1120000} + targets := []target{ + {kind: "relative", delta: 0}, + {kind: "relative", delta: -40000}, + {kind: "relative", delta: -280000}, + {kind: "relative", delta: -560000}, + {kind: "relative", delta: -1120000}, + } + + // Resolve valid heights (skip negatives/future) + var heights []uint64 + for _, t := range targets { + if h, ok := t.resolve(n); ok { + heights = append(heights, h) + } + } + + // Fetch timestamps + type info struct { + height uint64 + timestamp uint64 + } + infos := make(map[uint64]info) + for _, h := range heights { + ts, err := utils.GetBlockTimestamp(ctx, client, *rpcURL, h) + if err != nil { + _, _ = fmt.Fprintf(os.Stderr, "warning: failed to fetch block %d: %v\n", h, err) + continue + } + infos[h] = info{height: h, timestamp: ts} + } + + // Ensure n present + nTS, ok := func() (uint64, bool) { + if x, ok := infos[n]; ok { + return x.timestamp, true + } + ts, err := utils.GetBlockTimestamp(ctx, client, *rpcURL, n) + if err != nil { + return 0, false + } + infos[n] = info{height: n, timestamp: ts} + return ts, true + }() + if !ok { + _, _ = fmt.Fprintf(os.Stderr, "error: failed to fetch latest block %d timestamp\n", n) + os.Exit(1) + } + + // 5) Pretty header for the current block + fmt.Printf("Current block: %s β€” %s (UTC)\n", + utils.WithCommas(n), + utils.IsoTime(infos[n].timestamp), + ) + + // 6) Pretty per-reference output + for _, t := range targets { + h, ok := t.resolve(n) + if !ok || h == n { + continue + } + src, ok := infos[h] + if !ok { + continue + } + + blockDiff := int64(n) - int64(h) + secDiff := int64(nTS) - int64(src.timestamp) + avg := math.NaN() + if blockDiff != 0 { + avg = float64(secDiff) / float64(blockDiff) + } + + // First line: Ξ” from () β†’ + deltaLabel := fmt.Sprintf("Ξ”%d", blockDiff) // no commas to match the inspiration + fmt.Printf("\n%-10s from height %s (%s) \u2192 %s\n", + deltaLabel, + utils.WithCommas(h), + utils.IsoTime(src.timestamp), + utils.WithCommas(n), + ) + + // Second line: elapsed (as 0d Xh Ym Zs, always showing units) + fmt.Printf(" elapsed : %s\n", utils.ElapsedDHMS(secDiff)) + + // Third line: avg block time (seconds and milliseconds) + fmt.Printf(" avg block : %.6f s/block (%.3f ms)\n", + avg, + avg*1000.0, + ) + } +} + +type target struct { + kind string // "relative" or "absolute" + delta int64 // for relative + value uint64 // for absolute +} + +func (t target) resolve(n uint64) (uint64, bool) { + switch t.kind { + case "relative": + if t.delta >= 0 { + return n + uint64(t.delta), true + } + d := uint64(-t.delta) + if d > n { + return 0, false + } + return n - d, true + case "absolute": + if t.value > n { + return 0, false + } + return t.value, true + default: + return 0, false + } +} diff --git a/util-scripts/bor/calculators/go.mod b/util-scripts/bor/calculators/go.mod new file mode 100644 index 00000000..aa89cde9 --- /dev/null +++ b/util-scripts/bor/calculators/go.mod @@ -0,0 +1,3 @@ +module bor_calculators + +go 1.24.6 diff --git a/util-scripts/bor/calculators/hf_block/main.go b/util-scripts/bor/calculators/hf_block/main.go new file mode 100644 index 00000000..89c60683 --- /dev/null +++ b/util-scripts/bor/calculators/hf_block/main.go @@ -0,0 +1,229 @@ +package main + +import ( + "bor_calculators/utils" + "bytes" + "context" + "encoding/json" + "errors" + "flag" + "fmt" + "math" + "math/big" + "net/http" + "os" + "strings" + "time" +) + +func main() { + rpcURL := flag.String("rpc", utils.DefaultRPC, "Polygon (Bor) JSON-RPC endpoint") + targetStr := flag.String("target", "", "Target time in RFC3339 or RFC3339Nano (UTC)") + avgSecs := flag.Float64("avg", 0, "Average block time in seconds (e.g., 2.15)") + flag.Parse() + if *targetStr == "" || *avgSecs == 0 { + fmt.Printf("Please pass a target and average as arguments of the script, e.g.:\n go run main.go -target=\"2025-10-07T14:00:00Z\" -avg=2.156\n") + return + } + + client := &http.Client{Timeout: utils.HttpTimeout} + ctx := context.Background() + + // 1) Fetch current block height and timestamp + n, err := getLatestBlockNumber(ctx, client, *rpcURL) + if err != nil { + failf("get latest block number: %v", err) + } + curTS, err := getBlockTimestamp(ctx, client, *rpcURL, n) + if err != nil { + failf("get timestamp for current block %d: %v", n, err) + } + now := time.Unix(int64(curTS), 0).UTC() + + // 2) Parse target time + target, err := parseTarget(*targetStr) + if err != nil { + failf("parse target time: %v", err) + } + + // 3) Calculate time delta + delta := target.Sub(now) + deltaSeconds := delta.Seconds() + + // 4) Estimate the number of blocks + avg := *avgSecs + blocksFloat := deltaSeconds / avg + blocksRounded := int64(math.Round(blocksFloat)) + + // 5) Predicted height + predicted := int64(n) + blocksRounded + if predicted < 0 { + predicted = 0 + } + + // 6) Pretty print + fmt.Printf("Current block : %s β€” %s (UTC)\n", withCommas(n), now.Format(time.RFC3339)) + fmt.Printf("Target time : %s (UTC)\n", target.Format(time.RFC3339)) + fmt.Printf("Avg block : %.6f s\n", avg) + + sign := "+" + if delta < 0 { + sign = "-" + } + fmt.Printf("\nΞ”time : %s%s (%s s)\n", sign, elapsedDHMS(delta), withCommasUint64(uint64(math.Abs(deltaSeconds)))) + fmt.Printf("Estimated Ξ”blk: %s%s (rounded) β€” %.3f (exact)\n", sign, withCommasInt64(absInt64(blocksRounded)), blocksFloat) + + fmt.Printf("\nPredicted block at target:\n") + fmt.Printf(" height : %s\n", withCommasUint64(uint64(predicted))) +} + +func parseTarget(s string) (time.Time, error) { + // Try RFC3339Nano first, then RFC3339 + if t, err := time.Parse(time.RFC3339Nano, s); err == nil { + return t.UTC(), nil + } + if t, err := time.Parse(time.RFC3339, s); err == nil { + return t.UTC(), nil + } + return time.Time{}, fmt.Errorf("unsupported time format %q (use RFC3339/RFC3339Nano, e.g. 2025-10-07T14:00:00Z)", s) +} + +func getLatestBlockNumber(ctx context.Context, client *http.Client, rpcURL string) (uint64, error) { + var hex string + if err := rpcCall(ctx, client, rpcURL, "eth_blockNumber", []interface{}{}, &hex); err != nil { + return 0, err + } + return hexToUint64(hex) +} + +func getBlockTimestamp(ctx context.Context, client *http.Client, rpcURL string, height uint64) (uint64, error) { + hexHeight := fmt.Sprintf("0x%x", height) + params := []interface{}{hexHeight, false} + var respBlock *utils.Block + if err := rpcCall(ctx, client, rpcURL, "eth_getBlockByNumber", params, &respBlock); err != nil { + return 0, err + } + if respBlock == nil || respBlock.Timestamp == "" { + return 0, fmt.Errorf("empty block/timestamp for height %d", height) + } + return hexToUint64(respBlock.Timestamp) +} + +func rpcCall[T any](ctx context.Context, client *http.Client, rpcURL, method string, params []interface{}, out *T) error { + var lastErr error + for attempt := 0; attempt < utils.MaxRetries; attempt++ { + reqBody := utils.RpcRequest{ + JSONRPC: utils.JsonrpcVer, + Method: method, + Params: params, + ID: 1, + } + b, _ := json.Marshal(reqBody) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, rpcURL, bytes.NewReader(b)) + if err != nil { + return err + } + req.Header.Set("Content-Type", "application/json") + + resp, err := client.Do(req) + if err != nil { + lastErr = err + time.Sleep(utils.RetryBackoff * time.Duration(attempt+1)) + continue + } + + var decoded utils.RpcResponse[T] + dec := json.NewDecoder(resp.Body) + err = dec.Decode(&decoded) + _ = resp.Body.Close() + if err != nil { + lastErr = err + time.Sleep(utils.RetryBackoff * time.Duration(attempt+1)) + continue + } + if decoded.Error != nil { + lastErr = errors.New(decoded.Error.Message) + time.Sleep(utils.RetryBackoff * time.Duration(attempt+1)) + continue + } + *out = decoded.Result + return nil + } + return fmt.Errorf("rpc %s failed after %d attempts: %v", method, utils.MaxRetries, lastErr) +} + +func hexToUint64(h string) (uint64, error) { + if strings.HasPrefix(h, "0x") || strings.HasPrefix(h, "0X") { + h = h[2:] + } + if h == "" { + return 0, fmt.Errorf("empty hex string") + } + bi := new(big.Int) + if _, ok := bi.SetString(h, 16); !ok { + return 0, fmt.Errorf("invalid hex %q", h) + } + if bi.Sign() < 0 || !bi.IsUint64() { + return 0, fmt.Errorf("hex %q out of uint64 range", h) + } + return bi.Uint64(), nil +} + +func withCommas(u uint64) string { return withCommasUint64(u) } + +func withCommasUint64(u uint64) string { + s := fmt.Sprintf("%d", u) + n := len(s) + if n <= 3 { + return s + } + var b strings.Builder + pre := n % 3 + if pre == 0 { + pre = 3 + } + b.WriteString(s[:pre]) + for i := pre; i < n; i += 3 { + b.WriteByte(',') + b.WriteString(s[i : i+3]) + } + return b.String() +} + +func withCommasInt64(v int64) string { + if v < 0 { + return "-" + withCommasUint64(uint64(-v)) + } + return withCommasUint64(uint64(v)) +} + +func absInt64(v int64) int64 { + if v < 0 { + return -v + } + return v +} + +func elapsedDHMS(d time.Duration) string { + neg := d < 0 + if neg { + d = -d + } + totalSec := int64(d.Seconds()) + dd := totalSec / 86400 + r := totalSec % 86400 + hh := r / 3600 + r %= 3600 + mm := r / 60 + ss := r % 60 + prefix := "" + if neg { + prefix = "-" + } + return fmt.Sprintf("%s%dd %dh %dm %ds", prefix, dd, hh, mm, ss) +} + +func failf(format string, a ...any) { + _, _ = fmt.Fprintf(os.Stderr, "error: "+format+"\n", a...) + os.Exit(1) +} diff --git a/util-scripts/bor/calculators/utils/common.go b/util-scripts/bor/calculators/utils/common.go new file mode 100644 index 00000000..ad975183 --- /dev/null +++ b/util-scripts/bor/calculators/utils/common.go @@ -0,0 +1,160 @@ +package utils + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "math/big" + "net/http" + "strings" + "time" +) + +const ( + DefaultRPC = "https://polygon-rpc.com" + JsonrpcVer = "2.0" + HttpTimeout = 20 * time.Second + MaxRetries = 3 + RetryBackoff = 600 * time.Millisecond +) + +type RpcRequest struct { + JSONRPC string `json:"jsonrpc"` + Method string `json:"method"` + Params []interface{} `json:"params"` + ID int `json:"id"` +} + +type RpcResponse[T any] struct { + JSONRPC string `json:"jsonrpc"` + ID int `json:"id"` + Result T `json:"result"` + Error *struct { + Code int `json:"code"` + Message string `json:"message"` + } `json:"error,omitempty"` +} + +type Block struct { + Number string `json:"number"` + Timestamp string `json:"timestamp"` +} + +func GetLatestBlockNumber(ctx context.Context, client *http.Client, rpcURL string) (uint64, error) { + var hex string + if err := RpcCall(ctx, client, rpcURL, "eth_blockNumber", []interface{}{}, &hex); err != nil { + return 0, err + } + return HexToUint64(hex) +} + +func GetBlockTimestamp(ctx context.Context, client *http.Client, rpcURL string, height uint64) (uint64, error) { + hexHeight := fmt.Sprintf("0x%x", height) + params := []interface{}{hexHeight, false} + var respBlock *Block + if err := RpcCall(ctx, client, rpcURL, "eth_getBlockByNumber", params, &respBlock); err != nil { + return 0, err + } + if respBlock == nil || respBlock.Timestamp == "" { + return 0, fmt.Errorf("empty block/timestamp for height %d", height) + } + return HexToUint64(respBlock.Timestamp) +} + +func RpcCall[T any](ctx context.Context, client *http.Client, rpcURL, method string, params []interface{}, out *T) error { + var lastErr error + for attempt := 0; attempt < MaxRetries; attempt++ { + reqBody := RpcRequest{ + JSONRPC: JsonrpcVer, + Method: method, + Params: params, + ID: 1, + } + b, _ := json.Marshal(reqBody) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, rpcURL, bytes.NewReader(b)) + if err != nil { + return err + } + req.Header.Set("Content-Type", "application/json") + + resp, err := client.Do(req) + if err != nil { + lastErr = err + time.Sleep(RetryBackoff * time.Duration(attempt+1)) + continue + } + + var decoded RpcResponse[T] + dec := json.NewDecoder(resp.Body) + err = dec.Decode(&decoded) + _ = resp.Body.Close() + if err != nil { + lastErr = err + time.Sleep(RetryBackoff * time.Duration(attempt+1)) + continue + } + if decoded.Error != nil { + lastErr = errors.New(decoded.Error.Message) + time.Sleep(RetryBackoff * time.Duration(attempt+1)) + continue + } + *out = decoded.Result + return nil + } + return fmt.Errorf("rpc %s failed after %d attempts: %v", method, MaxRetries, lastErr) +} + +func HexToUint64(h string) (uint64, error) { + if strings.HasPrefix(h, "0x") || strings.HasPrefix(h, "0X") { + h = h[2:] + } + if h == "" { + return 0, fmt.Errorf("empty hex string") + } + bi := new(big.Int) + if _, ok := bi.SetString(h, 16); !ok { + return 0, fmt.Errorf("invalid hex %q", h) + } + if bi.Sign() < 0 || !bi.IsUint64() { + return 0, fmt.Errorf("hex %q out of uint64 range", h) + } + return bi.Uint64(), nil +} + +func WithCommas(u uint64) string { + s := fmt.Sprintf("%d", u) + n := len(s) + if n <= 3 { + return s + } + var b strings.Builder + pre := n % 3 + if pre == 0 { + pre = 3 + } + b.WriteString(s[:pre]) + for i := pre; i < n; i += 3 { + b.WriteByte(',') + b.WriteString(s[i : i+3]) + } + return b.String() +} + +func IsoTime(unixSec uint64) string { + return time.Unix(int64(unixSec), 0).UTC().Format(time.RFC3339) +} + +func ElapsedDHMS(totalSec int64) string { + if totalSec < 0 { + totalSec = -totalSec + } + d := totalSec / 86400 + r := totalSec % 86400 + h := r / 3600 + r %= 3600 + m := r / 60 + s := r % 60 + return fmt.Sprintf("%dd %dh %dm %ds", d, h, m, s) +} diff --git a/docker_devnet.sh b/util-scripts/docker/devnet_setup.sh similarity index 51% rename from docker_devnet.sh rename to util-scripts/docker/devnet_setup.sh index 98b2a39d..c5d47230 100755 --- a/docker_devnet.sh +++ b/util-scripts/docker/devnet_setup.sh @@ -2,8 +2,8 @@ # Run the devnet - Consolidated script -# Start Ganache -bash docker-ganache-start.sh || { echo "Failed to start Ganache"; exit 1; } +# Start Anvil +bash docker-anvil-start.sh || { echo "Failed to start Anvil"; exit 1; } # Start Heimdall bash docker-heimdall-start-all.sh || { echo "Failed to start Heimdall"; exit 1; } @@ -14,10 +14,12 @@ bash docker-bor-setup.sh || { echo "Failed to setup Bor"; exit 1; } # Start Bor bash docker-bor-start-all.sh || { echo "Failed to start Bor"; exit 1; } -# Deploy Bor to Ganache -bash ganache-deployment-bor.sh || { echo "Failed to deploy Bor to Ganache"; exit 1; } +sleep 2m -# Sync Ganache deployment -bash ganache-deployment-sync.sh || { echo "Failed to sync Ganache deployment"; exit 1; } +# Deploy contracts on Bor +bash anvil-deployment-bor.sh || { echo "Failed to deploy contracts on Bor"; exit 1; } + +# Sync Bor contracts deployment +bash anvil-deployment-sync.sh || { echo "Failed to sync Bor contracts deployment"; exit 1; } echo "Devnet setup complete." diff --git a/util-scripts/docker/fund_anvil_accounts.sh b/util-scripts/docker/fund_anvil_accounts.sh new file mode 100644 index 00000000..e374ce3a --- /dev/null +++ b/util-scripts/docker/fund_anvil_accounts.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +host="localhost" + +echo "Transferring 10 ETH from anvil account[0] to all others..." + +signersFile="../devnet/devnet/signer-dump.json" +signersDump=$(jq . $signersFile) +signersLength=$(jq '. | length' $signersFile) + +rootChainWeb3="http://${host}:9545" + +for ((i = 1; i < signersLength; i++)); do + to_address=$(echo "$signersDump" | jq -r ".[$i].address") + from_address=$(echo "$signersDump" | jq -r ".[0].address") + from_priv_key=$(echo "$signersDump" | jq -r ".[0].priv_key") + txReceipt=$(export PATH="$HOME/.foundry/bin:$PATH" && cast send --rpc-url $rootChainWeb3 --private-key $from_priv_key $to_address --value 10ether) + txHash=$(echo "$txReceipt" | grep -oE '0x[a-fA-F0-9]{64}' | head -n 1) + echo "Funds transferred from $from_address to $to_address with txHash: $txHash" +done diff --git a/util-scripts/docker/smoke_test.sh b/util-scripts/docker/smoke_test.sh new file mode 100644 index 00000000..4ccd1f59 --- /dev/null +++ b/util-scripts/docker/smoke_test.sh @@ -0,0 +1,114 @@ +#!/bin/bash +set -e + +echo "Starting smoke tests for the local docker devnet..." + +cd ./devnet +ADDRESS=$(jq -r '.[0].address' signer-dump.json) +PRIVATE_KEY=$(jq -r '.[0].priv_key' signer-dump.json) + +cd ../code/pos-contracts +MATIC_CONTRACT_ADDRESS=$(jq -r .root.tokens.MaticToken contractAddresses.json) + +echo "Checking MATIC token balance before executing deposits..." +export PATH="$HOME/.foundry/bin:$PATH" + +# Check MATIC token balance of the account. +REQUIRED_BALANCE="100000000000000000000" # 100 MATIC tokens. +CURRENT_BALANCE=$(cast call $MATIC_CONTRACT_ADDRESS "balanceOf(address)" $ADDRESS --rpc-url http://localhost:9545 | cast --to-dec) + +echo "Current MATIC balance: $CURRENT_BALANCE" +echo "Required MATIC balance: $REQUIRED_BALANCE (100 MATIC)" + +# Use bc for large number comparison since bash can't handle wei amounts +if [ $(echo "$CURRENT_BALANCE < $REQUIRED_BALANCE" | bc) -eq 1 ]; then + echo "❌ Error: Insufficient MATIC balance!" + echo "Current: $CURRENT_BALANCE" + echo "Required: $REQUIRED_BALANCE" + echo "Please fund the account with more MATIC tokens before running the smoke tests." + exit 1 +fi + +echo "βœ… Balance check passed! Account has sufficient MATIC tokens." + +# Check the initial state sync event count in Heimdall before deposits. +echo "Checking initial state sync event count in Heimdall..." +INITIAL_EVENT_COUNT=$(curl -s localhost:1317/clerk/event-records/count | jq -r '.count' || echo "0") +echo "Initial state sync event count: $INITIAL_EVENT_COUNT" + +# Check the initial BOR balance before deposits. +INITIAL_BOR_BALANCE=$(docker exec bor0 bash -c "bor attach /var/lib/bor/data/bor.ipc --exec \"Math.round(web3.fromWei(eth.getBalance(eth.accounts[0]), 'ether'))\"") +echo "Initial balance in BOR: $INITIAL_BOR_BALANCE" + +echo "Executing 100 deposits..." + +for i in {1..100}; do + echo "Executing deposit $i/100..." + forge script scripts/matic-cli-scripts/Deposit.s.sol:MaticDeposit --sig "run(address,address,uint256)" $ADDRESS $MATIC_CONTRACT_ADDRESS 1000000000000000000 --rpc-url http://localhost:9545 --private-key $PRIVATE_KEY --legacy --broadcast &>/dev/null + echo "βœ… Deposit $i/100 executed successfully!" + sleep 0.5 +done + +echo "βœ… All 100 deposits executed successfully! Waiting for Heimdall to process events..." + +# Wait for Heimdall to process all 100 events. +EXPECTED_EVENT_COUNT=$((INITIAL_EVENT_COUNT + 100)) +echo "Waiting for Heimdall's clerk event count to reach: $EXPECTED_EVENT_COUNT" + +SECONDS=0 +start_time=$SECONDS + +while true; do + CURRENT_EVENT_COUNT=$(curl -s localhost:1317/clerk/event-records/count | jq -r '.count' || echo "0") + + if [ "$CURRENT_EVENT_COUNT" -eq "$EXPECTED_EVENT_COUNT" ]; then + event_processing_time=$((SECONDS - start_time)) + echo "βœ… All 100 events processed by Heimdall!" + echo "Initial event count: $INITIAL_EVENT_COUNT" + echo "Final event count: $CURRENT_EVENT_COUNT" + echo "Events processed: $((CURRENT_EVENT_COUNT - INITIAL_EVENT_COUNT))" + echo "Time taken: $(printf '%02dm:%02ds\n' $((event_processing_time % 3600 / 60)) $((event_processing_time % 60)))" + break + fi + + echo "Current event count: $CURRENT_EVENT_COUNT (expected: $EXPECTED_EVENT_COUNT)" + sleep 5 +done + +# Now check BOR balance bumped by exactly 100 MATIC. +EXPECTED_BOR_BALANCE=$((INITIAL_BOR_BALANCE + 100)) +echo "Waiting for BOR balance to reach exactly: $EXPECTED_BOR_BALANCE" + +while true; do + CURRENT_BOR_BALANCE=$(docker exec bor0 bash -c "bor attach /var/lib/bor/data/bor.ipc --exec \"Math.round(web3.fromWei(eth.getBalance(eth.accounts[0]), 'ether'))\"") + + if ! [[ $CURRENT_BOR_BALANCE =~ ^[0-9]+$ ]]; then + echo "❌ Error reading BOR balance (got: $CURRENT_BOR_BALANCE)" + exit 1 + fi + + if [ "$CURRENT_BOR_BALANCE" -eq "$EXPECTED_BOR_BALANCE" ]; then + echo "βœ… BOR balance updated correctly: $CURRENT_BOR_BALANCE" + break + else + echo "Current BOR balance: $CURRENT_BOR_BALANCE (expected: $EXPECTED_BOR_BALANCE)" + fi + + sleep 5 +done + +echo "πŸŽ‰ All state sync tests passed β€” Heimdall clerk events and BOR balance look good!" + +echo "Starting checkpoint test…" +while true; do + checkpointID=$(curl -s localhost:1317/checkpoints/latest | jq -r '.checkpoint.id' || echo "null") + if [ "$checkpointID" != "null" ]; then + echo "βœ… Checkpoint created! ID: $checkpointID" + break + else + echo "Current checkpoint: none (polling…)" + sleep 5 + fi +done + +echo "πŸŽ‰ Checkpoint test passed β€” Heimdall checkpoint looks good!" diff --git a/util-scripts/heimdall/README.md b/util-scripts/heimdall/README.md deleted file mode 100644 index 96e44fb1..00000000 --- a/util-scripts/heimdall/README.md +++ /dev/null @@ -1,191 +0,0 @@ -# Cosmos-SDK Commit Testing Script - -## Overview - -This script automates the testing of specific commits from the [Cosmos SDK](https://github.com/maticnetwork/cosmos-sdk) within [Heimdall](https://github.com/maticnetwork/heimdall) using [Matic CLI](https://github.com/maticnetwork/matic-cli). It streamlines the process of: - -- Checking out specific Cosmos SDK commits. -- Updating Heimdall's dependencies to these commits. -- Building the project to ensure compatibility. -- Deploying a devnet using Matic CLI to either cloud platforms (AWS/GCP) or locally via Docker. -- Collecting and storing logs for analysis. - -By automating these tasks, the script significantly reduces manual overhead, enabling efficient and consistent testing of different Cosmos SDK versions within Heimdall. - -## Table of Contents - -- [Prerequisites](#prerequisites) -- [Configuration](#configuration) -- [Usage](#usage) - - [Running the Script](#running-the-script) - - [Platform Options](#platform-options) -- [Script Workflow](#script-workflow) -- [Logging](#logging) -- [Permissions](#permissions) - -## Prerequisites - -Before running the script, ensure you have the following installed and configured as specified in the [Matic CLI documentation](https://www.github.com/maticnetwork/matic-cli): - -1. **Git**: For version control operations. -2. **Go**: To manage Go modules and build the project. -3. **Make**: For building the project. -4. **Docker**: If deploying locally using Docker. -5. **AWS CLI/GCP CLI**: If deploying on either of the cloud platforms. -6. **Terraform**: For config management and IaC required if using cloud based deployments. -7. **Access Rights**: Ensure you have the necessary permissions to push to the Heimdall branch specified in the configuration. - -## Configuration - -The script relies on a `config.env` file to set up necessary variables. This file is located at `matic-cli/util-scripts/heimdall/config.env`. Ensure this file is present and correctly configured. - -### Sample `config.env` - -```bash -# Array of Cosmos SDK commit hashes -cosmos_commits=( - "commitHash1" - "commitHash2" - "commitHash3" -) - -# Directories and branches -cosmos_directory="/Path/to/cosmos-sdk" # Absolute path to your local Cosmos SDK directory -cosmos_branch="my-cosmos-branch" # Branch name for Cosmos SDK commits -heimdall_directory="/Path/to/heimdall" # Absolute path to your local Heimdall directory -heimdall_branch="my-heimdall-branch" # Branch name for Heimdall (ensure you have push rights) -matic_cli_directory="/Path/to/matic-cli" # Absolute path to your local Matic CLI directory -``` - -**Notes:** - -- **`cosmos_commits`**: List the specific commit hashes from the Cosmos SDK repository you wish to test. -- **Directories**: Ensure all paths are absolute and correctly point to your local repositories. -- **Branches**: - - `cosmos_branch`: The branch in the Cosmos SDK repository where the specified commits reside. - - `heimdall_branch`: The branch in the Heimdall repository where dependencies will be updated. Ensure your docker `configs/devnet/docker-setup-config.yaml`(for local docker deployments) or your `.env`(for cloud based deployments) build using the same heimdall branch and you have the necessary permissions to push changes to this branch. - -## Usage - -### Running the Script - -1. **Navigate to the Script Directory:** - - ```bash - cd /Path/to/matic-cli/util-scripts/heimdall - ``` - -2. **Make the Script Executable** (if not already): - - ```bash - chmod +x cosmos_release_heimdall.sh - ``` - -3. **Execute the Script** with the desired deployment platform: - - ```bash - ./cosmos_release_heimdall.sh {aws|gcp|docker} - ``` - - Replace `{aws|gcp|docker}` with your target deployment platform. - -### Platform Options - -- **`aws`**: Deploy the devnet to Amazon Web Services. -- **`gcp`**: Deploy the devnet to Google Cloud Platform. -- **`docker`**: Deploy the devnet locally using Docker. - -**Example:** - -```bash -./cosmos_release_heimdall.sh aws -``` - -## Script Workflow - -The script performs the following steps for each specified Cosmos SDK commit: - -1. **Setup**: - - - Determines the script's directory. - - Sources the `config.env` file for configuration variables. - - Validates the provided deployment platform (`aws`, `gcp`, or `docker`). - -2. **Processing Each Commit**: - - For each commit hash in `cosmos_commits`: - - a. **Checkout Cosmos SDK Commit**: - - - Navigates to the Cosmos SDK directory. - - Fetches the latest changes. - - Checks out the specified branch and pulls the latest commits. - - Switches to the target commit. - - b. **Retrieve Version Information**: - - - Determines the module version corresponding to the commit. - - c. **Update Heimdall Dependencies**: - - - Navigates to the Heimdall directory. - - Checks out or creates the specified Heimdall branch. - - Updates `go.mod` to replace the Cosmos SDK dependency with the target version. - - Runs `go mod tidy` and builds the project using `make build`. - - d. **Commit and Push Changes**: - - - Commits the updated `go.mod` and `go.sum`. - - Pushes the changes to the Heimdall repository. - - e. **Deploy Devnet**: - - - Navigates to the Matic CLI directory. - - Depending on the chosen platform (`aws`, `gcp`, or `docker`), initializes and starts the devnet. - - Captures logs during initialization and deployment. - - For Docker deployments, handles container cleanup and log collection. - - f. **Logging**: - - - Stores all logs in a structured directory for each commit and platform. - -3. **Completion**: - - After processing all commits, the script notifies that all tasks are completed. - -## Logging - -Logs are stored in the following structure within the Matic CLI repository: - -``` -matic-cli/util-scripts/heimdall/logs/ -β”œβ”€β”€ commitHash1/ -β”‚ β”œβ”€β”€ aws-init-commitHash1.log -β”‚ β”œβ”€β”€ aws-start-commitHash1.log -β”‚ β”œβ”€β”€ gcp-init-commitHash1.log -β”‚ β”œβ”€β”€ gcp-start-commitHash1.log -β”‚ β”œβ”€β”€ docker-setup-commitHash1.log -β”‚ β”œβ”€β”€ docker-start-commitHash1.log -β”‚ β”œβ”€β”€ bor/ -β”‚ β”‚ └── ... -β”‚ └── heimdall/ -β”‚ └── ... -β”œβ”€β”€ commitHash2/ -β”‚ └── ... -└── commitHash3/ - └── ... -``` - -- **AWS/GCP Logs**: Capture initialization and startup logs specific to the cloud platform. -- **Docker Logs**: Include setup and startup logs, as well as logs from Bor and Heimdall nodes for local deployments. - -These logs facilitate troubleshooting and analysis of each deployment. - -## Permissions - -- **Heimdall Branch**: Ensure you have push rights to the specified Heimdall branch (`heimdall_branch`) in your `config.env`. The script will attempt to commit and push changes to this branch. -- **Repository Access**: Ensure your local repositories (`cosmos_directory`, `heimdall_directory`, `matic_cli_directory`) are correctly set up with the necessary access rights. -- **Access and Setup**: Make sure you have AWS CLI or GCP CLI set up with the necessary permissions for cloud deployments. - ---- - -_Happy Testing!_ diff --git a/util-scripts/heimdall/calculators/README.md b/util-scripts/heimdall/calculators/README.md new file mode 100644 index 00000000..bde48423 --- /dev/null +++ b/util-scripts/heimdall/calculators/README.md @@ -0,0 +1,41 @@ +# πŸ› οΈ Heimdall Calculators + +## πŸ” What's Inside + +| Script | Description | +| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `avg_blocktime/main.go` | Calculates the average block time over the last 10k, 100k, 1M, and 1.5M blocks. Useful for chain health monitoring and block production analysis. | +| `hf_block/main.go` | Predicts the block height corresponding to a future target UTC time given an assumed average block time (e.g. planning for hard forks or upgrades). | + +--- + +## πŸš€ Quick Start + +### Example 1: Calculate Heimdall Average Block Times + +```bash +cd avg_blocktime +go run main.go +``` + +This script + +- Fetches the latest block height and timestamp from Heimdall APIs +- For each lookback (10k, 100k, 1M, 1.5M blocks), fetches a past block +- Prints elapsed time (days/hours/minutes/seconds) and average block time in seconds + +### Example 2: Predict Heimdall Block Height at a Future Time + +```bash +cd hf_block +go run main.go -target= -avg="AVG_SECONDS" [-url=] +# Example: +go run main.go -target="2025-10-07T14:00:00Z" -avg=1.6 +``` + +This script + +- Fetches the latest block height and timestamp from Heimdall APIs +- Uses a hardcoded target UTC timestamp and an average block time (in seconds) +- Calculates how many blocks fit in the delta between now and target +- Prints the predicted block height and time delta diff --git a/util-scripts/heimdall/calculators/avg_blocktime/main.go b/util-scripts/heimdall/calculators/avg_blocktime/main.go new file mode 100644 index 00000000..9f2dba99 --- /dev/null +++ b/util-scripts/heimdall/calculators/avg_blocktime/main.go @@ -0,0 +1,93 @@ +package main + +import ( + "context" + "errors" + "flag" + "fmt" + "heimdall_calculators/utils" + "net/http" + "time" +) + +type blockResp struct { + Result struct { + Block struct { + Header struct { + Height string `json:"height"` + Time string `json:"time"` + } `json:"header"` + } `json:"block"` + } `json:"result"` +} + +func main() { + baseUrl := flag.String("base", utils.DefaultCometURL, "Base URL for the Tendermint RPC-compatible API") + timeout := flag.Duration("timeout", 15*time.Second, "HTTP request timeout") + flag.Parse() + + ctx, cancel := context.WithTimeout(context.Background(), *timeout) + defer cancel() + + httpc := &http.Client{Timeout: *timeout} + + latestHeight, latestTime, earliestHeight, err := utils.GetLatest(ctx, httpc, *baseUrl) + if err != nil { + panic(fmt.Errorf("get latest: %w", err)) + } + + fmt.Printf("Current block: %d at %s (earliest available: %d)\n\n", + latestHeight, latestTime.Format(time.RFC3339Nano), earliestHeight) + + lookBacks := []int64{10_000, 100_000, 1_000_000, 1_500_000} + for _, lb := range lookBacks { + target := latestHeight - lb + if target < earliestHeight { + fmt.Printf("Ξ”%-9d SKIP target height %d < earliest available %d\n", lb, target, earliestHeight) + continue + } + t0, err := getBlockTime(ctx, httpc, *baseUrl, target) + if err != nil { + fmt.Printf("Ξ”%-9d ERROR fetching height %d: %v\n", lb, target, err) + continue + } + elapsed := latestTime.Sub(t0) // total time elapsed + avgSeconds := elapsed.Seconds() / float64(lb) // average seconds per block + + fmt.Printf("Ξ”%-9d from height %-10d to %-10d\n", lb, target, latestHeight) + fmt.Printf(" elapsed : %s\n", formatElapsed(elapsed)) + fmt.Printf(" avg block : %.6f s/block (%.3f ms)\n\n", avgSeconds, avgSeconds*1000.0) + } +} + +func formatElapsed(d time.Duration) string { + if d < 0 { + d = -d + } + days := d / (24 * time.Hour) + d -= days * 24 * time.Hour + hours := d / time.Hour + d -= hours * time.Hour + mins := d / time.Minute + d -= mins * time.Minute + secs := d / time.Second + + return fmt.Sprintf("%dd %dh %dm %ds", days, hours, mins, secs) +} + +func getBlockTime(ctx context.Context, c *http.Client, base string, height int64) (time.Time, error) { + u := fmt.Sprintf("%s/block?height=%d", base, height) + var br blockResp + if err := utils.GetJSON(ctx, c, u, &br); err != nil { + return time.Time{}, err + } + ts := br.Result.Block.Header.Time + if ts == "" { + return time.Time{}, errors.New("empty block time") + } + t, err := time.Parse(time.RFC3339Nano, ts) + if err != nil { + return time.Time{}, fmt.Errorf("parse block time: %w", err) + } + return t, nil +} diff --git a/util-scripts/heimdall/calculators/go.mod b/util-scripts/heimdall/calculators/go.mod new file mode 100644 index 00000000..9d9b6d3d --- /dev/null +++ b/util-scripts/heimdall/calculators/go.mod @@ -0,0 +1,3 @@ +module heimdall_calculators + +go 1.24.6 diff --git a/util-scripts/heimdall/calculators/hf_block/main.go b/util-scripts/heimdall/calculators/hf_block/main.go new file mode 100644 index 00000000..df5e0408 --- /dev/null +++ b/util-scripts/heimdall/calculators/hf_block/main.go @@ -0,0 +1,121 @@ +package main + +import ( + "context" + "encoding/json" + "flag" + "fmt" + "heimdall_calculators/utils" + "io" + "net/http" + "os" + "strconv" + "time" +) + +func main() { + base := flag.String("url", utils.DefaultCometURL, "Base URL for the Tendermint RPC-compatible API") + timeout := flag.Duration("timeout", 15*time.Second, "HTTP request timeout") + targetStr := flag.String("target", "", "Target time in RFC3339 or RFC3339Nano (UTC)") + avgSecs := flag.Float64("avg", 0, "Average block time in seconds (e.g., 2.15)") + flag.Parse() + + if *targetStr == "" || *avgSecs == 0 { + fmt.Printf("Please pass a target and average as arguments of the script, e.g.:\n go run main.go -target=\"2025-10-07T14:00:00Z\" -avg=1.6\n") + return + } + + ctx, cancel := context.WithTimeout(context.Background(), *timeout) + defer cancel() + + httpc := &http.Client{Timeout: *timeout} + + // Get current height + time + latestHeight, latestTime, _, err := getLatest(ctx, httpc, *base) + if err != nil { + panic(fmt.Errorf("get latest: %w", err)) + } + fmt.Printf("Current block: %d at %s\n\n", + latestHeight, latestTime.Format(time.RFC3339Nano)) + + targetTime, err := time.Parse(time.RFC3339Nano, *targetStr) + if err != nil { + panic(fmt.Errorf("parse target time: %w", err)) + } + + delta := targetTime.Sub(latestTime) + if delta < 0 { + fmt.Printf("Target time %s is in the past relative to latest block.\n", targetTime.Format(time.RFC3339)) + return + } + + blocksToAdd := int64(delta.Seconds() / *avgSecs) + predicted := latestHeight + blocksToAdd + + fmt.Println("Future block prediction:") + fmt.Printf(" target time : %s\n", targetTime.Format(time.RFC3339)) + fmt.Printf(" avg block time : %.2f s\n", *avgSecs) + fmt.Printf(" time delta : %dd %dh %dm %ds\n", int(delta.Hours())/24, int(delta.Hours())%24, int(delta.Minutes())%60, int(delta.Seconds())%60) + fmt.Printf(" blocks to add : %d\n", blocksToAdd) + fmt.Printf(" predicted height: %d\n", predicted) +} + +func getLatest(ctx context.Context, c *http.Client, base string) (height int64, t time.Time, earliest int64, err error) { + u := base + "/status" + var sr utils.StatusResp + if err = getJSON(ctx, c, u, &sr); err != nil { + return + } + h, err1 := strconv.ParseInt(sr.Result.SyncInfo.LatestBlockHeight, 10, 64) + if err1 != nil { + err = fmt.Errorf("parse latest height: %w", err1) + return + } + earliest, err1 = strconv.ParseInt(sr.Result.SyncInfo.EarliestBlockH, 10, 64) + if err1 != nil { + err = fmt.Errorf("parse earliest height: %w", err1) + return + } + t, err1 = time.Parse(time.RFC3339Nano, sr.Result.SyncInfo.LatestBlockTime) + if err1 != nil { + err = fmt.Errorf("parse latest time: %w", err1) + return + } + height = h + return +} + +func getJSON(ctx context.Context, c *http.Client, url string, out any) error { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) + if err != nil { + return err + } + resp, err := c.Do(req) + if err != nil { + return err + } + defer func(Body io.ReadCloser) { + _ = Body.Close() + }(resp.Body) + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + return fmt.Errorf("HTTP %d for %s", resp.StatusCode, url) + } + dec := json.NewDecoder(resp.Body) + return dec.Decode(out) +} + +func parseTarget(s string) (time.Time, error) { + // Try RFC3339Nano first, then RFC3339 + if t, err := time.Parse(time.RFC3339Nano, s); err == nil { + return t.UTC(), nil + } + if t, err := time.Parse(time.RFC3339, s); err == nil { + return t.UTC(), nil + } + return time.Time{}, fmt.Errorf("unsupported time format %q (use RFC3339/RFC3339Nano, e.g. 2025-10-07T14:00:00Z)", s) +} + +func failf(format string, a ...any) { + _, _ = fmt.Fprintf(os.Stderr, "error: "+format+"\n", a...) + os.Exit(1) +} diff --git a/util-scripts/heimdall/calculators/utils/common.go b/util-scripts/heimdall/calculators/utils/common.go new file mode 100644 index 00000000..dd390e62 --- /dev/null +++ b/util-scripts/heimdall/calculators/utils/common.go @@ -0,0 +1,64 @@ +package utils + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "strconv" + "time" +) + +const DefaultCometURL = "https://tendermint-api.polygon.technology" + +type StatusResp struct { + Result struct { + SyncInfo struct { + LatestBlockHeight string `json:"latest_block_height"` + LatestBlockTime string `json:"latest_block_time"` + EarliestBlockH string `json:"earliest_block_height"` + } `json:"sync_info"` + } `json:"result"` +} + +func GetLatest(ctx context.Context, c *http.Client, baseURL string) (height int64, t time.Time, earliest int64, err error) { + u := baseURL + "/status" + var sr StatusResp + if err = GetJSON(ctx, c, u, &sr); err != nil { + return + } + h, err1 := strconv.ParseInt(sr.Result.SyncInfo.LatestBlockHeight, 10, 64) + if err1 != nil { + err = fmt.Errorf("parse latest height: %w", err1) + return + } + earliest, err1 = strconv.ParseInt(sr.Result.SyncInfo.EarliestBlockH, 10, 64) + if err1 != nil { + err = fmt.Errorf("parse earliest height: %w", err1) + return + } + t, err1 = time.Parse(time.RFC3339Nano, sr.Result.SyncInfo.LatestBlockTime) + if err1 != nil { + err = fmt.Errorf("parse latest time: %w", err1) + return + } + height = h + return +} + +func GetJSON(ctx context.Context, c *http.Client, url string, out any) error { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) + if err != nil { + return err + } + resp, err := c.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + return fmt.Errorf("HTTP %d for %s", resp.StatusCode, url) + } + dec := json.NewDecoder(resp.Body) + return dec.Decode(out) +} diff --git a/util-scripts/heimdall/config.env.example b/util-scripts/heimdall/config.env.example deleted file mode 100644 index 9a167f7c..00000000 --- a/util-scripts/heimdall/config.env.example +++ /dev/null @@ -1,13 +0,0 @@ -# Array of Cosmos SDK commit hashes -cosmos_commits=( - "commitHash1" - "commitHash2" - "commitHash3" -) - -# Directories and branches -cosmos_directory="/Path/to/cosmos-sdk" # Absolute path to your local Cosmos SDK directory -cosmos_branch="my-cosmos-branch" # Branch name for Cosmos SDK commits -heimdall_directory="/Path/to/heimdall" # Absolute path to your local Heimdall directory -heimdall_branch="my-heimdall-branch" # Branch name for Heimdall (ensure you have push rights) -matic_cli_directory="/Path/to/matic-cli" # Absolute path to your local Matic CLI directory diff --git a/util-scripts/heimdall/cosmos_release_heimdall.sh b/util-scripts/heimdall/cosmos_release_heimdall.sh deleted file mode 100755 index 6132353f..00000000 --- a/util-scripts/heimdall/cosmos_release_heimdall.sh +++ /dev/null @@ -1,181 +0,0 @@ -#!/bin/bash - -# Determine the directory where the script is located -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" - -# Source the configuration file -if [ -f "$SCRIPT_DIR/config.env" ]; then - source "$SCRIPT_DIR/config.env" -else - echo "config.env file not found in $SCRIPT_DIR!" - exit 1 -fi - -# Check if an option is provided -if [ -z "$1" ]; then - echo "Usage: $0 {aws|gcp|docker}" - exit 1 -fi - -# Set the platform based on the option provided -platform="$1" - -# Validate the platform option -case $platform in - aws|gcp|docker) - echo "Selected platform: $platform" - ;; - *) - echo "Invalid platform option: $platform. Use 'aws', 'gcp', or 'docker'." - exit 1 - ;; -esac - -# Define the log destination base directly -log_destination_base="$matic_cli_directory/util-scripts/heimdall/logs" - -# Iterate over each commit -for commit_hash in "${cosmos_commits[@]}"; do - echo "========================================" - echo "Processing commit: $commit_hash" - echo "========================================" - - # Step 1: Check out the Cosmos SDK commit - cd "$cosmos_directory" || exit 1 - git fetch origin - git checkout "$cosmos_branch" || exit 1 - git pull origin "$cosmos_branch" - git checkout "$commit_hash" || exit 1 - - # Step 2: Get the version corresponding to the commit - version_output=$(go list -m github.com/maticnetwork/cosmos-sdk@"$commit_hash" 2>/dev/null) - if [ $? -ne 0 ]; then - echo "Failed to get version for commit $commit_hash" - exit 1 - fi - version=$(echo "$version_output" | awk '{print $2}') - echo "Found version: $version for commit $commit_hash" - - # Step 3: Update Heimdall's go.mod - cd "$heimdall_directory" || exit 1 - - git fetch origin - git checkout -b "$heimdall_branch" || git checkout "$heimdall_branch" - - # Replace cosmos-sdk with testing version - sed -i.bak "s|replace github.com/cosmos/cosmos-sdk .*|replace github.com/cosmos/cosmos-sdk => github.com/maticnetwork/cosmos-sdk $version|" go.mod - - # Clean up backup file created by sed (macOS) - rm go.mod.bak - - # Run go mod tidy - go mod tidy || { echo "go mod tidy failed"; exit 1; } - - # Run make build - make build || { echo "make build failed"; exit 1; } - - # Step 4: Commit and push changes - git add go.mod go.sum - git commit -m "Update cosmos-sdk to version $version for commit $commit_hash" - git push origin "$heimdall_branch" - - # Step 5: Build and run the devnet using matic-cli - cd "$matic_cli_directory" || exit 1 - - case $platform in - aws) - # Ensure the logs directory exists - log_destination="$log_destination_base/$commit_hash" - mkdir -p "$log_destination" - echo "Running AWS specific setup..." - - # Run init and capture logs - ./bin/express-cli.js --init aws | tee "$log_destination/aws-init-$commit_hash.log" - - echo "Init completed. Finding the highest devnet directory..." - - # Find the highest-numbered devnet-X directory - highest_devnet=$(ls -d deployments/devnet-* 2>/dev/null | sort -V | tail -n 1) - - if [ -z "$highest_devnet" ]; then - echo "No devnet directories found. Exiting..." - exit 1 - fi - - echo "Navigating to latest devnet directory: $highest_devnet" - cd "$highest_devnet" || exit 1 - - # Start the devnet and capture logs - ../../bin/express-cli.js --start | tee "$log_destination/aws-start-$commit_hash.log" - ;; - gcp) - # Ensure the logs directory exists - log_destination="$log_destination_base/$commit_hash" - mkdir -p "$log_destination" - echo "Running GCP specific setup..." - - # Run init and capture logs - ./bin/express-cli.js --init gcp | tee "$log_destination/gcp-init-$commit_hash.log" - - echo "Init completed. Finding the highest devnet directory..." - - # Find the highest-numbered devnet-X directory - highest_devnet=$(ls -d deployments/devnet-* 2>/dev/null | sort -V | tail -n 1) - - if [ -z "$highest_devnet" ]; then - echo "No devnet directories found. Exiting..." - exit 1 - fi - - echo "Navigating to latest devnet directory: $highest_devnet" - cd "$highest_devnet" || exit 1 - - # Start the devnet and capture logs - ../../bin/express-cli.js --start | tee "$log_destination/gcp-start-$commit_hash.log" - ;; - docker) - # Ensure the logs directory exists - mkdir -p "$log_destination_base" - echo "Running Docker specific setup..." - - # Log locations in matic-cli devnet - bor_log_source="$matic_cli_directory/devnet/logs/node0/bor/" - heimdall_log_source="$matic_cli_directory/devnet/logs/node0/heimdall/" - log_destination="$log_destination_base/$commit_hash" - mkdir -p "$log_destination" - - # Clean up any existing Docker containers and devnet directory - docker stop $(docker ps -q) 2>/dev/null - docker rm $(docker ps -a -q) 2>/dev/null - rm -rf devnet - mkdir devnet - cd devnet || exit 1 - ../bin/matic-cli.js setup devnet --config ../configs/devnet/docker-setup-config.yaml | tee "$log_destination/docker-setup-$commit_hash.log" - - # Start the devnet using the aggregated script - chmod +x ../docker_devnet.sh - ../docker_devnet.sh | tee "$log_destination/docker-start-$commit_hash.log" - - # Copy logs to the specified location - mkdir -p "$log_destination/bor" - mkdir -p "$log_destination/heimdall" - - cp -r "$bor_log_source"* "$log_destination/bor/" - cp -r "$heimdall_log_source"* "$log_destination/heimdall/" - - echo "Logs copied to $log_destination" - - # Clean up - cd "$matic_cli_directory" || exit 1 - docker stop $(docker ps -q) 2>/dev/null - docker rm $(docker ps -a -q) 2>/dev/null - rm -rf devnet - - ;; - esac - - echo "Completed processing for commit: $commit_hash" - echo "========================================" -done - -echo "All commits have been processed."