ElementsProject / ElementsProject/elements
`fundrawtransaction` crashes a node with watch-only wallet when not imported UTXO in the inputs
- Lingua principale
- C++
- Stelle
- 1.2k
- Fork
- 416
- Merge medio
- 1g 23h
- PR unite (30g)
- 15
Descrizione
I can make my regtest node reliably crash when:
* wallet is watch-only (private keys deactivated)
* I call `fundrawtransaction` with a transaction which has 1 input (spending either L-BTC or an asset) which is **not** followed in the wallet and 1 output in L-BTC
* I don't pass optional argument, but the result is the same if I add either a change address, `includeWatching` or both
* I know this is caused by the input not being in the wallet since the issue disappeared when I imported the corresponding address in the wallet
Elements should fail with an explicit error message about why it can't fund the transaction.
Instead it crashes with the following error: `error: Could not connect to the server 127.0.0.1:28433 (error code 1 - "EOF reached")`
The issue should be reproducible by following those steps
1. Start a new node
2. create a new wallet with private keys deactivated and unload default wallet
3. run `createrawtransaction` with adding of an explicit input that is not followed by the watch-only wallet.
4. call `fundrawtransaction` with the resulting raw transaction as an argument
I compiled elements master branch about a week ago, here's the output of `elementsd --version`: `Elements Core Daemon version v0.18.99.0-ec9b28e08`
I'm running Ubuntu 20.04, with an AMD cpu and a SSD
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci il crash su un nodo regtest di Elements usando un wallet watch-only, un input esplicitamente non seguito e fundrawtransaction dopo createrawtransaction. Traccia la gestione di fundrawtransaction per quello stato del wallet e verifica che il nodo rimanga in esecuzione e restituisca un errore esplicito di finanziamento invece di un EOF; aggiungi o esegui un test di regressione se la copertura dei test esistente del progetto identifica il punto di ingresso appropriato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- api, backend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100