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

[aptos-framework] permissioned_delegation with rate limiter #15114

Merged
merged 6 commits into from
Jan 17, 2025

Conversation

lightmark
Copy link
Contributor

token bucket for rate limiting.

Copy link

trunk-io bot commented Oct 30, 2024

⏱️ 14m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-move-tests 10m 🟥
rust-cargo-deny 2m 🟩
check-dynamic-deps 36s 🟩
general-lints 26s 🟩
semgrep/ci 24s 🟩
file_change_determinator 10s 🟩
permission-check 4s 🟩
permission-check 2s 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@@ -46,7 +46,6 @@ module aptos_framework::rate_limiter {
// Calculate the full tokens that can be added
let accumulated_amount = time_passed * limiter.capacity + limiter.fractional_accumulated;
let new_tokens = accumulated_amount / limiter.refill_interval;
limiter.current_amount = limiter.current_amount + new_tokens;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found this line and slap myself.

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.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite compat success on 6593fb81261f25490ffddc2252a861c994234c2a ==> 48d007e1164ae3d61da49e737c71534b8d6eb649

Compatibility test results for 6593fb81261f25490ffddc2252a861c994234c2a ==> 48d007e1164ae3d61da49e737c71534b8d6eb649 (PR)
1. Check liveness of validators at old version: 6593fb81261f25490ffddc2252a861c994234c2a
compatibility::simple-validator-upgrade::liveness-check : committed: 17448.88 txn/s, latency: 1958.91 ms, (p50: 1900 ms, p70: 2100, p90: 2300 ms, p99: 3400 ms), latency samples: 574280
2. Upgrading first Validator to new version: 48d007e1164ae3d61da49e737c71534b8d6eb649
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 5027.55 txn/s, latency: 5940.56 ms, (p50: 6800 ms, p70: 7200, p90: 7300 ms, p99: 7400 ms), latency samples: 101920
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 5204.67 txn/s, latency: 6616.99 ms, (p50: 7300 ms, p70: 7300, p90: 7700 ms, p99: 7800 ms), latency samples: 180560
3. Upgrading rest of first batch to new version: 48d007e1164ae3d61da49e737c71534b8d6eb649
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 4701.99 txn/s, latency: 6603.29 ms, (p50: 7400 ms, p70: 7900, p90: 8100 ms, p99: 8300 ms), latency samples: 96500
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 4637.83 txn/s, latency: 7368.84 ms, (p50: 8200 ms, p70: 8400, p90: 8500 ms, p99: 8700 ms), latency samples: 165340
4. upgrading second batch to new version: 48d007e1164ae3d61da49e737c71534b8d6eb649
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 9065.33 txn/s, latency: 3326.33 ms, (p50: 3800 ms, p70: 4100, p90: 4400 ms, p99: 4500 ms), latency samples: 166000
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 8393.37 txn/s, latency: 3974.60 ms, (p50: 4100 ms, p70: 4500, p90: 4700 ms, p99: 4800 ms), latency samples: 283260
5. check swarm health
Compatibility test for 6593fb81261f25490ffddc2252a861c994234c2a ==> 48d007e1164ae3d61da49e737c71534b8d6eb649 passed
Test Ok

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 48d007e1164ae3d61da49e737c71534b8d6eb649

two traffics test: inner traffic : committed: 14535.90 txn/s, latency: 2726.61 ms, (p50: 2700 ms, p70: 2700, p90: 3000 ms, p99: 3600 ms), latency samples: 5526880
two traffics test : committed: 100.00 txn/s, latency: 1543.97 ms, (p50: 1400 ms, p70: 1500, p90: 1800 ms, p99: 3500 ms), latency samples: 1760
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 1.447, avg: 1.324", "ConsensusProposalToOrdered: max: 0.294, avg: 0.292", "ConsensusOrderedToCommit: max: 0.411, avg: 0.394", "ConsensusProposalToCommit: max: 0.705, avg: 0.686"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.62s no progress at version 4821375 (avg 0.20s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.62s no progress at version 2877119 (avg 0.62s) [limit 16].
Test Ok

@igor-aptos igor-aptos merged commit 17540fa into main Jan 17, 2025
46 checks passed
@igor-aptos igor-aptos deleted the token_bucket branch January 17, 2025 19:05
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