README
¶
Benchmark Sequencer Scripts
This repository contains scripts to benchmark a sequencer. The main script is written in Go and can be used to run a series of commands and perform various operations.
Usage
1. Clone the repository:
git clone git@github.com:0xPolygonHermez/zkevm-node.git
cd zkevm-node/test/benchmarks/sequencer/scripts
2. Setup Environment Variables:
Copy the .env.example
file to .env
and populate it with the appropriate values.
Required environment variables are:
BASTION_HOST
: The IP address or domain name of the bastion host. (FromDeployments.doc
underBASH VARIABLES
section for the specificEnvironment
)POOLDB_DBNAME
: Database name for the pool. (FromDeployments.doc
underBASH VARIABLES
section for the specificEnvironment
)POOLDB_EP
: Endpoint for the pool database. (FromDeployments.doc
underBASH VARIABLES
section for the specificEnvironment
)POOLDB_PASS
: Password for the pool database. (FromDeployments.doc
underBASH VARIABLES
section for the specificEnvironment
)POOLDB_USER
: User for the pool database. (FromDeployments.doc
underBASH VARIABLES
section for the specificEnvironment
)SEQUENCER_IP
: The IP address of the sequencer. (sequencer.zkevm-public.aws
forpublic testnet
,sequencer.zkevm-internal.aws
forinternal testnet
,sequencer.zkevm-dev.aws
fordev testnet
)RPC_URL
: The URL for the Remote Procedure Call (RPC) server. (FromDeployments.doc
underPublic URLs
section as a bullet point toRPC
for the specificEnvironment
)CHAIN_ID
: The ID of the blockchain network. (FromDeployments.doc
underPublic URLs
section as a bullet point toRPC
for the specificEnvironment
)PRIVATE_KEY
: Your private key.
Optional environment variables:
POOLDB_PORT
: Port for the pool database. (Default is5433
)
Example:
cp .env.example .env
nano .env
3. Run the Benchmark Script:
Run the main.go
script with the following command-line flags:
--type
: The type of transactions to test. Accepted values areeth
,erc20
oruniswap
.--num-ops
(optional): The number of operations to run. Default is 200.--help
(optional): Display the help message.
Example:
go run main.go --type erc20 --sequencer-ip <Private IP>
Notes
- Ensure that the
.env
file exists and contains all the required environment variables before running the script. - The script will perform various operations based on the provided command-line flags and environment variables.
- Ensure that Go is installed on your system to run the script.
Documentation
¶
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.