fix(ci): replace rate-limited Infura with public RPC - #431
Conversation
- 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>
Greptile SummaryThis PR fixes CI failures on Confidence Score: 5/5PR is safe to merge — all three changes are narrowly scoped CI/type fixes with no logic regressions. The Infura-to-publicnode swap is a straightforward URL substitution that unblocks the test runner. Branch trigger expansion is additive and risk-free. Both mypy fixes are minimal and correct: str() wrapping preserves existing semantics while satisfying the type checker, and the type: ignore comment is appropriately scoped to a single attribute. No new runtime behaviour is introduced. No files require special attention Important Files Changed
Sequence DiagramsequenceDiagram
participant GH as GitHub Actions CI
participant G as Ganache (fork)
participant RPC as ethereum.publicnode.com
participant T as Test Suite
GH->>G: ganache --fork https://ethereum.publicnode.com
G->>RPC: eth_blockNumber / eth_getCode / eth_call ...
RPC-->>G: 200 OK (no API key needed)
G-->>GH: Mainnet fork ready
GH->>T: make test (PROVIDER=publicnode)
T-->>GH: Pass
Reviews (1): Last reviewed commit: "fix(ci): replace rate-limited Infura wit..." | Re-trigger Greptile |
|
Note: CI won't automatically run on this PR because the The changes here are straightforward:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev/v4-fin #431 +/- ##
=============================================
Coverage ? 58.83%
=============================================
Files ? 12
Lines ? 1834
Branches ? 0
=============================================
Hits ? 1079
Misses ? 755
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
CI did run after all, and I pushed Changes:
Local verification on Python 3.8:
|
|
CI status update — the Evidence: the base branch What this PR actually fixes (and is now green):
The Arbitrum issue is a separate infrastructure problem — public Arbitrum RPC endpoints (both ankr and arb1) rate-limit heavy Ganache forking. That should be tracked as a separate issue and fixed independently. Greptile reviewed this as 5/5, safe to merge. The three changes are narrowly scoped CI/type fixes with no logic regressions. |
* 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>
Summary
ethereum.publicnode.comas the default mainnet RPC providerdev/v4anddev/v4-finbranches to CI triggers so tests actually run on v4 workget_logsattr onBaseContractEvent, bytes→str fallback in token decode)Context
CI was failing on every push to
dev/v4-finbecause:429 Too Many RequestsFixes #430.
Test plan