Skip to content

Commit 09a7c78

Browse files
lgahdlclaude
authored andcommitted
docs: fix the sweep's own stale claims - cowprotocol override, production.md 3.1
Review catches on the stale-reference sweep itself: - ADR-0007 errata and sdk.md Versioning both claimed cowprotocol is a clean 0.1.0 registry dependency "with no git override". The branch's own Cargo.toml pins 0.2.0 WITH an active [patch.crates-io] override to nullislabs/cow-rs (pending the hash-only OrderCreationAppData constructor release). Both now describe that state and point at the patch-block comment as the source of truth. - production.md 3.1 still shipped the "interim" hand-rolled Dockerfile recipe issue #123 flagged; replaced with a pointer to the real root Dockerfile and docs/deployment/docker.md. - 02-modules-events-packaging.md: un-garble the parenthetical the earlier rename made self-contradictory ("was module.toml in earlier drafts" -> "was nexum.toml"). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TfSsJPYDQ1GQGbnSVFxATx
1 parent d357a60 commit 09a7c78

4 files changed

Lines changed: 17 additions & 45 deletions

File tree

docs/02-modules-events-packaging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A module is distributed as a **bundle** - a WASM component plus a manifest that
66

77
### Manifest (`module.toml`)
88

9-
Every module ships with a manifest. The file is named `module.toml` in 0.2 (was `module.toml` in earlier drafts; per [ADR-0001](adr/0001-engine-toml-separate-from-nexum-toml.md) the operator/module split is now explicit).
9+
Every module ships with a manifest. The file is named `module.toml` in 0.2 (was `nexum.toml` in earlier drafts; per [ADR-0001](adr/0001-engine-toml-separate-from-nexum-toml.md) the operator/module split is now explicit).
1010

1111
```toml
1212
[module]

docs/adr/0007-upstream-protocol-logic-to-cow-rs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ Lower-priority follow-ons (`OrderUid::from_slice`, retry middleware on `OrderBoo
4545
- A follow-on Bleu module - the Rust-side equivalent of `cowprotocol/refunder` (permissionless `invalidateOrder` triggering for expired EthFlow orders) - becomes natural to ship once an ethflow-watcher module lands. Out of scope for M2 but explicitly enabled by the same primitives.
4646
- TWAP polling logic (decode `ConditionalOrderCreated`, eth_call `getTradeableOrderWithSignature`, decode return, build `OrderCreation`) and EthFlow event decoding stay entirely in guest module code. The `cowprotocol` crate provides only the types and the orderbook client; the strategy is the module's.
4747

48-
_Errata: `crates/nexum-engine` was renamed to `crates/nexum-runtime` + `crates/nexum-cli` in the 0.2 refactor. The `[patch.crates-io]` rev-bump mechanism was retired once `cowprotocol 0.1.0` published to crates.io; the workspace now pins it as a normal registry dependency with no git override._
48+
_Errata: `crates/nexum-engine` was renamed to `crates/nexum-runtime` + `crates/nexum-cli` in the 0.2 refactor. The `cowprotocol` crate now publishes to crates.io (the workspace pins `0.2.0`), so the PR-#5-head consumption model above is historical; a `[patch.crates-io]` git override to `nullislabs/cow-rs` remains active pending a release with the hash-only `OrderCreationAppData` constructor - see the comment above the patch block in the root `Cargo.toml` for the current state._

docs/production.md

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -140,45 +140,14 @@ journalctl -u shepherd -f --output=json | jq '.MESSAGE | fromjson?'
140140

141141
## 3. Container deploy: Docker Compose
142142

143-
> **Status note:** the official Dockerfile is tracked as a
144-
> separate issue. Until it lands, build the image locally with
145-
> the multi-stage recipe below; the Compose file is forward-
146-
> compatible with the eventual published image.
147-
148-
### 3.1 Dockerfile (interim)
149-
150-
```dockerfile
151-
# syntax=docker/dockerfile:1.6
152-
FROM rust:1.86-slim-bookworm AS build
153-
WORKDIR /src
154-
RUN apt-get update && apt-get install -y --no-install-recommends \
155-
pkg-config libssl-dev cmake clang \
156-
&& rm -rf /var/lib/apt/lists/*
157-
RUN rustup target add wasm32-wasip2
158-
COPY . .
159-
RUN cargo build -p nexum-cli --release
160-
# Build all 5 modules. Add yours here.
161-
RUN cargo build -p twap-monitor --target wasm32-wasip2 --release \
162-
&& cargo build -p ethflow-watcher --target wasm32-wasip2 --release \
163-
&& cargo build -p price-alert --target wasm32-wasip2 --release \
164-
&& cargo build -p balance-tracker --target wasm32-wasip2 --release \
165-
&& cargo build -p stop-loss --target wasm32-wasip2 --release
166-
167-
FROM debian:bookworm-slim AS runtime
168-
RUN apt-get update && apt-get install -y --no-install-recommends \
169-
ca-certificates tini \
170-
&& rm -rf /var/lib/apt/lists/* \
171-
&& useradd -r -s /usr/sbin/nologin -d /var/lib/shepherd shepherd \
172-
&& install -d -o shepherd -g shepherd /var/lib/shepherd
173-
COPY --from=build /src/target/release/nexum /usr/local/bin/
174-
COPY --from=build /src/target/wasm32-wasip2/release/*.wasm /opt/shepherd/modules/
175-
COPY --from=build /src/modules /opt/shepherd/manifests
176-
USER shepherd
177-
WORKDIR /var/lib/shepherd
178-
EXPOSE 9100
179-
ENTRYPOINT ["/usr/bin/tini", "--", "nexum"]
180-
CMD ["--engine-config", "/etc/shepherd/engine.toml"]
181-
```
143+
### 3.1 Dockerfile
144+
145+
The official multi-stage `Dockerfile` ships at the repo root - it
146+
builds the `nexum` binary, compiles all five module wasms, and runs as
147+
a non-root user under `tini`. Build it with `docker build -t shepherd .`
148+
or let the root `docker-compose.yml` build it for you. The full image
149+
reference (published tags, pinning, .env wiring) is in
150+
[`docs/deployment/docker.md`](deployment/docker.md).
182151

183152
### 3.2 docker-compose.yml
184153

docs/sdk.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ The SDK crates are currently `0.1.0` and live at `crates/nexum-sdk/`
109109
and `crates/shepherd-sdk/` in the shepherd monorepo. They are not yet
110110
published to crates.io; modules depend on them via workspace paths.
111111

112-
The `cowprotocol` crate is published to crates.io at `0.1.0`; the
113-
workspace declares `cowprotocol = "0.1.0"` in `[workspace.dependencies]`
114-
with no `[patch.crates-io]` or git overrides. Module Cargo.toml files
115-
that inherit from the workspace pick it up automatically.
112+
The `cowprotocol` crate is published to crates.io; the workspace
113+
declares `cowprotocol = "0.2.0"` in `[workspace.dependencies]`, with a
114+
temporary `[patch.crates-io]` git override to `nullislabs/cow-rs`
115+
pending a release that ships the hash-only `OrderCreationAppData`
116+
constructor (see the comment above the patch block in the root
117+
`Cargo.toml`). Module Cargo.toml files that inherit from the workspace
118+
pick it up automatically.

0 commit comments

Comments
 (0)