You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We used to compute an unspent ID from the values in a spend's prevout "output commitment" and then check it existed in in the state tree. We lost that when we converted to entry-based hashing:
Now there's no separate UnspentID; the value in the state tree is simply the outputID in the spend. But that outputID needs to be recomputed from the other values in the spend (according to the txgraph mapping algorithm) and the recomputed value must match the spentOutputID in the spend for the spend to be valid. As it is, we're just reading and trusting the spentOutputID.
The text was updated successfully, but these errors were encountered:
Spend TxInputs need to contain all of the data necessary to reconstruct
output ids in order to spend them. Performing the hashing during
validation gives us cryptographic integrity that the spent output data
is correct.
In order to preserve this data, the mapping process was updated to
return additional information which is stored in the account_utxos
table. This data is then populated in a SpendCommitment type on the
TxInput structs.
Fixes#648Closes#665
We used to compute an unspent ID from the values in a spend's prevout "output commitment" and then check it existed in in the state tree. We lost that when we converted to entry-based hashing:
b817512#diff-fb46f84aaf51fdc47bacd0fb932c9f26
Now there's no separate UnspentID; the value in the state tree is simply the outputID in the spend. But that outputID needs to be recomputed from the other values in the spend (according to the txgraph mapping algorithm) and the recomputed value must match the spentOutputID in the spend for the spend to be valid. As it is, we're just reading and trusting the spentOutputID.
The text was updated successfully, but these errors were encountered: