Skip to content

test(e2e): cover the PaymentPool redeploy collision against two live deployments #2088

Closed

Description

@thiras

What

An anvil e2e that deploys PaymentPool twice, opens a buyer pool against the first, points the node at the second, and asserts it opens a fresh pool rather than resuming the tracked row.

Why

#2087 scopes buyer pool rows to their PaymentPool deployment, because poolId = keccak256(owner, ownerPoolNonce) carries neither the contract address nor the chain id and a redeploy restarts that nonce — so the same owner's Nth pool has a byte-identical id on every deployment. The unit tests cover the mechanism (a_foreign_row_is_dropped_even_when_there_is_nothing_to_adopt, the_pull_path_ignores_a_row_from_another_deployment), but nothing exercises it against a real contract pair.

This matters more than a usual e2e gap: contract-shape drift against the hand-written sol! bindings is only caught by the anvil e2e job, and this change is specifically about two deployments of the same contract being confusable. The bug it fixes was found in production after the 2026-09-20 Arbitrum Sepolia redeploy, not by the suite.

Shape

  1. ChainFixture deploys PaymentPool Add devcontainer for secure Claude Code sessions #1; a node opens a buyer pool and signs at least one voucher so the row carries lane progress.
  2. Deploy PaymentPool docs: Generalize architecture to content-agnostic CDN, refocus slashing on bad edges #2 and restart the node pointed at it.
  3. Assert: bootstrap logs the foreign-row drop naming Add devcontainer for secure Claude Code sessions #1 as foreign_payment_pool, getPools(owner) on docs: Generalize architecture to content-agnostic CDN, refocus slashing on bad edges #2 is empty at first, and the first cache-miss pull opens a fresh pool on docs: Generalize architecture to content-agnostic CDN, refocus slashing on bad edges #2 rather than reusing the id from Add devcontainer for secure Claude Code sessions #1.
  4. Assert the collision directly by driving the owner's nonce on docs: Generalize architecture to content-agnostic CDN, refocus slashing on bad edges #2 up to the tracked id and confirming the node does not resume against it.

Step 4 is the one that would have caught the production bug.

Activity

  1. moved this from Backlog to Ready in deCDNon Sep 21, 2026
  2. self-assigned this
    on Sep 26, 2026
  3. thiras commented on Sep 30, 2026

    @thiras
    ContributorAuthor

    Fixed on main: #2182 (af5a682) added the buyer-side redeploy journeys in crates/e2e/tests/node_pull_pool_redeploy.rs (foreign-row drop + empty getPools + fresh pool; reissued pool id adopted without lanes), and #2191 (e90f1e3) added the repointed-seller journey this issue was waiting on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

Medium

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions