{"id":19358524,"url":"https://github.com/paritytech/evm-tps","last_synced_at":"2025-07-14T17:09:37.321Z","repository":{"id":178607312,"uuid":"659411375","full_name":"paritytech/evm-tps","owner":"paritytech","description":"Simple tool to flood EVM network with transactions and check for its TPS.","archived":false,"fork":false,"pushed_at":"2023-11-09T21:39:15.000Z","size":308,"stargazers_count":19,"open_issues_count":4,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-09T00:20:07.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paritytech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-27T19:23:24.000Z","updated_at":"2024-08-07T11:37:48.000Z","dependencies_parsed_at":"2024-11-10T07:12:13.810Z","dependency_job_id":"88184c67-32e4-4489-8995-d271c2ec24b6","html_url":"https://github.com/paritytech/evm-tps","commit_stats":null,"previous_names":["paritytech/evm-tps"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paritytech/evm-tps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fevm-tps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fevm-tps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fevm-tps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fevm-tps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paritytech","download_url":"https://codeload.github.com/paritytech/evm-tps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fevm-tps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265322375,"owners_count":23746607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T07:12:11.747Z","updated_at":"2025-07-14T17:09:37.253Z","avatar_url":"https://github.com/paritytech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple EVM TPS tool\n\n```shell\ngit clone https://github.com/paritytech/evm-tps.git\ncd evm-tps\n\nyarn\n```\n\n## Setup:\n\nChange network's parameters (\"local\") in [hardhat.config.json](hardhat.config.ts):\n\nChange test's parameters in [data/config.json](./data/config.json):\n\n1. This will deploy the ERC20 contract and will prepare a server to send `transferLoop()` transactions, asserting final Other's token balance:\n```json\n{\n    \"tpsServerHost\": \"0.0.0.0\",\n    \"tpsServerPort\": 8181,\n    \"variant\": \"substrate\",\n    \"deployer\": {\n        \"address\": \"0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b\",\n        \"privateKey\": \"0x99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342\"\n    },\n    \"fundSenders\": true,\n    \"accounts\": 100,\n    \"workers\": 80,\n    \"sendRawTransaction\": true,\n    \"timeout\": 15000,\n    \"tokenAddress\": \"\",\n    \"tokenMethod\": \"transferLoop\",\n    \"tokenAmountToMint\": 1000000000,\n    \"tokenTransferMultiplier\": 1,\n    \"tokenAssert\": true,\n    \"transactions\": 50000,\n    \"gasLimit\": \"200000\",\n    \"txpoolMaxLength\": -1,\n    \"txpoolMultiplier\": 3,\n    \"txpoolLimit\": 7500,\n    \"checkersInterval\": 250,\n    \"estimate\": false,\n    \"verbose\": false\n}\n```\n\n2. This one already has the token deployed at `tokenAddress`, so it will wait to send `transferLoop()` (5 * `transfer()`) transactions + tokenAssert:\n```json\n{\n    \"tpsServerHost\": \"0.0.0.0\",\n    \"tpsServerPort\": 8181,\n    \"variant\": \"substrate\",\n    \"deployer\": {\n        \"address\": \"0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b\",\n        \"privateKey\": \"0x99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342\"\n    },\n    \"fundSenders\": true,\n    \"accounts\": 100,\n    \"workers\": 80,\n    \"sendRawTransaction\": true,\n    \"timeout\": 15000,\n    \"tokenAddress\": \"\",\n    \"tokenMethod\": \"transferLoop\",\n    \"tokenAmountToMint\": 1000000000,\n    \"tokenTransferMultiplier\": 1,\n    \"tokenAssert\": true,\n    \"transactions\": 50000,\n    \"gasLimit\": \"200000\",\n    \"txpoolMaxLength\": -1,\n    \"txpoolMultiplier\": 3,\n    \"txpoolLimit\": 7500,\n    \"checkersInterval\": 250,\n    \"estimate\": false,\n    \"verbose\": false\n}\n```\n\n\n3. This one has a `transfer()` hardcoded in the `payloads` field:\n```json\n{\n    \"tpsServerHost\": \"0.0.0.0\",\n    \"tpsServerPort\": 8181,\n    \"variant\": \"substrate\",\n    \"deployer\": {\n        \"address\": \"0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b\",\n        \"privateKey\": \"0x99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342\"\n    },\n    \"fundSenders\": true,\n    \"accounts\": 100,\n    \"workers\": 80,\n    \"sendRawTransaction\": true,\n    \"timeout\": 15000,\n    \"tokenAddress\": \"\",\n    \"tokenMethod\": \"transferLoop\",\n    \"tokenAmountToMint\": 1000000000,\n    \"tokenTransferMultiplier\": 1,\n    \"tokenAssert\": true,\n    \"transactions\": 50000,\n    \"gasLimit\": \"200000\",\n    \"txpoolMaxLength\": -1,\n    \"txpoolMultiplier\": 3,\n    \"txpoolLimit\": 7500,\n    \"checkersInterval\": 250,\n    \"estimate\": false,\n    \"verbose\": false,\n    \"payloads\": [\n        {\n            \"data\": \"0xa9059cbb000000000000000000000000ea8d69db60401a766e1083beba3a34cafa13151c0000000000000000000000000000000000000000000000000000000000000001\",\n            \"from\": \"0x48A78AeA1c4F8C24EDfE7FE0973F05D3f3d1763C\",\n            \"to\": \"0x030c5D377E202F52CF30b7f855e09aC0589D53ab\"\n        }\n    ]\n}\n```\n\n4. This one sends ETH (`send()`) via `payloads` field and assert the destination `\"to\"` ETH balance at the end:\n```json\n{\n    \"tpsServerHost\": \"0.0.0.0\",\n    \"tpsServerPort\": 8181,\n    \"variant\": \"substrate\",\n    \"deployer\": {\n        \"address\": \"0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b\",\n        \"privateKey\": \"0x99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342\"\n    },\n    \"fundSenders\": true,\n    \"accounts\": 100,\n    \"workers\": 80,\n    \"sendRawTransaction\": true,\n    \"timeout\": 15000,\n    \"tokenAddress\": \"\",\n    \"tokenMethod\": \"transferLoop\",\n    \"tokenAmountToMint\": 1000000000,\n    \"tokenTransferMultiplier\": 1,\n    \"tokenAssert\": true,\n    \"transactions\": 50000,\n    \"gasLimit\": \"200000\",\n    \"txpoolMaxLength\": -1,\n    \"txpoolMultiplier\": 3,\n    \"txpoolLimit\": 7500,\n    \"checkersInterval\": 250,\n    \"estimate\": false,\n    \"verbose\": false,\n    \"payloads\": [\n        {\n            \"from\": \"0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b\",\n            \"to\": \"0xEA8D69Db60401A766e1083bebA3A34cAfa13151C\",\n            \"value\": \"0x1414\"\n        }\n    ]\n}\n```\n\n## Deployer:\n\n1. CI pre funded EVM Account (Frontier)\n```json\n  \"variant\": \"frontier\",\n  \"deployer\": {\n    \"address\": \"0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b\",\n    \"privateKey\": \"0x99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342\"\n  },\n```\n\n2. Alith (Substrate/Frontier)\n```json\n  \"variant\": \"frontier\",\n  \"deployer\": {\n    \"address\": \"0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac\",\n    \"privateKey\": \"0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133\"\n  },\n```\n\n3. Alice (Substrate)\n```json\n  \"variant\": \"substrate\",\n  \"deployer\": {\n    \"address\": \"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY\",\n    \"privateKey\": \"0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a\"\n  },\n```\n\n## Running:\n\nTo run the TPS server for EVM (Frontier):\n\n```shell\nyarn evm\n```\n\nOr, to run the TPS server for Substrate (remember to set the `deploye.privateKey` properly):\n\n```shell\nyarn substrate\n```\n\nAfter the initial setup is done, you can trigger an \"auto\" run by:\n```shell\ncurl -X GET \"http://0.0.0.0:8181/auto\"\n```\n\nThat command will send `50,000` transactions to the target using `80` threads (set by `transactions` and `workers` in the [data/config.json](./data/config.json)).\n\n\nOr sending requests via `artillery`/`wrk` to:\n```shell\nartillery quick --count 50 --num 500 http://0.0.0.0:8181/sendRawTransaction\n```\n\nThat command will send 25,000 (`50` \"users\" sending `500` requests each) requests to `/sendRawTransaction`.\n\n```\nwrk -t 50 -c 50 -d 600 --latency --timeout 1m http://0.0.0.0:8181/sendRawTransaction\n```\n\nThat command will spawn 50 threads to send requests to `/sendRawTransaction` in 600 seconds.\n\nTo run it using a different JSON files directory (other than `data/`) by setting `EVM_TPS_ROOT_DIR`:\n\n```shell\nEVM_TPS_ROOT_DIR=\"path/to/dir\" npx hardhat run scripts/tps-server.ts --network local\n```\n\n## TODOs:\n\n- Create common files for both setups.\n- Remove Hardhat.\n- Create a step-by-step test option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fevm-tps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparitytech%2Fevm-tps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fevm-tps/lists"}