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

SegWit unconfirmed tx bug? #157

Closed
KingZee opened this issue Dec 15, 2018 · 2 comments
Closed

SegWit unconfirmed tx bug? #157

KingZee opened this issue Dec 15, 2018 · 2 comments

Comments

@KingZee
Copy link

KingZee commented Dec 15, 2018

Example of a segwit tx being displayed as expected : https://api.blockchair.com/bitcoin/dashboards/transaction/9f11241c176e9daad3b523aa4275cee10a9187bf6e18e3facbf7bc8207587f1b

Snippet :
"inputs" : [{"block_id":553805,"transaction_id":364489577,"index":1,"transaction_hash":"ff62db6152dd894fb59b74ff936ebbba20125777ee2125e90ea42bd6a71a3423","date":"2018-12-14","time":"2018-12-14 16:09:42","value":699006,"value_usd":23.9413,"recipient":"3Kra6yraNUD7aDCQzwYoCdE7ighJwLYTpx","type":"scripthash","script_hex":"a914c740dec7d51b1f9a48333ddca7fe8a87885f559987","is_from_coinbase":false,"is_spendable":null,"is_spent":true,"spending_block_id":553811,"spending_transaction_id":364504185,"spending_index":0,"spending_transaction_hash":"9f11241c176e9daad3b523aa4275cee10a9187bf6e18e3facbf7bc8207587f1b","spending_date":"2018-12-14","spending_time":"2018-12-14 17:26:17","spending_value_usd":23.9413,"spending_sequence":4294967295,"spending_signature_hex":"160014eb8341e84f920e8a889de3a037d754b10d26789b","spending_witness":"304402205d00d31d6553b1d676743d386509bb771df191b2cd36c2e197af59dfd50ed02802203c1f72008658d17f824e0532dbe00744bdab68012b77cb029889d5dfeef07a2201,02607d4be10ae7f51675a0dbb69a9dd53e5300513285385a13e326ea6e749bc8e5","lifespan":4595,"cdd":0},{"block_id":553808,"transaction_id":364495610,"index":8,"transaction_hash":"52d1d030c5d211a168fc7f45a8adf8ac9ff3d39eecf890434badd05499c29a1a","date":"2018-12-14","time":"2018-12-14 16:40:50","value":638492,"value_usd":21.8687,"recipient":"3CA9ArquHKZLwby5dfD9thmKhugrU3menU","type":"scripthash","script_hex":"a91472d289c4ce2584e0b76925047166758c6b0d160487","is_from_coinbase":false,"is_spendable":null,"is_spent":true,"spending_block_id":553811,"spending_transaction_id":364504185,"spending_index":1,"spending_transaction_hash":"9f11241c176e9daad3b523aa4275cee10a9187bf6e18e3facbf7bc8207587f1b","spending_date":"2018-12-14","spending_time":"2018-12-14 17:26:17","spending_value_usd":21.8687,"spending_sequence":4294967295,"spending_signature_hex":"1600146d90b0340f7c58d1611c3bb694cf6225ffd4a87d","spending_witness":"304402202d923ea69df05728f57548de2ca8752d58d47e849107997aa8eba4209c80863002200ac959a293a513599460273affe2da99e07b219b8e2af8f9772a6ca4a67963ed01,027efc4ca979979e8cee276185a191e5dec0be057a52c712dd49e320e79c0f028b","lifespan":2727,"cdd":0},]

Example of a segwit tx not being displayed as expected : http://archive.is/KkRDq

Snippet of just the witness value :

ARRAY[decode('', 'hex'), decode('3045022100dde4227fc6465c4f2773d9f579bad4d6e06fcd61c9e3fd7fff4a3d1a4913316b02204d3c26a79e89f19d2df22202df475de8bb7cb2c737bec87847232a281cd8176301', 'hex'), decode('3045022100ca782e43c0a8e17a6c6dab7d129d6a87c37338c3fe0e9d1042716dcc04f5280f0220447c83c6c51be08979e8abe2ffb7b9cff707fd2701c835ee02da81a61ff1e31401', 'hex'), decode('5221032d57bb23ea8d1ddd4d38c25a2448e9cc17451a679d8053dc119c08d5f71a8e6c2102c7acbabc7e74304ae176494a192668211c960d747f5c288f3a7d9cf6247f90d821032bc9a7a54df3433f50369305a2fe6c821f1c6e862e89b76828d6de020b51ad8b53ae', 'hex')]"

I can see the signature is there.. but what is ARRAY decode hex doing in there?

@Har01d
Copy link
Member

Har01d commented Dec 18, 2018

Hello, thanks!

It’s indeed a bug, instead of

ARRAY[decode('', 'hex'), decode('3045022100dde4227fc6465c4f2773d9f579bad4d6e06fcd61c9e3fd7fff4a3d1a4913316b02204d3c26a79e89f19d2df22202df475de8bb7cb2c737bec87847232a281cd8176301', 'hex'), decode('3045022100ca782e43c0a8e17a6c6dab7d129d6a87c37338c3fe0e9d1042716dcc04f5280f0220447c83c6c51be08979e8abe2ffb7b9cff707fd2701c835ee02da81a61ff1e31401', 'hex'), decode('5221032d57bb23ea8d1ddd4d38c25a2448e9cc17451a679d8053dc119c08d5f71a8e6c2102c7acbabc7e74304ae176494a192668211c960d747f5c288f3a7d9cf6247f90d821032bc9a7a54df3433f50369305a2fe6c821f1c6e862e89b76828d6de020b51ad8b53ae', 'hex')]

API should return simply an array of

['','3045022100dde4227fc6465c4f2773d9f579bad4d6e06fcd61c9e3fd7fff4a3d1a4913316b02204d3c26a79e89f19d2df22202df475de8bb7cb2c737bec87847232a281cd8176301', 3045022100ca782e43c0a8e17a6c6dab7d129d6a87c37338c3fe0e9d1042716dcc04f5280f0220447c83c6c51be08979e8abe2ffb7b9cff707fd2701c835ee02da81a61ff1e31401','5221032d57bb23ea8d1ddd4d38c25a2448e9cc17451a679d8053dc119c08d5f71a8e6c2102c7acbabc7e74304ae176494a192668211c960d747f5c288f3a7d9cf6247f90d821032bc9a7a54df3433f50369305a2fe6c821f1c6e862e89b76828d6de020b51ad8b53ae']

We'll be working on a fix.

@Har01d
Copy link
Member

Har01d commented Jun 5, 2020

This has been fixed in v.2.0.57 (better late than never they say).

For the aforementioned example the API will return the following string: ,3045022100dde4227fc6465c4f2773d9f579bad4d6e06fcd61c9e3fd7fff4a3d1a4913316b02204d3c26a79e89f19d2df22202df475de8bb7cb2c737bec87847232a281cd8176301, 3045022100ca782e43c0a8e17a6c6dab7d129d6a87c37338c3fe0e9d1042716dcc04f5280f0220447c83c6c51be08979e8abe2ffb7b9cff707fd2701c835ee02da81a61ff1e31401,5221032d57bb23ea8d1ddd4d38c25a2448e9cc17451a679d8053dc119c08d5f71a8e6c2102c7acbabc7e74304ae176494a192668211c960d747f5c288f3a7d9cf6247f90d821032bc9a7a54df3433f50369305a2fe6c821f1c6e862e89b76828d6de020b51ad8b53ae.

Note that nothing before the first comma means an empty element.

@Har01d Har01d closed this as completed Jun 5, 2020
@Blockchair Blockchair deleted a comment from richmanrich Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants