cloudwalk / stratus

EVM executor + custom storage
https://doc.stratus.cloudwalk.io/
MIT License
111 stars 1 forks source link

CPP: cashback periodical cap is failing #1121

Closed mayconamaroCW closed 3 months ago

mayconamaroCW commented 3 months ago

Example: https://github.com/cloudwalk/stratus/actions/runs/9519619584/job/26243207767?pr=1114

Log:

Complex scenario
      ✔ Execute as expected (330ms)
    Scenario with cashback period cap
      1) Executes as expected

  48 passing (6s)
  1 failing

  1) Contract 'CashbackDistributor'
       Scenario with cashback period cap
         Executes as expected:

      The sent cashback has unexpected status. The cashback nonce = 5
      + expected - actual

      -6
      +1

      at sendCashbacks (test/CashbackDistributor.test.ts:291:12)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Context.<anonymous> (test/CashbackDistributor.test.ts:1328:37)

/home/runner/work/stratus/stratus/e2e/cloudwalk-contracts
error: Recipe `contracts-test` failed on line 450 with exit code 1
mayconamaroCW commented 3 months ago

after investigating the issue, it seems that changing hardhat.config.ts to the one that is already present in the contract is enough for the test to pass. I'm trying to understand why this file difference is causing a test to fail.

mayconamaroCW commented 3 months ago

The tests passed on another hardhat.config.ts due to the network name. Patching a line of the test fixed the issue.

It seems Stratus is faster than hardhat for that test, so a different time consideration was needed.