-
Notifications
You must be signed in to change notification settings - Fork 32
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
Util.tokenUtxoDetails() should check all UTXOs #84
Comments
Update: This change would remove the validation capability. There would need to be a second call or some other method to ensure an SLP UTXO is valid. |
After conversing with the team on this, perhaps a preferred workflow for this function would be:
|
Looks like a good solution, if the validation here would be too heavy, the apps could also rely on a second call such as to Also regarding |
PR #86 implements the following features:
|
This issue satisfied by PR #86 |
Capturing the results of a team conversation around
Util.tokenUtxoDetails()
.The current behavior
tokenUtxoDetails()
callsvalidateTxid()
for each UTXO it receives, to have SLPDB validate each UTXO. For those UTXOs that come back as valid, the raw transaction data is retrieved from the full node and the OP_RETURN data decoded.The desired behavior
tokenUtxoDetails()
should retrieve the raw transaction data directly from the full node and check for the presence of an OP_RETURN. If there is no OP_RETURN, it can mark the UTXO asfalse
to indicate it is not an SLP UTXO. For those with an OP_RETURN, it should attempt to be decoded. No calls need to be made to SLPDB.Reasoning
The reason for this change is a realization that SLPDB may not know about a TX, and thus may erroneously return a false negative that would cause a wallet to burn a token. This new method increases demands on full nodes and increases computation, but removes the risk of burning tokens.
The text was updated successfully, but these errors were encountered: