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

Check the Minimum required UTxO for different transaction types #1096

Closed
dorin100 opened this issue May 26, 2022 · 6 comments
Closed

Check the Minimum required UTxO for different transaction types #1096

dorin100 opened this issue May 26, 2022 · 6 comments
Labels

Comments

@dorin100
Copy link
Collaborator

dorin100 commented May 26, 2022

The scope of this test is to check that the Minimum required UTxO remains the same from release to release for different transaction types.

Transaction types:

  • simple spent transaction (1-to-1, 1-to-many, many-to-many)
  • certificates (delegation, un-delegation, pool registration/de-registration)
  • multi assets (mint, spend, destroy, multiple assets/operations in the same tx)
  • scripts (time locking, ttl, etc)
  • Plutus scripts
  • a mix of simple spending, multi assets, scripts, Plutus scripts in the same tx, certificates
  • try to create a transaction with the size of a full block
  • try to submit a transaction with the size higher than a full block

How to:

  • compare the Minimum required UTxO value returned when using transaction build to generate different transaction types with:
    • the value returned by transaction calculate-min-value for the same tx
    • the previous values of Minimum required UTxO from the previous runs/releases
  • it should not be possible to submit/create UTXOs smaller than Minimum required UTxO (the official/golden value)
@dorin100 dorin100 added the node label May 26, 2022
@dorin100
Copy link
Collaborator Author

@saratomaz saratomaz self-assigned this May 26, 2022
@mkoura
Copy link
Collaborator

mkoura commented May 26, 2022

Minimum UTxO size is computed from tx outputs, and the only possibilities are

  • UTxO with just Lovelace
  • UTxO with Lovelace and single native token
  • UTxO with Lovelace and multiple native tokens
  • UTxO with Lovelace and datum hash
  • UTxO with Lovelace, single native token and datum hash
  • UTxO with Lovelace, multiple native tokens and datum hash

I propose you to find suitable existing tests, and instead of using fixed amount of Lovelace, calculate the minimum value using calculate_min_req_utxo. Also record the value and check that the calculated value matches (same as we do for fees).
Find just single candidate test for each scenario, as we don't want to have many failing tests in case the calculation is broken (it is broken right now).

@saratomaz
Copy link
Collaborator

This is blocked by:
cardano-node 3913

@saratomaz saratomaz added the blocked Not possible to work on the issue right now label May 31, 2022
@dorin100
Copy link
Collaborator Author

dorin100 commented Jun 1, 2022

This is blocked by: cardano-node 3913

In Babbage, yes, but I think the test can be written in Alonzo with Alonzo transactions + node 1.34.1 and then ran on Babbage nodes and confirm the functionality.

In the end, the scope of these tests is to check that the Minimum required UTxO remains the same from release to release for different transaction types.

@dorin100
Copy link
Collaborator Author

dorin100 commented Jun 1, 2022

In Babbage, these could be relevant too (only if the results are different than expected):

@mkoura
Copy link
Collaborator

mkoura commented Jun 1, 2022

This is broken on Babbage and we have other tests that confirms that this is broken, so it makes no sense to break more tests by introducing this checks at this moment, or implement workaround that will be removed later. Once the minimum UTxO computation is fixed, we can continue with this task.

@saratomaz saratomaz removed the blocked Not possible to work on the issue right now label Jun 7, 2022
@saratomaz saratomaz removed their assignment Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants