-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Incorrect output_index stored for return collaterals #101
Comments
Hi, do you have an example of such a scenario? Are you sure that the indexed outputs do not correspond to a collateral change output resulting from the collateral consumption? |
Hmm, I'll check. It's possible it could be collateral return, but I was having trouble spending these outputs via ogmios. |
I think it is a collateral return, but blockfrost vs kupo return different tx and output indexes:
[
{
"address": "addr_test1vr69f80dfrmrfp77xg55zqzwfc4lf5pk65fxtnue2m3ffrspkhx6a",
"tx_hash": "a9bd09c6191167dcc4362b23264684f2bd596cbd2f196af5aea1715e8badb7af",
"tx_index": 1,
"output_index": 1,
"amount": [
{
"unit": "lovelace",
"quantity": "5000000"
}
],
"block": "0f868b414cb5549fd0fcb41c3ab616c33f9f47ae51ce8500c925a2561c699029",
"data_hash": null,
"inline_datum": null,
"reference_script_hash": null
}
]
[
{
"transaction_index": 3,
"transaction_id": "a9bd09c6191167dcc4362b23264684f2bd596cbd2f196af5aea1715e8badb7af",
"output_index": 0,
"address": "addr_test1vr69f80dfrmrfp77xg55zqzwfc4lf5pk65fxtnue2m3ffrspkhx6a",
"value": {
"coins": 5000000,
"assets": {}
},
"datum_hash": null,
"script_hash": null,
"created_at": {
"slot_no": 6356319,
"header_hash": "0f868b414cb5549fd0fcb41c3ab616c33f9f47ae51ce8500c925a2561c699029"
},
"spent_at": null
}
] |
I think blockfrost's |
Also to confirm kupos output index is wrong:
|
Ho, I see. The index is off because collateral return aren't indexes from zero, but as if they were a continuation of the existing output set. Thanks for catching that, will fix asap. |
What Git revision / release tag are you using?
v2.2.0
Describe what the problem is?
Submitting a transaction which will fail phase 2 validation, with the
is_valid
field of the transaction set to false to allow submission, results inthe outputs of such a transaction being indexedthe collateral return outputs of such a transaction being incorrectly indexed in thematches
endpoint. This results in unspendable utxos being listed in wallets, for exampleWhat should be the expected behavior?
When
is_valid
is set to false, outputs should not be listed. I have not checked, but additionally we should verify the behaviour of collateral, ie that it should be marked as spent and collateral return outputs be indexed.If applicable, what are the logs from the server around the occurence of the problem?
The text was updated successfully, but these errors were encountered: