docs: benchmark and document storage cost delta from weighted governance - #547
Merged
thegreatfeez merged 1 commit intoAug 31, 2026
Conversation
Updates ARCHITECTURE.md storage tables and cost analysis to reflect the weighted governance model that replaced the flat M-of-N approval count. Measures actual XDR byte sizes for the Map<Address, u32> OWNERS entry, the u32-based approval weight entry, and the expanded Proposal struct, then presents a clear before/after cost comparison. Changes: - Updated Persistent Storage table: OWNERS type Vec<Address> → Map<Address, u32>, APPR type bool → u32 - Added TWGT to Key Naming Conventions singleton keys table - Added measured XDR byte breakdowns for OWNERS (1/7/20 owners), approval weight, and proposal entries - Added Storage Cost Delta section with before/after comparison - Corrected Proposal entry field names (threshold → quorum_weight, added approval_weight) Closes Ac0rdP#351
|
@Meet-hybrid is attempting to deploy a commit to the thegreatfeez's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Meet-hybrid 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! 🚀 |
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.
Overview
This PR benchmarks the real byte-size impact of weighted governance on on-chain storage and brings ARCHITECTURE.md back in sync with the deployed contract. The storage cost tables still described the pre-weighted layout (
Vec<Address>owners,boolapprovals, noquorum_weight); this update corrects all tables, adds measured XDR byte breakdowns, and presents a clear before/after cost comparison.Related Issue
Closes #351
Changes
📊 Storage Table Corrections
docs/ARCHITECTURE.md— Persistent Storage table:OWNERStype changed fromVec<Address>toMap<Address,u32>,("APPR", id, owner)type changed frombooltou32docs/ARCHITECTURE.md—TWGTadded to Key Naming Conventions singleton keys table📐 Measured XDR Byte Breakdowns
docs/ARCHITECTURE.md—OWNERSentry measured at 1, 7, and 20 owners (52 / 316 / 808 bytes)docs/ARCHITECTURE.md—("APPR", id, owner)weighted entry breakdown (~144 bytes,u32value)docs/ARCHITECTURE.md— Proposal entry corrected:threshold→quorum_weight, addedapproval_weightfield, corrected Address and String byte counts📈 Before/After Cost Delta
docs/ARCHITECTURE.md— Storage Cost Delta section with pre-weighted vs post-weighted comparison tabledocs/ARCHITECTURE.md— Worst-case persistent entries count (1,051 entries, ~54.6 XLM per 30-day cycle — identical before and after)Verification Results
Acceptance Criteria
TWGTlib.rsdefinitionquorum_weight, addedapproval_weightOWNERSand("PROP", id)entries