📝
smartbch
  • Introduction
  • Whitepaper
  • FAQ
  • Mainnet
  • Testnets
  • Join Amber testnet as a Validator
  • Developer's Guide
    • Introduction
    • Deploy contracts using Truffle
    • Deploy contracts using Remix
    • JSON-RPC Endpoints
    • Staking Scheme
    • XHedge Smart Contract
    • Decision of the minimum gas price
  • Sha-Gate Bridge
    • Sha-Gate Specification
    • Sha-Gate Risk Analysis
    • Sha-Gate's Covenant
  • In-Depth Design Documents
    • Introduction
    • MoeingADS's General Ideas
    • MoeingADS's RabbitStore
    • MoeingADS's internal architecture
    • Benchmarking MoeingADS
    • Benchmarking MoeingEVM and MoeingADS
    • Benchmarking Testnet
    • Transaction Reordering in smartBCH
    • Transaction Parallel Execution in smartBCH
    • Send back-to-back Transactions
    • Data structures in world state
  • SmartBCH Evolution Proposals (SEPs)
    • SEP101: Store values with arbitrary length
    • SEP102: Adjustment of Used Gas
    • SEP109: On-chain Verification of Verifiable Random Functions
    • SEP18: Blockchain cheques on smartBCH
    • SEP20: Tokens on smartBCH
    • SEP206: Manipulate Native Token as a SEP20 Token
    • SEP201: Simple Stochastic Payment
  • Archives
    • Single Node Private Testnet
    • Multi-Node Testnet
    • Fake RPC Server for Testing
    • Test using MetaMask
Powered by GitBook
On this page

Was this helpful?

  1. In-Depth Design Documents

Benchmarking Testnet

PreviousBenchmarking MoeingEVM and MoeingADSNextTransaction Reordering in smartBCH

Last updated 2 years ago

Was this helpful?

Although MoeingADS and MoeingEVM are important libraries, what we most care about is always the performance of the whole blockchain, instead of its individual components.

To benchmark MoeingADS and MoeingEVM, we have developed some toolkits to generate random transactions and run them. They can also be used to benchmark the entire chain. You can find their source code at https://github.com/smartbch/smartbch/blob/main/cmd/stresstest .

First, we follow the sames steps as for MoeingADS and MoeingEVM, till the end of Step 2 (generate several blocks filled with random transactions). There will be a generated directory named blkdata, which contains the random transactions; and a keys60M.txt file, which constains some test keys.

Then, we need to start or first. Please note that we must give enough initial balances to the first 50,000 accounts in the keys60M.txt file, such that they can send transactions.

Now we can use a node's websocket to broadcast these random transactions:

./stresstest replayWS ws://the-ip-address-of-a-smartbch-node:8546 

Finally we can query about the status of executed transactions:

./stresstest queryTxsWS ws://the-ip-address-of-s-smartbch-node:8546 <stop-height>

Or we can draw some charts showing the chain's performance:

./stresstest queryBlocksWS ws://the-ip-address-of-s-smartbch-node:8546 <stop-height> <start-height> true

After running above commands, there will a charts.html file in current directory showing the following numbers in every 100 blocks: 1, Transaction Count; 2, Block Size; 3, Used Gas; 4, Block Interval.

the benchmarks
a multi-node testnet
a single-node testnet