Repository navigation
feat(wallet): build ephemeral hot wallet pool with automated multi-sig replenishment (closes #965) - #1081
Merged
ibochielizabeth-spec merged 1 commit intoNov 26, 2026
Conversation
…g replenishment (closes EF-CHAIN#965)
|
@warlock-netizen Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
5 of 6 tasks
ibochielizabeth-spec
pushed a commit
that referenced
this pull request
Nov 27, 2026
…ubmission (#1086) * feat(wallet): gate high-value transfers behind the 2-of-3 quorum on submission The 2-of-3 quorum policy existed but nothing called it: `submitPayment` built, signed and submitted a high-value envelope with a single key. This wires the policy into the one function every outbound value-moving path goes through, between signing and `server.submitTransaction`, so a transfer that cannot show two valid signatures throws before any transport exists. Second signatures come from the deployment's configured quorum co-signers (`MULTISIG_COSIGNERS`), consulted over the protocol the HSM signer already speaks. A co-signer is only ever asked, never trusted: its reply must be a 64-byte Ed25519 signature that verifies against this exact envelope, its key must already be an on-chain signer on the account, and the whole envelope is then re-verified against the ledger's own signer set and thresholds. With nothing configured, high-value transfers fail closed with `cosigner_unavailable` rather than silently downgrading to single-key submission. Below the threshold nothing new runs - no extra Horizon read, no co-signer resolution - so a broken co-signer configuration cannot break an ordinary payment. `changeTrust` stays single-key, since it moves no value. Also fixes a reservation leak the gate exposed: the refusal is raised after `submissionStarted` is set, but `handleStellarPaymentFailure` only enqueues a reversal for genuine Horizon rejections, so the velocity reservation was left to expire. Refusals raised before any submission now carry `preSubmission`, and the orchestrator releases the reservation itself. * docs(wallet): correct the quorum gate's submission-coverage claim The gate's own comments claimed `submitPayment` is the one function every outbound value-moving path goes through. That was true at the base commit but is not true on current upstream main, and a comment that overstates a security boundary is worse than no comment: the next reader trusts it. `wallet/hotWalletPool.js` (#1081, now merged) builds a native payment of arbitrary size from cold storage, signs it with raw in-process keypairs up to its own `coldStorageThreshold`, and submits directly to Horizon. It applies an ad-hoc quorum unrelated to this policy and this gate cannot see or refuse it. The comments now scope the claim to user-facing outbound transfers, enumerate the modules that submit directly, and separate the genuinely exempt ones (changeTrust, fee bumps, channel accounts) from that real gap. Whether the treasury path comes under one policy is a maintainer decision and is flagged as such rather than assumed. Comments only; no behaviour change. * test(wallet): make the ungated-submission tripwire survive #1066 The guard asserted that `feeBump.js` and `channelAccountPool.js` are dormant, which was true at this branch's base but is not on current main: #1066 wires `feeBump.buildFeeBumpEnvelope` into `trustlines.js`. Merging #959 onto main therefore turned this test red for a reason that is not a bypass — the wrapped operation is a zero-value ChangeTrust. Reworked so it asserts the invariant instead of the snapshot: - `feeBump.js` may have callers, but only allowlisted ones. Subset semantics, so it holds both on a base that predates `trustlines.js` and on main; an unsanctioned caller still fails, because feeBump is generic and could be handed a valued inner transaction. - `channelAccountPool.js` and `hotWalletPool.js` must stay dormant. Both submit valued transactions straight to Horizon. `hotWalletPool` (#1081) signs native payments of arbitrary size with raw in-process keypairs under its own quorum notion; nothing requires it today, so it is a latent rather than live gap, and this is what keeps it that way. Verified red-to-green against both trees: this branch's base and a trial merge onto current upstream main. The module comment is corrected to match. Tests only, plus comments; no behaviour change.
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.
Summary
Closes #965