IntersectMBO / IntersectMBO/cardano-ledger
Imp tests for `WithdrawalsExceedAccountBalance`
- Dominant language
- Haskell
- Stars
- 295
- Forks
- 179
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 29
Description
Here are scenarios that we need to have tests for:
* [ ] - Negative test: common case where one or more transaction bodies in a transaction have a withdrawal that takes an already registered account(s) below 0
* [ ] - ~Positive test: edge case where a transaction has withdrawal that attempts to withdraw 0 from an account that was registered in a prior sub-transaction~ If there will be need for this we will be able to allow it with an intra-era hard fork in the future. For now it would introduce more complexity in the implementation, arguably for little benefit
* [ ] - Negative test: edge case where a transaction has a ~non-zero~ withdrawal that attempts to transfer funds out of an account that was registered in a prior sub-transaction, which also had a direct deposit into that account
* [ ] - Positive test in a legacy mode: Ensure that a top-level transaction can withdraw 0 for an account that was registered in another sub transaction
* [ ] - Positive test in a legacy mode: Ensure that a top-level transaction can withdraw the exact amount for an account that was registered in another sub transaction and had direct deposits into that account
* [ ] - Negative test: for an existing account, a subtransaction unregisters it, and a subsequent subtransaction tries to withdraw 0
Both of the latter scenarios are safe, because top level transaction as well as all sub-transactions have to balance out on their own.
Contributor guide
Assessment
This issue has not been assessed yet.