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

chore: Share CodeFetcher in orderbook #2429

Closed
MartinquaXD opened this issue Feb 23, 2024 · 1 comment · Fixed by #2912
Closed

chore: Share CodeFetcher in orderbook #2429

MartinquaXD opened this issue Feb 23, 2024 · 1 comment · Fixed by #2912
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@MartinquaXD
Copy link
Contributor

Background

Currently we create one instance of CodeFetcher in the price estimator factory and another one for the OrderValidator in the orderbook. There is no reason these need to be separate instances so by sharing 1 instance in both contexts we could reduce the number of RPC calls we issue for fetching code at a given address.

@MartinquaXD MartinquaXD added the good first issue Good for newcomers label Feb 23, 2024
Copy link

This issue has been marked as stale because it has been inactive a while. Please update this issue or it will be automatically closed.

@github-actions github-actions bot added the Stale label Apr 24, 2024
@MartinquaXD MartinquaXD removed the Stale label Apr 24, 2024
@fleupold fleupold added the help wanted Extra attention is needed label Apr 25, 2024
fleupold added a commit that referenced this issue Aug 20, 2024
# Description
<!--- Describe your changes to provide context for reviewers, including
why it is needed -->

Reduce the number of RPC calls by instantiating the code fetcher only
once.

# Changes
<!-- List of detailed changes (how the change is accomplished) -->

- [ ] Instanciate code_fetcher in run (orderbook)
- [ ] Pass it to PriceEstimatorFactory

Fixes #2429

---------

Co-authored-by: Felix Leupold <felixleupold90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants