bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.85k stars 2.09k forks source link

Insight does not correctly present transaction b10c007c…792b4d41 #3430

Closed murchandamus closed 1 year ago

murchandamus commented 2 years ago

The first transaction that used P2TR outputs (notably before activation of the soft fork), b10c007c60e14f9d087e0291d4d0c7869697c6681d979c6639dbd960792b4d41 is shown to have one input and two outputs, although it actually has four inputs:

image

For reference, mempool.space shows: image

It does look like bech32m addresses and P2TR outputs are correctly indexed starting from activation, as other transactions I've tested (e.g. 3777…35c8 look correct to me.

kajoseph commented 2 years ago

Thanks for bringing this to our attention! We will look into this

kajoseph commented 2 years ago

@Xekyo This fix has been merged and deployed.

image

murchandamus commented 2 years ago

Hi @kajoseph, I was just looking at the transaction again. It's good that the addresses are now shown, but I notice that the last three inputs are compounded into one line, and other than I expected, even when expanding the details, the three inputs still are shown as one. While the latter three inputs all spend funds associated with the same address, this causes e.g. the arrow in the front to only link to the details of input 1. image

I was wondering whether that is intentional, or whether the detailed view should reveal that there were four inputs even when some of them spend funds associated with the same address: image

kajoseph commented 2 years ago

Hmm...yeah I think the rollup is intentional (at least I think I remember seeing where that's happening intentionally...that was a decision made before my time here), but we should probably re-think this. We recently re-wrote our Insight UI and this might have been something that worked before but was missed in the re-write. I'll pass this on to the UI team.

Re-opening until I have something to report back.

kajoseph commented 1 year ago

@Xekyo The inputs have been unrolled. We also fixed the input confirmations, added some tx metadata, removed the script field since it wasn't being populated anyway (I'd like to add it back in in a future iteration), and addressed some awkward displaying of the tx page when you followed an input to it's tx. It now has a tag on the input's tx output

image

murchandamus commented 1 year ago

Thanks looking good, I did notice another small issue though, which I filed here: https://github.com/bitpay/bitcore/issues/3468