Skip to content

docs: add architecture documentation for the dual-path design - #29

Merged
mfw78 merged 2 commits into
developfrom
docs/dual-path-architecture
Jul 31, 2026
Merged

mfw78 merged 2 commits into
developfrom
docs/dual-path-architecture

Conversation

@mfw78

@mfw78 mfw78 commented Jul 10, 2026

Copy link
Copy Markdown

Architecture documentation for the dual-path design: settlement/polling split, generator verdict and registry fill overlay, typed-error decoding policy and tryGenerateOrder diagnostics, order manifest pagination contract, the multi-order pattern via offchainInput keying (closes #17), ERC-1271 integration, the handler purity invariant (advances #8), and the full breaking-changes migration guide from upstream.

Issues

Closes #17.
Advances #8 (design principle 6 in docs/architecture.md states the invariant, but the NatSpec note on IConditionalOrder.generateOrder is unchanged and there is no test or lint guard - the issue explicitly prefers those over documentation alone).

Part of #1.

@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from b668bda to 452a443 Compare July 30, 2026 03:50
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from 004690a to 3e2feb8 Compare July 30, 2026 03:50
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from 452a443 to 51b23dd Compare July 30, 2026 04:01
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from 3e2feb8 to 2be9eb5 Compare July 30, 2026 04:01
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from 51b23dd to c766366 Compare July 30, 2026 06:59
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from 0b2fbf5 to fd3884c Compare July 30, 2026 07:02
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch 2 times, most recently from e66564c to ed40976 Compare July 30, 2026 07:07
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch 2 times, most recently from 9de4e10 to 8ff13c2 Compare July 30, 2026 07:09
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from ed40976 to 0e9e912 Compare July 30, 2026 07:09
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from 8ff13c2 to c96591b Compare July 30, 2026 07:14
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch 3 times, most recently from eaa61a8 to e7cfeac Compare July 30, 2026 07:22
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from 7f22c28 to 848fbed Compare July 30, 2026 07:22
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from e7cfeac to ddecfb6 Compare July 30, 2026 07:26
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from 848fbed to bb49e8a Compare July 30, 2026 07:26
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from ddecfb6 to ed73d3d Compare July 30, 2026 07:33
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch 2 times, most recently from 8da66b0 to c1131f5 Compare July 30, 2026 08:23
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch 2 times, most recently from 6554f56 to d0e2a0f Compare July 30, 2026 08:42
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from c1131f5 to d61d5ad Compare July 30, 2026 08:42
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from d0e2a0f to b5fb2bd Compare July 30, 2026 09:51
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from 8683f5d to 9fa12cf Compare July 30, 2026 09:54
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch 3 times, most recently from be043cf to 538c59b Compare July 30, 2026 10:40
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from 27b2338 to 285901a Compare July 30, 2026 10:40
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from 538c59b to cc5a62f Compare July 30, 2026 12:54
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch 2 times, most recently from 81972ab to eb11525 Compare July 30, 2026 13:07
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from cc5a62f to 515b61a Compare July 30, 2026 13:07
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from eb11525 to c90ee80 Compare July 30, 2026 13:19
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch 2 times, most recently from a68f7f6 to e509b1e Compare July 30, 2026 13:55
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch 2 times, most recently from 8225816 to 83d1edc Compare July 30, 2026 14:25
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch 2 times, most recently from 676f9e7 to a452b31 Compare July 30, 2026 23:43
@mfw78
mfw78 force-pushed the feat/order-manifest-types branch from 83d1edc to 4ec7892 Compare July 30, 2026 23:43
Base automatically changed from feat/order-manifest-types to develop July 30, 2026 23:51
Covers the settlement/polling path split, the generator verdict and
registry fill overlay, error decoding policy, order manifest
enumeration and its pagination contract, the multi-order pattern via
offchainInput keying, ERC-1271 integration, and the full breaking-
changes migration guide from upstream.
@mfw78
mfw78 force-pushed the docs/dual-path-architecture branch from a452b31 to f10390c Compare July 30, 2026 23:51
The `PollResult` NatSpec and `architecture.md` both claimed that a `POST`
verdict coexisting with `PARTIALLY_FILLED` is "what allows a partially filled
order to keep being posted". That is not how it works: a recorded fill means
the discrete order was already accepted by the orderbook and settled, so it
stays solvable there until `validTo`, and the remainder keeps filling with no
re-post involved.

The behaviour is unchanged and remains correct under the rule actually applied
in `getTradeableOrderWithSignature`: a signature is withheld only for fill
states the chain proves terminal. `FILLED` and `INVALIDATED` qualify, as does
any recorded fill on a fill-or-kill order. `PARTIALLY_FILLED` on a
`partiallyFillable` order does not, so a valid signature is still returned.
The registry is an on-chain view and cannot see whether the order is still
listed, so it reports validity rather than asserting orderbook state.

Also notes that the fill-or-kill branch is defensive: GPv2 settles such an
order in one go, so the observed state should already be `FILLED`.

Comment-only.
@mfw78
mfw78 merged commit 33ddd3f into develop Jul 31, 2026
@mfw78
mfw78 deleted the docs/dual-path-architecture branch July 31, 2026 00:11
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.

interfaces: multi-order generation per poll — pattern, not signature change

1 participant