refactor!: rename liquidity pools to components - #366
Open
Troshchk wants to merge 6 commits into
Open
Conversation
Breaking API Changes (Intentional)Breaking API changes detected and declared in the PR title. semver-checks output |
Troshchk
force-pushed
the
taker-propAMM/kt/ENG-6202-pool-naming-fix
branch
from
July 29, 2026 08:24
a97390c to
76c76b7
Compare
"Pool" meant both a liquidity pool and a worker pool. Rename all liquidity-pool uses to "component" (matching Tycho's ProtocolComponent and the component_id wire field); "pool" alone now always means a worker pool. Adds a Terminology section to docs/ARCHITECTURE.md. No behavior change, and runtime-observable interfaces are untouched: wire formats, metric names (market_pools*), and the pool_depths computation ID used as the Prometheus `computation` label keep their legacy names, with comments marking them as intentional. BREAKING CHANGE: fynd-core public API renames — DerivedData pool-depth accessors are now component_depths()/component_depths_block()/ set_component_depths()/clear_component_depths(), PoolDepths/ PoolDepthKey are ComponentDepths/ComponentDepthKey, PoolDepthComputation is ComponentDepthComputation, and MarketState::pool_counts_by_protocol() is component_counts_by_protocol(). HTTP wire formats and client library APIs are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Complete the pool→component rename on the two client-facing surfaces excluded from the main rename commit: - GET /v1/prices (experimental feature): response fields `pool_depths` → `component_depths`, both the top-level array and the entry in `blocks`. Request parameters (`include=depths`) are unchanged. - @kayibal/fynd-client: `Swap.poolId` → `Swap.componentId`, matching the `component_id` wire field. The quote wire format is unchanged. BREAKING CHANGE: consumers of the experimental /v1/prices endpoint must read `component_depths` instead of `pool_depths`; TypeScript client consumers must rename `swap.poolId` to `swap.componentId`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Troshchk
force-pushed
the
taker-propAMM/kt/ENG-6202-pool-naming-fix
branch
from
July 29, 2026 08:42
76c76b7 to
9785e31
Compare
added 3 commits
July 29, 2026 12:58
Bare "pool" in the builder/config API meant worker pool but read as
liquidity pool. Rename so the public surface says which:
- PoolConfig -> WorkerPoolConfig; the internal spawn config it collided
with becomes WorkerPoolSpawnConfig
- FyndBuilder::add_pool -> add_worker_pool, NoPools -> NoWorkerPools
- defaults::POOL_* -> WORKER_POOL_*
This reverts commit 35f0afc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rename all liquidity-pool naming to "component" (matching Tycho's ProtocolComponent and the component_id wire field); "pool" alone now always means a worker pool -- docs, comments, tests, and internal identifiers only, with no behavior change.
Breaking changes:
Not changed (intentionally, to avoid breaking consumers): the quote API wire format, Prometheus metric names (market_pools, market_pools_per_protocol), and the pool_depths computation ID used as the computation metric label.