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

[forge] Remove SenderAware shuffler from forge and tests #16109

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

hariria
Copy link
Contributor

@hariria hariria commented Mar 11, 2025

Context

In a previous PR (#15613) I had deprecated the SenderAwareV2 shuffler given that we had made the UseCaseAwareShuffler the default going forward.

Unfortunately, I forgot to remove all instances of the SenderAwareV2 shuffler, including places where it was used in forge. Because of this the forge-realistic-network-tuned-for-throughput test (which you can find in realistic_network_tuned_for_throughput_test() for aptos-core here) was failing.

details = """
panicked at consensus/src/transaction_shuffler/mod.rs:79:13:
internal error: entered unreachable code: SenderAware shuffler is no longer supported."""

Resolution

In forge I changed from TransactionShufflerType::SenderAwareV2(256) to

TransactionShufflerType::UseCaseAware {
    sender_spread_factor: 256,
    platform_use_case_spread_factor: 0,
    user_use_case_spread_factor: 0,
},

I also changed tests where appropriate

Test Plan

IDE Find Usages for TransactionShufflerType::SenderAwareV2 now only returns the following:

  1. create_transaction_shuffler -> this has an unreachable! branch for SenderAwareV2
  2. user_use_case_spread_factor -> returns None for all deprecated shufflers

(No longer used in tests and forge)

@hariria hariria self-assigned this Mar 11, 2025
Copy link

trunk-io bot commented Mar 11, 2025

@hariria hariria requested review from msmouse and zekun000 March 11, 2025 23:36
@@ -439,11 +439,11 @@ pub(crate) fn realistic_network_tuned_for_throughput_test() -> ForgeConfig {
}
OnChainExecutionConfig::V4(config_v4) => {
config_v4.block_gas_limit_type = BlockGasLimitType::NoLimit;
config_v4.transaction_shuffler_type = TransactionShufflerType::SenderAwareV2(256);
config_v4.transaction_shuffler_type = TransactionShufflerType::default_for_genesis();
Copy link
Contributor

Choose a reason for hiding this comment

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

if it's default we don't need to override, right?

probably should overwrite with

    UseCaseAware {
        sender_spread_factor: 256,
        platform_use_case_spread_factor: 0,
        user_use_case_spread_factor: 0,
    },

Replaced with TransactionShufflerType::UseCaseAware
@hariria hariria force-pushed the andrew/forge/remove-sender-aware-shuffler branch from 11ddec4 to 87a5488 Compare March 12, 2025 00:33
@hariria hariria requested a review from msmouse March 12, 2025 00:35
@hariria hariria enabled auto-merge (squash) March 12, 2025 01:34

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 87a5488583e01ccf19c2166f22e1bdf1651fbee1

two traffics test: inner traffic : committed: 12484.88 txn/s, latency: 3180.77 ms, (p50: 2400 ms, p70: 3000, p90: 5100 ms, p99: 10800 ms), latency samples: 4747020
two traffics test : committed: 99.97 txn/s, latency: 3952.78 ms, (p50: 2400 ms, p70: 4300, p90: 8100 ms, p99: 15600 ms), latency samples: 1660
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 0.453, avg: 0.272", "ConsensusProposalToOrdered: max: 0.310, avg: 0.304", "ConsensusOrderedToCommit: max: 0.439, avg: 0.403", "ConsensusProposalToCommit: max: 0.743, avg: 0.707"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.93s no progress at version 19778 (avg 0.20s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.95s no progress at version 1700276 (avg 0.87s) [limit 16].
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on c5eef1450476a6f7eee96d0d1953b65df04fdb91 ==> 87a5488583e01ccf19c2166f22e1bdf1651fbee1

Compatibility test results for c5eef1450476a6f7eee96d0d1953b65df04fdb91 ==> 87a5488583e01ccf19c2166f22e1bdf1651fbee1 (PR)
Upgrade the nodes to version: 87a5488583e01ccf19c2166f22e1bdf1651fbee1
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 504.26 txn/s, submitted: 505.61 txn/s, failed submission: 1.36 txn/s, expired: 1.36 txn/s, latency: 6289.04 ms, (p50: 2400 ms, p70: 3500, p90: 20500 ms, p99: 21200 ms), latency samples: 44600
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 951.73 txn/s, submitted: 954.58 txn/s, failed submission: 2.85 txn/s, expired: 2.85 txn/s, latency: 3030.98 ms, (p50: 2100 ms, p70: 2700, p90: 7400 ms, p99: 11600 ms), latency samples: 86920
5. check swarm health
Compatibility test for c5eef1450476a6f7eee96d0d1953b65df04fdb91 ==> 87a5488583e01ccf19c2166f22e1bdf1651fbee1 passed
Upgrade the remaining nodes to version: 87a5488583e01ccf19c2166f22e1bdf1651fbee1
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1699.63 txn/s, submitted: 1705.17 txn/s, failed submission: 5.55 txn/s, expired: 5.55 txn/s, latency: 1708.21 ms, (p50: 1800 ms, p70: 2000, p90: 2400 ms, p99: 3400 ms), latency samples: 153181
Test Ok

Copy link
Contributor

✅ Forge suite compat success on c5eef1450476a6f7eee96d0d1953b65df04fdb91 ==> 87a5488583e01ccf19c2166f22e1bdf1651fbee1

Compatibility test results for c5eef1450476a6f7eee96d0d1953b65df04fdb91 ==> 87a5488583e01ccf19c2166f22e1bdf1651fbee1 (PR)
1. Check liveness of validators at old version: c5eef1450476a6f7eee96d0d1953b65df04fdb91
compatibility::simple-validator-upgrade::liveness-check : committed: 12126.15 txn/s, latency: 2723.19 ms, (p50: 2800 ms, p70: 2900, p90: 3300 ms, p99: 3700 ms), latency samples: 399700
2. Upgrading first Validator to new version: 87a5488583e01ccf19c2166f22e1bdf1651fbee1
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 2491.44 txn/s, latency: 11038.87 ms, (p50: 11600 ms, p70: 12400, p90: 14900 ms, p99: 15200 ms), latency samples: 66000
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 2592.42 txn/s, latency: 11639.30 ms, (p50: 12900 ms, p70: 13200, p90: 15100 ms, p99: 16000 ms), latency samples: 100600
3. Upgrading rest of first batch to new version: 87a5488583e01ccf19c2166f22e1bdf1651fbee1
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 1623.57 txn/s, latency: 15260.89 ms, (p50: 20300 ms, p70: 21400, p90: 22300 ms, p99: 23000 ms), latency samples: 55060
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 2397.68 txn/s, latency: 9654.68 ms, (p50: 9400 ms, p70: 11600, p90: 13100 ms, p99: 13400 ms), latency samples: 117220
4. upgrading second batch to new version: 87a5488583e01ccf19c2166f22e1bdf1651fbee1
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 1407.85 txn/s, submitted: 1408.00 txn/s, expired: 0.15 txn/s, latency: 5648.03 ms, (p50: 6400 ms, p70: 6900, p90: 7000 ms, p99: 7100 ms), latency samples: 104729
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 2110.61 txn/s, submitted: 2110.86 txn/s, expired: 0.25 txn/s, latency: 6315.85 ms, (p50: 6900 ms, p70: 7100, p90: 7400 ms, p99: 7400 ms), latency samples: 186438
5. check swarm health
Compatibility test for c5eef1450476a6f7eee96d0d1953b65df04fdb91 ==> 87a5488583e01ccf19c2166f22e1bdf1651fbee1 passed
Test Ok

@hariria hariria merged commit ad387a6 into main Mar 12, 2025
88 checks passed
@hariria hariria deleted the andrew/forge/remove-sender-aware-shuffler branch March 12, 2025 02:12
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