Skip to content

Early API Node testing for Leap 5.0.0

Eric Passmore edited this page Sep 11, 2023 · 11 revisions

Early API Node testing for Leap 5.0.0

Thank you for contributing to Leap Testing to ensure quality and a smooth rollout process. Leap v5.0.0 is packed with features, so we are taking several passes at testing to reduce the risks that such a large release creates.

NOTE: Due to updates Early Access Releases will need to be started from a snapshot Starting from an existing shared_memory.bin will not work.

Test Plan Overview

For this round of testing our goal is to test read only transactions. Since read only transactions are not relevant to block producer nodes, we can test on API nodes.

We'll be testing the following features:

  • Read-only Transactions
  • EOS VM OC
  • Reduced Chainbase Size
  • Prometheus Metrics
  • Libary Upgrades (Boost, C++)
  • P2P improvements ?? (need to check: sync, connections)

By exercising these features via the following test plan, we hope to confirm the following expectations:

  • nodeos is stable (no crashes)
  • nodeos has lower overall cpu utilization
  • nodeos has smaller resident memory size
  • nodeos has smaller chainbase size
  • nodeos handles high quantity of simultaneous read only transactions

Test Plan

Prerequisites

  • OS: ubunutu 22.04
  • Snapshot: need to start from snapshot Recommendation for early access; however earlier versions of ubunutu are supported

Evaluation Steps

  1. Copy the following Test Report Template:

    • pre-5.0.0 version
      • release version:
      • baseline
        • resident memory size:
        • chainbase size:
        • nodeos cpu utilization:
      • Wharfkit & Wharf test suite
        • correctness test: Remove mock data and re-run tests on new api node. Expect all tests should pass.
        • note: some tests may have assumptions in mock data and fail. Failed tests will need to be reviewed.
    • Early Testing Version
      • tag name: API-early-v5.0-b73c28d51
      • baseline
        • resident memory size:
        • chainbase size:
        • nodeos cpu utilization:
        • Any crashes?
      • Wharfkit & Wharf test suite
        • correctness test: Remove mock data and re-run tests on new api node. Expect all tests should pass.
      • during low read-only thread count test
        • nodeos cpu utilization:
        • Any crashes?
      • during high read-only thread count test
        • nodeos cpu utilization
        • Any crashes?
  2. Pre-5.0.0 version

    With an API node with a pre-5.0.0 version:

    1. Document the Baseline Scenario

      1. Ascertain Resident Memory Size
      2. Ascertain Chainbase Size
      3. Ascertain CPU utilization
      4. Document in your Test Report
    2. Run the Wharfkit & Wharf test suite

      1. Run WharfKit + Wharf Antelope Core tests
      2. Ascertain Resident Memory Size
      3. Ascertain Chainbase Size
      4. Ascertain CPU utilization
      5. Document in your Test Report
  3. Early Testing Version

    With an API node running an Early Testing Version of Leap v5.0.0:

    1. Document the Baseline Scenario

      1. Ascertain Resident Memory Size
      2. Ascertain Chainbase Size
      3. Ascertain CPU utilization
      4. Document in your Test Report
    2. Run the Wharfkit & Wharf test suite

      1. Run WharfKit + Wharf Antelope Core tests
      2. Ascertain Resident Memory Size
      3. Ascertain Chainbase Size
      4. Ascertain CPU utilization
      5. Document in your Test Report
    3. Low read-only thread counts

      1. set read-only-threads = 32
      2. Spam network with read-only transactions (get-block, get-info)
      3. Ascertain CPU utilization
      4. Document in your Test Report
    4. High read-only thread counts

      1. set read-only-threads = 256
      2. Spam network with read-only transactions (get-block, get-info)
      3. Ascertain CPU utilization
      4. Document in your Test Report
    5. Custom read-only contracts

      1. Deploy custom read-only contract (example)
      2. Spam network with transactions containing your custom read-only actions
      3. Ascertain CPU utilization
      4. Document in your Test Report
    6. Auto EOS-VM-OC

      1. set eos-vm-oc-enable = auto
      2. Spam network with system contract transactions
      3. Ascertain CPU utilization
      4. Document in your Test Report

Tech Notes

Upgrade to the Early Testing Version of Leap v5.0.0

  1. take a snapshot
  2. backup your configuration
  3. build leap from source with tag API-early-v5.0-b73c28d51
  4. install updated software from build
  5. set read-only-threads = 32 confirm setting read-only-read-window-time-us = 165000 confirm setting enable-account-queries = true
  6. restore from snapshot

Build Instructions

At this time only unpinned builds are tested. Follow the instructions on the Leap Readme, with the following modifications to pull the specified tag.

  • Step 1. git clone https://github.com/antelopeIO/leap.git --branch API-early-v5.0-b73c28d51 --single-branch
  • Step 2. Follow instructions. Do not checkout any tags. Do run git submodule update --init --recursive
  • Step 3. Follow unpinned build instructions
  • Step 4. Follow instructions for testing
  • Step 5. Follow instructions for installation

Ascertain Resident Memory Size

  • RSS: Resident Memory Size
  • VSZ: Virtual Set Size
> ps -o pid,user,vsz,rss,comm,args -p 1831038 1831042 1831045
    PID USER        VSZ   RSS COMMAND         COMMAND
1831038 eric     4515168016 36008 nodeos      nodeos 
1831042 eric     1113320 2360 oc-monitor      nodeos
1831045 eric      64744  2360 oc-trampoline   nodeos 

Ascertain Chainbase Size

  1. Ensure the following plugins are activated:

    • eosio::http_plugin
    • eosio::chain_plugin
    • eosio::db_size_api_plugin
  2. Make a call to db_size to find the current utilized space

http://api.example.com:8888/v1/db_size/get

Instructions Running Wharf Tests

Note: Many tests will fail. Not recommended to run this test suit.

Prereqs

Steps to run tests

  1. Get the code git clone https://github.com/wharfkit/antelope
  2. Remove the mock data rm test/data/*.json
  3. Build by running make
  4. Update endpoints for testing. Change line 14 in test/utils/mock-provider.ts to match desired endpoint
  5. set env export MOCK_PROVIDER=overwrite
  6. run tests make test