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

Cache chain-id #288

Merged
merged 5 commits into from
Dec 10, 2024
Merged

Cache chain-id #288

merged 5 commits into from
Dec 10, 2024

Conversation

hweawer
Copy link
Contributor

@hweawer hweawer commented Dec 2, 2024

What

According to the dashboards chain_id calls significantly increased in last 2 months, it is increasing usage of the provider node resources. It has huge effect because of the number of the environments we have.

Why

Decrease usage of the provider resources

How

Cache chain_id

See ethers-io/ethers.js#2689 for reference, a lot of providers force client to do chainId before fetching the block number

@hweawer hweawer self-assigned this Dec 2, 2024
@hweawer hweawer requested a review from infloop December 2, 2024 14:00
@hweawer hweawer requested a review from F4ever December 9, 2024 10:37
@hweawer hweawer requested a review from F4ever December 9, 2024 11:47
@hweawer hweawer merged commit e2694eb into develop Dec 10, 2024
6 checks passed
@hweawer hweawer deleted the cache-chain-id branch December 10, 2024 07:48
hweawer added a commit that referenced this pull request Dec 11, 2024
* Examples of alerts

* Remove special forks annotations (#271)

* Remove special forks annotations

* take addresses from envs

* Add env

* Variables in README

* Move to other section

* Holesky only

* fix check balance test

* Actualize readme

* remove deprecated entrypoints

* Add account label to balance

* fix xfail unit tests

* Update minor deps + remove package-mode

* add balance check

* remove tests

* Remove mellow

* Remove test

* Fix test

* Refactor strategy

* Update alerts

* Empty whitelist (#282)

* Empty whitelist

* Change default

* Refactor

---------

Co-authored-by: Kirill <[email protected]>
Co-authored-by: Raman Siamionau <[email protected]>

* Track recommended fee despite checks (#281)

* Fetch prefix one time for a batch (#279)

* Fetch prefix one time

* default arg

* function arg

* Filters on request

* Fix tests

* refactor

* Fix unvetter tests

* Fix bug

* fix signatures in test

* Fix

* Fix

* Fix

* Fix

* Fix comments

* Gas strategy with addendum (#285)

* Gas strategy with addendum

* Precommit hooks

* Env variable

* Update README

* Gwei default

* Module iteration until first healthy module (#286)

* Cache quorum

* Gather quorum in advance

* Update tests

* Fix types

* fix var

* fix

* Fix comments

* Fix sorting

* Remove unit tests

* Move minutes to a variable

* Add more logs

* Unit tests for iteration order

* Comment

* Fix comments

* Update curl (#287)

* Update curl

* Pin version

* Update aiohttp (#289)

* Max operators per unvetting check (#290)

* Max operators per unvetting check

* Upgrade test

* Cache chain-id (#288)

* Cache chain-id

* middleware to cache id

* Cache gnosis

* Add metrics to gnosis

* Remove i

* Fix recursion (#292)

* Fix recursion

* Remove metrics from onchain web3

* Reorder middlewares (#294)

---------

Co-authored-by: F4ever <[email protected]>
Co-authored-by: Kirill <[email protected]>
hweawer added a commit that referenced this pull request Dec 16, 2024
* Cache chain-id

* middleware to cache id

* Cache gnosis

* Add metrics to gnosis

* Remove i
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.

2 participants