PrimeLab is excited to release the first iteration of our Utility/Tool to perform TPS load testing on NEAR Protocol! This utility includes contracts, detailed instructions, and configurable options.
Why (is this needed)
- With the primary performance bottleneck within the NEAR ecosystem being reliable communication with RPC nodes, the most important step to solve the issue is being able to reliably re-create the problem utilizing an easily quantifiable method.
Who (would this benefit)
- Engineers are able to benchmark the performance of the contract based protocols.
- Engineers are able to utilize the library to fish out any bottlenecks within their current implementation.
- Engineers working on the underlying protocol have a reproducible integration test case when working on the node communication & transaction processing layers of NEAR
How (does this achieve a solution):
1. The utility first instantiates a collection of contracts and user accounts.
The base contract houses the underlying method being tested (the default contract is the counter contract).
The included executor contract is in-charge of proxying the calls to the underlying contract utilizing the created sub-accounts.
The utility also creates a number of accounts that sign transactions being sent to the underlying contract. You can modify these values within the
2. The utility then sends the transactions into a queue to be put on-chain.
- While the utility awaits responses from the RPC node, it inserts any failed transactions into an array to be returned back to the user once it has completed the current iterations.