Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Reorder middlewares #294

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Reorder middlewares #294

merged 1 commit into from
Dec 11, 2024

Conversation

hweawer
Copy link
Contributor

@hweawer hweawer commented Dec 10, 2024

What

The problem now is that despite requests are cached the metrics are still showing that requests has happened.

Why

We want not to report cached responses in requests metrics.

How

So the order of the inject matters with web3 middlewares. When we inject middlewares with level = 0 we always append to the end of the queue of middlewares. So to fail fast with cache middleware we need it to be injected first to achieve order:
[..., cache middleware, other middlewares which we shouldn't reach after cache]

@hweawer hweawer requested a review from F4ever December 10, 2024 22:50
@hweawer hweawer self-assigned this Dec 10, 2024
@hweawer hweawer merged commit f16d2f6 into develop Dec 11, 2024
6 checks passed
@hweawer hweawer deleted the reorder-middlewares branch December 11, 2024 09:19
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 <infloop.gm@gmail.com>
Co-authored-by: Raman Siamionau <raman.s@lido.fi>

* 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 <raman.s@lido.fi>
Co-authored-by: Kirill <infloop.gm@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants