Skip to content

Update Elements federation script and pegin address - #20

Merged
tiero merged 4 commits into
masterfrom
claude/fedpegscript-update-f6uz5m
Jul 27, 2026
Merged

Update Elements federation script and pegin address#20
tiero merged 4 commits into
masterfrom
claude/fedpegscript-update-f6uz5m

Conversation

@tiero

@tiero tiero commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates the mainnet federation script and corresponding test fixtures to reflect changes in the Elements federation configuration.

Key Changes

  • Updated MAINNET_FED_SCRIPT: Modified the federation script in src/index.ts with new public keys and adjusted script parameters

    • Changed the threshold parameter from c00f to 801f (affecting the multisig requirements)
    • Updated multiple public key entries in the federation script
  • Updated test fixtures:

    • Modified expectedContract in test/fixtures/fixtures.ts to match the new federation script
    • Updated the expected pegin address in test/peginaddress.spec.ts from 3AV836ASdCs6k25KjFweWxXNKyJdNx2tFh to 3HfF9gFpqZPxfGe4rtwWD7nxFpvrL6xZq5

Implementation Details

The changes appear to be related to a federation update on the Elements network, with modifications to the multisig script structure and the participating federation members' public keys. The test fixtures have been updated to ensure consistency with the new federation configuration.

https://claude.ai/code/session_01CQrBTWWVTXJCZHhDDeqzVL

Update MAINNET_FED_SCRIPT to the newly proposed federation script
(proposed on-chain in block
fe936658c04c22dba2f1df606b6f11041814f95c87e8ca302c62641d3da5b750).

Compared to the previous script, the structure is unchanged
(11-of-15 federation multisig with a 2-of-3 emergency fallback and
identical emergency keys): 4 of the 15 federation pubkeys are rotated
and the CSV emergency timeout is raised from 4032 to 8064 blocks.

Regenerate the derived test fixtures accordingly:
- expectedContract: pegin contract (HMAC-tweaked fedpegscript) for the
  fixture claim script, computed with the Elements contract-tweak
  algorithm and cross-checked against the previous fixture values
- expected mainchain P2SH address, verified through the go-elements
  WASM MainChainAddress code path

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQrBTWWVTXJCZHhDDeqzVL
@tiero
tiero marked this pull request as ready for review July 27, 2026 12:04
claude added 3 commits July 27, 2026 12:08
The libwally Docker build broke because Debian buster reached EOL and
its apt repositories moved to archive.debian.org, so every CI run
failed at `make build` before running any tests. Point the buster
image's apt sources at the archive (with Check-Valid-Until disabled,
as the archived Release files are past their validity window) and drop
the no-longer-served buster-updates entry.

Also modernize the workflow:
- Node 14.x/16.x matrix -> Node 22.x
- actions/checkout@v2 -> v4, actions/setup-node@v1 -> v4 (both old
  versions run on a deprecated Node runtime)
- replace bahmutov/npm-install with `npm ci` + setup-node's built-in
  npm cache

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQrBTWWVTXJCZHhDDeqzVL
The lockfile entry for tiny-secp256k1 was missing the
"hasInstallScript" flag, so npm >= 7 does not run the package's own
guarded install script ("node-gyp rebuild || echo ..."), and instead
injects the default `node-gyp rebuild` because the package ships a
binding.gyp. The native build has always failed (nan 2.13 predates
modern V8) and is designed to fall back to the pure JS implementation,
but without the guard the failure aborts `npm ci`.

Setting the flag makes npm run the package's actual install script
again, restoring the non-fatal fallback behavior npm 6 had.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQrBTWWVTXJCZHhDDeqzVL
The libwally image installs emscripten 2.0.9 but cloned emsdk master,
whose installer scripts now require python >= 3.10 while buster ships
3.7. Clone the emsdk 2.0.9 tag instead so the installer scripts match
the era of the toolchain being installed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQrBTWWVTXJCZHhDDeqzVL
@tiero
tiero merged commit 3d50ae4 into master Jul 27, 2026
1 check passed
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.

2 participants