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

[ETHEREUM-CONTRACTS] min deposit behaviour #1881

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Conversation

d10r
Copy link
Collaborator

@d10r d10r commented Mar 6, 2024

Step 1: simple, non-fuzzing test case visualizing the problem

This is the test log output:

[FAIL. Reason: assertion failed] testUpdateFlowWithMinDeposit() (gas: 2939604)
Logs:
  Minimum deposit 1000 (raw: 4294967296000)
  ===== #1: alice -> app createFlow | app mode FORWARD_ALL | blocktime 1 =====
    alice -> app FR 4, deposit 2000 1000
    app -> bob FR 4, deposit 1000 0
    APP ctx in : credit granted|used 1001 0
    APP ctx out: credit granted|used 1001 1000
    == acc alice ==
    realtimeBalance 309485009821336478790189055
    deposit 2000 0
    == acc app ==
    realtimeBalance 0
    deposit 1000 1000
  ===== #2: alice -> app updateFlow | app mode FORWARD_ALL | blocktime 1 =====
    alice -> app FR 8, deposit 1001 1000
    app -> bob FR 8, deposit 1000 0
    APP ctx in : credit granted|used 1001 1000
    APP ctx out: credit granted|used 1001 1000
    == acc alice ==
    realtimeBalance 309485009821340769462517759
    deposit 1001 0
    == acc app ==
    realtimeBalance 0
    deposit 1000 1000
  Error: deposit shouldn't decrease
  Error: a >= b not satisfied [uint]
    Value a: 4299262263296
    Value b: 8589934592000

Test result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 26.76ms
 
Ran 1 test suites: 0 tests passed, 1 failed, 0 skipped (1 total tests)

Copy link

github-actions bot commented Mar 6, 2024

Changelog Reminder

Reminder to update the CHANGELOG.md for any of the modified packages in this PR.

  • CHANGELOG.md modified
  • Double check before merge

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.

[ETHEREUM-CONTRACTS] deposit accounting bug when combining app credit and min deposit
1 participant