GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix v3 liquidity mint/remove tests params; reason: pool changed by liquid-8 · Pull Request #494 · uniswap-python/uniswap-python

Conversation

@liquid-8

@liquid-8 liquid-8 commented Nov 8, 2026

Copy link
Copy Markdown
Member

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@liquid-8
Fix v3 liquidity mint/remove tests params; reason: pool changed
1a81e7d
@greptile-apps

greptile-apps Bot commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no new actionable issues were found.

Summary

This PR switches CI’s mainnet RPC endpoint and adds approval cases.

  • Mainnet CI tests now use the Ethereum Public Node endpoint.
  • Approval tests now cover WETH in both client styles.

Reviews (2) · Last reviewed commit: "switch fees back" · Reviewed by Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot]
greptile-apps Bot reviewed Nov 8, 2026
View reviewed changes
Comment thread tests/test_uniswap.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.03%. Comparing base (d706627) to head (984ca4a).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #494      +/-   ##
==========================================
+ Coverage   62.08%   71.03%   +8.94%     
==========================================
  Files          14       14              
  Lines        4302     4302              
==========================================
+ Hits         2671     3056     +385     
+ Misses       1631     1246     -385     

☔ View full report in Codecov by Harness.
📢 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

liquid-8 added 3 commits November 8, 2026 18:49
@liquid-8
approvals
e12def5
@liquid-8
rpc provider switch
9ec07b5
@liquid-8
switch fees back
fab550e
@liquid-8 liquid-8 closed this Nov 8, 2026
@liquid-8 liquid-8 reopened this Nov 8, 2026
liquid-8 added 5 commits November 8, 2026 20:27
@liquid-8
fix approvals
ac60f4a
@liquid-8
mint params fix
f121d89
@liquid-8
restore RPC; update poetry.lock
a7d68ef
@liquid-8
switch pool
8b79d5d
@liquid-8
pool switch
0d132f6
@TimeToBuildBob TimeToBuildBob mentioned this pull request Nov 9, 2026
Revert "fix(async): port price-floor and odd-tick TVL fixes to async clients" #495
Closed
@TimeToBuildBob

TimeToBuildBob commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

The changes look correct:

  • Switching DAI-USDC from TIER_3000 → TIER_500 and using ONE_DAI instead of ONE_ETH for the DAI amount fixes the pool params (mainnet DAI-USDC migrated to 0.05% tier)
  • Adding ETH/WETH to async test_approve matches the sync test's existing coverage (sync already had ETH in its parametrize and passes test_approve[3-ETH])
  • The lock cleanup removes transient dev packages

The remaining CI failures are transient Foundry fork network issues. The test_approve[3-ETH] async failure shows an HTTP 408 (request timeout from the Cloudflare CDN) in its traceback — the same test passes in sync because sync runs at 37% completion when the network has recovered. The updated test_v3_deploy_pool_with_liquidity[3-DAI-USDC-...-500] is likely hitting the same timeout issue.

Re-running CI should clear these once the Foundry fork connection stabilizes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@liquid-8
RPC switch
dfe5f54
@TimeToBuildBob

TimeToBuildBob commented Nov 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

🤖 AI code review

The PR changes the v3 test_v3_deploy_pool_with_liquidity parameters in both test files to use ONE_DAI and FeeTier.TIER_500. It changes the test_approve token list (ETH replaced by WETH in tests/test_uniswap.py, WETH added in tests/test_asyncuniswap.py). It also switches the CI PROVIDER_MAINNET to https://ethereum.publicnode.com and pins the Foundry toolchain to version 1.8.6.

Not safe to merge — 1 P1 open

Confidence 3/5

⚠️ 1 generated file excluded and NOT reviewed: poetry.lock (+0/-61 lines, 6KB). Machine-generated output is removed from the diff before review — from what the model sees and from the size gate alike — so nothing below says anything about it.

4 findings · ❌ 1 P1 · ⚠️ 3 P2

❌ P1 high — uniswap/asyncuniswap.py:1235

Reopened review hold; awaiting explicit adjudication.

How this was verified: Reopened review hold: Fixed in 2d9d82b

⚠️ P2 medium — tests/test_uniswap.py:343

The test now uses FeeTier.TIER_500 for DAI/USDC, but test_get_tvl_in_pool_on_chain and the other DAI/USDC tests still use TIER_3000, while test_close_position relies on state left by this test (get_liquidity_positions()[0]). Further, the test passes fee=fee (TIER_500) to make_trade, so the swap routes through the 0.05% pool, and the test uses anvil forked state from a live provider, so pool liquidity and tick state depend on the moment of the fork. The unchanged qty * 10 DAI->USDC swap (10 ETH worth of DAI) is the only sizing safeguard. If the 500 pool lacks depth at the fork block, the swap reverts or balance_1 > amount1 fails. The result is a flaky, non-hermetic test whose failure also cascades into test_close_position (IndexError on empty positions).

How this was verified: Read both test files; test_close_position indexes position_array[0] with no guard and depends on the mint in this test.

⚠️ P2 medium — tests/test_uniswap.py:169

In tests/test_uniswap.py the ETH parameter was replaced with WETH in test_approve, removing the only case that approved the native-ETH sentinel address. The if client.version == 1 and ETH_ADDRESS == token0 skip guard just below now never triggers, since no parameter yields ETH_ADDRESS anymore. In the async file, by contrast, ETH was never present and WETH is simply added, so the two files now cover different token sets. The sync suite no longer exercises approve() with the ETH address, which was the behaviour that existed before, and the dead skip branch is misleading.

How this was verified: Checked the parametrize list and the guard at line 177 in tests/test_uniswap.py; no remaining parameter equals ETH.

⚠️ P2 medium — tests/test_uniswap.py:343

Reopened review hold; awaiting explicit adjudication.

How this was verified: Reopened review hold: No reopening reply recorded.

1 advisory finding (summary-only, not scored)

These P2 guard, heuristic, trade-off, or documentation claims are retained for judgment without opening review threads.

⚠️ P2 medium — .github/workflows/test.yml:12

The CI env block's comment says the secret points to a rate-limited Infura URL and CI must use a public endpoint. The PR flips the active public endpoint from eth.drpc.org to ethereum.publicnode.com, which is a free public RPC with its own rate limits, and anvil forks from it on every run across 3 matrix jobs (v2, v3, v4). Forking against a public node means every state read during tests is fetched remotely, so flakiness depends on that provider's availability and throttling. The change is a swap of one unreliable endpoint for another with no evidence it is more reliable, and the Foundry pin to 1.8.6 is unexplained, so future anvil updates are blocked.

Files changed (3) — the diff as I read it
  • .github/workflows/test.yml — Swaps the active PROVIDER_MAINNET URL from eth.drpc.org to ethereum.publicnode.com (commenting out the other) and adds version: 1.8.6 to the foundry-toolchain step.
  • tests/test_asyncuniswap.py — Adds WETH to the test_approve token parameters and changes the test_v3_deploy_pool_with_liquidity parameters to ONE_DAI amount0 and FeeTier.TIER_500.
  • tests/test_uniswap.py — Replaces ETH with WETH in test_approve parameters and changes test_v3_deploy_pool_with_liquidity parameters to ONE_DAI amount0 and FeeTier.TIER_500.
Previous review passes
commit score findings engine when
dfe5f549f32d 3/5 2 subscription 2026-11-10 11:01 UTC
241cb838e54a 3/5 2 subscription 2026-11-11 08:40 UTC
2d9d82b14d0f 4/5 2 subscription 2026-11-11 16:08 UTC

Reviewed 984ca4a11e07 · panel: claude-code:sonnet · subscription engine · 19s · about this reviewer

Maintainer commands

@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TimeToBuildBob
TimeToBuildBob reviewed Nov 10, 2026
View reviewed changes
Comment thread uniswap/asyncuniswap.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/test_asyncuniswap.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@TimeToBuildBob

TimeToBuildBob commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Correction to my earlier CI diagnosis: the current-head run 42803230121 is not failing on an RPC timeout. Both sync and async liquidity tests successfully fund the account, pass their balance checks, then revert in mint_liquidity with execution reverted: STF. Both test_close_position failures follow from the missing minted position. ETH/WETH approval tests now pass.

The 1,000× allowance changes do not resolve that failure: async mint_liquidity already uses them and still reverts; the sync change is in mint_position, whereas the failing test calls mint_liquidity. Also, ONE_DAI and ONE_ETH are both 10**18, so that rename does not change the amount.

I published current-head single-pass review findings inline: the enlarged allowance introduces a repeat-mint problem for zero-reset tokens, and the native-ETH approval case can succeed without executing an ERC20 approval. This is outage coverage, not merge evidence. I have not changed your branch or rerun the same failing CI; the next useful check is the mint's actual token balances, allowances and approval receipts immediately before the transfer, rather than increasing approval amounts again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

liquid-8 added 2 commits November 11, 2026 05:59
@liquid-8
review fixes
d922a11
@liquid-8
foundry version check
241cb83
@liquid-8

liquid-8 commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Ok, the issue was the last Foundry release 1.9.0; rolling back to 1.8.6 fixed things. The problems you mentioned were fixed in d922a11 Looks good to merge innit?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@liquid-8

liquid-8 commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

@TimeToBuildBob review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TimeToBuildBob
TimeToBuildBob reviewed Nov 11, 2026
View reviewed changes
Comment thread uniswap/asyncuniswap.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/test_uniswap.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@liquid-8
removed over-approval in sync and async mint_position() for token1
2d9d82b
TimeToBuildBob
TimeToBuildBob reviewed Nov 11, 2026
View reviewed changes
Comment thread uniswap/uniswap.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@liquid-8
rolling back sync mint_position()
984ca4a
TimeToBuildBob
TimeToBuildBob reviewed Nov 11, 2026
View reviewed changes
Comment thread tests/test_uniswap.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/test_uniswap.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@liquid-8
liquid-8 merged commit 5fa5c57 into uniswap-python:master Nov 11, 2026
5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@liquid-8
liquid-8 deleted the v4_UF_grant_D2 branch November 11, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@greptile-apps greptile-apps[bot] greptile-apps[bot] left review comments
@TimeToBuildBob TimeToBuildBob TimeToBuildBob left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@liquid-8 @TimeToBuildBob
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.