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

[FUZZER] Multiple utils and library refactor, fuzzers #15176

Merged
merged 15 commits into from
Nov 13, 2024
Merged

Conversation

zi0Black
Copy link
Contributor

@zi0Black zi0Black commented Nov 4, 2024

Description

New structure for utils:

./utils
├── authenticator.rs
├── helpers.rs 
├── mod.rs
└── vm.rs

helpers.rs contains generic data structures and helpful functions. Specific data structures or functions for specific fuzzers are now located in vm.rs and authenticator.rs.

testsuite/fuzz/src/main.rs is now a CLI that introduces helpful commands to build fuzzers. Currently, only compile_federated_jwk has been introduced, but others can be ported. This is a good PoC to show how to generate custom scripts/modules and embed them in the fuzzer's code if required for the setup. A new data folder is now present, which is used for support files for the new CLI.

I turned all the fuzzers back on, as the build now works as expected on OSS-Fuzz.

How Has This Been Tested?

./fuzz.sh test

Key Areas to Review

N/A

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
  • Move Compiler
  • Other (specify)

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

@zi0Black zi0Black requested review from gedigi and GotenJBZ November 4, 2024 14:57
Copy link

trunk-io bot commented Nov 4, 2024

⏱️ 2h 29m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
execution-performance / single-node-performance 24m 🟩
rust-targeted-unit-tests 17m 🟥
rust-targeted-unit-tests 14m 🟥
rust-cargo-deny 13m 🟩🟩🟩🟩🟩 (+2 more)
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
check-dynamic-deps 9m 🟩🟩🟩🟩🟩 (+2 more)
rust-move-tests 9m
general-lints 3m 🟩🟩🟩🟩🟩 (+2 more)
semgrep/ci 3m 🟩🟩🟩🟩🟩 (+2 more)
file_change_determinator 1m 🟩🟩🟩🟩🟩 (+2 more)

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
execution-performance / single-node-performance 24m 19m +27%

settingsfeedbackdocs ⋅ learn more about trunk.io

testsuite/fuzzer/README.md Outdated Show resolved Hide resolved
@zi0Black zi0Black enabled auto-merge (squash) November 12, 2024 17:12

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@@ -14,6 +14,7 @@ anyhow = { workspace = true }
arbitrary = { workspace = true, features = ["derive_arbitrary"], optional = true }
bcs = { workspace = true }
bytes = { workspace = true }
dearbitrary = { version = "1.0.4", optional = true, features = ["derive"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use the same pattern where the external dependency version is declared at the workspace level?

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite compat success on fcd2dedf6ca61a23f4979e944c629dcdbdae5dca ==> 86b7910efa28041077f71a5b8324c443388f34d8

Compatibility test results for fcd2dedf6ca61a23f4979e944c629dcdbdae5dca ==> 86b7910efa28041077f71a5b8324c443388f34d8 (PR)
1. Check liveness of validators at old version: fcd2dedf6ca61a23f4979e944c629dcdbdae5dca
compatibility::simple-validator-upgrade::liveness-check : committed: 13716.55 txn/s, latency: 2086.68 ms, (p50: 1600 ms, p70: 1800, p90: 2000 ms, p99: 21100 ms), latency samples: 551380
2. Upgrading first Validator to new version: 86b7910efa28041077f71a5b8324c443388f34d8
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 8247.71 txn/s, latency: 3472.79 ms, (p50: 3900 ms, p70: 4100, p90: 4100 ms, p99: 4200 ms), latency samples: 150340
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 7560.26 txn/s, latency: 4250.67 ms, (p50: 4100 ms, p70: 4200, p90: 6800 ms, p99: 7200 ms), latency samples: 269760
3. Upgrading rest of first batch to new version: 86b7910efa28041077f71a5b8324c443388f34d8
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 6529.65 txn/s, latency: 4439.97 ms, (p50: 4900 ms, p70: 5400, p90: 5600 ms, p99: 5600 ms), latency samples: 117260
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 6971.02 txn/s, latency: 4687.26 ms, (p50: 5000 ms, p70: 5200, p90: 5400 ms, p99: 5500 ms), latency samples: 233400
4. upgrading second batch to new version: 86b7910efa28041077f71a5b8324c443388f34d8
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 11101.22 txn/s, latency: 2438.31 ms, (p50: 2400 ms, p70: 2600, p90: 3800 ms, p99: 4000 ms), latency samples: 192420
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 11313.79 txn/s, latency: 2769.12 ms, (p50: 2500 ms, p70: 2600, p90: 5600 ms, p99: 6900 ms), latency samples: 363280
5. check swarm health
Compatibility test for fcd2dedf6ca61a23f4979e944c629dcdbdae5dca ==> 86b7910efa28041077f71a5b8324c443388f34d8 passed
Test Ok

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 86b7910efa28041077f71a5b8324c443388f34d8

two traffics test: inner traffic : committed: 14506.37 txn/s, latency: 2741.49 ms, (p50: 2700 ms, p70: 2700, p90: 2900 ms, p99: 3000 ms), latency samples: 5515680
two traffics test : committed: 99.96 txn/s, latency: 1499.91 ms, (p50: 1400 ms, p70: 1400, p90: 1600 ms, p99: 6300 ms), latency samples: 1720
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 1.980, avg: 1.569", "ConsensusProposalToOrdered: max: 0.323, avg: 0.292", "ConsensusOrderedToCommit: max: 0.358, avg: 0.347", "ConsensusProposalToCommit: max: 0.648, avg: 0.640"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.91s no progress at version 2370219 (avg 0.20s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 8.48s no progress at version 2370217 (avg 8.48s) [limit 15].
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on fcd2dedf6ca61a23f4979e944c629dcdbdae5dca ==> 86b7910efa28041077f71a5b8324c443388f34d8

Compatibility test results for fcd2dedf6ca61a23f4979e944c629dcdbdae5dca ==> 86b7910efa28041077f71a5b8324c443388f34d8 (PR)
Upgrade the nodes to version: 86b7910efa28041077f71a5b8324c443388f34d8
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1409.78 txn/s, submitted: 1412.22 txn/s, failed submission: 2.44 txn/s, expired: 2.44 txn/s, latency: 2184.16 ms, (p50: 2100 ms, p70: 2400, p90: 2900 ms, p99: 4200 ms), latency samples: 126940
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1395.49 txn/s, submitted: 1397.78 txn/s, failed submission: 2.29 txn/s, expired: 2.29 txn/s, latency: 2207.16 ms, (p50: 2100 ms, p70: 2400, p90: 3600 ms, p99: 5100 ms), latency samples: 121900
5. check swarm health
Compatibility test for fcd2dedf6ca61a23f4979e944c629dcdbdae5dca ==> 86b7910efa28041077f71a5b8324c443388f34d8 passed
Upgrade the remaining nodes to version: 86b7910efa28041077f71a5b8324c443388f34d8
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1450.57 txn/s, submitted: 1453.44 txn/s, failed submission: 2.87 txn/s, expired: 2.87 txn/s, latency: 2071.59 ms, (p50: 2100 ms, p70: 2200, p90: 3000 ms, p99: 3900 ms), latency samples: 131300
Test Ok

@zi0Black zi0Black merged commit d7c3996 into main Nov 13, 2024
48 checks passed
@zi0Black zi0Black deleted the fuzzer-utils branch November 13, 2024 14:49
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