EIP-0048: Storage-Rent Repairs - #105
Open
arkadianet wants to merge 2 commits into
Open
Conversation
64-bit storage-fee arithmetic and an EIP-27 re-emission carve-out on expired-box recreation, gated on block version 5. Repairs two defects that permanently exempt box classes from storage rent: the Int-wrapping fee (ergo#2251) and the checkExpiredBox/verifyReemissionSpending deadlock on re-emission-token boxes. Reference implementation: ergoplatform/ergo#2438. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PYSS7hBNFeddkwE3RadSfw
…nalysis Two corrections after review (kushti + a-shannon confirmed on Discord; independent fork-type analysis corroborated): - Fork type: soft fork -> HARD FORK (fixed-height flag-day). The storage-rent predicate checkExpiredBox runs unconditionally on every node, not behind the script-version deferral that carried 5.0/6.0, and its failure surfaces as the non-disableable txScriptValidation rule, so the soft-fork machinery cannot carry the relaxation. Documents the one soft-fork-shaped alternative (disable txReemission) and why it is unacceptable (removes EIP-27 burn enforcement network-wide). Gate is now a consensus height H, decoupled from any script-v4 rollout. - Removes the incorrect 'second-wrap claims become invalid' tightening claim: correctOutValue is a floor, so undercollection stays valid and both repairs are pure relaxations - nothing valid becomes invalid. - Notes the reference branch is being reshaped to gate on H with consensus-derived EIP-27 enforcement (config-flag independent), overflow-safe debt arithmetic, and H-1/H/H+1 + reorg coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PYSS7hBNFeddkwE3RadSfw
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.
Specification for two storage-rent repairs, gated on block version 5 (soft fork via the standard voting mechanism, as with 5.0/6.0):
64-bit storage-fee arithmetic — the fee currently wraps in
Int(ergo#2251), making boxes ≥ ~1,718 bytes effectively rent-immune (negative fee → recreation floor above the box's own value) and charging boxes ≥ ~3,436 bytes a small fee unrelated to their size. Same arithmetic as ergo#2375, with the activation gate that makes it deployable without splitting patched/unpatched nodes.EIP-27 re-emission carve-out —
checkExpiredBox(recreate branch: tokens must be preserved) andverifyReemissionSpending(no output may carry the re-emission token) contradict each other for any expired box still holding re-emission tokens, making every unclaimed post-777,217 reward box permanently exempt from storage rent. A live mainnet node rejects both possible claim shapes for the first real such box (fbf119cb…f82cfb, 63 ERG, rent-eligible since ~1,828,900); rejection vectors are included in the EIP. The repair: the recreated box drops the token and the recreation floor drops by 1 nanoErg per token;verifyReemissionSpendingis unchanged and now enforces that the released value is paid to the pay-to-reemission contract — the rent path executes the burn obligation instead of deadlocking against it, and the value flows back to future miner emissions.Related: EIP-0033 (#68) is orthogonal and composable (full-consume branch, tokens generally; this EIP: recreate branch, re-emission token, fee arithmetic).
Reference implementation (draft, version-gated, changes nothing until a v5 vote activates): ergoplatform/ergo#2438. Independent Rust-node handling of the current rules' consequence, with the live-node rejection vectors as fixtures: arkadianet/ergo#225.
Number 0048 chosen as 0045–0047 are claimed by open PRs here; happy to renumber.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PYSS7hBNFeddkwE3RadSfw