Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding benchmark test - root/child chain measurements #1510

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

stana-miric
Copy link
Contributor

@stana-miric stana-miric commented May 15, 2023

Description

This PR includes adding benchmark test for testing tx execution on root and child chain. Also, benchmark-test command is added for the purpose of testing on a test environment were we have both root and child chain running. The changes includes:

  1. Adding benchmark directory that includes tests and helpers for tests.
  • helpers.go that has helper functions needed in tests like deploying contracts and similar,
  • root_child_benchmark_test.go tests execution of tx by calling the node on both root and child chain
  • transition_benchmark_test.go tests calling contracts on transition instance. This test uses SampleContract which is taken from go-ethereum test since we want to compare execution on both edge and geth
  1. Adding benchmark-test command(which tests the same thing as root_child_benchmark_test): the command has rootJSONRPC, childJSONRPC, startCluster and privateKey flags. If startCluster is false, then the local cluster will not be started and the provided addresses will be used as the endpoints to the root and child chains. If startCluster is set to true, the local cluster will be started automatically. If the private key is specified, it will be used as the transaction sender. Otherwise, the local cluster will generate a sender key. If startCluster is set to false, then the sender must have enough funds for sending transactions.. Example how to run the command:
    polygon-edge benchmark-test --childJSONRPC="http://127.0.0.1:12001" --rootJSONRPC="http://127.0.0.1:8545" --privateKey="aa75e9a7d427efc732f8e4f1a5b7646adcc61fd5bae40f80d13c8419c9f43d6d"
    or
    polygon-edge benchmark-test --startCluster
  2. There are changes in e2e testing framework which replaces testing.T with testing.TB interface in order to use some functionality in the benchmark tests as well
  3. tx relayer exposes WaitForReceipt and SumbitTransaction

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@stana-miric stana-miric force-pushed the EVM-639-analyze-storage-performance-edge-technical-challenges branch from 81ed307 to 6e075ab Compare May 16, 2023 17:33
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's talk about this

@stana-miric stana-miric force-pushed the EVM-639-analyze-storage-performance-edge-technical-challenges branch from 158de62 to 4bf44e0 Compare May 29, 2023 14:38
@stana-miric stana-miric force-pushed the EVM-639-analyze-storage-performance-edge-technical-challenges branch from 4bf44e0 to 70b0df9 Compare May 29, 2023 14:41
@stana-miric stana-miric marked this pull request as draft October 19, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants