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

[EI-519][indexer][testing] Implement scripted transaction generation #14569

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

larry-aptos
Copy link
Contributor

@larry-aptos larry-aptos commented Sep 9, 2024

Description

  • Scripted transactions with a shared step

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Other (specify)

How Has This Been Tested?

Locally tested.

  • Command used:
cargo run -- --testing-folder /absolute/path/to/testing_folder --output-folder /your_output/folder
  • Example testing folder structure
image
  • Result
image

importing txns with this imported_transactions.yaml

testnet:
  # Transaction Stream endpoint addresss.
  transaction_stream_endpoint: https://grpc.testnet.aptoslabs.com:443
  # (Optional) The key to use with developers.aptoslabs.com
  api_key: aptoslabs_L7pzPsqiShp_EwzUCbhb6ehTe8PSvFp6ZeUr3B3gBdGaX
  # A map from versions to dump and their output names.
  versions_to_import:
    123: testnet_v1
    278556781: testnet_v1_coin_register_fa_metadata_278556781
    1255836496: testnet_v2_fa_metadata_1255836496
    5979639459: testnet_v5979639459
    5992795934: testnet_v5992795934
    51268254: testnet_v51268254


mainnet:
  # Transaction Stream endpoint addresss.
  transaction_stream_endpoint: https://grpc.testnet.aptoslabs.com:443
  # (Optional) The key to use with developers.aptoslabs.com
  api_key: aptoslabs_L7pzPsqiShp_EwzUCbhb6ehTe8PSvFp6ZeUr3B3gBdGaX
  # A map from versions to dump and their output names.
  versions_to_import:
    308783012: mainnet_v308783012


result
Screenshot 2024-09-27 at 12 41 46 PM

Key Areas to Review

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Copy link

trunk-io bot commented Sep 9, 2024

⏱️ 5h 42m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
rust-cargo-deny 50m 🟩🟩🟩🟩🟩 (+23 more)
general-lints 49m 🟩🟩🟩🟩🟩 (+23 more)
check-dynamic-deps 27m 🟩🟩🟩🟩🟩 (+23 more)
semgrep/ci 11m 🟩🟩🟩🟩🟩 (+23 more)
rust-move-tests 10m 🟩
rust-move-tests 10m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

@larry-aptos larry-aptos changed the title script transaction [indexer][testing] Implement scripted transaction generation Sep 9, 2024
@larry-aptos larry-aptos marked this pull request as ready for review September 9, 2024 18:54
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from f9ceb25 to b2224d1 Compare September 9, 2024 18:59
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from b2224d1 to ce6cea0 Compare September 9, 2024 19:03
@larry-aptos larry-aptos force-pushed the 09-05-create_centralized_config_and_transaction_importer branch from b963aa0 to 8471fb7 Compare September 9, 2024 21:52
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from ce6cea0 to 0a5ba82 Compare September 9, 2024 21:52
@larry-aptos larry-aptos force-pushed the 09-05-create_centralized_config_and_transaction_importer branch from 8471fb7 to 741fbe2 Compare September 9, 2024 21:56
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from 0a5ba82 to 49da7b1 Compare September 9, 2024 21:56
@larry-aptos larry-aptos force-pushed the 09-05-create_centralized_config_and_transaction_importer branch from 741fbe2 to f2f2aa9 Compare September 9, 2024 22:28
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from 49da7b1 to 7b7b33c Compare September 9, 2024 22:28
@larry-aptos larry-aptos force-pushed the 09-05-create_centralized_config_and_transaction_importer branch from f2f2aa9 to 10a69c9 Compare September 9, 2024 23:07
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from 7b7b33c to baa199a Compare September 9, 2024 23:07
@larry-aptos larry-aptos force-pushed the 09-05-create_centralized_config_and_transaction_importer branch from 10a69c9 to 85707be Compare September 9, 2024 23:16
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from baa199a to 4eef98e Compare September 9, 2024 23:16
@larry-aptos larry-aptos requested review from yuunlimm and a team September 10, 2024 18:29
@larry-aptos larry-aptos force-pushed the 09-05-create_centralized_config_and_transaction_importer branch from 85707be to 7ee66bd Compare September 11, 2024 19:14
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from 4eef98e to edc1787 Compare September 11, 2024 19:14
@larry-aptos larry-aptos force-pushed the 09-05-create_centralized_config_and_transaction_importer branch from 7ee66bd to 8cf0704 Compare September 11, 2024 19:25
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from edc1787 to ed6a282 Compare September 11, 2024 19:25
@larry-aptos larry-aptos force-pushed the 09-05-create_centralized_config_and_transaction_importer branch from 8cf0704 to 36abb0d Compare September 11, 2024 19:58
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch 3 times, most recently from 3dcba7a to 4b75da4 Compare September 11, 2024 22:40
@larry-aptos larry-aptos force-pushed the 09-05-create_centralized_config_and_transaction_importer branch from 36abb0d to bb21344 Compare September 11, 2024 22:53
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from 4b75da4 to 65a6700 Compare September 11, 2024 22:53
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from 4b956b0 to f90e515 Compare September 14, 2024 00:54
@yuunlimm
Copy link
Contributor

looks like config template got removed

@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from f90e515 to d104199 Compare September 16, 2024 23:34
@larry-aptos
Copy link
Contributor Author

looks like config template got removed

added back with a working command.

@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch 2 times, most recently from 4d8dc0d to 543b2c9 Compare September 17, 2024 20:36
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch 6 times, most recently from 5c85c24 to 492f60c Compare September 20, 2024 03:47
Copy link
Contributor

@dermanyang dermanyang left a comment

Choose a reason for hiding this comment

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

approving first; will do post-submission review

Cargo.toml Outdated Show resolved Hide resolved
@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from 3e02f49 to 7b3f37c Compare September 30, 2024 21:08
@yuunlimm yuunlimm enabled auto-merge (squash) September 30, 2024 21:09
let move_folder_path = testing_folder.join(MOVE_SCRIPTS_FOLDER);
// If the move fixtures folder does not exist, skip the script transaction generator.
if !move_folder_path.exists() {
return Ok(());
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need a log here?

@larry-aptos larry-aptos force-pushed the 09-09-script_transaction branch from b36ec0a to 058ab73 Compare September 30, 2024 21:35

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691

two traffics test: inner traffic : committed: 14371.03 txn/s, latency: 2763.37 ms, (p50: 2700 ms, p70: 2700, p90: 3000 ms, p99: 3300 ms), latency samples: 5464280
two traffics test : committed: 99.93 txn/s, latency: 1578.73 ms, (p50: 1500 ms, p70: 1500, p90: 1700 ms, p99: 9300 ms), latency samples: 1880
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.242, avg: 0.229", "QsPosToProposal: max: 1.139, avg: 1.106", "ConsensusProposalToOrdered: max: 0.325, avg: 0.293", "ConsensusOrderedToCommit: max: 0.409, avg: 0.396", "ConsensusProposalToCommit: max: 0.700, avg: 0.688"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.84s no progress at version 2351057 (avg 0.21s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 8.70s no progress at version 2351055 (avg 8.70s) [limit 15].
Test Ok

Copy link
Contributor

✅ Forge suite compat success on 28abb7db64af8de81a6bc76c6b2d6600181ac578 ==> 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691

Compatibility test results for 28abb7db64af8de81a6bc76c6b2d6600181ac578 ==> 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691 (PR)
1. Check liveness of validators at old version: 28abb7db64af8de81a6bc76c6b2d6600181ac578
compatibility::simple-validator-upgrade::liveness-check : committed: 12216.79 txn/s, latency: 2328.10 ms, (p50: 1800 ms, p70: 1900, p90: 2200 ms, p99: 27100 ms), latency samples: 495380
2. Upgrading first Validator to new version: 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 8201.57 txn/s, latency: 3477.61 ms, (p50: 3900 ms, p70: 4100, p90: 4200 ms, p99: 4300 ms), latency samples: 149580
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 7264.80 txn/s, latency: 4168.55 ms, (p50: 4200 ms, p70: 4300, p90: 4300 ms, p99: 6600 ms), latency samples: 272820
3. Upgrading rest of first batch to new version: 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 7989.99 txn/s, latency: 3586.67 ms, (p50: 4000 ms, p70: 4200, p90: 4300 ms, p99: 4400 ms), latency samples: 146900
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 7845.26 txn/s, latency: 4087.12 ms, (p50: 4300 ms, p70: 4400, p90: 5300 ms, p99: 5800 ms), latency samples: 256820
4. upgrading second batch to new version: 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 9607.23 txn/s, latency: 2819.56 ms, (p50: 2300 ms, p70: 3000, p90: 4900 ms, p99: 5700 ms), latency samples: 194980
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 7163.83 txn/s, latency: 4328.13 ms, (p50: 3000 ms, p70: 3500, p90: 9800 ms, p99: 15100 ms), latency samples: 235040
5. check swarm health
Compatibility test for 28abb7db64af8de81a6bc76c6b2d6600181ac578 ==> 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691 passed
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on 28abb7db64af8de81a6bc76c6b2d6600181ac578 ==> 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691

Compatibility test results for 28abb7db64af8de81a6bc76c6b2d6600181ac578 ==> 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691 (PR)
Upgrade the nodes to version: 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1220.88 txn/s, submitted: 1224.40 txn/s, failed submission: 3.52 txn/s, expired: 3.52 txn/s, latency: 2472.40 ms, (p50: 2100 ms, p70: 2700, p90: 3600 ms, p99: 5100 ms), latency samples: 110920
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1286.36 txn/s, submitted: 1289.23 txn/s, failed submission: 2.87 txn/s, expired: 2.87 txn/s, latency: 2329.94 ms, (p50: 2100 ms, p70: 2600, p90: 3300 ms, p99: 4200 ms), latency samples: 116480
5. check swarm health
Compatibility test for 28abb7db64af8de81a6bc76c6b2d6600181ac578 ==> 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691 passed
Upgrade the remaining nodes to version: 058ab73dfb79bc5bf1fe9cf8860d734a10bcf691
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1240.02 txn/s, submitted: 1242.06 txn/s, failed submission: 2.03 txn/s, expired: 2.03 txn/s, latency: 2454.92 ms, (p50: 2400 ms, p70: 2700, p90: 3400 ms, p99: 5000 ms), latency samples: 109880
Test Ok

@yuunlimm yuunlimm merged commit b163f03 into main Sep 30, 2024
47 checks passed
@yuunlimm yuunlimm deleted the 09-09-script_transaction branch September 30, 2024 22:06
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.

4 participants