diff options
| author | Your Name <you@example.com> | 2026-05-20 03:14:49 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-20 03:14:49 +0530 |
| commit | bb157fcb839d66b98ca375ab0ea657a08b5a21b4 (patch) | |
| tree | 248fdeb2b02b9c58929870690612299c88480e10 /CONSOLIDATION.md | |
| parent | 32e1bfd27b849652a7c9d48ad75e13c44bdf8247 (diff) | |
docs: update CONSOLIDATION.md — reflect completed state
Diffstat (limited to 'CONSOLIDATION.md')
| -rw-r--r-- | CONSOLIDATION.md | 121 |
1 files changed, 76 insertions, 45 deletions
diff --git a/CONSOLIDATION.md b/CONSOLIDATION.md index 3e96dbf..92c9004 100644 --- a/CONSOLIDATION.md +++ b/CONSOLIDATION.md | |||
| @@ -26,7 +26,7 @@ esp-miner (master) | |||
| 26 | - [x] **1.3** Wire market config fields in config.c | 26 | - [x] **1.3** Wire market config fields in config.c |
| 27 | - [x] **1.4** Drop all 4 stashes (binaries only, content already in master) | 27 | - [x] **1.4** Drop all 4 stashes (binaries only, content already in master) |
| 28 | - [x] **1.5** Verify master builds: `idf.py build` — PASS | 28 | - [x] **1.5** Verify master builds: `idf.py build` — PASS |
| 29 | - [x] **1.6** Verify unit tests pass: `make test-unit` — 16/16 PASS | 29 | - [x] **1.6** Verify unit tests pass: `make test-unit` — 18/18 suites PASS |
| 30 | - [x] **1.7** Commit + push | 30 | - [x] **1.7** Commit + push |
| 31 | 31 | ||
| 32 | ## Phase 2: Merge feature/display-fix (touch + WiFi setup UI) | 32 | ## Phase 2: Merge feature/display-fix (touch + WiFi setup UI) |
| @@ -36,7 +36,7 @@ esp-miner (master) | |||
| 36 | - [x] **2.3** Resolve conflicts: took master for config/cvm/api/main, display-fix for display/axs15231b | 36 | - [x] **2.3** Resolve conflicts: took master for config/cvm/api/main, display-fix for display/axs15231b |
| 37 | - [x] **2.4** Fix display_update() call signature (7 args), add tollgate_config_add_wifi() | 37 | - [x] **2.4** Fix display_update() call signature (7 args), add tollgate_config_add_wifi() |
| 38 | - [x] **2.5** Verify build: `idf.py build` — PASS | 38 | - [x] **2.5** Verify build: `idf.py build` — PASS |
| 39 | - [x] **2.6** Verify unit tests: `make test-unit` — 16/16 PASS | 39 | - [x] **2.6** Verify unit tests: `make test-unit` — 18/18 suites PASS |
| 40 | - [x] **2.7** Commit + push | 40 | - [x] **2.7** Commit + push |
| 41 | 41 | ||
| 42 | ## Phase 3: Merge feature/miner-integration (full tollgate_core) | 42 | ## Phase 3: Merge feature/miner-integration (full tollgate_core) |
| @@ -46,13 +46,17 @@ esp-miner (master) | |||
| 46 | - [x] **3.3** Commit: "feat: upgrade tollgate_core to full version with mining + stratum" | 46 | - [x] **3.3** Commit: "feat: upgrade tollgate_core to full version with mining + stratum" |
| 47 | - [x] **3.4** Copy MINER_INTEGRATION_PLAN.md from feature branch | 47 | - [x] **3.4** Copy MINER_INTEGRATION_PLAN.md from feature branch |
| 48 | - [x] **3.5** Verify build: `idf.py build` — PASS | 48 | - [x] **3.5** Verify build: `idf.py build` — PASS |
| 49 | - [x] **3.6** Verify unit tests: `make test-unit` — 16/16 PASS | 49 | - [x] **3.6** Verify unit tests: `make test-unit` — 18/18 suites PASS |
| 50 | - [x] **3.7** Commit + push | 50 | - [x] **3.7** Commit + push |
| 51 | 51 | ||
| 52 | ## Phase 4: Restructure — Option B (main/ calls tollgate_core API) | 52 | ## Phase 4: Restructure — Option B (main/ calls tollgate_core API) |
| 53 | 53 | ||
| 54 | Move module logic from main/ into components/tollgate_core/, making main/ a thin shell. | 54 | Move module logic from main/ into components/tollgate_core/, making main/ a thin shell. |
| 55 | 55 | ||
| 56 | **Status: DEFERRED** — requires careful API design. Both main/ and tollgate_core currently have | ||
| 57 | independent implementations of the same modules. The restructure would make main/ delegate to | ||
| 58 | tollgate_core for all shared logic. | ||
| 59 | |||
| 56 | - [ ] **4.1** Identify modules in main/ that have tollgate_core equivalents: | 60 | - [ ] **4.1** Identify modules in main/ that have tollgate_core equivalents: |
| 57 | - cashu.c/h → tollgate_core_cashu.c/h | 61 | - cashu.c/h → tollgate_core_cashu.c/h |
| 58 | - dns_server.c/h → tollgate_core_dns.c/h | 62 | - dns_server.c/h → tollgate_core_dns.c/h |
| @@ -72,6 +76,9 @@ Move module logic from main/ into components/tollgate_core/, making main/ a thin | |||
| 72 | 76 | ||
| 73 | ## Phase 5: Wire up NerdQAxePlus via Component Manager | 77 | ## Phase 5: Wire up NerdQAxePlus via Component Manager |
| 74 | 78 | ||
| 79 | **Status: DEFERRED** — depends on Phase 4. Currently uses a broken symlink | ||
| 80 | (pointing to removed worktree). | ||
| 81 | |||
| 75 | - [ ] **5.1** Create main/idf_component.yml in NerdQAxePlus: | 82 | - [ ] **5.1** Create main/idf_component.yml in NerdQAxePlus: |
| 76 | ```yaml | 83 | ```yaml |
| 77 | dependencies: | 84 | dependencies: |
| @@ -85,18 +92,18 @@ Move module logic from main/ into components/tollgate_core/, making main/ a thin | |||
| 85 | 92 | ||
| 86 | ## Phase 6: Delete Branches & Worktrees | 93 | ## Phase 6: Delete Branches & Worktrees |
| 87 | 94 | ||
| 88 | - [x] **6.1** Delete feature/tollgate-core-component branch (merged via Phase 1) | 95 | - [x] **6.1** Delete feature/tollgate-core-component branch |
| 89 | - [x] **6.2** Delete backup/multi-mint-support-pre-rebase branch (fully in master) | 96 | - [x] **6.2** Delete backup/multi-mint-support-pre-rebase branch |
| 90 | - [x] **6.3** Delete feature/display-fix branch (merged in Phase 2) | 97 | - [x] **6.3** Delete feature/display-fix branch |
| 91 | - [x] **6.4** Delete feature/miner-integration branch (merged in Phase 3) | 98 | - [x] **6.4** Delete feature/miner-integration branch |
| 92 | - [x] **6.5** Remove worktree: esp32-miner-integration/ | 99 | - [x] **6.5** Remove worktree: esp32-miner-integration/ |
| 93 | - [x] **6.6** Remove worktree: esp32-tollgate-arch/ | 100 | - [x] **6.6** Remove worktree: esp32-tollgate-arch/ |
| 94 | - [x] **6.7** Remove worktree: esp32-tollgate-display/ | 101 | - [x] **6.7** Remove worktree: esp32-tollgate-display/ |
| 95 | - [x] **6.8** Clean up test binaries from git tracking: `git rm --cached` | 102 | - [x] **6.8** Clean up test binaries from git tracking: `git rm --cached` (20 binaries) |
| 96 | - [x] **6.9** Refresh backup bundles | 103 | - [x] **6.9** Refresh backup bundles |
| 97 | - [x] **6.10** Push to orangesync + origin | 104 | - [x] **6.10** Push to orangesync + origin |
| 98 | 105 | ||
| 99 | ## Phase 7: Update esp-miner (optional, after consolidation) | 106 | ## Phase 7: Update esp-miner (optional, after Phase 4) |
| 100 | 107 | ||
| 101 | - [ ] **7.1** Switch esp-miner from flat-file modules to tollgate_core via Component Manager | 108 | - [ ] **7.1** Switch esp-miner from flat-file modules to tollgate_core via Component Manager |
| 102 | - [ ] **7.2** Create main/idf_component.yml with git dependency on esp32-tollgate | 109 | - [ ] **7.2** Create main/idf_component.yml with git dependency on esp32-tollgate |
| @@ -107,44 +114,68 @@ Move module logic from main/ into components/tollgate_core/, making main/ a thin | |||
| 107 | 114 | ||
| 108 | --- | 115 | --- |
| 109 | 116 | ||
| 110 | ## Current State Summary | 117 | ## Current State |
| 111 | 118 | ||
| 112 | ### Repos | 119 | ### Repos |
| 113 | 120 | ||
| 114 | | Repo | Path | Branch | HEAD | Status | | 121 | | Repo | Path | Branch | HEAD | Status | |
| 115 | |------|------|--------|------|--------| | 122 | |------|------|--------|------|--------| |
| 116 | | esp32-tollgate | /home/c03rad0r/esp32-tollgate | master | 897a8d9 | Canonical source | | 123 | | esp32-tollgate | /home/c03rad0r/esp32-tollgate | master | 32e1bfd | **Consolidated** — build + tests pass | |
| 117 | | esp-miner-nerdqaxeplus | /home/c03rad0r/esp-miner-nerdqaxeplus | develop | 588c9f67 | Consumer | | 124 | | esp-miner-nerdqaxeplus | /home/c03rad0r/esp-miner-nerdqaxeplus | develop | 588c9f67 | Consumer — broken symlink needs fix | |
| 118 | | esp-miner | /home/c03rad0r/esp-miner | master | a8dc494 | Consumer (Phase 1 done) | | 125 | | esp-miner | /home/c03rad0r/esp-miner | master | a8dc494 | Consumer — Phase 1 flat-file done | |
| 119 | 126 | ||
| 120 | ### Branches (esp32-tollgate) | 127 | ### esp32-tollgate: Clean |
| 121 | 128 | ||
| 122 | | Branch | Worktree | Merged? | Unique Content | Action | | 129 | - **1 branch** (master), **0 worktrees**, **0 stashes** |
| 123 | |--------|----------|---------|----------------|--------| | 130 | - **Build**: `idf.py build` — PASS (2.9MB firmware) |
| 124 | | master | esp32-tollgate | — | Current production code | Keep | | 131 | - **Unit tests**: `make test-unit` — 18/18 suites, 400+ assertions, all PASS |
| 125 | | feature/display-fix | esp32-tollgate-display | NO | touch.c/h, keyboard.c/h, wifi_setup.c/h, 4 unit tests, E2E test, WiFi QR, error state | Merge (Phase 2) | | 132 | - **Pushed to**: orangesync (git.orangesync.tech) + origin (relay.ngit.dev) |
| 126 | | feature/miner-integration | esp32-miner-integration | PARTIAL | Full tollgate_core (mining+stratum+extern C+22 callbacks), docs | Merge (Phase 3) | | 133 | |
| 127 | | feature/tollgate-core-component | esp32-tollgate-arch | YES (be4788b) | None — superseded by miner-integration | Delete (Phase 6) | | 134 | ### Modules in main/ vs tollgate_core |
| 128 | | backup/multi-mint-support-pre-rebase | (none) | YES | None | Delete (Phase 6) | | 135 | |
| 129 | 136 | | main/ module | tollgate_core equivalent | Duplicated? | | |
| 130 | ### Stashes (esp32-tollgate) | 137 | |-------------|------------------------|-------------| |
| 131 | 138 | | cashu.c/h | tollgate_core_cashu.c/h | Yes — both exist | | |
| 132 | | Stash | Content | Action | | 139 | | dns_server.c/h | tollgate_core_dns.c/h | Yes | |
| 133 | |-------|---------|--------| | 140 | | firewall.c/h | tollgate_core_firewall.c/h | Yes | |
| 134 | | stash@{0} | Recompiled test binaries (no source changes) | Drop | | 141 | | session.c/h | tollgate_core_session.c/h | Yes | |
| 135 | | stash@{1} | AP-only services, market config wiring, sta_connecting guard | Apply (Phase 1) | | 142 | | mining_payment.c/h | tollgate_core_mining.c/h | Yes | |
| 136 | | stash@{2} | Recompiled test binaries (no source changes) | Drop | | 143 | | stratum_proxy.c/h | tollgate_core_stratum_proxy.c/h | Yes | |
| 137 | | stash@{3} | Recompiled test binaries (no source changes) | Drop | | 144 | | config.c/h | — | No (unique to esp32-tollgate) | |
| 138 | 145 | | identity.c/h | — | No | | |
| 139 | ### Tollgate Core Divergence | 146 | | display.c/h | — | No | |
| 140 | 147 | | touch.c/h | — | No (new from display-fix) | | |
| 141 | | File | Master (old skeleton) | Miner-integration (full) | | 148 | | keyboard.c/h | — | No (new from display-fix) | |
| 142 | |------|----------------------|--------------------------| | 149 | | wifi_setup.c/h | — | No (new from display-fix) | |
| 143 | | tollgate_core.h | 34 lines, no extern C, no mining API | 48 lines, extern C, 5 mining functions | | 150 | | captive_portal.c/h | — | No | |
| 144 | | tollgate_platform.h | 17 lines, 7 callbacks | 37 lines, extern C, 22 callbacks | | 151 | | tollgate_api.c/h | — | No | |
| 145 | | CMakeLists.txt | 9 source files (no mining/stratum) | 11 source files (mining+stratum) | | 152 | | tollgate_client.c/h | — | No | |
| 146 | | tollgate_core_firewall.c | unconditional NAPT | conditional CONFIG_LWIP_IPV4_NAPT | | 153 | | cvm_server.c/h | — | No | |
| 147 | | tollgate_core_mining.c | MISSING | Present (168 lines) | | 154 | | local_relay.c/h | — | No | |
| 148 | | tollgate_core_mining.h | MISSING | Present (35 lines) | | 155 | | wifistr.c/h | — | No | |
| 149 | | tollgate_core_stratum_proxy.c | MISSING | Present (160 lines) | | 156 | | beacon_price.c/h | — | No | |
| 150 | | tollgate_core_stratum_proxy.h | MISSING | Present (39 lines) | | 157 | | market.c/h | — | No | |
| 158 | | mint_health.c/h | — | No | | ||
| 159 | | lightning_payout.c/h | — | No | | ||
| 160 | | mcp_handler.c/h | — | No | | ||
| 161 | | nostr_event.c/h | — | No | | ||
| 162 | | geohash.c/h | — | No | | ||
| 163 | | lnurl_pay.c/h | — | No | | ||
| 164 | | nip04.c/h | — | No | | ||
| 165 | | font.c/h | — | No | | ||
| 166 | | negentropy_adapter.c | — | No | | ||
| 167 | | stratum_client.c/h | — | No | | ||
| 168 | | sw_miner.c/h | — | No | | ||
| 169 | | asic_miner.c/h | — | No | | ||
| 170 | | relay_selector.c/h | — | No | | ||
| 171 | | sync_manager.c/h | — | No | | ||
| 172 | |||
| 173 | ### Known Issues | ||
| 174 | |||
| 175 | 1. **NerdQAxePlus broken symlink** — `esp-miner-nerdqaxeplus/components/tollgate_core` points to | ||
| 176 | removed worktree `esp32-miner-integration`. Needs Phase 5 fix. | ||
| 177 | 2. **esp-miner flat-file duplication** — has its own copy of cashu/dns/firewall/session in main/, | ||
| 178 | independent from tollgate_core. Needs Phase 7 to consolidate. | ||
| 179 | 3. **tollgate_core not yet used by main/** — main/ still calls its own modules directly. | ||
| 180 | tollgate_core exists as a component but is only linked, not called (except by tollgate_platform.c). | ||
| 181 | Phase 4 would make main/ delegate to tollgate_core. | ||