upleb.uk

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

summaryrefslogtreecommitdiff
path: root/MINING_WORKTREE_PLAN.md
diff options
context:
space:
mode:
Diffstat (limited to 'MINING_WORKTREE_PLAN.md')
-rw-r--r--MINING_WORKTREE_PLAN.md56
1 files changed, 26 insertions, 30 deletions
diff --git a/MINING_WORKTREE_PLAN.md b/MINING_WORKTREE_PLAN.md
index 815e657..0fe50ad 100644
--- a/MINING_WORKTREE_PLAN.md
+++ b/MINING_WORKTREE_PLAN.md
@@ -3,15 +3,13 @@
3## Overview 3## Overview
4Implement Bitcoin mining-for-bandwidth in a proper git worktree so the shared `esp32-tollgate` repo stays clean for other LLM sessions. 4Implement Bitcoin mining-for-bandwidth in a proper git worktree so the shared `esp32-tollgate` repo stays clean for other LLM sessions.
5 5
6## Worktree Location 6## Status: COMPLETED — Squash-merged into master
7- **Shared repo:** `/home/c03rad0r/esp32-tollgate` (stays on `master`, always clean)
8- **Mining worktree:** `/home/c03rad0r/esp32-tollgate-mining` (on `feature/mining-payment` branch)
9 7
10## Checklist 8## Checklist
11 9
12### Phase 1: Cleanup & Setup 10### Phase 1: Cleanup & Setup
13- [x] 1.1 Backup all mining files to `/home/c03rad0r/mining-work-backup/` 11- [x] 1.1 Backup all mining files to `/home/c03rad0r/mining-work-backup/`
14- [x] 1.2 Restore shared repo to clean master (discard edits, remove untracked, delete accidental branches) 12- [x] 1.2 Restore shared repo to clean master
15- [x] 1.3 Create `feature/mining-payment` branch from master 13- [x] 1.3 Create `feature/mining-payment` branch from master
16- [x] 1.4 Create git worktree at `/home/c03rad0r/esp32-tollgate-mining` 14- [x] 1.4 Create git worktree at `/home/c03rad0r/esp32-tollgate-mining`
17- [x] 1.5 Copy backup files into worktree 15- [x] 1.5 Copy backup files into worktree
@@ -30,43 +28,41 @@ Implement Bitcoin mining-for-bandwidth in a proper git worktree so the shared `e
30- [x] 2.10 Edit `main/tollgate_client.h` — `TG_CLIENT_MINING` state + mining discovery fields 28- [x] 2.10 Edit `main/tollgate_client.h` — `TG_CLIENT_MINING` state + mining discovery fields
31- [x] 2.11 Edit `main/tollgate_client.c` — mining tag parsing in discovery 29- [x] 2.11 Edit `main/tollgate_client.c` — mining tag parsing in discovery
32- [x] 2.12 Edit `main/captive_portal.c` — tabbed UI with Cashu/Mine tabs 30- [x] 2.12 Edit `main/captive_portal.c` — tabbed UI with Cashu/Mine tabs
33- [x] 2.13 N/A — esp-miner not in worktree (not needed as component)
34 31
35### Phase 3: Build & Test (in worktree) 32### Phase 3: Build & Test (in worktree)
36- [x] 3.1 Clean build from scratch (`rm -rf build && idf.py build`) 33- [x] 3.1 Clean build from scratch
37 - Note: Pre-existing nucula_lib build error (`save_proofs()` is private) blocks full link
38 - All mining-specific source files passed compilation
39 - nucula_lib error exists in both main repo and worktree (not caused by mining changes)
40- [x] 3.2 Run existing unit tests (`make test-unit`) 34- [x] 3.2 Run existing unit tests (`make test-unit`)
41- [x] 3.3 All tests pass (84/84: 61 existing + 23 new mining_payment) 35- [x] 3.3 All tests pass
42 36
43### Phase 4: Missing Unit Tests 37### Phase 4: Missing Unit Tests
44- [ ] 4.1 `test_stratum_proxy.c` — job management, stats 38- [x] 4.1 `test_stratum_proxy.c` — job management, stats
45- [ ] 4.2 `test_session_payment_method.c` — payment_method field 39- [x] 4.2 `test_session_payment_method.c` — payment_method field
46- [ ] 4.3 `test_tollgate_client_mining.c` — mining discovery tag parsing 40- [x] 4.3 `test_tollgate_client_mining.c` — mining discovery tag parsing
47- [ ] 4.4 `test_firewall_sandbox.c` — sandbox allowlist logic 41- [x] 4.4 `test_firewall_sandbox.c` — sandbox allowlist logic
48- [ ] 4.5 All new tests pass 42- [x] 4.5 All new tests pass
49 43
50### Phase 5: Commit 44### Phase 5: Commit
51- [x] 5.1 Stage all changes in worktree (2 commits made) 45- [x] 5.1 Stage all changes in worktree (5 commits made)
52- [x] 5.2 Commit with descriptive messages 46- [x] 5.2 Commit with descriptive messages
53- [ ] 5.3 Push branch to origin (Nostr git relay issue branch exists locally) 47- [x] 5.3 Push branch to origin (state event published to relay.ngit.dev)
54 48
55### Phase 6: Merge (when ready) 49### Phase 6: Merge
56- [ ] 6.1 Squash-merge `feature/mining-payment` into `master` 50- [x] 6.1 Squash-merge `feature/mining-payment` into `master` (resolved merge conflicts)
57- [ ] 6.2 Remove worktree 51- [x] 6.2 Remove worktree
58- [ ] 6.3 Push master 52- [x] 6.3 Push master to origin
53- [x] 6.4 Delete feature branch
54- [x] 6.5 All 19 unit test suites pass on master
59 55
60## Commits Made 56## Commits on feature/mining-payment (before squash)
611. `c75230e` — feat(mining): add new mining source files and unit tests 571. `c75230e` — feat(mining): add new mining source files and unit tests
622. `beb73a2` — feat(mining): integrate mining subsystem into existing modules 582. `beb73a2` — feat(mining): integrate mining subsystem into existing modules
593. `473b4d1` — fix: build errors in cvm_server, stratum_proxy, sw_miner + nucula visibility
604. `ef9ae98` — test: add 4 new unit test suites for mining modules
615. `9d98ba1` — feat: expand nostr relay lists to max capacity
63 62
64## Known Issues (pre-existing) 63## Squash commit on master
65- `nucula_lib/nucula_wallet.cpp` calls private `save_proofs()`build error in both repos 64- `e366ceb` — feat(mining): Bitcoin mining-for-bandwidth payment system
66- Nostr git relay (`relay.ngit.dev`) rejected push branch exists locally only 65- `55917e0` — fix: resolve merge conflicts + test build fixes
67 66
68## Rules 67## Backup
69- **NEVER** edit files in `/home/c03rad0r/esp32-tollgate/` directly 68- `/home/c03rad0r/mining-work-backup/feature-mining-payment.bundle` — full branch history
70- **ALL** work happens in `/home/c03rad0r/esp32-tollgate-mining/`
71- **Commit frequently** — don't lose work again
72- No comments in code unless explicitly requested