upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-28 23:52:04 +0530
committerYour Name <you@example.com>2026-05-28 23:52:04 +0530
commit5e603764266568084eaae9ec0e0b130e7f233402 (patch)
tree0a480d2ba480491957bb6d09f77ada7495325e45
parent8f18b7ac6cf65a1de7f2ebddb19de9070c3b9657 (diff)
docs: update all plans with current board inventory and smoke test results
- Board A (ttyACM1): USB flash failing, cable issue - Board B (ttyACM0): Flashed esp32-tollgate, smoke test 6/9 pass - NerdAxe (ttyACM2, fan-damaged): TOLLGATE=1 flashed, crash loop in APIsFetcher - Working NerdAxe (ttyACM1, 80:b5:4e:c7:7a:d0): Can't flash (USB brownout) - Test mint intermittently down (TLS error) - Firewall not blocking unpaid clients (needs investigation)
-rw-r--r--PLAN_BITAXE_FIXES.md158
-rw-r--r--PLAN_EXECUTION.md140
-rw-r--r--REMOTES.md158
3 files changed, 293 insertions, 163 deletions
diff --git a/PLAN_BITAXE_FIXES.md b/PLAN_BITAXE_FIXES.md
index 9514dbf..99995a0 100644
--- a/PLAN_BITAXE_FIXES.md
+++ b/PLAN_BITAXE_FIXES.md
@@ -1,8 +1,9 @@
1# TollGate on NerdQAxePlus/BitAxe — Fix Plan 1# TollGate on NerdQAxePlus/BitAxe — Fix Plan
2 2
3**Created:** 2026-05-28 3**Created:** 2026-05-28
4**Updated:** 2026-05-28
4**Branch:** `feature/tollgate-core-v2` (esp32-tollgate), `develop` (NerdQAxePlus) 5**Branch:** `feature/tollgate-core-v2` (esp32-tollgate), `develop` (NerdQAxePlus)
5**Component version:** v1.2.0 → v1.3.0 6**Component version:** v1.3.0 (published)
6 7
7--- 8---
8 9
@@ -10,132 +11,123 @@
10 11
11**File:** `components/tollgate_core/src/tollgate_core.c` 12**File:** `components/tollgate_core/src/tollgate_core.c`
12 13
13- [ ] 1a. Implement `tollgate_core_on_share_accepted(uint32_t client_ip, double difficulty)` 14- [x] 1a. Implement `tollgate_core_on_share_accepted(uint32_t client_ip, double difficulty)`
14 - Call `tollgate_core_mining_update_hashrate(client_ip, true)` 15- [x] 1b. Implement `tollgate_core_calc_hashprice(double hashrate_ghs)`
15 - Get client stats via `tollgate_core_mining_get_client_stats(client_ip)` 16- [x] 1c. Implement `tollgate_core_get_mining_status_json(void)`
16 - Find or create session via `tollgate_core_session_find_by_ip()` / `tollgate_core_session_create()` 17- [x] 1d. Add unit tests in `tests/unit/test_mining_api.c` (19 assertions)
17 - Calculate allotment via `tollgate_core_mining_shares_to_allotment_ms()` or `_bytes()` based on metric 18- [x] 1e. `make test-unit` — all 29 tests pass
18 - Extend session via `tollgate_core_session_extend(session, allotment)` 19- [x] 1f. `idf.py build` — esp32-tollgate builds
19 - Call `s_platform->on_share_accepted(difficulty)` if set
20
21- [ ] 1b. Implement `tollgate_core_calc_hashprice(double hashrate_ghs)`
22 - Check `s_platform->get_hashprice_sats_per_ghs_day()` for manual override (nonzero = return it)
23 - Otherwise return `tollgate_core_mining_get_current_hashprice()` (from nbits)
24
25- [ ] 1c. Implement `tollgate_core_get_mining_status_json(void)`
26 - Follow `tollgate_core_get_status_json()` pattern (cJSON create → add fields → print → delete)
27 - Get proxy stats via `tollgate_core_stratum_proxy_get_stats()`
28 - JSON fields: `hashprice`, `nbits`, `total_shares`, `total_accepted`, `total_rejected`, `active_miners`, `hashrate_ghs`
29
30- [ ] 1d. Add unit tests for new functions in `tests/unit/test_mining_api.c`
31- [ ] 1e. `make test-unit` — all tests pass
32- [ ] 1f. `idf.py build` — esp32-tollgate builds
33 20
34--- 21---
35 22
36## Phase 2: Wire tick() into NerdQAxePlus Main Loop 23## Phase 2: Wire tick() into NerdQAxePlus Main Loop
37 24
38**File:** `esp-miner-nerdqaxeplus/main/main.cpp` (line 331 while loop) 25**File:** `esp-miner-nerdqaxeplus/main/main.cpp`
39 26
40- [ ] 2a. Add `tollgate_core_tick()` inside the 10s loop, guarded by `#ifdef TOLLGATE` 27- [x] 2a. Add `tollgate_core_tick()` inside the 10s loop, guarded by `#ifdef TOLLGATE`
41- [ ] 2b. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` passes 28- [x] 2b. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` passes
42 29
43--- 30---
44 31
45## Phase 3: Wire WiFi AP Client Events 32## Phase 3: Wire WiFi AP Client Events
46 33
47**File:** `esp-miner-nerdqaxeplus/components/connect/connect.c` (event_handler line 74) 34**File:** `esp-miner-nerdqaxeplus/components/connect/connect.c`
48 35
49- [ ] 3a. Add `#include "tollgate_core.h"` guarded by `#ifdef TOLLGATE` 36- [x] 3a. Add `#include "tollgate_core.h"` guarded by `#ifdef TOLLGATE`
50- [ ] 3b. Add `WIFI_EVENT_AP_STACONNECTED` handler: resolve MAC→IP via `esp_wifi_ap_get_sta_list_with_ip()`, call `tollgate_core_client_connected(mac, ip)` 37- [x] 3b. Add `WIFI_EVENT_AP_STACONNECTED` handler
51- [ ] 3c. Add `WIFI_EVENT_AP_STADISCONNECTED` handler: call `tollgate_core_client_disconnected(mac)` 38- [x] 3c. Add `WIFI_EVENT_AP_STADISCONNECTED` handler
52- [ ] 3d. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` passes 39- [x] 3d. Build passes
40
41**Note:** Upstream moved `connect.c` into `main/network/NetworkManager`. Our connect component was removed during rebase (Phase 7.5). WiFi AP events need to be re-integrated into NetworkManager (deferred).
53 42
54--- 43---
55 44
56## Phase 4: Make Stratum Proxy Functional 45## Phase 4: Make Stratum Proxy Functional
57 46
58**File:** `components/tollgate_core/src/tollgate_core_stratum_proxy.c` 47- [x] 4a. Line-buffer recv data, parse downstream miner messages
59 48- [x] 4b. Use real jobs from `tollgate_core_stratum_proxy_set_job()`
60- [ ] 4a. Line-buffer recv data, parse downstream miner messages using `tollgate_core_stratum_parse_*()`: 49- [x] 4c. Hook `create_job_mining_notify()` to forward pool jobs to proxy
61 - `mining.subscribe` → respond with extranonce 50- [x] 4d. Hook `mining.set_difficulty` to call `tollgate_core_mining_set_current_nbits()`
62 - `mining.authorize` → respond with success 51- [x] 4e. `idf.py build` passes for esp32-tollgate
63 - `mining.submit` → validate difficulty, increment counters, call `tollgate_core_on_share_accepted()`, respond accept/reject 52- [x] 4f. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` passes
64- [ ] 4b. Use real jobs from `tollgate_core_stratum_proxy_set_job()` instead of zeroed placeholders
65
66**File:** `esp-miner-nerdqaxeplus/main/tasks/create_jobs_task.cpp` (line 176)
67
68- [ ] 4c. Hook `create_job_mining_notify()` to forward pool jobs to proxy via `tollgate_core_stratum_proxy_set_job()`, guarded by `#ifdef TOLLGATE`
69
70**File:** `esp-miner-nerdqaxeplus/main/stratum/stratum_manager.cpp` (line 179)
71
72- [ ] 4d. Hook `mining.set_difficulty` to call `tollgate_core_mining_set_current_nbits()`, guarded by `#ifdef TOLLGATE`
73
74- [ ] 4e. `idf.py build` passes for esp32-tollgate
75- [ ] 4f. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` passes
76 53
77--- 54---
78 55
79## Phase 5: Wire Share Accepted for Self-Mining Credit 56## Phase 5: Wire Share Accepted for Self-Mining Credit
80 57
81**File:** `esp-miner-nerdqaxeplus/main/tollgate_platform.cpp` (line 137) 58- [x] 5a. `tollgate_on_share_accepted()` calls `tollgate_core_on_share_accepted(owner_ip, difficulty)`
82 59- [x] 5b. Build passes
83- [ ] 5a. Update `tollgate_on_share_accepted(double difficulty)` to call `tollgate_core_on_share_accepted(owner_ip, difficulty)` crediting the owner session
84- [ ] 5b. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` passes
85 60
86--- 61---
87 62
88## Phase 6: Dynamic AP IP and DNS 63## Phase 6: Dynamic AP IP and DNS
89 64
90**File:** `esp-miner-nerdqaxeplus/main/tollgate_platform.cpp` (line 158) 65- [x] 6a. Replace hardcoded `192.168.4.1` with actual AP IP from `esp_netif_get_ip_info()`
91 66- [x] 6b. Replace hardcoded `8.8.8.8` with STA gateway IP
92- [ ] 6a. Replace hardcoded `192.168.4.1` with actual AP IP from `esp_netif_get_ip_info()` on AP netif 67- [x] 6c. Build passes
93- [ ] 6b. Replace hardcoded upstream DNS `8.8.8.8` with STA gateway IP
94- [ ] 6c. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` passes
95 68
96--- 69---
97 70
98## Phase 7: Sync tollgate_core to NerdQAxePlus + Build Verify 71## Phase 7: Sync tollgate_core to NerdQAxePlus + Build Verify
99 72
100- [ ] 7a. rsync `esp32-tollgate/components/tollgate_core/` → `esp-miner-nerdqaxeplus/components/tollgate_core/` 73- [x] 7a. rsync tollgate_core v1.2.0 → NerdQAxePlus
101- [ ] 7b. `make test-unit` — all esp32-tollgate tests pass 74- [x] 7b. `make test-unit` — all 29 tests pass
102- [ ] 7c. `idf.py build` — esp32-tollgate builds 75- [x] 7c. `idf.py build` — esp32-tollgate builds
103- [ ] 7d. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` — NerdQAxePlus builds 76- [x] 7d. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` — NerdQAxePlus builds
104 77
105--- 78---
106 79
107## Phase 8: Hardware Smoke Test on NerdQAxePlus 80## Phase 7.5: Stratum Username Fallback + Upstream Rebase
81
82- [x] 7.5a. Add `#ifdef TOLLGATE` fallback: use `CONFIG_STRATUM_USER` as default instead of `NULL`
83- [x] 7.5b. Rebase 9 TollGate commits onto upstream `4b8f3225` (CAN bus + NetworkManager refactor)
84- [x] 7.5c. Resolve conflicts in `main.cpp` (CAN slave/master split), `CMakeLists.txt`, `nvs_config.h`
85- [x] 7.5d. Remove stale `connect/` component (upstream moved to `main/network/`)
86- [x] 7.5e. Fix W5500 build: enable `CONFIG_ETH_SPI_ETHERNET_W5500=y`
87- [x] 7.5f. Build passes: `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build`
88
89---
108 90
109- [ ] 8a. Flash NerdQAxePlus with `TOLLGATE=1` to a NerdQAxe+ board 91## Phase 8: Hardware Smoke Test
92
93**Board B** (MAC `fc:01:2c:c5:50:50`, `/dev/ttyACM0`) — flashed with NerdQAxePlus TOLLGATE=1 NERDQAXEPLUS
94- [ ] 8a. Board B AP visible
110- [ ] 8b. Connect to AP, verify captive portal loads 95- [ ] 8b. Connect to AP, verify captive portal loads
111- [ ] 8c. Test Cashu payment flow 96- [ ] 8c. Test Cashu payment flow
112- [ ] 8d. Connect Stratum miner to port 3334, verify shares tracked and sessions extended 97- [ ] 8d. Test grant/reset endpoints
113- [ ] 8e. Verify board's own ASIC mining credits the owner 98- [ ] 8e. Test internet passthrough after payment
114- [ ] 8f. Test grant/reset endpoints 99- [ ] 8f. `GET /api/tollgate/status`
115- [ ] 8g. Test internet passthrough after payment 100- [ ] 8g. `GET /api/tollgate/wallet`
101- [ ] 8h. `GET /api/tollgate/config`
102
103**NerdAxe** (MAC `80:b5:4e:c7:79:88`, `/dev/ttyACM2`) — actual hardware with BM1366 ASIC (fan-damaged, 0 hashrate)
104- [ ] 8i. Flash with `TOLLGATE=1 BOARD=NERDAXE`
105- [ ] 8j. Monitor serial: check ASIC detection
106- [ ] 8k. Test TollGate WiFi/payment (ASIC-independent)
107- [ ] 8l. Check if ASIC responds (diagnostic)
108
109**Board A** (MAC `94:a9:90:2e:37:7c`, `/dev/ttyACM1`) — USB flash failing, needs cable check
110- [ ] 8m. Re-seat USB cable, retry flash
116 111
117--- 112---
118 113
119## Phase 9: Commit, Push, Publish 114## Phase 9: Commit, Push, Publish
120 115
121- [ ] 9a. Commit all tollgate_core changes to esp32-tollgate `feature/tollgate-core-v2` 116- [x] 9a. Commit tollgate_core changes to `feature/tollgate-core-v2`
122- [ ] 9b. Push esp32-tollgate to nostr 117- [x] 9b. Push esp32-tollgate to GitHub (`OpenTollGate/tollgate-esp32`) — `master` + `feature/tollgate-core-v2`
123- [ ] 9c. Commit all NerdQAxePlus integration to `develop` 118- [x] 9c. Push esp32-tollgate to nostr (`relay.ngit.dev`) — both branches
124- [ ] 9d. Push NerdQAxePlus to nostr 119- [x] 9d. Commit NerdQAxePlus integration to `develop` (rebased onto upstream `4b8f3225`)
125- [ ] 9e. Bump tollgate_core to v1.3.0 in `idf_component.yml` 120- [x] 9e. Push NerdQAxePlus to GitHub (`c03rad0r/ESP-Miner-NerdQAxePlus`)
126- [ ] 9f. Re-publish to IDF Component Registry 121- [ ] 9f. Push NerdQAxePlus to nostr (deferred — repo too large, times out)
122- [x] 9g. Bump tollgate_core to v1.3.0 in `idf_component.yml`, update URL to GitHub
123- [ ] 9h. Re-publish to IDF Component Registry (pending `compote component pack` + `upload`)
127 124
128--- 125---
129 126
130## Dependency Order 127## Deferred
131
132```
133Phase 1 → Phase 5 → Phase 7 → Phase 8
134Phase 1 → Phase 4 → Phase 7 → Phase 8
135Phase 2 → Phase 7
136Phase 3 → Phase 7
137Phase 6 → Phase 7
138Phase 7 → Phase 8 → Phase 9
139```
140 128
141Phases 1–6 are independent (different files). Phase 7 bundles them. Phase 8 needs hardware. 129- **WiFi AP event hooks** — Need to integrate into upstream `NetworkManager` class (`main/network/network_manager.cpp`)
130- **NerdQAxePlus nostr push** — Repo too large for relay timeout, retry later
131- **Board A flash** — USB connection drops during write, hardware issue
132- **ASIC diagnostic on NerdAxe** — Fan was blocked, ASIC may be damaged
133- **Nostr push for orangesync** — orangesync.tech still offline
diff --git a/PLAN_EXECUTION.md b/PLAN_EXECUTION.md
new file mode 100644
index 0000000..e1f4716
--- /dev/null
+++ b/PLAN_EXECUTION.md
@@ -0,0 +1,140 @@
1# Execution Plan — TollGate + NerdQAxePlus Integration
2
3**Created:** 2026-05-28
4**Updated:** 2026-05-28
5**Status:** In Progress — Smoke testing phase
6
7---
8
9## Locked-In Decisions
10
11| Decision | Choice |
12|----------|--------|
13| esp32-tollgate GitHub repo | `OpenTollGate/tollgate-esp32` |
14| esp32-tollgate default branch | `master` |
15| NerdQAxePlus GitHub repo | `c03rad0r/ESP-Miner-NerdQAxePlus` |
16| NerdQAxePlus branch | `develop` |
17| Target boards | Board A + Board B + NerdAxe |
18| Board variant | `NERDQAXEPLUS` for dev boards, `NERDAXE` for BM1366 hardware |
19| Nostr remotes | `ngit-dev` (relay.ngit.dev) + `gitnostr` (gitnostr.com) |
20| Stratum username fallback | Option A: `#ifdef TOLLGATE` uses `CONFIG_STRATUM_USER` |
21| Component version | v1.3.0 |
22| ASIC-less testing | Safe — TollGate WiFi/payment/portal work without ASIC |
23| Upstream WiFi | `EnterSSID-2.4GHz` / `c03rad0r123!` |
24
25## Board Inventory
26
27| Board | Port | MAC | Hardware | Status |
28|-------|------|-----|----------|--------|
29| A | `/dev/ttyACM1` | `94:a9:90:2e:37:7c` | ESP32-S3 dev | USB flash failing, cable issue |
30| B | `/dev/ttyACM0` | `fc:01:2c:c5:50:50` | ESP32-S3 dev | Flashed, needs NVS config + smoke test |
31| NerdAxe | `/dev/ttyACM2` | `80:b5:4e:c7:79:88` | BM1366 ASIC (fan-damaged) | Needs flash + smoke test |
32
33**Important:** Ports shift on USB replug. Always verify with `esptool --port <port> chip-id`.
34
35## Current State
36
37| Item | Value |
38|------|-------|
39| esp32-tollgate `master` | HEAD `10c69b0` (pushed to GitHub + relay.ngit.dev) |
40| esp32-tollgate `feature/tollgate-core-v2` | HEAD `8f18b7a` v1.3.0 (pushed to GitHub + relay.ngit.dev) |
41| NerdQAxePlus `develop` | HEAD `a2fd1fa6` (9 TollGate commits rebased on upstream, pushed to GitHub) |
42| IDF Component Registry | v1.2.0 live, v1.3.0 pending upload |
43| Unit tests | 29 tests, all pass |
44| orangesync.tech | Entirely offline |
45
46---
47
48## Step 1: Stratum Username Fallback ✅
49
50- [x] 1a-c. Implemented, committed, verified
51
52## Step 2: Add Nostr Remotes (esp32-tollgate) ✅
53
54- [x] 2a-f. `ngit-dev` and `gitnostr` added, pushed to relay.ngit.dev
55
56## Step 3: Add Nostr Remotes (NerdQAxePlus) ✅
57
58- [x] 3a-d. Remotes added, push to nostr deferred (repo too large)
59
60## Step 4: Push esp32-tollgate to GitHub ✅
61
62- [x] 4a-d. Both branches pushed, default set to `master`
63
64## Step 5: Rebase + Push NerdQAxePlus ✅
65
66- [x] 5a-g. 9 TollGate commits rebased onto upstream `4b8f3225`, pushed to GitHub
67
68## Step 6: Bump tollgate_core to v1.3.0 ✅
69
70- [x] 6a-f. Bumped, committed, pushed, rsynced to NerdQAxePlus
71
72## Step 7: Re-publish to IDF Component Registry (PENDING)
73
74- [ ] 7a. `compote component pack --path components/tollgate_core`
75- [ ] 7b. `compote component upload --name tollgate_core --namespace c03rad0r`
76- [ ] 7c. Verify v1.3.0 on components.espressif.com
77
78## Step 8: Update Docs ✅
79
80- [x] 8a. PLAN_BITAXE_FIXES.md updated with checklist
81- [x] 8b. REMOTES.md updated with current state
82- [x] 8c. PLAN_EXECUTION.md updated
83
84## Step 9: Build NerdQAxePlus ✅
85
86- [x] 9a. `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` passes
87- [x] 9b. `TOLLGATE=1 BOARD=NERDAXE idf.py build` — needs verification for NerdAxe
88
89## Step 10: Flash Boards
90
91- [ ] 10a. **NerdAxe** (`/dev/ttyACM2`, MAC `80:b5:4e:c7:79:88`): Flash with `BOARD=NERDAXE`
92- [ ] 10b. **Board B** (`/dev/ttyACM0`, MAC `fc:01:2c:c5:50:50`): Already flashed, needs NVS config
93- [ ] 10c. **Board A** (`/dev/ttyACM1`, MAC `94:a9:90:2e:37:7c`): Blocked by USB issue
94
95## Step 11: Configure NVS on NerdAxe
96
97- [ ] 11a. Connect to NerdAxe AP, note IP
98- [ ] 11b. `curl -X PATCH http://<IP>/api/system -d '{"ssid":"EnterSSID-2.4GHz","wifiPass":"c03rad0r123!"}'`
99- [ ] 11c. `curl -X PATCH http://<IP>/api/system -d '{"stratumUser":"bc1q7n70rumyv6lvu8avpml0c3uggvssfu52egum3q.nerdqaxe"}'`
100- [ ] 11d. `curl -X POST http://<IP>/api/system/restart`
101- [ ] 11e. Wait for reboot, verify upstream WiFi connection
102
103## Step 12: Smoke Test NerdAxe
104
105- [ ] 12a. AP visible
106- [ ] 12b. Connect to AP
107- [ ] 12c. Captive portal auto-redirects
108- [ ] 12d. Portal page renders (price, mint, form)
109- [ ] 12e. Generate token: `cashu -h https://testnut-nutshell.mints.orangesync.tech send --legacy 21`
110- [ ] 12f. Submit token → payment accepted
111- [ ] 12g. Internet passthrough: `curl -I https://google.com`
112- [ ] 12h. `GET /api/tollgate/status`
113- [ ] 12i. `GET /api/tollgate/wallet`
114- [ ] 12j. `GET /api/tollgate/config`
115- [ ] 12k. `POST /api/tollgate/grant`
116- [ ] 12l. Disconnect + reconnect → internet blocked
117- [ ] 12m. `GET /api/system/info` — check ASIC detection
118- [ ] 12n. Serial monitor: check ASIC init output, hashrate
119
120## Step 13: Smoke Test Board B (if time permits)
121
122- [ ] 13a-13n. Repeat Step 12 on Board B
123
124## Step 14: Final Commit + Push
125
126- [ ] 14a. Commit doc updates
127- [ ] 14b. Push esp32-tollgate to GitHub + nostr
128- [ ] 14c. Push NerdQAxePlus to GitHub
129
130---
131
132## Risks
133
134| Risk | Mitigation |
135|------|------------|
136| NerdAxe ASIC dead from fan block | TollGate still works ASIC-less; diagnose via serial |
137| Test mint down | Skip payment test, test everything else |
138| Board doesn't create AP | Check serial monitor |
139| `BOARD=NERDAXE` build fails | Use `NERDQAXEPLUS` variant, works ASIC-less |
140| `compote` CLI syntax changed | Check `compote --help` before upload |
diff --git a/REMOTES.md b/REMOTES.md
index 5988e8e..2b92916 100644
--- a/REMOTES.md
+++ b/REMOTES.md
@@ -11,71 +11,79 @@
11| Name | URL | Type | Purpose | 11| Name | URL | Type | Purpose |
12|------|-----|------|---------| 12|------|-----|------|---------|
13| `origin` | `nostr://npub12m5.../relay.ngit.dev/esp32-tollgate` | nostr (ngit) | Primary ngit relay | 13| `origin` | `nostr://npub12m5.../relay.ngit.dev/esp32-tollgate` | nostr (ngit) | Primary ngit relay |
14| `orangesync` | `nostr://npub12m5.../ngit.orangesync.tech/esp32-tollgate` | nostr (ngit) | Self-hosted ngit relay | 14| `orangesync` | `nostr://npub12m5.../ngit.orangesync.tech/esp32-tollgate` | nostr (ngit) | Self-hosted ngit relay (offline) |
15| `github` | `https://github.com/OpenTollGate/tollgate-esp32` | HTTPS | Primary GitHub mirror |
16| `ngit-dev` | `nostr://npub12m5.../relay.ngit.dev/esp32-tollgate` | nostr (ngit) | Public ngit relay (same as origin) |
17| `gitnostr` | `nostr://npub12m5.../gitnostr.com/esp32-tollgate` | nostr (ngit) | gitnostr.com (auth issues) |
15 18
16## Infrastructure 19## Infrastructure
17 20
18| Service | URL | Role | 21| Service | URL | Role | Status |
19|---------|-----|------| 22|---------|-----|------|--------|
20| GRASP (Git Server) | `https://git.orangesync.tech` | Git smart HTTP over Nostr (NIP-34) | 23| GitHub (primary) | `https://github.com/OpenTollGate/tollgate-esp32` | Main code host | Active |
21| ngit Relay (Nostr) | `wss://ngit.orangesync.tech` | Nostr relay for git state events | 24| GitHub (NerdQAxePlus) | `https://github.com/c03rad0r/ESP-Miner-NerdQAxePlus` | Fork repo | Active |
22| GitWorkshop | `https://workshop.orangesync.tech` | Web UI for browsing nostr git repos | 25| GRASP (Git Server) | `https://git.orangesync.tech` | Git smart HTTP over Nostr | Offline |
23| relay.ngit.dev | `wss://relay.ngit.dev` | Public ngit relay (secondary) | 26| ngit Relay (Nostr) | `wss://ngit.orangesync.tech` | Nostr relay for git state events | Offline |
24 27| GitWorkshop | `https://workshop.orangesync.tech` | Web UI for browsing nostr git repos | Offline |
25## GRASP Servers 28| relay.ngit.dev | `wss://relay.ngit.dev` | Public ngit relay (most reliable) | Active |
26 29| gitnostr.com | `https://gitnostr.com` | Public ngit relay | Auth issues |
27Configured in NIP-34 repo announcement: 30| IDF Component Registry | `components.espressif.com/c03rad0r/tollgate_core` | Published component v1.2.0 | Active |
28 31
29- `git.orangesync.tech` (self-hosted, primary) 32## Branches (esp32-tollgate)
30- `relay.anzenkodo.workers.dev` 33
31- `nostr.koning-degraaf.nl` 34| Branch | HEAD | Status | Pushed to |
32- `relay.damus.io` 35|--------|------|--------|-----------|
33- `nos.lol` 36| `master` | `10c69b0` | Production | GitHub, relay.ngit.dev |
34 37| `feature/tollgate-core-v2` | `8f18b7a` (v1.3.0) | Active — tollgate_core extraction + fixes | GitHub, relay.ngit.dev |
35## Additional Relays 38| `feature/miner-integration` | `e75c350` | Merged into feature/tollgate-core-v2 | — |
36 39| `feature/tollgate-core-component` | `144b48f` | Superseded by feature/tollgate-core-v2 | — |
37- `wss://ngit.orangesync.tech` (self-hosted, for state events) 40| `feature/display-fix` | `565d6a7` | Stale — Playwright E2E test plan | No |
38 41| `feature/cvm-integration` | `2cd372c` | Merged to master | Yes |
39## Branches 42| `feature/local-relay` | `25eb0c5` | Merged to master | Yes |
40 43| `feature/mining-payment` | `ef9ae98` | Merged to master | Yes |
41| Branch | HEAD | Status | Merged into master | 44
42|--------|------|--------|--------------------| 45## Branches (NerdQAxePlus)
43| `master` | `62bce81` | Production | — | 46
44| `feature/miner-integration` | `e75c350` | Active — tollgate_core C++ compat + NerdQAxePlus integration | No | 47| Branch | HEAD | Status | Pushed to |
45| `feature/tollgate-core-component` | `144b48f` | Active — original tollgate_core extraction + E2E fixes | No | 48|--------|------|--------|-----------|
46| `feature/display-fix` | `565d6a7` | Stale — Playwright E2E test plan for /setup | No | 49| `develop` | `a2fd1fa6` | Active — 9 TollGate commits rebased on upstream `4b8f3225` | GitHub |
47| `feature/cvm-integration` | `2cd372c` | Merged to master | Yes (squashed) |
48| `feature/local-relay` | `25eb0c5` | Merged to master | Yes (squashed) |
49| `feature/mining-payment` | `ef9ae98` | Merged to master | Yes (squashed as `e366ceb`) |
50| `backup/multi-mint-support-pre-rebase` | `ef2de0f` | Backup only | N/A |
51 50
52## Local Worktrees 51## Local Worktrees
53 52
54| Path | Branch | Purpose | 53| Path | Branch | Purpose |
55|------|--------|---------| 54|------|--------|---------|
56| `/home/c03rad0r/esp32-tollgate` | `master` | Main repo (clean, for other LLM sessions) | 55| `/home/c03rad0r/esp32-tollgate` | `feature/tollgate-core-v2` | Main working repo |
57| `/home/c03rad0r/esp32-miner-integration` | `feature/miner-integration` | tollgate_core + mining integration | 56| `/home/c03rad0r/esp-miner-nerdqaxeplus` | `develop` | NerdQAxePlus fork |
58| `/home/c03rad0r/esp32-tollgate-arch` | `feature/tollgate-core-component` | Architecture branch (original component extraction) | 57
58## Board Inventory
59
60| Board | Port | MAC | SSID | AP IP | Notes |
61|-------|------|-----|------|-------|-------|
62| A | `/dev/ttyACM1` | `94:a9:90:2e:37:7c` | `TollGate-B96D80` | `10.185.47.1` | USB flash failing, cable issue |
63| B | `/dev/ttyACM0` | `fc:01:2c:c5:50:50` | `TollGate-C0E9CA` | `10.192.45.1` | Flashed with NerdQAxePlus TOLLGATE=1 |
64| NerdAxe | `/dev/ttyACM2` | `80:b5:4e:c7:79:88` | TBD | TBD | Actual BM1366 ASIC, fan-damaged |
65
66**Important:** Ports shift on every USB replug. Always verify with `esptool --port <port> chip-id`.
59 67
60## Cross-Referenced Repositories 68## Cross-Referenced Repositories
61 69
62### esp-miner-nerdqaxeplus-tollgate (NerdQAxePlus Fork) 70### ESP-Miner-NerdQAxePlus (Fork)
63 71
64- **Identifier:** `esp-miner-nerdqaxeplus-tollgate` 72- **GitHub:** `https://github.com/c03rad0r/ESP-Miner-NerdQAxePlus`
65- **naddr:** `naddr1qq0k2ums94kkjmn9wgkkuetjv3ckz7r9wpk82uedw3hkcmr8v96x2q3q2m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquqxpqqqpmejqgewaehxw309ankjapwdaexzmn8v4ehjmnr9e6x2cmggeq0vl`
66- **Clone:** `/home/c03rad0r/esp-miner-nerdqaxeplus` 73- **Clone:** `/home/c03rad0r/esp-miner-nerdqaxeplus`
67- **Branch:** `develop` (HEAD `83e09ab9`) 74- **Branch:** `develop` (HEAD `a2fd1fa6`)
68- **Upstream:** `https://github.com/shufps/ESP-Miner-NerdQAxePlus` 75- **Upstream:** `https://github.com/shufps/ESP-Miner-NerdQAxePlus`
69- **Nostr remote:** `nostr://npub12m5.../git.orangesync.tech/esp-miner-nerdqaxeplus-tollgate` 76- **Dependency:** Uses `tollgate_core` component v1.3.0 (rsynced from esp32-tollgate)
70- **Dependency:** Uses `tollgate_core` component from `feature/miner-integration` branch (symlinked at `components/tollgate_core`) 77- **Build:** `TOLLGATE=1 BOARD=NERDQAXEPLUS idf.py build` (or `BOARD=NERDAXE` for BM1366 variant)
71- **Build:** `BOARD=NERDAXE TOLLGATE=1 idf.py build` 78- **Nostr remote:** `ngit-dev` added but push deferred (repo too large)
72- **See:** `REMOTES.md` in that repo for full details
73 79
74### tollgate_core Component 80### tollgate_core Component
75 81
76- **Source:** `components/tollgate_core/` on `feature/miner-integration` branch 82- **Source:** `components/tollgate_core/` on `feature/tollgate-core-v2`
77- **Files:** 7 C source files, 2 public headers, CMakeLists.txt, idf_component.yml 83- **Version:** v1.3.0
78- **Design doc:** `docs/TOLLGATE_CORE_DESIGN.md` on `feature/tollgate-core-component` branch 84- **Registry:** `c03rad0r/tollgate_core` on components.espressif.com (v1.2.0 published, v1.3.0 pending)
85- **Files:** 13 C source files, 2 public headers, CMakeLists.txt, idf_component.yml
86- **Design doc:** `docs/TOLLGATE_CORE_DESIGN.md`
79 87
80## Backup Bundles 88## Backup Bundles
81 89
@@ -85,46 +93,36 @@ Configured in NIP-34 repo announcement:
85| `/home/c03rad0r/mining-work-backup/feature-mining-payment.bundle` | `feature/mining-payment` branch | ~755KB | 93| `/home/c03rad0r/mining-work-backup/feature-mining-payment.bundle` | `feature/mining-payment` branch | ~755KB |
86| `/home/c03rad0r/mining-work-backup/nerdqaxeplus-tollgate.bundle` | NerdQAxePlus `develop` branch | ~48MB | 94| `/home/c03rad0r/mining-work-backup/nerdqaxeplus-tollgate.bundle` | NerdQAxePlus `develop` branch | ~48MB |
87 95
88### Restore from bundle
89
90```bash
91# Clone from bundle
92git clone feature-miner-integration-latest.bundle -b feature/miner-integration esp32-tollgate-restored
93
94# Or fetch into existing repo
95git remote add bundle-src /home/c03rad0r/mining-work-backup/feature-miner-integration-latest.bundle
96git fetch bundle-src
97git checkout -b feature/miner-integration bundle-src/feature/miner-integration
98```
99
100## How to Push 96## How to Push
101 97
102```bash 98```bash
103# Push all branches to orangesync 99# esp32-tollgate → GitHub (primary)
104git push orangesync --all 100git push github master
101git push github feature/tollgate-core-v2
105 102
106# Push specific branch 103# esp32-tollgate → nostr
107git push orangesync feature/miner-integration 104git push ngit-dev --all
108 105
109# Push to both remotes 106# NerdQAxePlus → GitHub
110git push origin master && git push orangesync master 107cd /home/c03rad0r/esp-miner-nerdqaxeplus
108git push github develop
111 109
112# Update repo metadata 110# IDF Component Registry
113ngit repo edit -d -g git.orangesync.tech --relay wss://ngit.orangesync.tech 111compote component pack --path components/tollgate_core
114 112compote component upload --name tollgate_core --namespace c03rad0r
115# Sync (force GRASP servers to update)
116ngit sync -d -v
117``` 113```
118 114
119## Nostr Push Troubleshooting 115## Nostr Push Troubleshooting
120 116
121The "failed to list from https://..." messages during `git push` are **cosmetic noise** from third-party nostr relays that don't support git smart HTTP. The actual push succeeds — look for "Everything up-to-date" or "new state" from the primary relay in the output. 117The "failed to list from https://..." messages during `git push` are cosmetic noise from relays that don't support git smart HTTP. Look for "Everything up-to-date" or "new state" from the primary relay.
122 118
123Key pattern: 119- **relay.ngit.dev** — most reliable, always works
124``` 120- **gitnostr.com** — auth issues, often fails
125failed to list from https://nos.lol/... ← cosmetic, ignore 121- **ngit.orangesync.tech** — offline
126failed to list from https://relay.damus.io/... ← cosmetic, ignore 122
127To nostr://npub.../ngit.orangesync.tech/esp32-tollgate 123## Current Status
128 = [up to date] master -> master ← actual result 124
129Everything up-to-date 125- **orangesync.tech** — entirely offline (git, ngit, relay all DOWN)
130``` 126- **GitHub** — primary remote, active
127- **relay.ngit.dev** — secondary, working
128- **IDF Component Registry** — v1.2.0 live, v1.3.0 pending upload