Repository navigation
Drop a kept inscription launch whose commit can never confirm - #53
Merged
Merged
Conversation
A kept reveal blocks new inscription launches from its address until it is finished. When its commit is neither confirmed nor in the mempool and one of the commit's inputs has since been spent by another confirmed transaction, the commit can never confirm and no BTC waits behind it: resuming used to re-broadcast it, fail, and keep the record forever. resumeInscribeLaunch now asks the Bitcoin API for each input's outspend first. A confirmed spend by another transaction clears the record, broadcasts and signs nothing, and returns an "abandoned" outcome; the create page shows a one-time notice instead of an error. A mempool-only conflict, an unspent input, or an unreadable status keeps the record and the old path. The notice is machine-translated in every locale and listed as such in each status file.
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.
Follow-up to #50. A saved reveal record blocks new inscription launches from its address until the launch is finished. Say the commit never reached the network, for example because the page died before it was broadcast. If the coin it spends is then used by another transaction, "Finish launching" re-broadcast the commit, the node refused it (
missingorspent), and the record stayed. The address was blocked for good.Change (
apps/web/src/lib/inscribe-launch.ts). This applies only when the commit's/tx/:txid/statusis unknown, meaning it is neither confirmed nor in the mempool.resumeInscribeLaunchnow reads/tx/:prev/outspend/:voutfor each commit input. It uses the same esplora base (BITCOIN_API_BASE) the file already uses. If an input was spent by a different transaction and that spend is confirmed, the commit can never confirm. In that case the function:{ outcome: "abandoned", commitTxid, spentBy }.A successful resume now returns
{ outcome: "launched", commitTxid, revealTxid }.Not cleared. In each of these cases the record stays and the old path runs (re-broadcast, then an error if it fails):
Page (
create/page.tsx). Onabandoned, a one-time neutral notice replaces the amber banner. It is shown for that address only and is not persisted, since the record is already gone: "The inscription commit for {asset} never made it on-chain, and a coin it spends has since been spent by another confirmed transaction, so it never will. None of its BTC is waiting on a reveal, and you can start a new launch."Localization. Translated into es, fr, ja, ko, pt, ru, uk, zh, zh-tw and zh-hk. Each entry is added to
<locale>.status.jsonundermachine, as #50 did.Tests (
tests/inscribe-launch-recovery.test.ts).outcomefield.Gates run locally:
npm run check(111 files, 1432 tests, typecheck, lint, numeric, i18n with every locale at 1295/1295) andnext build. No api code changed.