Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
7cf8106
feat(spv): wire real reservation re-anchor SPV proof discovery
piotr-roslaniec Sep 1, 2026
6a8162b
feat(spv): implement real ReservationActionTimeoutWatcher.Run loop
piotr-roslaniec Sep 1, 2026
7108928
fix(spv): reject stale reservation re-anchor action generations befor…
piotr-roslaniec Sep 1, 2026
7824ad2
docs(spv): correct nonce-staleness window framing in code comment
piotr-roslaniec Sep 1, 2026
64fc398
fix(spv): skip, don't abort the round, on stale reservation re-anchor…
piotr-roslaniec Sep 1, 2026
e052162
docs(spv): correct won't-recur claim on stale/mismatched reanchor skips
piotr-roslaniec Sep 1, 2026
0f62ab2
Merge branch 'm1/keep-core-client' into m1/reservation-readiness-fixes
piotr-roslaniec Sep 2, 2026
fe05305
Merge branch 'm1/keep-core-client' into m1/reservation-readiness-fixes
piotr-roslaniec Sep 2, 2026
9f09fb3
feat(tbtc): add String() methods for ReservationActionType/State
piotr-roslaniec Sep 2, 2026
fc128f0
fix(spv): correct reservation action re-check guard behavior and cove…
piotr-roslaniec Sep 2, 2026
f5c5e35
Merge remote-tracking branch 'origin/m1/keep-core-client' into m1/res…
piotr-roslaniec Sep 2, 2026
0a427b6
ci(client): tolerate known tbtc-v2 npm ReservationRouter gap (#4281)
piotr-roslaniec Sep 2, 2026
7210a7c
Revert "ci(client): tolerate known tbtc-v2 npm ReservationRouter gap …
piotr-roslaniec Sep 2, 2026
3298ae0
fix(gen): vendor ReservationRouter artifact fallback for missing npm …
piotr-roslaniec Sep 2, 2026
ee30610
fix(gen): patch stale Bridge/WalletProposalValidator npm artifacts wi…
piotr-roslaniec Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"inputs": [
{
"internalType": "uint256",
"name": "depositKey",
"type": "uint256"
}
],
"name": "isReservedDeposit",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
]
60 changes: 60 additions & 0 deletions pkg/chain/ethereum/tbtc/gen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,63 @@ define fix_reservation_router_contract_collision
endef

include ../../common/gen/Makefile

# @keep-network/tbtc-v2@development on npm does not yet publish
# ReservationRouter.json (threshold-network/keep-core#4281), which makes
# `make generate` fail outright since nothing else can produce that
# prerequisite. Fall back to a vendored copy - its ABI is byte-for-byte
# the ABI already embedded in the committed bindings (re-derived from
# ReservationRouterMetaData.ABI, with the "struct"/"enum"/"contract"
# internalType prefix space abigen's metadata packer strips put back;
# verified by round-tripping through the same abigen + keep-common
# generator invocation and diffing byte-identical against
# abi/ReservationRouter.go, contract/ReservationRouter.go, and
# cmd/ReservationRouter.go) - only when the real artifact is missing,
# and only in the `development` environment, which already tolerates
# placeholder addresses (see the _address/% rule above). Non-development
# builds still hard-fail if the real artifact is ever missing there,
# since a real deployed address must never be substituted silently.
# Remove this rule once tbtc-v2 publishes the real artifact upstream.
${artifacts_dir}/ReservationRouter.json:
ifeq ($(environment), development)
@[ -f "$@" ] || { \
echo "ReservationRouter - artifact missing from ${npm_package_name}@${environment}, using vendored fallback (see threshold-network/keep-core#4281)"; \
cp ReservationRouter.fallback-artifact.json "$@"; \
}
else
@[ -f "$@" ] || { echo "$@ does not exist!"; exit 1; }
endif

# @keep-network/tbtc-v2@development on npm publishes Bridge.json and
# WalletProposalValidator.json, but both are stale relative to the
# reservation feature: they're missing isReservedDeposit (Bridge) and
# validateReservationAnchorProposal/validateReservationReanchorProposal
# (WalletProposalValidator), which the committed bindings already call
# (threshold-network/keep-core#4281). Unlike ReservationRouter.json,
# these files exist, so an only-if-missing artifact rule can't apply -
# patch the fetched artifact in place instead, merging in vendored
# fragments (extracted from the committed BridgeMetaData.ABI /
# WalletProposalValidatorMetaData.ABI, internalType prefix space
# restored the same way as ReservationRouter's; verified by
# round-tripping through the same abigen + keep-common generator
# invocation, producing a clean `go build ./...`) before anything reads
# the artifact. Only in `development`; only when the methods are
# actually missing, so a real future npm publish makes this a no-op
# without needing to be removed first. Non-development builds are
# untouched. Remove this whole block once tbtc-v2 publishes the real
# methods upstream.
.PHONY: patch-artifacts
check_artifacts: patch-artifacts
patch-artifacts:
ifeq ($(environment), development)
@jq -e '.abi[] | select(.name == "isReservedDeposit")' ${artifacts_dir}/Bridge.json >/dev/null 2>&1 || { \
echo "Bridge - artifact missing reservation methods, patching in vendored fallback (see threshold-network/keep-core#4281)"; \
jq --slurpfile extra Bridge.reservation-methods-fallback.json '.abi += $$extra[0]' ${artifacts_dir}/Bridge.json > ${artifacts_dir}/Bridge.json.patched && \
mv ${artifacts_dir}/Bridge.json.patched ${artifacts_dir}/Bridge.json; \
}
@jq -e '.abi[] | select(.name == "validateReservationAnchorProposal")' ${artifacts_dir}/WalletProposalValidator.json >/dev/null 2>&1 || { \
echo "WalletProposalValidator - artifact missing reservation methods, patching in vendored fallback (see threshold-network/keep-core#4281)"; \
jq --slurpfile extra WalletProposalValidator.reservation-methods-fallback.json '.abi += $$extra[0]' ${artifacts_dir}/WalletProposalValidator.json > ${artifacts_dir}/WalletProposalValidator.json.patched && \
mv ${artifacts_dir}/WalletProposalValidator.json.patched ${artifacts_dir}/WalletProposalValidator.json; \
}
endif
Loading
Loading