0xMiden / 0xMiden/wallet

Cold-start auto-consume: locked-vault deferral leaves the row in GeneratingTransaction, blocking every queued consume for 30 min

Aberta
#772 4 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
TypeScript
Estrelas
5
Forks
28
Merge médio
9h 50min
PRs com merge (30d)
123

Descrição

## Problem
After a browser relaunch, the first auto-consume runs before the password is entered. The loop marks the row `GeneratingTransaction` / `stage: 'sending'`, then hits the locked vault and returns without reverting the row. Since the loop skips everything while a status-1 row exists, every other queued consume is blocked. Unlocking, Claim and Retry do nothing. Rows only clear at the 30-minute reaper (all fail) or after a browser restart. Reproduced on the shipped 1.15.21 bundle; same code on main.

## Environment
Bread Wallet 1.15.21 (26cf464c), Chrome 151, testnet, auto-consume on. Extension only.

## Steps to reproduce
1. Have consumable notes pending.
2. Quit and relaunch Chrome; do not enter the password right away.
3. Open Pending notes: one row sits on "sending", the rest stay Queued behind it. Unlock/Claim/Retry have no effect.

## Root cause
- `src/lib/miden/transaction/index.ts:313-316` sets status 1 before any vault check.
- `index.ts:319` → `transaction-processor.ts:88-92` throws a locked error while the vault is null (vault is memory-only in the SW).
- `index.ts:1382-1386` catches it and returns with no status revert.
- `index.ts:1335-1338` then skips every pass while the status-1 row exists; no unlock hook re-drives it.

Introduced by #375 (fix for #313), which widened the pre-existing non-reverting arm from #268. Related downstream symptom: #771.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

The bug is in src/lib/miden/transaction/index.ts lines 313-316 and 1382-1386. Start by examining the transaction processor flow, particularly where status is set to 1 (GeneratingTransaction) and where locked vault errors are caught without reverting. Look at the reaper logic and the skip condition at lines 1335-1338. Running the extension in testnet with auto-consume on and reproducing the steps will help verify the fix. Done means the row status is properly reverted on vault lock, allowing queued consumes to proceed.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
typescript
Domínio
backend, databases
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Ativa
Clareza
Claramente especificada
Facilidade para iniciantes
65/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.