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 minAda for initial payments #418

Open
mmontin opened this issue Jun 11, 2024 · 1 comment
Open

Check minAda for initial payments #418

mmontin opened this issue Jun 11, 2024 · 1 comment

Comments

@mmontin
Copy link
Collaborator

mmontin commented Jun 11, 2024

While initial payments in initial distribution are part of a transaction that is not properly validated, we should still ensure that the resulting utxos have the required minimal amount of ada, otherwise we can work with a mockchain state that would not be correct.

@florentc
Copy link
Member

florentc commented Jun 12, 2024

  1. I agree this should fail, we should not allow to generate an initial state that violates the min ada invariant.
  2. I am not sure there should be a silent autofix by default on intitial distributions. I think it is interesting that you get an error because there might be something unintended (a typo or copypasting accident) in your initial distribution that is worth getting your attention as a user, while a silent correction would make it unnoticed.
  3. I think we could provide an optional autofix (that adds lovelace in UTxOs where they miss) in a dedicated function to compose over the inititial distribution, or dedicated smart constructor, for cases where the user knows everything is right or doesn't care about lovalaces, but is just lazy.
  4. Or maybe by default but with a warning when the autofix is triggered.

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

No branches or pull requests

2 participants