Orgchain v1.8: belts cross holdings, and a graduate becomes its own holding
From the operator's notes on trying v1.6.1. An award's recipient may sit in any holding, so a registry like well-known can certify an agent it doesn't hold (say, after the agent pays it). A graduated org already held its own root; now it is a holding of its own too: it and its subtree re-root under it, it joins the Holdings list with its own tree and timeline, mines its share and can be funded, and its parent's tree keeps a row for it that opens it. Events that touch two holdings (a belt across them, a graduation) show in both timelines, and the holding that acted gets the last-act credit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H4upF5LVwmPDDqrhdUfnXh
This commit is contained in:
1 parent
69a97544da
commit
7d981341ff
11 files changed
+122
-37
No files matched your search
+4
-3
@@ -160,11 +160,12 @@ test('graduation moves money to the new keys, and the graduate pays its own clai
|
||||
const lab = emptyLab();
|
||||
seedSample(lab);
|
||||
const { now, log, live } = money(lab);
|
||||
assert.deepEqual(now, { yolopreneur: 300 * SAT - 50 * SAT - 2 * FEE - TOPUP, 'well-known': 8 * SAT - FEE - TOPUP,
|
||||
lineage: 2 * SAT - FEE - TOPUP, time: 38.5 * SAT - 2 * FEE - 3 * TOPUP, sol: SAT - TOPUP, luna: 0.5 * SAT });
|
||||
// lineage graduates at beat 7 into a holding of its own, so it mines half of that beat
|
||||
assert.deepEqual(now, { yolopreneur: 275 * SAT - 50 * SAT - 2 * FEE - TOPUP, 'well-known': 8 * SAT - FEE - TOPUP,
|
||||
lineage: 27 * SAT - FEE - TOPUP, time: 38.5 * SAT - 2 * FEE - 3 * TOPUP, sol: SAT - TOPUP, luna: 0.5 * SAT });
|
||||
assert.deepEqual(log.slice(-2), [['move', 7, 'lineage', 'lineage', 2 * SAT - FEE], ['gas', 7, 'lineage', 'lineage', 10_000]]);
|
||||
const lineage = [...live.nodes.values()].find(n => n.name === 'lineage');
|
||||
assert.equal(lab.chain.balance(payerOf(lab.keys, live, lineage).script), 2 * SAT - FEE - TOPUP);
|
||||
assert.equal(lab.chain.balance(payerOf(lab.keys, live, lineage).script), 27 * SAT - FEE - TOPUP);
|
||||
assert.equal(money(lab, 5).now.lineage, 2 * SAT); // before graduating, at its derived address
|
||||
const solo = emptyLab();
|
||||
const root = act(solo, 'found', null, { name: 'acme' }), kid = act(solo, 'birth', root, { name: 'kid' });
|
||||
|
||||
Reference in new issue
Block a user