Skip to content

fix(ci): stop push runs from preferring stale mainnet secret - #432

Merged
ErikBjare merged 1 commit into
uniswap-python:dev/v4-finfrom
TimeToBuildBob:fix/ci-ignore-stale-mainnet-secret
Mar 27, 2026
Merged

fix(ci): stop push runs from preferring stale mainnet secret#432
ErikBjare merged 1 commit into
uniswap-python:dev/v4-finfrom
TimeToBuildBob:fix/ci-ignore-stale-mainnet-secret

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Summary

  • stop the test workflow from preferring secrets.MAINNET_PROVIDER
  • always use https://ethereum.publicnode.com for mainnet CI forks

Why

PR #431 fixed the fallback URL, but the post-merge push run on dev/v4-fin still consumed the repo secret on push jobs. That secret is a stale Infura URL, so Ganache still failed with Too Many Requests.

Evidence:

  • PR run for fix(ci): replace rate-limited Infura with public RPC #431 used PROVIDER_MAINNET: https://ethereum.publicnode.com and passed the mainnet jobs
  • post-merge push run for commit b2eb3a0 showed PROVIDER_MAINNET: *** and failed with Invalid response from fork provider: {"code":-32005,"message":"Too Many Requests"...see https://infura.io/dashboard}

This makes push CI behave differently from the PR run, which is dumb. CI should use the known-good public endpoint directly until the secret is updated or removed.

Notes

@greptile-apps

greptile-apps Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Reviewed PR #432 which fixes CI by hardcoding https://ethereum.publicnode.com as PROVIDER_MAINNET instead of using the secrets.MAINNET_PROVIDER || fallback expression that was silently consuming a stale Infura secret on push runs.

Confidence Score: 5/5

Safe to merge — the one-line change is targeted, low-risk, and directly addresses the confirmed CI regression.

The diff is a single-line replacement that removes a secret reference in favour of a hardcoded public URL. The logic is straightforward, the root cause is well-evidenced in the PR description, and the only remaining item (stale comment on line 79) is a non-blocking style nit.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/test.yml Removes the `secrets.MAINNET_PROVIDER

Comments Outside Diff (1)

  1. .github/workflows/test.yml, line 79 (link)

    P2 Stale comment no longer reflects reality

    This comment was accurate when PROVIDER_MAINNET used the secrets.MAINNET_PROVIDER || fallback expression, but now that the secret is bypassed entirely the comment is misleading. Consider updating it to reflect the new intent.

Reviews (1): Last reviewed commit: "fix(ci): ignore stale mainnet secret in ..." | Re-trigger Greptile

@codecov

codecov Bot commented Mar 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (dev/v4-fin@b2eb3a0). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev/v4-fin     #432   +/-   ##
=============================================
  Coverage              ?   58.83%           
=============================================
  Files                 ?       12           
  Lines                 ?     1834           
  Branches              ?        0           
=============================================
  Hits                  ?     1079           
  Misses                ?      755           
  Partials              ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Confirmed the mainnet regression is fixed here.

  • PR run 23620730825 now uses PROVIDER_MAINNET: https://ethereum.publicnode.com, and test (v1, mainnet), test (v2, mainnet), and test (v3, mainnet) all pass.
  • The only remaining red check is test (v3, arbitrum), and it is the same broader failure we already saw on dev/v4-fin after fix(ci): replace rate-limited Infura with public RPC #431 (23619459609 on 2026-03-26): the forked trade setup in tests/test_uniswap.py is reverting on Arbitrum (test_assets / test_make_trade*).

I am not broadening this PR to paper over that unrelated Arbitrum failure. This PR does the narrow thing it was opened for: stop push runs from preferring the stale mainnet secret.

@ErikBjare
ErikBjare merged commit ade1cf8 into uniswap-python:dev/v4-fin Mar 27, 2026
4 of 5 checks passed
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Addressed Greptile's P2 nit (3f73505): updated stale comment on line 79 to reflect that all provider env vars are now hardcoded public endpoints (no longer "use secret if available").

Everything else is unchanged — Greptile 5/5, mainnet CI green, Arbitrum failure is pre-existing and unrelated.

ErikBjare added a commit that referenced this pull request Jul 28, 2026
* v4 support pre-alpha

* v4 support pre-alpha

* Revert "v4 support pre-alpha"

This reverts commit fa75632.

* Revert "v4 support pre-alpha"

This reverts commit de63ce4.

* Update __init__.py

* Add files via upload

* Add Uniswap4 to module exports

* Delete uniswap/uniswap-v4 directory

* Add files via upload

* Refactor uniswap4.py by removing unused imports

Removed unused imports and cleaned up code formatting.

* Add files via upload

Pool manager contract ABI

* Delete uniswap/configs/evmuniV4_permit2.ini

Deleted due to naming fix

* Delete uniswap/configs/evmuniV4_chains.ini

Deleted due to naming fix

* Delete uniswap/configs/evmuniV4_quoter.ini

Deleted due to naming fix

* Delete uniswap/configs/evmuniV4_router.ini

Deleted due to naming fix

* Delete uniswap/configs/evmuniV4_stateview.ini

Deleted due to naming fix

* Add files via upload

Naming fix

* Add files via upload

Liquidity pools list management class added, UniswapV4 improvements.

* Delete uniswap/uni4base.py

refactor

* Delete uniswap/configs/chains.ini

refactor

* Delete uniswap/configs directory

refactor

* Beta

refactoring+bug fixes

* Add files via upload

* Add files via upload

* Delete uniswap/v4pools.py

moved to util

* Delete uniswap/v4types.py

moved to types

* Delete uniswap/v4constants.py

moved to constants

* Add files via upload

Structure refactoring; fixes; StateView contract support added

* Formmating fixes, naming fixes

* fix constants

* Fix util

* technical commit

* Technical fixes

* pre-commit formatter/linter

* fix pyproject.toml

* ci: update GitHub Actions to supported versions

* ci: fix python version output quoting in workflow

* build(deps): update poetry.lock

* typecheck fixes

* review fixes

* poetry.lock update

* more typecheck fixes

* more typecheck

* get_token fix

* PositionDescriptor support; PositionManager read methods support; misc

* fixes

* PositionManager full support; PoolManager full support; contracts-related methods naming improvement.

* fixes

* review fixes

* extra fix

* poetry.lock fix

* v4 test prototype

* Update uniswap/uniswap4.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update tests/v4tests.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix

* tech commit

* tech fix

* fix(ci): replace rate-limited Infura with public RPC (#431)

* fix(ci): replace rate-limited Infura with public RPC and fix type errors

- Switch PROVIDER_MAINNET fallback from Infura to ethereum.publicnode.com
  (Infura public key was hitting "Too Many Requests" rate limits)
- Add dev/v4 and dev/v4-fin branches to CI triggers
- Fix mypy errors: use str() for bytes fallback in token name/symbol
  decode, add type: ignore for web3 get_logs attribute

Co-authored-by: Bob <bob@superuserlabs.org>

* fix(ci): switch Arbitrum RPC and resolve mypy warning

* fix(ci): stop push runs from preferring stale mainnet secret (#432)

* Added multi-hop quotes support

* review fixes

* Checks improvements, small logic fix, multi-hop tests added

* Added multi-hop swaps support; added market pricing functions similar to main class; removed hardcoded zero values regarding hooks; impoved pool data fetching process;  misc improvement

* review fix

* typecheck fix

* Improved exceptions handling; get_logs() glitch fix

* Added swap tests; added liquidity read functions; added liquidity tests

* typo fix

* Fixes: get_poolkeys_sublist() - addresses comparison; estimate_price_impact() - route param removed;  decode_position_info() - imcorrect input value handling

* Fix: decode_position_info() - truncated poolID decoding

* Add get_position_value() and get_minted_token_id(); related tests; tick math improved; misc

* get_amounts_for_liquidity_by_ticks() refactoring; review suggestions added

* typecheck glitch fix

* typo

* typo

* get_sqrt_ratio_at_tick() moved to util.py as it is shared with v3;  get_minted_token_id() refactoring to support multiple mints

* review suggestion

* review suggestion

* Add liquidity management methods; add router commands and pool actions constants

* quick self-fix

* typos

* typos

* Changed direct contract call methods naming to improve usability

* typo

* Improve log processing in fetch_poolkey_data(); typos fixed

* Add fetch_poolkey_data()  reconnect functionality

* Change fetch_poolkey_data(): param/var renamed and docstring changed for better clarity; tests exceptions handling improved slightly.

* Add universal router prerequisites

* quick fix

* Add universal router support

* Review fixes

* review suggestions

* Review suggestions

* Review suggestions

* Fixed custom recipient' logic in swaps; fixed ABIs constants.

* review fixes

* Removed custom recipent in swaps; tests added.

* quick fix

* misc fixes

* Switch from ganachr to foundry-anvil for v4 tests

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Add custom transactions' nonce; custom delay time within approve(); universal router' commands and actions ABIs clarified

* fix

* ABI fix

* fix

* Add more v4 tests

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Add more tests

* fix

* Add liquidity tests

* fix

* Add swap tests

* fix

* fix

* fix

* fix

* Add fetch pool data test

* Add the rest of pool data tests

* Add liquidity postions management tests.

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Add StateView and PositionDescriptor tests; liquidity tests reorg.

* fix

* fix

* fix

* fix

* Add Universal_router_execute() tests

* fix

* fix

* Add positive slippage collection

* Fix comments

* Fix positive slippage recipient

* Minor fixes.

* Fix

* RC

* fix

* Docstrings clarification, comments on universal_router_execute() usage

* fix

* Fix position_manager_permit2_single()

* Fix constructor network handling

* fix

* Docstrings clarification

* fix

* Add testnets, minor constructor improvements

* Docstrings clarification

* Add router v2.1.1 support; add X Layer, Tempo, Robinhood networks support; removes Blast and testnets support.

* fix

* abi fix for multihop swap

* fix

* fix

* tests fix

* fix singlehop swaps abi, method and tests

* unversal router execute() test fix

* Add ReservesLens support

* draft fixes

* getPoolTVLBatch fix

* getPoolTVLBatch params refactoring

* docstring clarification

* Fix ruff versions clownshow; docstring clarificatiom

---------

Co-authored-by: Erik Bjäreholt <erik@bjareho.lt>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Bob <bob@superuserlabs.org>
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