Model Founder Seat capacity and the USD price schedule - #80
Merged
Merged
Conversation
Move checked arithmetic, RFC 8785 canonical bytes, and the D(label) digest helper into simulation/common so a second Founder model cannot drift from the economy simulator's digest rule. A divergent second implementation of the canonicalization or domain-separation rule is exactly what would make two conforming models disagree on a digest. Pure move plus import updates; no behavior change. Proven by the unchanged frozen vectors: 67 tests pass and the verifier still derives 139 manifest and 65 simulator values, including the accepted manifest, trace, state, and result digests. Refs #79.
Add the independent Founder Seat sale model satisfying first-goal requirement 8: the 100,000-seat capacity, the 1,000-seat per-principal bound, the integer USD cent denomination, the constitutional block price schedule, and the purchase transition with a bound external-payment placeholder. The complete 100,000-seat sale runs end to end and derives exactly 423,185,500,000 cents, the founder-stated USD 4,231,855,000. The tier boundary falls at block 90; that reading is not a preference but the only one deriving both the USD 91,900 final block and the full-sale total. Handlers are pure and return a write set the engine commits, so a rejected purchase cannot write by construction. The clone-and-digest approach used by the economy simulator was measured at 0.96s, 3.82s, and 16.45s for 500, 1,000, and 2,000 purchases, which extrapolates to roughly eleven hours for the complete sale; the founder-directed scenario this model exists to prove would not have been runnable. founder-economy-simulator-v1 is untouched and keeps its frozen vectors. The verifier rederives the whole schedule by walking the constitutional rule, sharing no code with the model's constant-time formula and closed-form sums, and requires the walk, the model, and the recorded file to agree on all 1,000 blocks. Fixes #79. Evidence: 49 seat tests and 67 economy tests pass; 96 seat vectors and 204 economy vectors derived and matched. No C++, consensus, devnet, or M1 change.
…lengths State.clone() became dead when the purchase handler was made pure, and leaving it implied the engine still copies state before each event, which is precisely the behavior this model does not have. Wrap the remaining lines that exceeded the longest existing Python line in the repository. No behavior change; all seat and economy suites and both vector verifiers pass unchanged. Refs #79.
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.
Closes #79. Milestone M2.3 — satisfies
first-goal.mdrequirement 8.Outcome
The constitutional Founder Seat sale is now executable. The complete
100,000-seat sale runs end to end and derives exactly USD 4,231,855,000.
Scope
docs/specifications/founder-seat-schedule-v1.md— integer USD denomination,capacity, block price schedule, ownership bound, purchase transition,
canonical state, journals, and vector obligations.
docs/decisions/0019-founder-seat-sale-schedule.md— denomination, tierboundary, atomicity design, and model separation with alternatives.
simulation/founder_seats/— contract, state, validation, pure handler,engine, metrics, CLI, and research fixture.
test-vectors/founder-seat-schedule-v1.txt— schedule, capacity, scenario,and atomicity vectors.
tools/founder-seat-vectors/verify.py— independent derivation.simulation/common/— shared deterministic primitives (see below).Economic and protocol effects
None activated. Seat sale value is USD cents, a unit distinct from native
atomic units; it never enters native supply or an issuance channel, so no seat
sale can affect the 55,743,940,100-unit maximum.
No C++ source, consensus rule, transaction byte, receipt, state root, SQLite
database, ABCI response, CometBFT validator, devnet parameter, dependency, or
workflow changes.
founder-economy-simulator-v1is untouched and keeps itsfrozen vectors and digests.
Key decisions
The tier boundary is block 90, and that is derived rather than chosen. The
constitution's prose is ambiguous in isolation, but only one reading derives
both founder-stated endpoints — the USD 91,900 final block and the USD
4,231,855,000 total. The two derived figures uniquely determine the rule.
USD cents, not native atomic units, so sale value cannot be confused with
or added to native supply. Cents rather than whole dollars so a later bridge
quote does not force a schema break.
A separate model, not an economy-simulator extension. The natural
integration (
purchase_seatcreating a seat thatactivate_seatrequires)would change an event kind ADR 0018 froze one slice earlier, invalidating the
vectors and digests just accepted — in exchange for an integration whose
activation height rule is still unsettled.
Pure handlers instead of clone-and-compare atomicity. A handler returns
either a rejection or a complete write set and never holds a reference it can
partially write, so a rejected purchase cannot write by construction.
A design defect found and fixed mid-slice
The first implementation reused the economy simulator's clone-per-event plus
per-event full-state digest. Measured against a growing state that is
quadratic: 500, 1,000, and 2,000 purchases took 0.96s, 3.82s, and 16.45s,
extrapolating to roughly eleven hours for the complete sale.
The specification already written claimed the complete sale was a scenario the
model "must be able to run end to end" — which was not true of the design.
Rather than weaken the claim, the design was fixed: pure handlers, no per-event
clone, no per-event state digest, and strided full-invariant checks. The
complete sale now runs in about ten seconds. Both documents record the
divergence from the economy simulator and why it exists.
A follow-up commit removed
State.clone(), which had become dead code andimplied a copying behavior this model deliberately does not have.
Verification
Local, on candidate
3328fc4:The four previously merged Founder Economy suites (67 tests) and its verifier
(139 manifest + 65 simulator vectors) still pass unchanged, which is also the
proof that the
simulation/common/extraction altered no behavior — the frozenmanifest, trace, state, and result digests are unchanged.
Independence: the vector file was produced from the model, so the verifier
rederives every schedule value by walking the constitutional rule one block at
a time, sharing no code with the model's constant-time formula and closed-form
sums, and anchors the four founder-stated figures to literals taken from the
constitution. The walk, the model, and the recorded file must all agree.
Scope classification selects
full; the complete hosted matrix runs on theexact head.
Known limitations and follow-up
because the activation height rule and purchase-to-activation transition are
unsettled.
biometric M4 work, so this constrains concentration only as strongly as
identity is proved, which in M2 is not at all.
custody, finality, refund, or stablecoin governance is safe.
first-goal.mdremain open;the handoff lists them and names the next slice.