Skip to content

EIP-0048: Storage-Rent Repairs - #105

Open
arkadianet wants to merge 2 commits into
ergoplatform:masterfrom
arkadianet:eip-0048-storage-rent-repairs
Open

EIP-0048: Storage-Rent Repairs#105
arkadianet wants to merge 2 commits into
ergoplatform:masterfrom
arkadianet:eip-0048-storage-rent-repairs

Conversation

@arkadianet

Copy link
Copy Markdown

Specification for two storage-rent repairs, gated on block version 5 (soft fork via the standard voting mechanism, as with 5.0/6.0):

  1. 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.

  2. EIP-27 re-emission carve-outcheckExpiredBox (recreate branch: tokens must be preserved) and verifyReemissionSpending (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; verifyReemissionSpending is 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

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
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.

1 participant