Remix.run Logo
charcircuit 3 days ago

Technically there is no such thing as a bitcoin. Just unspent transaction outputs. Those get spent as an input of a transaction and then are gone forever. There is no concept of the output of a transaction being the same "bitcoin" as what comes from the input of the transaction. This means if you had 2 inputs and 2 outputs of the same amount there is no way to trace which input became which output. At best you can find which outputs potentially came from an input.

lazide 2 days ago | parent [-]

That is called tracing. It’s also not hard - every node does it to verify blocks.

charcircuit 2 days ago | parent [-]

When blocks are verified it just needs to validate that sum of the outputs isn't more than the sum of the inputs. It doesn't care about tracking what went where.

lazide 2 days ago | parent [-]

Except I can literally pull up a full node and see a wallets current balance - which is because it traces all the transactions through the blockchain, verifying all of them.

Literally the only way anyone can see their wallet balance is by doing this.

charcircuit 2 days ago | parent [-]

You can find your balance by looking at the UTXO set and seeing if your adress can spend it. There is no need to trace where those UTXO came from.

lazide 2 days ago | parent [-]

But every full node does, because it is required to validate the chain.

Near as I can tell, you just don’t know how Bitcoin actually works?

charcircuit 2 days ago | parent [-]

I will say it again. When validating the chain all it cares about is that the sum of the output UTXO for a transaction are <= the sum of the input UTXO. All the input UTXO are no longer valid once spent and can be forgotten.