Skip to content
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

Patch for tx_info and block_tx_info (collateral_tx_out) #285

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Conversation

rdlrt
Copy link
Contributor

@rdlrt rdlrt commented Jun 4, 2024

Description

The outputs for collateral_tx_out are never really created on chain - and thus, any assets involved are never committed to ma_tx_out. However, current references for collateral_tx_out in tx_info and block_tx_info endpoints does an incorrect join assuming collateral_tx_out.id can be joined against ma_tx_out -> tx_out_id (latter is strictly only to be mapped against tx_out.id) . This resulted in collateral_tx_out returning inconsistent and wrong results across instances due to invalid key to join.

Which issue it fixes?

#284

How has this been tested?

Tested on local preprod instance using below (should be empty):

curl -sX POST "http://127.0.0.1:18053/api/v1/tx_info?select=collateral_output->asset_list"  -H "accept: application/json" -H "content-type: application/json"  -d '{"_tx_hashes":["6fc9e482959befc6928d2691caa62c8a52a5abce167bd5fce8874cc315bb346d"]}'
# [{"asset_list":"[]"}]

@rdlrt rdlrt requested a review from Scitz0 June 4, 2024 06:33
Copy link
Contributor

@Scitz0 Scitz0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok but require schema update as the format of asset desc field doesn't match other asset outputs.

@rdlrt rdlrt merged commit 26e3703 into main Jun 6, 2024
2 checks passed
@rdlrt rdlrt deleted the tx_info branch June 6, 2024 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants