ElementsProject / ElementsProject/elements

Node crashes when processing partial transaction

Abierto
#1,105 13 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
1.2k
Forks
417
Merge medio
1 d 23 h
PR fusionados (30 d)
15

Descripción

I made the node crash while trying to blind the following pset:

```bash
$ e1 walletprocesspsbt cHNldP8BAgQCAAAAAQMEAAAAAAEEAQEBBQEDAfsEAgAAAAABDiAqrJ9c31tcJHnWDjQWJNUfArZMJr1w1h7/S6GIMG31DwEPBAAAAAABEAT/////AAEEFgAUBFTPa7NoO3V+jzsjbmvRlQwcOWoBAwgA4fUFAAAAAAf8BHBzZXQCINMRFPznA5TB+dNUdQG0udNvQgI27GQZkVRWZDSIWs8tAAEEFgAU+a3P0cB6H1+r8pR099KXbz20PbwBAwgAAAAAAAAAAAf8BHBzZXQCICWyUQcOKcoZBDzzPM1zJOLdqwPsxK4LXnfE/A5c9slaB/wEcHNldAYhAv2YM9xdvR/Mxx+ulKcSzcom+JQpzsV/hrxKHexk7BYYB/wEcHNldAgEAAAAAAABBAABAwjoAwAAAAAAAAf8BHBzZXQCICWyUQcOKcoZBDzzPM1zJOLdqwPsxK4LXnfE/A5c9slaAA== false
```

The input of the tx is confidential and its amount is exactly 0.00001, therefore it's spent entirely by the fee out.
The first output of the tx is a non-LBTC unblinded one, therefore i tried to add a dummy LBTC blinded output to balance the tx as `{"el1qqt7esv7utk73lnx8r7hfffcjeh9zd7y5988v2luxh39pmmryastp37ddelguq7slt74l99r57lffwmeaks7mc883qj7565fdg": 0, "blinder_index": 0}` in `createpsbt`.

These are the last logs of the node:

```
2022-04-15T15:39:50Z [default wallet] AddToWallet 02338810e562a4fe99d555e616932f76dbb8301e9e264fcf6e9a3cf56ce5322d new
2022-04-15T15:39:50Z [default wallet] AddToWallet 0ff56d3088a14bff1ed670bd264cb6021fd52416340ed679245c5bdf5c9fac2a update
elementsd: blindpsbt.cpp:554: BlindingStatus BlindPSBT(PartiallySignedTransaction&, std::map >, std::map >): Assertion `rangeresult' failed.
```

Seems like the blinder role fails to create a rangeproof for the dummy output. Am I doing something wrong?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza en blindpsbt.cpp alrededor de la línea 554 y reproduce el caso proporcionado de walletprocesspsbt usando el dummy blinded output creado mediante createpsbt. Rastrea el estado de blinding y el fallo de rangeproof para el output de valor cero; después, añade o ejecuta una prueba de regresión para esta transacción, de modo que el nodo ya no aborte mientras procesa la transacción parcial.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
cpp
Área
blockchain
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.