ElementsProject / ElementsProject/elements

Crash at fundrawtransaction

Open
#1,255 0 comments 0 reactions 0 assignees View on GitHub
needs reproduction
Dominant language
C++
Stars
1.2k
Forks
416
Avg merge
1d 23h
Merged PRs (30d)
15

Description

```
2023-08-08T07:23:35Z UpdateTip: new best=78b7897fac1fbe95d92f5724b1cd506fc6d1bb03710f17b36754d13f578a9555 height=2460677 version=0x20000000 tx=3918616 date='2023-08-08T07:23:08Z' progress=1.000000 cache=0.2MiB(699txo)
elementsd: wallet/spend.cpp:1449: bool CWallet::CreateTransactionInternal(const std::vector&, CTransactionRef&, CAmount&, int&, bilingual_str&, const CCoinControl&, FeeCalculation&, bool, BlindDetails*, const IssuanceDetails*): Assertion `coin_selection_params.m_subtract_fee_outputs || fee_needed <= map_change_and_fee.at(policyAsset) - change_amount' failed.
```

This occured in the production blockchain, with a multi-sig (2-of-3) wallet.
Reproduction rate was quite high, but finally the transaction was created.

Version: 22.1.1
Platform: Linux (Ubuntu 22 LTS) in docker

More details (except the wallet) are available on request, if needed.

Contributor guide

Open the contributing guide

Research direction

Start at wallet/spend.cpp:1449 and trace the fundrawtransaction path around the reported assertion in CWallet::CreateTransactionInternal. Use the provided production log and multi-sig wallet context to reproduce the failure; done means fundrawtransaction no longer aborts under the reported conditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.