Roa: carve sysio's account-creation RAM out of tier 1 at activation - #640
Merged
Merged
Conversation
activateroa now funds sysio's pool with 1/10 of every tier-1 slot's allocation up front, instead of regnodeowner granting 1/10 of every tier's allocation one registration at a time through a permanently locked policy row. Tier 1 is the tier that creates accounts; tiers 2 and 3 no longer contribute and keep their whole allocation. The removed row did nothing: it could never be reduced or extended, and the budget debit and quota credit it described were applied directly. nodeowners.total_sys now records the owner's budget net of sysio's share, so an owner's allocated_sys is exactly the sum of the policies it has issued. Dropping the registration grant also removes its absolute re-sync of sysio's quota from the reslimit row, which refunded the gift taken by each plain newaccount since the previous registration.
huangminghuang
previously approved these changes
Sep 25, 2026
huangminghuang
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the diff and relevant resource-accounting paths. No actionable findings for the documented pre-launch, fresh-bootstrap deployment. Required CI checks passed. Existing activated chains would need a separate migration for stored allocations and locked policies.
…trap-carveout The only conflict is sysio.roa.wasm; every source file merges clean. Rebuilt from the merged tree with wire-cdt master (a00bd7187, which includes #119). That CDT reproduces master's committed sysio.roa.wasm byte-for-byte, as it does every other contract except sysio.bios (untouched on both sides, left as committed), so the new binary differs from master's only by this branch's source change. sysio.roa.abi is unchanged.
huangminghuang
approved these changes
Sep 25, 2026
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.
Summary
Every node-owner registration wrote a permanently locked policy granting
sysio10% of the owner's tier allocation — for all three tiers. It shows up in node-owner UIs as a policy tosysiolocked until block 4,294,967,295. The agreed design is a single carve-out from tier 1 (the tier that creates accounts), made at bootstrap.activateroanow fundssysio's pool with 10% of every tier-1 slot's allocation up front, registered or not.regnodeownerno longer writes asysiopolicy or touchessysio's reslimit/quota.nodeowners.total_sysrecords the owner's budget net of the carve-out, soallocated_sysis exactly the sum of the policies an owner has issued.Why the policy row can go
It was inert.
reducepolicyrequirescurrent_block >= time_blockand it was written atUINT32_MAX;extendpolicyrequires a strictly largertime_block. The owner's budget debit lives innodeowners.allocated_sysand the credit was applied straight tosysio's reslimit, so nothing read the row.sysio's bootstrap pool never had a backing policy either.Numbers at the launch config
75,496 SYS, 104 bytes/unit, 1,144 bytes/account:
total_sys)sysioat activationsysio.roaSupply is conserved exactly:
sysio.roa+sysio+sysio.acctseed + every owner budget =total_sys × bytes_per_unit.Deployment
The T3 resource share (0.003% in code vs. 0.00045% in the whitepaper) is a separate open question; it changes the leftover that also feeds
sysio's pool.