Commit Graph
224 Commits
Author SHA1 Message Date
Kgothatso NgakoandClaude Opus 5 e07bb68014 feat: the sender ratchet as its own row, and the receive side beside it (marmot-kmp, Phase 8)
The piece Phase 7 deferred, in both directions, because they are one question:
a group's state is a few kilobytes of ratchet tree, group context and epoch
secrets, and the app was rewriting all of it to record things that moved a
counter.

Sending an application message advances exactly one thing -- this leaf's entry
in the secret tree (RFC 9420 §9) -- so the library carries the position as its
own record, `MlsGroupStateStore.saveSenderRatchet`, in the spirit of OpenMLS
keeping `message_secrets` apart from `group_state`. Giza defaulted that to
false, which sent the manager back to a full save per message. It is now a
`MarmotSenderRatchet` row, one per room, schema 36 -> 37 with an AutoMigration.
The bytes are stored as the library wrote them -- the `MarmotPublishObligation`
precedent, not the retained-epoch one -- because a record whose whole job is to
never go backwards is safest when nothing here re-encodes it; the epoch, leaf
and generation sit beside it, read off those same bytes, so they cannot drift.

The hazard this introduces is an ordering, and it is in the app's code, not the
library's. `MlsGroupManager.restoreAll` applies the record itself. A room joined
after the engine restored is loaded from its row by `MarmotEngine.groupFor`
instead, and that has to apply the record BEFORE `adoptGroup`, because adopting
persists and persisting rewrites the row from the group being adopted. The other
way round, the next restart re-emits generations already published, under AEAD
keys and nonces already used.

Finding the test that could tell the two orders apart took two goes. The first
asserted the row after a lazy load and passed with the order inverted: a state
saved before this leaf ever sent has no ratchet entry, `exportOwnSenderRatchet`
returns null, and the adopt writes nothing. The order cannot matter until the
stored state holds a position of its own behind the record's, and a received
message is what puts one there. With one receive in the middle the inverted
order fails with expected:<2> but was:<1>.

The receive side is a full save, from `MarmotEngine.processGroupEvent`, which
`NostrDao` now reads inbound events through so a second caller cannot forget it.
And a correction to Phase 5, which said an unwritten row still lost the late
message. It does not: mls-kmp writes the skipped keys beside the positions they
belong to, so an unwritten row is an older COHERENT state, and a position that
has not passed the late generation derives it forward. quartz's engine saved the
positions and dropped the keys -- that pair is what lost messages. The cost of
an unwritten row is the re-deriving, against SecretTree's thousand-step cap. The
reason the write lands now is the send side: until this change every send wrote
the whole state, so the row could not fall far behind inside an epoch.

1167 tests across 156 classes, 0 failures; Android and JVM compile clean; the
four audits unchanged. docs/mls-skipped-keys.md loses its mitigation claim and
gains the correction; docs/marmot-kmp.md gains Phase 8.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-19 09:55:31 +02:00
Kgothatso NgakoandClaude Opus 5 7fb56b8f8f docs: the move is built, and what it does not claim (marmot-kmp)
Phases 0 to 7, one commit each but for 5 and 6, which share one because the fork probe
produced no code. 1161 tests, 0 failures; compileDebugKotlinAndroid and compileKotlinJvm
clean; four audits green, the new one among them.

Three things it does not claim, said at the top rather than left to be discovered at the
end of a phase. No manual upgrade of a profile with real rooms has been done, and that is
the last check before a release -- a fixture is one member at epoch 0. The sender ratchet
record and the receive-side write are deferred together, because they are one decision
about how often this app persists a group and they want a schema change. And the authored
fork is still not settled; Phase 6 probed it and the gap is the library's, unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-19 00:17:24 +02:00
Kgothatso NgakoandClaude Opus 5 f0f1c179df build: the engine cannot come back from quartz (marmot-kmp, Phase 7)
marmotAudit runs docs/scripts/marmot-kmp-imports.sh --check from `check`, beside the M3,
brand and wallet audits. Verified both ways: silent on a clean tree, and on a tree with
one import put back it names the file and the line and fails with a pointer to the note.
That is C2 made enforceable -- a cherry-pick from a Bennu still on quartz 1.15.2 brings
the old spelling back, and "re-run the rule" is advice until a build failure makes it a
step.

The other three items of this phase are named in the note rather than done, each for a
reason:

- The app's own copies: nothing to delete. CommitOrdering is still live in NostrDao's
  reindex sweep and MarmotInboundManager's epoch tracker, and marmot-kmp has no
  CommitOrdering at all -- the convergence engine replaced the idea, not the class. Under
  D4 the legacy pipeline keeps its behaviour, so the comparator retires with the profile.
- The sender ratchet record wants a new table, so schema 36 -> 37 and an AutoMigration,
  and the interface says the write MUST be durable before it returns or a lost position
  reuses an AEAD key and nonce pair. A per-message write path with a correctness hazard
  does not belong in the tail of a migration whose discipline was D5. It is the obvious
  next task, and it is the same shape as the receive-side write Phase 5 pinned: one piece
  of work that decides how often this app persists a group, in both directions.
- Durable ingest dedup is taken by MarmotManager, not by MarmotInboundProcessor, so it
  needs the client D1 deferred. Phase 3 is where that stopped being hypothetical.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-19 00:16:21 +02:00
Kgothatso NgakoandClaude Opus 5 3b2b5e3614 test: the skipped keys, half closed and half pinned (marmot-kmp, Phases 5 and 6)
Phase 6 is a probe with no code of its own, so it rides along: both fork tests pass
unchanged, which means marmot-kmp 2.2.1 still scores a fork this device is half of the way
quartz 1.15.2 did. The assertion whose message is "the two sides agree -- the library has
been fixed" did not fire. What changed is that the fix docs/marmot-v2.md predicts is now a
first-class thing on the library's side -- MlsGroup.stageCommit, with the staged commit in
MlsGroupState from its STATE_VERSION 9 -- so it is a choice in MlsCandidateStateEngine
between replaying a branch and taking the state that was kept. Both notes say so.

Phase 5 is the skipped keys, and it is half closed. mls-kmp's state carries them:
skippedApplicationSecrets and skippedHandshakeSecrets, exported by saveState and imported
by restore, arriving at STATE_VERSION 5 so a version-4 blob reads them as an empty map.
That is steps 1 to 3 of the fix docs/mls-skipped-keys.md proposed. Step 4 is not done:
consumedGenerations, the replay guard, is still one SecretTree's field.

The app does not benefit yet, and the first draft of this test claimed it did.
MlsGroupManager.decrypt persists only when the message was a commit that advanced the
epoch, so the secret reaches the live group and never the row. The draft delivered
generation 1, rebuilt the engine, delivered generation 0 and asserted it decrypted -- and
it did, for the wrong reason: a rebuilt engine restores a blob whose sender ratchet never
moved, so generation 0 is simply the next one it expects. A green test proving nothing,
caught by the assertion beside it that looked redundant.

So the three tests say what is true: the secret is in the state the engine would save, a
group rebuilt from those bytes reads the late message, and the stored state does not carry
it. The last one is pinned in the style of the authored fork, with its KDoc saying what to
invert when the receive path starts persisting -- deliberately not done here, because it
is a write per inbound message that re-encodes the ratchet tree, the group context and
every epoch secret. saveSenderRatchet is the library's answer to that cost on the send
side.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-19 00:15:28 +02:00
Kgothatso NgakoandClaude Opus 5 b2539773ce test: the state on every device still opens (marmot-kmp, Phase 4)
C1 is the constraint the whole move hangs on: ChatRoom.mlsGroupState is a
MlsGroupState.encodeTls() blob written by quartz 1.15.2 on every device that has ever been
in a group, and a blob the new engine cannot read costs a user every room they are in --
there is no in-place migration from a legacy group.

The argument was checkable before a test was written. quartz 1.15.2's own sources, in the
sources jar beside the artifact in the gradle cache, declare STATE_VERSION = 4; mls-kmp
1.3.0 declares 10 and accepts 1..10, appending only. So every blob in the wild is version
4 and the window covers it six times over.

The measurement is docs/tools/old-state-blob, whose only dependency is
com.vitorpamplona.quartz:quartz:1.15.2 -- it prints a real 1033-byte blob for a legacy
MIP-01 group at epoch 0, which is the shape every room in the wild started as. It is
checked in because once it is gone nothing in the hex says whether the fixture came from
the old engine or the new one, and a fixture written by the new engine would pass while
testing nothing.

MlsGroupStateCompatibilityTest pins it six ways: the fixture is still version 4 (asserted
alone, so a fixture that drifted to 10 cannot make the rest pass vacuously); mls-kmp
decodes it; the group rebuilds from it with 0xF2EE, its nostr_group_id and its name
intact, still reading as legacy; the kind:445 outer key off a restored old group is 32
bytes, which is Phase 1's policy finding pinned against real pre-migration bytes; a
re-save lands on version 10 and still decodes, same group id and epoch; and
RetainedEpochSecrets still round-trips the five fields RoomMlsGroupStateStore stores it as.

No schema change: the blob is opaque to Room and the version is inside it, so 36 stands.

Not done, and not automatable here: one manual upgrade of a profile with real rooms in it.
A fixture is one member at epoch 0; the rooms that matter have epochs, members and a
retained window behind them. That is the last thing between this and a release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-19 00:08:17 +02:00
Kgothatso NgakoandClaude Opus 5 763edcde9f test: the app's orchestration against the library's own client (marmot-kmp, Phase 3)
`MarmotStandIn` moved to marmot-kmp's managers in Phase 1 with nothing but its imports
changing, and it stays as it is: the convergence and lifecycle tests need a processor they
can reach into -- `recordLocalCommit` with a state snapshot of their own, `buildAppEvent`
with a payload they wrote -- which a `MarmotManager` would take away.

So the second stand-in is additive. `MarmotClientStandIn` is a `MarmotManager` over an
`InMemoryMlsGroupStateStore` and a publisher that says yes, with no message store and no
KeyPackage store because both are nullable and a client that persists nothing is all a
test wants from one. It is what Amethyst, its desktop app and the `amy` CLI drive.

The two are not redundant, and the difference is the difference between the two questions
this migration has to answer. In CurrentProfileInteropJvmTest the test's own code decides
how the Welcome is sealed and what an application payload looks like, and asks whether two
engines agree. Here the library decides -- `addMemberInvites` picks the commit's shape,
`MarmotWelcomeSender` wraps the Welcome -- and the question is whether the app's own
orchestration, `MarmotEngine` and the DAOs and the outbound queue, reaches the same group
as the orchestration the library ships. It does, on the first run: the app joins a group
the client made and invited it to, under the routing id the client minted; it files and
attributes a `buildTextMessage` from it; and the client decrypts what the app's outbound
path sends and decodes it as a canonical payload.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-19 00:05:11 +02:00
Kgothatso NgakoandClaude Opus 5 9bc05c112d refactor: the names quartz 2.x gave the kinds (marmot-kmp, Phase 2)
Most of this phase was answered by Phase 1 rather than built. `GroupEventResult` still has
exactly nine variants -- `MarmotEngine.inRoom` is an exhaustive `when` used as an
expression, so the compiler says so rather than a reading of the source. The convergence
and lifecycle surface takes and returns what `settleLater` and `awaitSettled` already
expected, `allowsOutboundWork` included. `stageAddMember` -> `StagedCommit` ->
`gate.prepare` -> `installState` needed no edit. And no test's assertions moved: seven
fixtures now build their group with `MarmotGroupPolicy` as the app does, which is a
construction-site change, not a weakened expectation.

What was left is the six classes quartz 2.x renamed to match what the NIPs call the kinds,
and kept deprecated typealiases for: SealedRumorEvent -> SealEvent, ChatMessageRelayListEvent
-> DmRelayListEvent, RelayFeedsListEvent -> FavoriteRelayListEvent, LnZapEvent ->
ZapReceiptEvent, LongTextNoteEvent -> LongFormContentEvent, ChannelListEvent ->
PublicChatListEvent. 104 references in 25 files; same packages, so each is an identifier
rename. None reaches a string the app persists -- no Room column, no string resource, no
kind number -- and after it the build has no quartz deprecation warnings left.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-18 23:59:35 +02:00
Kgothatso NgakoandClaude Opus 5 fc80a089aa build: the Marmot engine comes from marmot-kmp (marmot-kmp, Phase 1)
quartz 1.15.2 -> 2.7.3, and the engine it used to carry from marmot 2.2.1 over mls 1.3.0
over crypto 2.1.0. docs/scripts/marmot-kmp-imports.sh --apply moved 187 lines by the rule;
42 `quartz.marmot` imports stay, which are the event classes quartz kept.

The 854 non-Marmot quartz imports came through the major bump without an edit. All 45
compile errors were in the engine seam, and 44 were one thing: five accessors that were
members of `MlsGroup` in quartz's engine are extension functions in marmot-kmp
(`currentGroupState`, `currentMarmotData`, `currentNostrGroupId`, `currentAdminIdentities`,
`isLocalAdmin`), so 14 files import one now. The 45th, `buildCurrentProfileFrom`, likewise.
No constructor the app drives changed shape, and `GroupEventResult` still has exactly nine
variants -- `MarmotEngine`'s exhaustive `when` compiling is the proof there is no tenth to
drop on the floor.

One change here is not a rename. `MlsGroupPolicy` is new in mls-kmp: quartz's engine
hardcoded Marmot's rules, mls-kmp made them an argument, and every factory defaults it to
`Permissive` -- so the eleven places this app builds a group itself were building a
non-Marmot group. The loud half is that `commitExporter` is then null, `preCommitExporterSecret`
comes back empty and `GroupEventEncryption.encrypt` refuses it ("Group key must be 32
bytes"), which is the one test that failed. The silent half matters more: `Permissive`
greases the leaf's capabilities, which MDK has never been tested against; it knows neither
`0xF2EE` nor the app-data dictionary, so RFC 9420 13.4 refuses a GroupContextExtensions
proposal in a group we are a member of; and it authorizes every commit, proposal and
SelfRemove without a check. So `MarmotGroupPolicy` goes in at all eleven. The
current-profile paths needed none -- `CurrentProfileGroupFactory` and every
`MlsGroupManager` entry point pass it themselves.

1149 tests, 0 failures; compileDebugKotlinAndroid clean; the three audits unchanged.
Import blocks were re-sorted in the touched files only: 253 further files in composeApp
have blocks that were already out of order, and C2 is the reason to leave them be.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-18 23:56:27 +02:00
Kgothatso NgakoandClaude Opus 5 1775ae7d4c build: the rule that says where a Marmot class comes from (marmot-kmp, Phase 0)
docs/scripts/marmot-kmp-imports.sh, with --apply, --revert and --check. The destinations
in it are not derived from the packages' names but from listing what quartz 2.15.1 still
has under `marmot/` against what marmot-kmp 2.2.1 and mls-kmp 1.3.0 declare, which is how
the split inside `mip00KeyPackages`, `mip02Welcome`, `mip03GroupMessages` and
`mip05PushNotifications` came out: the events and tags stay, the five stores and managers
beside them move. marmot-kmp imports the quartz half itself.

Applied and reverted on a clean tree it moves 187 lines and puts all 187 back -- 79 onto
marmot-kmp, 80 onto mls-kmp, 27 onto crypto-kmp, one KDoc line -- and leaves the 42
`quartz.marmot` event imports standing, which is the count the plan's table predicts.

Reversible because the fork still cherry-picks from upstream, upstream is on quartz 1.15.2
with the engine inside it, and every line this touches is one a cherry-pick will conflict
in. The resolution is to re-run the rule, not to read the diff.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-18 23:43:46 +02:00
Kgothatso NgakoandClaude Opus 5 f2059eb1b5 docs: the Marmot engine left quartz, and a plan to follow it (marmot-kmp, the plan)
quartz 2.3.0 dropped the Marmot engine. Everything this app imports from
`com.vitorpamplona.quartz.marmot` but the event classes -- the MLS engine, the three
processors, convergence, the publish gate, the app components, the KeyPackage managers --
is in marmot-kmp over mls-kmp over crypto-kmp now, and quartz 1.15.2 is the last version
that still has it inside. So the app is not behind on a version; it is on a branch of the
engine that ended.

The note is the move: where each of the 228 import lines goes and the one rule that places
all but two of them, the two constraints (the group state already on devices, and that the
fork still cherry-picks from a Bennu that is on 1.15.2), the six decisions -- keep
`MarmotEngine`, pin quartz to the 2.7.3 marmot 2.2.1 was built against, declare crypto-kmp
rather than inherit it -- and eight phases that put the swap in one commit with the
evidence around it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-18 23:43:46 +02:00
Kgothatso NgakoandClaude Opus 5.5 8b06679584 docs: follow Bennu by cherry-picking, and record what is left (wallet removal, Phase 9)
Material Design conformance / budgets (push) Canceled after 0s
Material Design conformance / tests (push) Canceled after 0s
The rebrand's Phase 9 now takes fixes from Bennu one commit at a time
(W1): a merge would bring every wallet change back as a conflict, and
Giza's schema has its own version 36. The wallet-removal plan records
itself as built but for Phase 7b and Phase 9's device checks, which need
an iOS build, devices and a Bennu build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:15:37 +02:00
Kgothatso NgakoandClaude Opus 5.5 b27ed2a05f docs: retire the wallet notes, and guard against a wallet coming back (wallet removal, Phase 8)
The 23 wallet notes move to docs/retired/ with a banner; every link between
notes is rewritten for the move and checked. The index lists them as one
Retired paragraph, and seven kept notes carry a line on what changed. The
README and CLAUDE.md describe a Giza with no wallet.

brand-audit.sh loses its "bennu/ exception: every such tag was a wallet's,
so one now is a wallet coming back. wallet-audit.sh --check, in check and
in CI, fails on a retired kind in the app's code, a lightning-kmp import,
a file named for a wallet's pieces, or sats in a string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:15:13 +02:00
Kgothatso NgakoandClaude Opus 5.5 005cbc2f23 refactor: composeApp stops importing lightning-kmp (wallet removal, Phase 7a)
W3: a Lightning invoice in a note is a card that opens a lightning: link
in the device's own wallet app, undecoded -- decoding was lightning-kmp's,
and paying from the card was never wired. The dead pay and zap hooks go.

Lightning.randomBytes becomes quartz's RandomInstance; the tests'
LocalKeyManager becomes PhraseKeys; NodeParamsManager.chain becomes
PROFILE_CHAIN, the mainnet constant every profile's preference files are
named under.

What is left of the library is storage (keystore, credentials, seed file,
preferences). Moving it into the app and off the composite build is
Phase 7b, which needs an iOS build and a device to check, and is left for
its own branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:08:52 +02:00
Kgothatso NgakoandClaude Opus 5.5 84be1c5beb refactor: no node behind a recovery phrase (wallet removal, Phase 6)
PhraseKeys derives a phrase's nostr key (NIP-06, m/44'/1237'/0'/0/0) and
its profile id (hash160 of m/50'/0', the old node key) with bitcoin-kmp's
DeterministicWallet. ForkCompatibilityTest's Phase 0 pins pass unchanged
through it, so the same phrase is the same person with the same
preference files.

No profile starts a node: Identity.business, startupNode and its state
machine, the platform start/schedule/stop actuals, LightningApplication,
BusinessManager.initialize, the NFC hooks and POST_NOTIFICATIONS go. A
switch is clearing the identity and nothing else. Copy that promised funds
or a wallet is reworded, and the switcher's badge says Recovery phrase.

Forgetting a phrase profile is still refused (now PhraseAttached): the
phrase would derive the key again, and offering it is new UI.

iosMain was edited without an iOS build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:03:47 +02:00
Kgothatso NgakoandClaude Opus 5.5 9c2cbf0295 feat: schema 35 -> 36, the wallets' tables and rows dropped (wallet removal, Phase 5)
MIGRATION_35_36, by hand: the wallets' chat lines; GroupTransaction; every
signing session over a transaction or a sweep, with its items and its
members' messages; the other fifteen wallet tables, children first; and
FrostSigningItem.inputIndex, DkgSession.guardianDelay and
ChatMessage.lightningFactKey. DkgSession.walletPolicy stays: the join
screen reads a Bennu ceremony's tag from it. The 36 schema is committed.

The wallet line-type constants and the transcript's arms for them go with
the rows they named.

jvmTest: 1,150 run, 0 failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:54:21 +02:00
Kgothatso NgakoandClaude Opus 5.5 c6b231fa84 refactor: remove the group's on-chain wallet, guardians and the subgroup wallet policy (wallet removal, Phase 4)
wallet/ (Electrum included), nostr/wallet/, the policy and guardian tags,
GroupWalletDerivation, GroupWalletManager, GuardianDerivation,
GuardianManager, ProposedSpend, three screens with their view models,
states and routes, and FROST's spend half.

FROST is back to signing events. Every transaction proposal from a Bennu
peer is filed declined without being read, and the decline goes out
through advance(). Certificates and ceremonies carry no wallet tag; a
guarded subgroup's ceremony is filed and not joined, and its join screen
says why (W5). A key state carrying a wallet's certificate is declined.
The last bennu/ derivation tag leaves the code, and the last wallet pins
with it.

jvmTest: 1,148 run, 0 failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:48:11 +02:00
Kgothatso NgakoandClaude Opus 5.5 db38640e57 refactor: remove member guarded wallets (wallet removal, Phase 3)
The member-wallet events, MemberWalletManager, MemberWalletDerivation, the
repository and DAO, five screens with their view models, states and routes,
and the 74 strings only they read. GuardianManager stops reading member
certificates. The entities stay until Phase 5's migration.

Guardians and the subgroup wallet policy move to Phase 4: they are built
into the group's on-chain wallet and cannot leave before it and compile.

jvmTest: 1,311 run, 0 failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:32:04 +02:00
Kgothatso NgakoandClaude Opus 5.5 1bd0761339 refactor: remove the group Lightning wallet and Iceberg (wallet removal, Phase 2)
The Lightning events, managers, Iceberg ceremony, wallet/lightning, the
repository, five screens with their view models, states and routes, the
four DAOs, and the regtest network with its build wiring. The entities
stay until Phase 5's migration.

FROST's sweep path goes here rather than in Phase 4, since it was built on
GroupSweep: a sweep that arrives is filed declined without being read.
Lightning kinds fall to the retired-kinds arm; existing Lightning lines
stay as settled lines that open nothing. The 147 strings Phases 1 and 2
left unread go, and a Phase 1 test name that said Bennu is renamed.

jvmTest: 1,440 run, 0 failed, 0 skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:25:15 +02:00
Kgothatso NgakoandClaude Opus 5.5 8e0f1bd38a feat: Giza neither offers nor signs a wallet (wallet removal, Phase 1)
A Bennu member can put a wallet to a group Giza is in. Giza can no longer
check one, so it declines on arrival, out loud: the proposal is filed as a
declined session and advance() publishes the DECLINE, which the group
counts. Refusing used to be silent, which looks like a phone in a pocket.

- RetiredKinds: 30331-30337 and 30350-30366 stay Bennu's, never reused.
- WalletRefusal: what is a wallet's to sign, read by tag name so it
  outlives the wallet's parsers. approve() declines one instead.
- A retired kind is one line or none in the transcript, never a raw bubble.
- No Lightning dispatch, no guarded-wallet forwarding, no key answers.
- The detail and profile screens and the subgroup picker lose their
  wallets; a guarded room says why it offers no subgroup (W5), and
  certificates carry no wallet tags.
- The wallet tests this behaviour breaks are deleted with it.

jvmTest: 1,495 run, 0 failed, 2 skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:14:53 +02:00
Kgothatso NgakoandClaude Opus 5.5 94b45c0bc8 test: pin a recovery phrase's npub, profile id and host key (wallet removal, Phase 0)
Through LocalKeyManager, the code Phase 6 replaces, on NIP-06's own test
vector. A different npub would be a different person, and a different id
would lose the profile's preference files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 14:59:22 +02:00
Kgothatso NgakoandClaude Opus 5.5 60e878e74f docs: a phased plan to remove the wallets from Giza
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 14:52:31 +02:00
Kgothatso NgakoandClaude Opus 5.5 bad6012940 docs: the repository is giza.mobi/giza-kmp (fork, Phase 1)
The README's clone URL and the plan guessed machankura/giza-kmp. The repository was made
under giza.mobi, with Bennu's full history and giza as its default branch at 4e106fb5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 12:44:31 +02:00
Kgothatso NgakoandClaude Opus 5.5 851ff0c8c2 test: Giza derives what Bennu derives, every tag pinned (fork, Phase 8)
ForkCompatibilityTest pins each mantra/ and bennu/ derivation tag through the
function that hashes it: the ChillDKG host key, the Marmot shared-key tweak,
the group Lightning basepoints, the Iceberg pool label and the session,
contribution, commitment, seed and transcript hashes, the member wallet id and
possession message, and the group wallet address and guardian root. A sweep
that renames one of them now fails a test rather than moving a group's coins
and splitting Giza from Bennu.

The vectors come from this tree. A diff against 4e106fb5 shows that the files
holding the tags differ only in packages, imports, comments and the database's
type name, so the vectors are Bennu's too.

docs/giza-rebrand.md gains a table of where the build stands and what turned
out differently, the twelve bennu/ tags first.

jvmTest: 1651 run (1643 + 8), 0 failed, 2 skipped. m3Audit and brandAudit pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 11:00:44 +02:00
Kgothatso NgakoandClaude Opus 5.5 5b92b83869 chore: tooling, docs and a guard for the name (fork, Phase 6)
- rootProject.name is Giza. Res is pinned, so no import moves.
- Regtest: GIZA_REGTEST, GIZA_SPLICE_DELAYS and the gizaRegtest task input;
  node aliases giza-lsp and giza-payer.
- README describes Giza and says what it shares with Bennu: one network, one
  derivation, and a recovery phrase that must not run in both apps at once.
  The clone URL is the planned giza-kmp repository, which does not exist yet.
- docs/README.md is titled Giza docs and says how to read the documents
  written while the app was Bennu.
- CLAUDE.md gains the rule: name the app Giza, never name Bennu outside a
  comment, and never rename a mantra/ or bennu/ derivation tag.
- docs/scripts/brand-audit.sh --check, run by check (brandAudit) and by the CI
  budgets job, fails on Bennu anywhere in composeApp, iosApp, testing or the
  gradle scripts except in a comment or a "bennu/ tag. It catches the strings
  a merge from Bennu brings in, which giza-rename.sh cannot word.
- The plan gains the twelve bennu/ tags, missed when it was written.

jvmTest: 1643 run, 0 failed, 2 skipped. compileDebugKotlinAndroid, m3Audit and
brandAudit pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:53:17 +02:00
Kgothatso NgakoandClaude Opus 5.5 34e802ce6f refactor: packages, classes and Res under mobi.giza (fork, Phase 3b)
docs/scripts/giza-rename.sh, run over the moves of Phase 3a:

- com.machankura.bennu.{compose,android,desktop} -> mobi.giza.{...}, in
  package lines, imports, fully qualified references, the manifest, mainClass,
  the Android namespace (one value with applicationId again), the m3Audit
  source path, the six docs/scripts tools, and the source links in docs/;
- Res moves from bennu.composeapp.generated.resources to
  mobi.giza.compose.resources, now pinned with packageOfResClass so a later
  rename of the root project leaves the imports alone;
- BennuDatabase, BennuTheme and the other eleven Bennu identifiers are Giza*.

The script's search is now the same pattern as its sed expressions, so on a
renamed tree it finds nothing and changes nothing.

Checked against the Phase 0 baseline: jvmTest 1643 run (1642 + AppDirJvmTest),
0 failed, 2 skipped; compileDebugKotlinAndroid passes; m3-audit prints the
baseline report line for line. iOS is not compiled on this Linux host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:40:27 +02:00
Kgothatso NgakoandClaude Opus 5.5 30d5feaf87 refactor: move the sources to mobi/giza, paths only (fork, Phase 3a)
docs/scripts/giza-rename.sh --moves-only: com/machankura/bennu becomes
mobi/giza in all six source sets, the nine files named Bennu* are named Giza*,
and the Room schema directory moves to mobi.giza.compose.database.GizaDatabase.
Every source file is a 100% rename, so log --follow and blame go straight
through.

This commit does not compile on purpose: the next one rewrites the contents.
The script, which does both, comes with it so a merge from Bennu can re-run it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:35:04 +02:00
Kgothatso NgakoandClaude Opus 5.5 2a7fc7a08a docs: a plan to fork Bennu as Giza under mobi.giza
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:28:11 +02:00
Kgothatso NgakoandClaude Opus 5.5 4f1b4a4384 feat(lightning): buying inbound liquidity is on, on mainnet
GroupLightningRollout.LIQUIDITY_ENABLED is true, by decision, ahead of the plan's own Phase 0 check
on mainnet: ACINQ's LSP has not yet been seen to accept a splice whose funding key from us does not
change, so the first purchase there is that check. If it refuses, the splice aborts before anything is
signed into it and the purchase is reported failed. A purchase is bounded meanwhile by the mainnet
channel cap, the fee cap the group signs, and every co-signer's checks. The wallet screen now shows Add
liquidity, and the operator's node buys what the group authorises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:09:42 +02:00
Kgothatso NgakoandClaude Opus 5.5 67351eeaa5 docs: group Lightning liquidity is built, but for the LSP's own splices, and off (liquidity, Phase 10)
The plan's build table now says each phase's state. Phase 9, a splice the LSP starts to deliver a
payment, is left to the group as the plan left it. GroupLightningRollout.LIQUIDITY_ENABLED stays
off: the regtest run passed, but the mainnet half of Phase 0 -- ACINQ's LSP accepting a splice whose
funding key from us does not change, and its rates -- needs a purchase with real money. The group
Lightning wallet note's check 8 points here, as do the docs index and the regtest README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:47:24 +02:00
Kgothatso NgakoandClaude Opus 5.5 94015fd3f8 test(lightning): the group buys liquidity on regtest, end to end (liquidity, Phase 8)
GroupLightningRegtestJvmTest now buys inbound liquidity between receiving and paying: a member prices
200,000 sats from the operator's snapshot, the group authorises it, the operator's node splices, and
every co-signer checks the first commitment on the new output and the shared input before the group
signs. The channel grows from 100,000 to 299,779 sats for 2,521 sats, what the member's device
estimated; a 50,000-sat payment then arrives without an on-the-fly splice; and the run's payment,
mutual close and sweep follow on the spliced channel. No device refuses, and the room gets one line
for the liquidity added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:47:07 +02:00
Kgothatso NgakoandClaude Opus 5.5 db7d12b606 feat(lightning): a member asks the group to add inbound liquidity (liquidity, Phase 7)
GroupLightningLiquidityScreen asks as Phoenix asks its owner: Phoenix's amounts on a discrete slider,
less those the LSP does not sell and those past the channel cap; the miner fee, service fee, its year
and the total, priced on this device from the operator's report with lightning-kmp's own arithmetic
(LiquidityPrice, which matches what eclair charged on regtest to the sat); Phoenix's warning at a
quarter of the amount and its stop at the balance; a fee cap with room above the estimate; and a
review sheet with Phoenix's acknowledgement. Then a proposal, and the signing session it opens.

The wallet screen gains Add liquidity on its balance card, or the reason it is not there, a purchase's
state on its channel row, and Inbound liquidity added in its payment list (a nullable liquiditySat on
the payment row, in schema 35). The room gets a line when a purchase locks or fails.

All of it is behind GroupLightningRollout.LIQUIDITY_ENABLED, off until the regtest run passes; the
operator's node buys nothing while it is off. m3Audit meets every budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:45:01 +02:00
Kgothatso NgakoandClaude Opus 5.5 be90715dd3 feat(lightning): the operator's node buys the liquidity the group authorised (liquidity, Phase 6)
GroupLightningNode.buyAuthorised runs with the node's other actions, on the watch of kind 30363: for
each open buy-liquidity it has not taken on, it finds the LSP's rate for the amount, estimates at the
node's own feerate, and splices only if the estimate is within the authorisation's cap, buying at the
feerate the estimate raised to, as Phoenix does. Once per authorisation; not while the channel has a
splice that has not locked, which eclair would refuse; a failure is reported and not retried.

The snapshot now carries the LSP's rates and the node's feerate, for a member to price a purchase from,
each purchase's state (waiting, pending, locked, failed with its reason), how many funding outputs each
channel has live, and the purchase as a `liquidity` payment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:50 +02:00
Kgothatso NgakoandClaude Opus 5.5 b481c14cf9 feat(lightning): every co-signer checks a liquidity purchase before the group signs it (liquidity, Phase 5)
A co-signer keeps a ledger per funding output now (schema 35: IcebergChannelLedger keyed by output,
with its index, the parent it spent and the purchase that let it). A commitment on an output it has
no ledger for is the first commitment on a splice's new one: it must follow the newest output by one
index, rebuild from its context, and open from the parent's ledger at the same number with the same
HTLCs, the group's balance lower by no more than an open buy-liquidity authorisation's fee cap
(CoSignerPolicy.openSplice). The shared input is then held to that authorisation: it spends the pinned
output, makes one new output of the group's key with the LSP's under the cap, buys the amount the
group named, is paid from the channel balance alone, costs what the first commitment took to the
msat and no more than the cap, and the LSP puts in what it is paid for. An authorisation is bound to
the parent of the first splice it let, so however many attempts there are, one confirms.

While two outputs are live a payment settles on both at one commitment number; each ledger records
what its last commitment consumed, and a sibling spends only the difference. Before this the second
commitment was refused as under its floor.

GroupLightningSpliceCoSigningJvmTest, seven four-device tests on regtest and mainnet: a purchase the
group signs and the script interpreter accepts, payments over both live outputs, and each refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:30:10 +02:00
Kgothatso NgakoandClaude Opus 5.5 28f2d5a72a feat(lightning): the group decides to buy inbound liquidity (liquidity, Phase 4)
A fourth action for kind 30363, `buy-liquidity`: one channel, an amount of inbound, a cap on the fee
(our share of the splice's mining fee and the purchase's own together), an expiry, and an id so two
purchases for one channel are two events. An older build reads it as no authorisation at all, and
refuses the splice that follows.

GroupLightningAuthorisations gains liquidityPurchases, prepareBuyLiquidity -- which refuses a purchase
of nothing, or one past the mainnet channel cap, with a LiquidityProblem of its own -- and
proposeBuyLiquidity. The proposal reads "Add 500,000 sats of inbound liquidity", with the fee cap and
the LSP's year, and the room gets a line once the group signs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:14:55 +02:00
Kgothatso NgakoandClaude Opus 5.5 89504df765 feat(lightning): the co-signing wire carries a splice (liquidity, Phase 3)
A splice's shared input now reaches every co-signer with what it is: CoSigningWire.Context type
`splice`, with the parent funding output, the new one by index, the counterparty's new key, both
contributions, the liquidity purchase and the feerate. A commitment's context names its funding index,
and a request carries every other output the transaction spends.

messageOf computes the taproot sighash at the input that spends the funding output, over every spent
output, and is null when the request leaves one out; check 3 lets a splice spend the funding output
once beside the counterparty's inputs, and refuses a request with no hash to compute. A splice is
still refused, now by name, until the co-signer checks one (Phase 5). The context's spec is optional,
since a splice has none, and every check that reads one refuses a context without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:14:55 +02:00
Kgothatso NgakoandClaude Opus 5.5 5bc3f126da test(lightning): a node that keeps its funding key buys liquidity from eclair (liquidity, Phase 0)
LiquidityPurchaseRegtestJvmTest runs on the regtest network: a stock lightning-kmp node whose channel
keys serve index 0's funding key at every index, as a group's node will, buys 200,000 sats of
inbound three times on one channel, each with its signatures delayed longer, then receives a payment
the channel had no room for before.

What it found, recorded in the plan: eclair v0.14.4 accepts a splice whose funding key from us does
not change, and rotates its own; a purchase needs exactly two group signatures, and eclair allows the
whole splice one minute from quiescence (channel.quiescence-timeout), so both have to fit in it
together; the estimate is our mining share plus the purchase's own fees; and a splice does not raise
the channel's in-flight maximum, which this LSP fixes at the capacity the channel opened with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:13:27 +02:00
Kgothatso NgakoandClaude Opus 5.5 815d8c3e72 docs: requesting inbound liquidity for the group Lightning wallet, planned
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 11:19:51 +02:00
Kgothatso NgakoandClaude Opus 5.5 84984ca887 feat(lightning): the key ceremony asks once, and ends itself when it stalls
Joining is now the only approval. Every check in the other two rounds --
a contribution against its commitment, everyone's transcript hash, the
public shares making one key -- is the device's, so after joining it sends
its contributions and confirms by itself. Asking a person to tap through
them only let a member who joined and never came back hold the ceremony
open for everybody.

A ceremony that has not finished 24 hours after its proposal is abandoned
by the first participant's device to notice, checked each minute beside
the group nodes, naming who had not taken their part. The deadline runs
from the proposal's own timestamp, so every device agrees on it, and a
proposal read after its deadline is not filed. Any participant can also
abandon a ceremony from its screen. Before this a ceremony nobody finished
blocked the room for good, since a room runs one at a time.

The group screen's Lightning row test now covers both sides of the row
waiting for an onchain wallet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:11:57 +02:00
Kgothatso Ngako 1f9c9ef131 docs: the group Lightning wallet's review findings, as seven phased plans
The review asked whether the wallet's operator can spend lightning funds
without t-1 other share holders. The core claim holds; the seven exceptions
each get a phased plan under docs/lightning/, with an index giving the
severity table and the build order.
2026-10-27 09:21:36 +02:00
Kgothatso NgakoandClaude Opus 5.5 c4d8561cb0 fix(lightning): the wallet's payment list says a close is a close, and a sent amount without its fee
The same two misreadings the regtest run found in the room's lines, on the
wallet screen: a channel's close, which lightning-kmp files as an outgoing
payment with no payment hash, was listed as sent, and a sent amount
included its fee. Both now read through GroupLightningReports.isChannelClose
and recipientMsat, which the room's lines use too. A close is listed as one,
or as closing until it confirms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 09:06:02 +02:00
Kgothatso NgakoandClaude Opus 5.5 94385d2f4a fix(lightning): a channel's close is not a payment sent, and a sent amount leaves out its fee
Found by the regtest run, now that it checks the transcript. lightning-kmp
files a channel's close as an outgoing payment with no payment hash, which
wrote "sent" beside each closed line, and an outgoing payment's amount
includes its fee, so 20,000 sats with an 84-sat fee read as 20,084 sent.
GroupLightningRegtestJvmTest now asserts every device's lines: one per
channel opened and closed, one per payment, and no raw JSON, refusal or
alarm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 09:01:18 +02:00
Kgothatso NgakoandClaude Opus 5.5 ca2a5b790d docs: the group Lightning wallet in the chat is built, and the notes it touched say so (Phase 7)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 00:21:43 +02:00
Kgothatso NgakoandClaude Opus 5.5 e328720071 docs: the group Lightning wallet in the chat, planned
Every Lightning kind but the three the group signs reaches the transcript's
unsupported arm and leaves a raw-JSON bubble, and the Iceberg ceremony never
got the standing notice above the composer. Seven phases to put both right.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:55:54 +02:00
Kgothatso NgakoandClaude Opus 5.5 515ddea2be feat(lightning): the group node acts as requests arrive, and the mainnet run is recorded
On the first mainnet run, most of the wait for an invoice (six seconds) and for an authorised
payment to leave (five) was the node's ten-second poll. The node now watches the room's
invoice requests (30364) and authorisations (30363, which carry channel actions too), and acts
the moment either changes. The poll stays, for expiries and snapshots. Answering, paying and
closing each take one lock, so a wakeup, the poll and a direct call never act twice on the
same request: payAuthorised checks hasPaid, which suspends, before it marks a payment in hand.

Advances lightning-kmp-app to the commit that keeps payment preimages out of a release build's
Logcat.

The plan doc records the run with ACINQ's mainnet LSP: an on-the-fly 25,000-sat taproot
channel, 8,558 sats received, and a 21-sat payment sent. Every co-signer approved every
commitment. The doc also notes that a payment larger than the channel's 16,442 sats of
inbound would need the splice the co-signers still refuse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:47:32 +02:00
Kgothatso NgakoandClaude Opus 5.5 309a486de9 fix(lightning): set the group node up as Phoenix sets up its own
ACINQ's mainnet LSP hung up on the group's node seven milliseconds after init, every time. The
node required simple taproot channels (bit 564). The LSP's init lists neither 564 nor 565, and
BOLT 9 obliges a peer to hang up on a required feature it does not offer. Phoenix leaves the
feature optional and stays connected. Nothing is lost by matching it: lightning-kmp asks for the
taproot channel type in every channel it opens, and the co-signers rebuild every funding output
and commitment as taproot.

The node now takes Phoenix's setup wherever the group's terms allow:
- lightning-kmp's default features and peer storage
- connect and handshake timeouts that grow with each attempt, tripled over Tor
- the LSP's onion address while the identity has Tor on, and no clearnet dial over Tor
- the 50% relative cap on liquidity fees

The absolute fee cap stays the statement's, and the redial backoff stays: Phoenix's resets at
every handshake, which against an LSP that hangs up after init would redial every 0.1 s.

On the operator's emulator, the group's connection to ACINQ now holds. The regtest run still
opens a simple_taproot_channel and passes. Whether ACINQ opens a taproot channel to the group's
node is still unknown until one is opened on mainnet. The plan doc says so, and Phase 0's
instruction to require the feature is corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:03:27 +02:00
Kgothatso NgakoandClaude Opus 5.5 3e4de464fe feat(lightning): the group node redials the LSP, and says why it was dropped
lightning-kmp never reconnects by itself. The identity's own node has Phoenix's connection
daemon for that; the group's node connected once, so a single drop left it offline for the
rest of the term.

It now redials after every drop, waiting two seconds and doubling up to five minutes. A
connection that ends within a minute counts as a failure, so an LSP that hangs up on our
features isn't redialled every two seconds. Each drop is logged with its reason. When the
LSP's init doesn't offer a feature we require, the log names it. The node waits up to a
second for that init, because the socket can read as closed before the init's event arrives.

Run against ACINQ's mainnet LSP on an emulator, every drop reads: "Connection closed: the
LSP does not offer simple_taproot_channels, which this node requires". The plan doc now
records that against Phase 0's first step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:37:54 +02:00
Kgothatso NgakoandClaude Opus 5.5 cf8ae0200e feat(lightning): the group Lightning wallet on mainnet only
The Lightning wallet now opens on the node's own network, mainnet,
where the group's onchain wallet already is, so the separate testnet3
onchain wallet and its row on the group's screen are gone.
GroupLightningRollout.allows takes mainnet and regtest, nothing else.

This lifts the plan's mainnet gate by decision, ahead of its condition:
an outside review of the Iceberg scheme and the DKG, and a month on
testnet3. The LSP's signing deadline was never measured either.
Meanwhile:

- Every co-signer refuses to sign for a mainnet channel over
  MAINNET_CHANNEL_CAP, 1,000,000 sats, so a bigger one never opens; none
  grows, since splices are refused.
- The opening screen says the scheme is unreviewed and names the cap.

Running the co-signing suite on mainnet (now a second test class) found a
bug that would have stopped everything there: every key manager was built
with a testnet swap-in tpub, which lightning-kmp rejects on mainnet. That
covers every co-signer and the operator's node. Mainnet now takes the
mainnet LSP's published xpub; nothing derives from it.

The full JVM suite (1,578 tests) and the regtest run pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 21:45:57 +02:00
Kgothatso NgakoandClaude Opus 5.5 5ff9380b03 feat(lightning): turn the group Lightning wallet on, on testnet3 (Phase 15)
GroupLightningRollout.ENABLED is now true. A Marmot group's screen offers
the Lightning wallet and the testnet3 onchain wallet it closes to, and
devices run the group nodes they are elected to. NIP-17 rooms still get
neither: they have no key to sign with. Mainnet is still refused by
GroupLightningRollout.allows, whatever a screen offers.

It was turned on before Phase 0's testnet3 measurement of how long the
LSP waits for a signature, so the 60-second signing deadline is a guess
until the first groups run there. The plan doc says so.

The wallet-row test now finds the onchain row by its title and status,
since the testnet3 row is also "Not opened yet". A new test checks that
the Lightning rows open the Lightning wallet and the testnet3 wallet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 21:25:37 +02:00
Kgothatso NgakoandClaude Opus 5.5 0939bd4c55 Merge branch 'bennu' into claude/lightning-wallet-iceberg-f20da1
Brings in an Electrum client for a profile with no node: IdentityElectrum
gives an nsec or npub profile a StandaloneElectrum of its own, so every
profile can watch the chain.

For the group Lightning wallet:

- GroupChainClients now sits on IdentityElectrum's client for the node's
  network, so group wallets and the watcher work on profiles with no node
  too.
- Each other network (testnet3, for the Lightning wallet) now gets a
  StandaloneElectrum instead of this branch's own connection loop. The
  old loop picked a server with ElectrumServers and connected directly,
  ignoring the profile's Tor setting, so a profile with Tor on would have
  reached a testnet3 server in the clear. The new one uses onion servers
  while Tor is on. A test covers it.
- The group's Lightning node takes its context and logger from the app,
  not the identity's Phoenix business, so a profile with no node that
  holds a share can be elected and run it.
- The member wallet's follow() keeps its network parameter.

The full JVM suite (1,568 tests) and the regtest run pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:28:17 +02:00
Kgothatso NgakoandClaude Opus 5.5 cb277d3269 Merge branch 'bennu' into claude/lightning-wallet-iceberg-f20da1
Brings in the guarded member wallets, guarded subgroup wallets, ceremony
creation, and the removal of the group's nostr profile, relays and posts.

Two clashes needed more than a textual resolution:

- Event kinds. The guarded-wallet family took 30333-30337, the numbers
  the Lightning family used for its ceremony. Nothing conflicted
  textually and nothing would have failed, since each side reads the
  other's events by kind. The Lightning family moves to a fresh run,
  30350-30366, which costs nothing: rumor kinds that never shipped.
  GroupLightningEventsTest now knows the guarded-wallet kinds and asserts
  the family starts past every kind the app uses.
- Schema versions. bennu used 27-31. This branch's four versions were
  never on an installed database, so they become one migration, 31 to 32,
  adding the 13 Lightning tables.

Also:

- bennu's new member-wallet calls (broadcast, confirmationsOf,
  guardianSpends, the fee suggestion) now take the network, because this
  branch made Electrum clients per network.
- bennu's watcher conflict check uses the transaction's own network.
- NEVER_BROADCAST is gone with the broadcast screen, and so is the test
  that checked the Lightning statements against it.

The full JVM suite (1,554 tests) and the regtest run pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:23:33 +02:00