Skip to content

feat: handler discovery interfaces IOrderDescriptor and IOrderModule - #40

Open
mfw78 wants to merge 2 commits into
feat/uri-proof-payloadsfrom
feat/discovery-interfaces
Open

feat: handler discovery interfaces IOrderDescriptor and IOrderModule#40
mfw78 wants to merge 2 commits into
feat/uri-proof-payloadsfrom
feat/discovery-interfaces

Conversation

@mfw78

@mfw78 mfw78 commented Jul 11, 2026

Copy link
Copy Markdown
  • IOrderDescriptor + IOrderModule sidecars (own ERC-165 ids, never on the settlement path) with opt-in mixins: immutable-by-omission, constructor-emitted update events, module digest non-zero (InvalidModuleDigest)
  • commitment-gated advertising: a handler constructed without URIs does not claim the sidecar, so feature detection never lies about empty metadata
  • adopted by TWAP, StopLoss, GoodAfterTime, PerpetualStableSwap (constructors gain descriptor args; deploy scripts pass uncommitted until the descriptor publication pipeline exists)
  • BaseConditionalOrder.supportsInterface becomes public for super-chaining (same selector, no ABI change)

Issues

Closes #34.

Part of #1.

@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from a3af0b8 to da2512b Compare July 30, 2026 03:50
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch 2 times, most recently from 857a9ba to cd4fd8b Compare July 30, 2026 04:01
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from da2512b to 60a398f Compare July 30, 2026 04:01
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from cd4fd8b to fa7ce15 Compare July 30, 2026 06:59
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch 2 times, most recently from 4e49284 to c14cebe Compare July 30, 2026 07:02
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from fa7ce15 to 6ff5243 Compare July 30, 2026 07:02
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from c14cebe to 8db0db6 Compare July 30, 2026 07:07
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch 2 times, most recently from 16046bc to c5390a4 Compare July 30, 2026 07:09
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 8db0db6 to a353d2b Compare July 30, 2026 07:09
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from c5390a4 to 1054887 Compare July 30, 2026 07:14
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from a353d2b to 11e673b Compare July 30, 2026 07:14
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from 1054887 to 8ca9cd8 Compare July 30, 2026 07:18
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 11e673b to 1adff10 Compare July 30, 2026 07:18
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from 8ca9cd8 to 698dac6 Compare July 30, 2026 07:22
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 1adff10 to 45aafa9 Compare July 30, 2026 07:22
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from 698dac6 to d55df5e Compare July 30, 2026 07:26
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 45aafa9 to 790f4ad Compare July 30, 2026 07:26
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from d55df5e to d841766 Compare July 30, 2026 07:33
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 790f4ad to 7be42fc Compare July 30, 2026 07:33
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from d841766 to fa5de5e Compare July 30, 2026 08:23
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 7be42fc to 9e8cd3e Compare July 30, 2026 08:23
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from fa5de5e to bf6656b Compare July 30, 2026 08:42
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 9e8cd3e to 5663501 Compare July 30, 2026 08:42
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from bf6656b to 4e9b624 Compare July 30, 2026 09:51
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 5663501 to 2fc05f5 Compare July 30, 2026 09:51
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from 4e9b624 to db09123 Compare July 30, 2026 09:54
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch 2 times, most recently from 5dda0ce to edabf32 Compare July 30, 2026 10:24
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from db09123 to a8b07ea Compare July 30, 2026 10:24
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from edabf32 to bdd4dd8 Compare July 30, 2026 10:40
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from a8b07ea to 76ee045 Compare July 30, 2026 10:40
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from bdd4dd8 to 38f6ba1 Compare July 30, 2026 12:54
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from 76ee045 to 29ca5f6 Compare July 30, 2026 12:54
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 38f6ba1 to b851f74 Compare July 30, 2026 13:07
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch 2 times, most recently from 969129b to c56f9c5 Compare July 30, 2026 13:19
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from b851f74 to b469984 Compare July 30, 2026 13:19
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from c56f9c5 to 63259e5 Compare July 30, 2026 13:55
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from b469984 to 2621e99 Compare July 30, 2026 13:55
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from 63259e5 to f38f934 Compare July 30, 2026 14:25
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch 2 times, most recently from c2dc973 to 9c527b7 Compare July 30, 2026 23:43
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from f38f934 to a45fe45 Compare July 30, 2026 23:43
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 9c527b7 to e36b654 Compare July 30, 2026 23:51
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from 138be58 to cc68ac2 Compare July 31, 2026 00:06
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch 2 times, most recently from 34ef864 to 97120da Compare July 31, 2026 00:12
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from cc68ac2 to 4a6cf39 Compare July 31, 2026 00:12
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 97120da to f659bd8 Compare July 31, 2026 00:14
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch 2 times, most recently from 6076c6f to 76be6eb Compare July 31, 2026 04:00
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from f659bd8 to 429f6ad Compare July 31, 2026 04:00
mfw78 added 2 commits July 31, 2026 05:22
Replaces the keccak256-over-bytes digest on both discovery sidecars with a
`(bytes32 digest, PackageKind kind)` pair, where `kind` says how the package is
put together and therefore how its digest is computed and verified.

`BZZ_MANIFEST` hashes a structure, so only Swarm can recompute it: it locates
itself, publishes no URI, and verifies per entry. `TAR_ZST` hashes bytes, so
any transport can be checked by hashing what it delivered, which is what makes
mirroring across bzz, ipfs and https possible at all. Neither needs a canonical
byte serialisation specified.

Two consequences in the mixins:

- ERC-165 advertisement now gates on the digest rather than on the URI list.
  Gating on URIs would have silently stopped a `BZZ` or `IPFS` handler from
  advertising at all, since those publish none.
- `TAR_ZST` locates nothing, so it requires at least one URI, and URIs cannot
  be published without a commitment to verify them against.
  `InvalidModuleDigest` is replaced by `UncommittedModuleURI` and
  `ModuleURIRequired`, which say which of the two rules was broken.

BREAKING CHANGE: `descriptorDigest()` and `moduleDigest()` are replaced by
`descriptorCommitment()` and `moduleCommitment()`; `DescriptorUpdate` and
`ModuleUpdate` carry the kind; handler constructors take it.
@mfw78
mfw78 force-pushed the feat/uri-proof-payloads branch from 76be6eb to 1e2c531 Compare July 31, 2026 05:26
@mfw78
mfw78 force-pushed the feat/discovery-interfaces branch from 429f6ad to 3d2c877 Compare July 31, 2026 05:26
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.

1 participant