Skip to content

docs: add end-to-end local-setup guide for wire-test-cluster#1

Open
heifner wants to merge 2 commits into
masterfrom
docs/local-setup-guide
Open

docs: add end-to-end local-setup guide for wire-test-cluster#1
heifner wants to merge 2 commits into
masterfrom
docs/local-setup-guide

Conversation

@heifner
Copy link
Copy Markdown

@heifner heifner commented Apr 24, 2026

Summary

  • Adds docs/local-setup.md — step-by-step for building and running wire-test-cluster from source, without Docker, across all five sibling repos.
  • Links to it from README Prerequisites.
  • Captures the OPP feature branches required in wire-sysio / wire-ethereum / wire-solana, plus the gotchas hit during the walkthrough: @yao-pkg/pkg-fetch race, pnpm global-bin setup, missing protoc-gen-ts, opp_cdt_models.protos not built before contracts_project, libopp.a POST_BUILD fish step requiring pnpm bin on PATH, pkill -f self-terminating the shell, wire-solana master being the liqSol repo (not opp-outpost), and ~5 places the reference Dockerfile has drifted.

End-to-end guide covering prereqs, the WIRE_ROOT sibling-repo layout, the
OPP feature branches required across wire-sysio / wire-ethereum / wire-solana,
per-repo build steps (wire-cdt, wire-sysio, OPP bundle generation, Anchor
build of opp-outpost), the run command, and the gotchas hit along the way
(pkg-fetch race, pnpm global bin, protoc-gen-ts, zpp proto ordering,
POST_BUILD fish step PATH, pkill self-term). README now links to it from
Prerequisites.
Copy link
Copy Markdown
Contributor

@jglanz jglanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the comments before merging please, but more than any THANK YOU for taking the time - many of the comments are reminders to myself to fix/tweak things - but please read them all

Comment thread docs/local-setup.md
├── wire-ethereum/
├── wire-solana/
├── wire-e2e-tests/
├── wire-opp/ # GENERATED by generate-opp-bundles.fish, not cloned
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to exist, but can be empty

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 04eda04. Added a mkdir -p "$WIRE_ROOT/wire-opp" step in §1.3 with a one-liner explaining that generate-opp-bundles.fish only writes there when the dir already exists.

Comment thread docs/local-setup.md Outdated
Comment on lines +212 to +220
> **GOTCHA — first-build race on the zpp-generated contract headers.** The
> `contracts_project` external target depends on `opp_cdt_models.protos`
> (which runs `cdt::protoc-gen-zpp` to generate `sysio/opp/**/*.pb.hpp` in
> `build/debug/libraries/opp/generated-cdt/`). With Ninja, that dependency
> doesn't reliably fire on a cold build — the contracts build runs before
> the `.pb.hpp` files exist and blows up with
> `fatal error: 'sysio/opp/types/types.pb.hpp' file not found`. Running
> `ninja opp_cdt_models.protos` explicitly before the full build generates
> the headers, after which the main `cmake --build` proceeds cleanly.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really the case? I can tweak it if the latest commits didn't resolve it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question — turns out wire-sysio commit 1015c98d3 (your "Refactor OPP bundle generation… add target dependencies in CMake") already wired add_dependencies(contracts_project opp_cdt_models.protos). I did hit the cold-build race despite that on feature/intrinsic-span-cleanup, but it may have been a transient ordering thing. Softened in 04eda04 to a "if you still hit it, run ninja opp_cdt_models.protos first" note, and dropped the obligatory pre-step from the main build commands. §6.4 troubleshooting entry rewritten to match.

Comment thread docs/local-setup.md Outdated
Comment on lines +245 to +246
(cd "$WIRE_ROOT/wire-opp/solidity" && npm link)
(cd "$WIRE_ROOT/wire-opp/typescript" && npm link)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm link --global is required as well

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 04eda04 — both npm link and pnpm link --global now run for wire-opp/solidity and wire-opp/typescript in §3.5. Also updated the §5 Dockerfile-diffs entry so it lists wire-opp/{solidity,typescript} as packages that still need a global link (alongside the three CLI binaries).

Comment thread docs/local-setup.md Outdated
**Fix:** pre-populate the cache once before `pnpm install`:

```bash
npx --yes @yao-pkg/pkg-fetch node22 linux x64 # fills ~/.pkg-cache/v3.5/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think node24 is needed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in 04eda04. protoc-gen-solidity, protoc-gen-solana, and protobuf-bundler all declare "engines": { "node": ">=24" }, and @yao-pkg/pkg fetches a v24 runtime to bundle. Bumped §1.2 install + verify step (nvm install 24), the §6.1 pkg-fetch line (node22node24), and removed the now-stale "Node 22 works fine" entry from §5.

Comment thread docs/local-setup.md Outdated
Comment on lines +380 to +387
Fresh pnpm installs don't pick up a global bin dir. Set it once:

```bash
pnpm config set global-bin-dir /home/<you>/.local/share/pnpm
pnpm config set global-dir /home/<you>/.local/share/pnpm/global
# and add PNPM_HOME to your shell rc:
export PNPM_HOME="$HOME/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run pnpm setup - it does this for you

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — replaced the manual pnpm config set block in §6.2 with pnpm setup in 04eda04. Much cleaner.

- Note wire-opp/ must exist (mkdir -p) before the wire-sysio build
- Bump Node.js requirement to 24 (protoc-gen-* declare engines.node>=24)
- Add pnpm link --global alongside npm link for wire-opp/{solidity,typescript}
- Replace manual PNPM_HOME config with pnpm setup
- Soften OPP cold-build gotcha — wire-sysio 1015c98d3 wired the dep,
  ninja opp_cdt_models.protos pre-step is now a fallback only
- Credit b66eea7243 for the find_program cache-reuse fix (§6.5)
- Fix duplicate §6.5 numbering (cascades to §6.6–§6.8)
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.

2 participants