| 3 | done. Giza `4555f5d1`. `compileDebugKotlinAndroid`; `jvmTest` 1411/1411; `check` with the brand, M3, Magpie lock, Marmot and wallet audits all at 0. No app change |
| 4 | done but for the device checks below. `ConfederationReachableJvmTest` 3/3 through the desktop JNI library Giza loads. Android: a debug build installed over the existing one on `Medium_Phone` (API 36, x86_64; its Room schema was 42, the same as this branch's) launches and loads `libsecp256k1-jni.so` with no crash or link error. That profile had no group, so **no group was signed in**. The Alice/Bob/Charlie emulators were left alone. Desktop run and iOS build not done. `libsecp256k1-jni.so` is now 1.6–2.0 MB per ABI; no pre-bump APK was at hand to compare |
**secp256k1-kmp's instrumented tests don't build, and this update didn't cause it.**
`:tests:dexBuilderDebugAndroidTest` fails because D8 rejects the method name
`` `the zkp vectors come out the same through the bindings` `` in `FrostRefreshTest`: names with
spaces need DEX 040, i.e. a minSdk of 30. `-Pandroid.injected.build.api=36` doesn't get around
it. The test came in with `0f5a710` (2026-11-19, FROST share refresh) and is already in `bcaa985`,
which Giza pinned before this update. None of the confederation tests use spaced names. The
fix is to rename the methods in `FrostRefreshTest`. That is a secp256k1-kmp commit, and the
chain above it would have to be bumped again, so it is left for its own change.
The gap is one pointer: **lightning-kmp pins bitcoin-kmp at `0fd254b`, three commits behind
`threshold`.** Every level above it inherits that gap. Every level below is already current.
`0fd254b` is an ancestor of `0c34097`, so the update is a fast-forward and nothing has to be merged.
The three bitcoin-kmp commits:
| commit | what |
|---|---|
| `50c0e1c` | secp256k1-kmp `bcaa985` → `fce4d81`. No source change. The commit says the existing suites pass unchanged on jvm and linuxX64. |
| `42d184d` | `Confederation`, `ConfederationRoster`, `ConfederationKeyState`, `ConfederationTransition`, `ConfederationShare`, `ConfederationRecoveryPackage`, `ConfederationOperation`, plus tests and vectors copied from secp256k1-kmp `fce4d81` |
| `0c34097` | `ConfederationTweak.taproot` and `Confederation.signTaprootInputLocal`: BIP 341 key-path signing, tested end to end through the script interpreter |
Below them, secp256k1-kmp `bcaa985..fce4d81` adds seven commits: the zkp bump, the descriptors,
transitions, shares and recovery, DKG and signing, hardening, and docs. zkp `31ea015c..c68e2384`
adds 88 commits, the confederation module merged with `frost_refresh`.
## What arrives, and what it can and cannot do
**It is additive.** At every level the diff touches only confederation:
- bitcoin-kmp: six files, all under `crypto/confederation/`, plus the submodule pointer.
- secp256k1-kmp: one line removed in `Secp256k1.kt`, plus the `.def` header lists. Everything else
is added: JNI, Kotlin/Native and the `Secp256k1` interface. `-DSECP256K1_ENABLE_MODULE_CONFEDERATION=ON`
joins `CMAKE_DEFAULT_OPTS` in `native/build.gradle.kts`.
- zkp: outside `src/modules/confederation/`, `include/secp256k1_confederation.h`, tools, docs and
examples, the only changes are build wiring, `src/secp256k1.c` (+4, the include), `src/tests.c`,
`src/ctime_tests.c`, and a ChillDKG test in `src/modules/prefractal/tests_impl.h`. **No other
header in `include/` changed, and neither did the FROST, ChillDKG, enrollment or refresh
sources Giza signs with.**
**Giza can use it in tests, but not across devices.** The bitcoin-kmp KDoc is explicit on this:
- `Confederation.dkgLocal` and `signLocal` run *every role in one process*, holding every host
secret key and every share. They are a simulation and test harness. "The round-by-round steps,
and enrollment, refresh, masking and resharing, are not public at the pinned native revision."
- The module is experimental research code, "not audited or stable", and "must not be used in
production or to protect value". The recovery-package encryption is "a non-standard candidate
construction that has not been reviewed".
- Transport, sender authentication, durable attempt records, timeouts and atomic persistence are
left to the application.
So after this update Giza can import the confederation types, build rosters and key states from
their canonical encodings, and run a whole confederation in a test. It cannot yet run a
confederation ceremony across members' devices. That has to wait until the distributed rounds are
public, and it needs its own design document, as reduced enrollment did (submodule-refresh.md,
Phase 6).
**zkp now tracks `frost`, not `main`.** secp256k1-kmp `fce4d81` changed its `.gitmodules` branch
to `frost`. [submodule-refresh.md](./submodule-refresh.md) recorded that move as a decision *not*
taken, because zkp's `frost` branch held the BIP 445 rewrite of the FROST signing module. It has
now been taken upstream, as part of this work. At the pinned commits the FROST sources are
byte-identical (Phase 0 re-checks this), so Giza's signing does not change. But from now on, any
`git submodule update --remote` at that level follows `frost`. The next zkp bump is where a
signing-module change could come in, and its plan has to check for it.
## Before starting
This worktree (`claude/submodule-update-bitcoin-kmp-5aa639`) has the submodule registered but not
checked out. `lightning-kmp-app/` is empty.
1. **Shared `.git/modules`.** Linked worktrees share `.git/modules/` with the main checkout
([jvm-target.md](./jvm-target.md)). The main checkout currently has every level on a
`claude/dependency-update` branch, except zkp, which is detached at
`origin/claude/frost-share-refresh`. All five are clean. Record
`git submodule status --recursive` in the main checkout before you start. Restore it at the
end, or say in the PR that it moved.
2. **Concurrent work.** bitcoin-kmp's three commits landed at 19:36–19:42 today. Another session
may still be working at the bitcoin-kmp or secp256k1-kmp level. Re-fetch before each push, and
confirm that `threshold` at bitcoin-kmp is still `0c34097`. If it has moved, pin the new tip
only after reading what it adds.
3. Check out the chain and the SDK paths:
```bash
git submodule update --init --recursive
```
Then add `local.properties` at all five Gradle roots, using the loop in the root `README.md`.
4. **Branch per level.** Name the branches `claude/confederation` at lightning-kmp (from
`threshold`) and at lightning-kmp-app (from `master`). Giza's branch is this worktree's.
bitcoin-kmp, secp256k1-kmp and zkp need no branch, because nothing is committed there.
## Phase 0: confirm the bottom of the chain
No commit. Prove that what lightning-kmp is about to pin builds and passes, before stacking on it.
1. In `…/bitcoin-kmp`, check out `0c34097` and run `git submodule update --recursive`. Confirm that
secp256k1-kmp is at `fce4d81` and zkp at `c68e2384`.
2. Confirm that the FROST signing module did not change under the tracking-branch move. Each of