Profile the owner-authorization check's per-call resource cost at the… - #393
Open
quickweb-stack wants to merge 1 commit into
Open
Profile the owner-authorization check's per-call resource cost at the…#393quickweb-stack wants to merge 1 commit into
quickweb-stack wants to merge 1 commit into
Conversation
… maximum owner count
|
@OluRemiFour is attempting to deploy a commit to the thegreatfeez's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@quickweb-stack Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Author
|
Done, Close: #393 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close: #353
Summary
Both benchmark tests exist in contracts/accord/src/test.rs:7224-7389 and the results are fully documented in docs/ARCHITECTURE.md:473-541.
What exists:
benchmark_owner_check_cpu_and_memory (test.rs:7251) — Measures get_owner_weight at 1 and 20 owners, records CPU/memory deltas
benchmark_approve_cost_20_owners (test.rs:7322) — Measures a full approve call at 20 owners
Actual measured results (verified by running both tests):
Scenario CPU instructions Memory bytes % of mainnet CPU % of mainnet memory
Owner check (1 owner) 47,958 24,477 — —
Owner check (20 owners) 89,998 55,035 0.0150% 0.1312%
Delta 42,040 30,558 — —
Full approve (20 owners) 280,920 145,205 0.0468% 0.3462%
Conclusion: The owner-authorization check stays well within Soroban's per-invocation resource budget (600M CPU, ~40MB memory) at the maximum owner count of 20. The check consumes 0.015% CPU and 0.13% memory at 20 owners, leaving ample headroom.
Type of Change
Related Issue
Closes #353
Testing Checklist