docs(guides): expand Windows setup with verification, troubleshooting, and quick-reference#1102
docs(guides): expand Windows setup with verification, troubleshooting, and quick-reference#1102notsoblack wants to merge 2 commits into
Conversation
…ooting, and quick-reference checklist - Add system prerequisites table (Windows version, virtualization, disk space) - Add virtualization verification via systeminfo - Add step-by-step verification commands after each install step - Add detached mode instructions for proof server with --restart policy - Add curl health-check for proof server connectivity - Replace hardcoded VSIX version with dynamic 'latest release' instructions - Add comprehensive troubleshooting tables for WSL, Docker, proof server, and Compact issues - Add quick-reference completion checklist for developers
|
Someone is attempting to deploy a commit to the Midnight Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
cc @pataei |
|
|
||
| **Expected output:** | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Multiple "Expected output" code blocks throughout this PR are missing language identifiers. The style guide requires every fenced code block to have a language tag.
Add text to these bare code fences:
- Line 34 (Hyper-V output)
- Line 99 (WSL version output)
- Line 147 (Docker hello-world output)
- Line 183 (proof server startup output)
- Line 212 (docker ps output)
- Line 272 (compact version output)
Change each opening ``` to ```text.
|
|
||
| ## Install Ubuntu | ||
|
|
||
| Developing DApps for the Midnight network often requires compiling and running various components (like the proof server or complex scripts) that are traditionally Linux-based. The Windows Subsystem for Linux (WSL) is a critical component that allows you to run a native Linux environment directly within Windows without the overhead of a traditional virtual machine. |
There was a problem hiding this comment.
Brand terminology: always "Midnight Network" (both words capitalized).
| Developing DApps for the Midnight network often requires compiling and running various components (like the proof server or complex scripts) that are traditionally Linux-based. The Windows Subsystem for Linux (WSL) is a critical component that allows you to run a native Linux environment directly within Windows without the overhead of a traditional virtual machine. | |
| Developing DApps for the Midnight Network often requires compiling and running various components (like the proof server or complex scripts) that are traditionally Linux-based. The Windows Subsystem for Linux (WSL) is a critical component that allows you to run a native Linux environment directly within Windows without the overhead of a traditional virtual machine. |
| To ensure WSL is running the correct version, you can execute this command in the Windows PowerShell: | ||
| To ensure WSL is running the correct version, execute this command in Windows PowerShell: | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
This is a Windows PowerShell command, not a bash command. Change the language tag from bash to powershell.
Same applies to line 57 (wsl --install -d ubuntu).
| ## Set up and run the midnight proof server | ||
|
|
||
| The **Midnight Proof Server** is the core component that your DApps will communicate with to execute zero-knowledge proofs and transactions. It is run via **Docker** for consistency. | ||
| The **Midnight Proof Server** is the core component that your DApps will communicate with to execute zero-knowledge proofs and transactions. It is run via **Docker** for consistency. |
There was a problem hiding this comment.
The proof server generates proofs; it doesn't execute transactions. Transactions are submitted to the node.
| The **Midnight Proof Server** is the core component that your DApps will communicate with to execute zero-knowledge proofs and transactions. It is run via **Docker** for consistency. | |
| The **Midnight Proof Server** generates zero-knowledge proofs that your DApps need for shielded transactions. It runs via **Docker** for consistency. |
| Alternatively, pull the image directly from your Ubuntu terminal: | ||
|
|
||
| ```bash | ||
| docker pull midnightntwrk/proof-server:latest |
There was a problem hiding this comment.
This pulls latest but the docker run command on line 178 uses 8.0.3. Pick one approach and be consistent within the file. The getting-started guide uses latest; the tutorials pin to 8.0.3. Either way, both references in this file should match.
| ```bash | ||
| curl http://localhost:6300 | ||
| ``` | ||
|
|
||
| **Expected output:** | ||
|
|
||
| ```json | ||
| {"message":"Midnight Proof Server"} | ||
| ``` |
There was a problem hiding this comment.
This endpoint and response don't match documented behavior. The documented health endpoint is /health and returns {"status":"ok"} (see docs/examples/dapps/bboard.mdx:249).
Fix the curl command to:
curl http://localhost:6300/health
And the expected output to:
{"status":"ok"}Verify the actual response against a running proof server before committing.
| sudo apt-get install gh | ||
|
|
||
| # Download the latest VSIX | ||
| latest_version=$(curl -s https://api.github.com/repos/midnight-ntwrk/releases/contents/artifacts/vscode-extension | grep -o '"name": "compact-[^"]*"' | tail -1 | sed 's/.*"compact-(.*)".*//') |
There was a problem hiding this comment.
This sed command has two bugs:
- Missing
-Eflag -- without it,()are literal characters, not capture groups - Missing
\1backreference -- the replacement is empty instead of the captured version
As written, this silently outputs the original string unchanged, so latest_version gets set to the full JSON field instead of the version number.
| latest_version=$(curl -s https://api.github.com/repos/midnight-ntwrk/releases/contents/artifacts/vscode-extension | grep -o '"name": "compact-[^"]*"' | tail -1 | sed 's/.*"compact-(.*)".*//') | |
| latest_version=$(curl -s https://api.github.com/repos/midnight-ntwrk/releases/contents/artifacts/vscode-extension | grep -o '"name": "compact-[^"]*"' | tail -1 | sed -E 's/.*"compact-(.*)".*/\1/') |
| |---------|-------|----------| | ||
| | `docker: command not found` inside WSL | WSL integration not enabled or Docker not running | Open Docker Desktop → Settings → Resources → WSL Integration → Enable Ubuntu. Restart Docker Desktop. | | ||
| | `Cannot connect to the Docker daemon` | Docker Desktop is not running | Launch Docker Desktop from the Start Menu and wait for the whale icon to stop animating. | | ||
| | `port is already allocated` | Port 6300 is in use by another process | Find and kill the process: `sudo lsof -i :6300` then `kill <PID>`, or use a different port with `-p 6301:6300`. | |
There was a problem hiding this comment.
lsof is not installed by default in Ubuntu on WSL. ss is available out of the box and more reliable here.
| | `port is already allocated` | Port 6300 is in use by another process | Find and kill the process: `sudo lsof -i :6300` then `kill <PID>`, or use a different port with `-p 6301:6300`. | | |
| | `port is already allocated` | Port 6300 is in use by another process | Find the process: `ss -tlnp | grep 6300` then `kill <PID>`, or use a different port with `-p 6301:6300`. | |
|
|
||
| | Problem | Cause | Solution | | ||
| |---------|-------|----------| | ||
| | Proof server starts but DApp can't connect | Firewall blocking port 6300 | Add an inbound rule for port 6300 in Windows Defender Firewall, or run the proof server on port 8080 with `-p 8080:6300`. | |
There was a problem hiding this comment.
Heads up: docs/guides/run-proof-server.mdx (line 54) explicitly states the proof server port "should not be changed." Suggesting port 8080 here could lead to configuration mismatches with the wallet and DApp providers, which all default to 6300. Consider removing the port remap suggestion and focusing on the firewall fix only.
| - [ ] Compact compiler is installed and `compact --version` prints a version | ||
| - [ ] Compact VS Code extension is installed and syntax highlighting works on `.compact` files | ||
|
|
||
| Once every box is checked, you're ready to build on Midnight! |
There was a problem hiding this comment.
The exclamation mark reads a bit marketing-y for a technical setup guide. Keeping it neutral is more consistent with the rest of the docs.
| Once every box is checked, you're ready to build on Midnight! | |
| Once every item is confirmed, your environment is ready for Midnight development. |
oduameh
left a comment
There was a problem hiding this comment.
Good expansion of this guide. The prerequisites table, verification steps, detached mode instructions, troubleshooting tables, and quick-reference checklist all reduce friction for Windows developers. A few technical issues and style gaps need attention before this merges.
Frontmatter:
- Missing
SPDX-License-Identifierandcopyrightfields. Seedocs/guides/run-proof-server.mdxfor the standard format used in sibling guides. - Missing
tagsarray. Add 5-10 lowercase tags like[windows, wsl, docker, compact, setup, proof-server, development-environment]. - Consider adding
toc_max_heading_level: 2to keep the table of contents clean.
Pre-existing issues to fix while you're here:
- Line 8: The intro mentions "the Midnight Lace wallet" but this guide never covers Lace setup. Either remove that reference or add Lace configuration steps.
- Line 8: "We'll walk you through" uses first-person plural. The style guide prefers second person and imperative voice.
Quick reference checklist (lines 376-383):
- The
- [ ]Markdown checkboxes render as disabled HTML inputs on the Docusaurus site. Readers can't interact with them, which makes the checkboxes look broken. Consider switching to a plain bullet list or numbered list.
|
Documentation Contributor seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Summary
Significantly improves the
windows-compact-setup.mdxguide to reduce friction for Windows developers onboarding to Midnight.What's changed
Added
systeminfocommand to confirm Intel VT-x / AMD-V is enabled before startingwsl -l -vshould show VERSION 2,docker run hello-world,curl http://localhost:6300docker run -d --restart unless-stopped ...so developers don't need to keep a terminal window open permanentlycurl http://localhost:6300to confirm connectivity before proceedingcompact-0.2.13link with guidance to always fetch the latest releaseImproved
Why this matters
The current guide assumes everything works smoothly, but Windows + WSL + Docker is a common failure point for new developers. These additions reduce support burden and improve first-time setup success rate.
Checklist