IntersectMBO / IntersectMBO/cardano-ledger

Imp tests for `WithdrawalsExceedAccountBalance`

Open
#5,769 0 comments 0 reactions 0 assignees View on GitHub
:detective: testing
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.