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

[PH] Support configuring transaction type to send in trx generator through JSON transaction description #626

Merged
merged 8 commits into from
Jan 12, 2023

Conversation

oschwaldp-oci
Copy link
Contributor

@oschwaldp-oci oschwaldp-oci commented Jan 9, 2023

JSON Transaction Description Support

Add the ability to configure the type of transaction to generate/send from a JSON transaction description (file, str, etc.)
Added functionality to transaction generator to take input of abi from file, transaction action type, and action data from a string or file json description and generate transactions matching that description.

Transaction Generator now takes additional arguments:

  • action-name The action name applied to the provided action data input
  • action-data The path to the json action data file or json action data description string to use
  • abi-file The path to the contract abi file to use for the supplied transaction action data

Transaction Generator refactor base class

  • Refactored the transaction generator to push reusable functionality into a transaction_generator_base base class.

launch_transaction_generators.py also now supports:

  • action_name The action name applied to the provided action data input
  • action_data The path to the json action data file or json action data description string to use
  • abi_file The path to the contract abi file to use for the supplied transaction action data

performance_test_basic.py now supports:

  • --user-trx-data-file Path to userTrxData.json

Other Changes/Additions:

Rename handler_account to contract_owner_account for more accurate description.

Add integration test exercising the new functionality that builds transactions from abi, action type and action data. Makes use of the performance_test_basic with new argument --user-trx-data-file' and provided example userTrxData.json, but generates the transfer transactions from the abi, action name and action description in the test.

Added support to Cluster.py to allow populating wallet and creating accounts with specific account names for testing purposes (in particular to use with the --user-trx-data-file where a user would like to have foreknowledge about account names to use in action data).

Add functionality to transaction generator to take input of abi from file, transaction action type, and action data from a string or file json description and generate transactions matching that description.

Rename handler_account to contract_owner_account for more accurate description.

Add integration test exercising the new functionality that builds transactions from abi, action type and action data.  Makes use of the performance_test_basic with new argument '--exercise-trx-specification', but generates the transfer transactions from the abi, action name and action description in the test.

Added unit test to exercise the new trx_generator constructor.
tests/performance_tests/CMakeLists.txt Outdated Show resolved Hide resolved
tests/performance_tests/performance_test_basic.py Outdated Show resolved Hide resolved
tests/trx_generator/trx_generator.cpp Outdated Show resolved Hide resolved
tests/trx_generator/trx_generator.cpp Show resolved Hide resolved
…rxData.

Update performance_test_basic to support user specified transaction data through the use of the --user-trx-data command argument and the UserTrxData class.  Now supports creation of named accounts for use in user defined transactions.

Cluster supports populating wallet with named accounts.

Renamed command line argument for making use of user provided trx data to --user-trx-data.
Fix trx_expr to be fc::microseconds instead of int64_t
Replace prev argument --user-trx-data with --user-trx-data-file.

Read user trx data in from file and use that directly in lieu of UserTrxData.

Update tests to exercise this path with sample userTrxData.json file.

Update report construction to support Paths.
@oschwaldp-oci oschwaldp-oci requested a review from heifner January 12, 2023 04:57
tests/trx_generator/trx_generator.cpp Outdated Show resolved Hide resolved
@oschwaldp-oci oschwaldp-oci merged commit 02163a4 into feature_performance_harness_stage_2 Jan 12, 2023
@oschwaldp-oci oschwaldp-oci deleted the ph-trx-gen-json branch January 12, 2023 17:59
@oschwaldp-oci oschwaldp-oci added the OCI Work exclusive to OCI team label Apr 14, 2023
@oschwaldp-oci oschwaldp-oci self-assigned this Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants