Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liquid: missing transaction prevouts #71

Closed
natsoni opened this issue Jan 4, 2024 · 2 comments · Fixed by #72
Closed

Liquid: missing transaction prevouts #71

natsoni opened this issue Jan 4, 2024 · 2 comments · Fixed by #72
Assignees

Comments

@natsoni
Copy link
Contributor

natsoni commented Jan 4, 2024

When querying a transaction from electrs at /tx/:txId, it fails with an error if the transaction has an input with a missing prevout (like liquid peg ins):

> curl https://liquid.network/api/tx/2686128adb8d678b1c852bb15c0c6c98fdac4e9626798a52e5a9827d711d7c2e
Transaction missing prevouts

It looks like this behaviour was introduced by 173d613, since running electrs from the parent commit fixes the issue (mempool-electrs 3.0.0-dev-a21a958):

curl http://localhost:3000/tx/2686128adb8d678b1c852bb15c0c6c98fdac4e9626798a52e5a9827d711d7c2e
{"txid":"2686128adb8d678b1c852bb15c0c6c98fdac4e9626798a52e5a9827d711d7c2e","version":2,"locktime":0,"vin":[{"txid":"7b94f15dbfda5f24b3ff486425b02da915419a03f20793fa85f44de20b0c37e7","vout":0,"prevout":null,"scriptsig":"","scriptsig_asm":"","witness":["304402203e66c3c61690e06a6d8394f4cafccd5a842c81e942a0d970ccdc7179b7c1010302200bcb9e76d90ca0fb0ffbc9e6f9fb61fb892632de5ac81605deda495a306b143c01","032abcbb6f2836c2a701d0f0e92743a0a60a64b86c90156bbc99191bc749988377"],"is_coinbase":false,"sequence":4294967295,"is_pegin":true}],"vout":[{"scriptpubkey":"0014602353deacdcd14d4fb4756591958eb18fb5ebe5","scriptpubkey_asm":"OP_0 OP_PUSHBYTES_20 602353deacdcd14d4fb4756591958eb18fb5ebe5","scriptpubkey_type":"v0_p2wpkh","scriptpubkey_address":"ex1qvq348h4vmng56na5w4jer9vwkx8mt6l9um0h0a","value":809953,"asset":"6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d"},{"scriptpubkey":"","scriptpubkey_asm":"","scriptpubkey_type":"fee","value":47,"asset":"6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d"}],"size":1062,"weight":1548,"fee":47,"status":{"confirmed":true,"block_height":2666759,"block_hash":"9c8c4340a290a62043ee6eb91ebd5755d8b49bcfc1c1d8fa010cecf5674000e9","block_time":1704310628}}

It results in the Liquid explorer not being able to display peg in transactions:

Screenshot 2024-01-04 at 11 16 41
@junderw
Copy link
Member

junderw commented Jan 4, 2024

Can you try out #72 for me? Thanks.

@natsoni
Copy link
Contributor Author

natsoni commented Jan 4, 2024

Can you try out #72 for me? Thanks.

It looks like #72 fixed it. Thanks!
On f0c9fa7:

curl http://localhost:3000/tx/2686128adb8d678b1c852bb15c0c6c98fdac4e9626798a52e5a9827d711d7c2e
{"txid":"2686128adb8d678b1c852bb15c0c6c98fdac4e9626798a52e5a9827d711d7c2e","version":2,"locktime":0,"vin":[{"txid":"7b94f15dbfda5f24b3ff486425b02da915419a03f20793fa85f44de20b0c37e7","vout":0,"prevout":null,"scriptsig":"","scriptsig_asm":"","witness":["304402203e66c3c61690e06a6d8394f4cafccd5a842c81e942a0d970ccdc7179b7c1010302200bcb9e76d90ca0fb0ffbc9e6f9fb61fb892632de5ac81605deda495a306b143c01","032abcbb6f2836c2a701d0f0e92743a0a60a64b86c90156bbc99191bc749988377"],"is_coinbase":false,"sequence":4294967295,"is_pegin":true}],"vout":[{"scriptpubkey":"0014602353deacdcd14d4fb4756591958eb18fb5ebe5","scriptpubkey_asm":"OP_0 OP_PUSHBYTES_20 602353deacdcd14d4fb4756591958eb18fb5ebe5","scriptpubkey_type":"v0_p2wpkh","scriptpubkey_address":"ex1qvq348h4vmng56na5w4jer9vwkx8mt6l9um0h0a","value":809953,"asset":"6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d"},{"scriptpubkey":"","scriptpubkey_asm":"","scriptpubkey_type":"fee","value":47,"asset":"6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d"}],"size":1062,"weight":1548,"sigops":0,"fee":47,"status":{"confirmed":true,"block_height":2666759,"block_hash":"9c8c4340a290a62043ee6eb91ebd5755d8b49bcfc1c1d8fa010cecf5674000e9","block_time":1704310628}}

@junderw junderw assigned junderw and unassigned mononaut Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants