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

OCT-1720: Reduce number of RPC calls #294

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

mike-code
Copy link
Contributor

Description

Definition of Done

  1. Acceptance criteria are met.
  2. PR is manually tested before the merge by developer(s).
    • Happy path is manually checked.
  3. PR is manually tested by QA when their assistance is required (1).
    • Octant Areas & Test Cases are checked for impact and updated if required (2).
  4. Unit tests are added unless there is a reason to omit them.
  5. Automated tests are added when required.
  6. The code is merged.
  7. Tech documentation is added / updated, reviewed and approved (including mandatory approval by a code owner, should such exist for changed files).
    • BE: Swagger documentation is updated.
  8. When required by QA:
    • Deployed to the relevant environment.
    • Passed system tests.

(1) Developer(s) in coordination with QA decide whether it's required. For small tickets introducing small changes QA assistance is most probably not required.

(2) Octant Areas & Test Cases.

@mike-code mike-code marked this pull request as draft July 4, 2024 01:08
@mike-code mike-code self-assigned this Jul 4, 2024
@kgarbacinski kgarbacinski self-requested a review July 4, 2024 10:54
@mike-code mike-code marked this pull request as ready for review July 4, 2024 20:55
@mike-code mike-code force-pushed the michal/peformance-improvements branch 2 times, most recently from 424ec82 to e406d44 Compare July 5, 2024 09:14
@paulperegud
Copy link
Contributor

👀

@mike-code mike-code force-pushed the michal/peformance-improvements branch from e406d44 to b2601f8 Compare July 16, 2024 23:36
@mike-code mike-code added the request-approval Request approval from the Housekeeper label Jul 18, 2024
@mike-code mike-code marked this pull request as draft July 21, 2024 22:18
@paulperegud
Copy link
Contributor

I get some very sensible errors when I run this locally.

First:

self = <tests.conftest.Client object at 0x746a07ed6790>, target = 2

    def move_to_next_epoch(self, target):
        assert epochs.get_current_epoch() == target - 1
        now = w3.eth.get_block("latest").timestamp
        nextEpochAt = epochs.get_current_epoch_end()
        forward = nextEpochAt - now + 30
        w3.provider.make_request("evm_increaseTime", [forward])
        w3.provider.make_request("evm_mine", [])
>       assert epochs.get_current_epoch() == target
E       assert 1 == 2
E        +  where 1 = <bound method Epochs.get_current_epoch of <app.infrastructure.contracts.epochs.Epochs object at 0x746a0a828450>>()
E        +    where <bound method Epochs.get_current_epoch of <app.infrastructure.contracts.epochs.Epochs object at 0x746a0a828450>> = <app.infrastructure.contracts.epochs.Epochs object at 0x746a0a828450>.get_current_epoch

tests/conftest.py:679: AssertionError

Second:

self = <tests.conftest.Client object at 0x746a06ff5f10>, target = 3

    def move_to_next_epoch(self, target):
        assert epochs.get_current_epoch() == target - 1
        now = w3.eth.get_block("latest").timestamp
        nextEpochAt = epochs.get_current_epoch_end()
        forward = nextEpochAt - now + 30
        w3.provider.make_request("evm_increaseTime", [forward])
        w3.provider.make_request("evm_mine", [])
>       assert epochs.get_current_epoch() == target
E       assert 4 == 3
E        +  where 4 = <bound method Epochs.get_current_epoch of <app.infrastructure.contracts.epochs.Epochs object at 0x746a0a828450>>()
E        +    where <bound method Epochs.get_current_epoch of <app.infrastructure.contracts.epochs.Epochs object at 0x746a0a828450>> = <app.infrastructure.contracts.epochs.Epochs object at 0x746a0a828450>.get_current_epoch

tests/conftest.py:679: AssertionError

@paulperegud
Copy link
Contributor

Third one is a bit less obvious:

_______________________________________________________________ test_deposit_basics ________________________________________________________________

client = <tests.conftest.Client object at 0x746a06e8c090>, deployer = <tests.conftest.UserAccount object at 0x746a07143310>
ua_alice = <tests.conftest.UserAccount object at 0x746a06ebec10>, ua_bob = <tests.conftest.UserAccount object at 0x746a06d91e50>, setup_funds = None

>   ???
E   AssertionError: assert 0 > 0
E    +  where 0 = int('0')

/home/pepesza/wl/sources/octant/backend/tests/api-e2e/test_api_deposits.py:52: AssertionError

@paulperegud
Copy link
Contributor

That's everything, BTW. No gateway errors, no strange stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request-approval Request approval from the Housekeeper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants