Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
359 commits
Select commit Hold shift + click to select a range
f06832e
fix: input validation in RPC handlers — int() crashes, SCID format check
santyr Feb 13, 2026
c375442
fix: wrap bulk save methods in transactions to prevent data loss
santyr Feb 13, 2026
2521538
fix: settlement gaming crash, marker double-decay, missing expires_at…
santyr Feb 13, 2026
427e0cd
fix: MCP server or-falsy on fee fields could violate zero-fee invariant
santyr Feb 13, 2026
9b9ee42
fix: update test expectations to match relaxed health tier boundaries
santyr Feb 13, 2026
35cc01a
feat: add revenue_fee_anchor MCP tool for advisor fee anchors
santyr Feb 14, 2026
859d764
docs: DID + L402 remote fleet management design proposal
santyr Feb 14, 2026
19d9baa
docs: DID Reputation Schema spec + reference from L402 fleet management
santyr Feb 14, 2026
c7903e7
docs: comprehensive task taxonomy and danger scoring for fleet manage…
santyr Feb 14, 2026
d409dcf
docs: DID + Cashu task escrow protocol spec
santyr Feb 14, 2026
79cffbd
docs: DID Hive Settlements spec — trustless multi-operator fleet econ…
santyr Feb 14, 2026
7f96280
docs: audit fixes — all specs hardened through iterative review
santyr Feb 14, 2026
961d4f3
docs: implement remaining audit suggestions across all specs
santyr Feb 14, 2026
ec81a65
docs: reference canonical Archon reputation schemas (archetech/schemas)
santyr Feb 14, 2026
caf3013
docs: DID Hive Marketplace spec — service advertising, discovery, and…
santyr Feb 14, 2026
c1bd571
docs: marketplace spec hardened through iterative audit
santyr Feb 14, 2026
c2d5d1c
docs: DID Hive Client spec + public marketplace extension
santyr Feb 14, 2026
75bafbc
docs: DID abstraction, payment flexibility, Archon tiers — all specs …
santyr Feb 14, 2026
d3ace74
docs: DID abstraction layer + payment flexibility (Bolt11/Bolt12/L402…
santyr Feb 14, 2026
b82dbdf
docs: DID Hive Liquidity spec — liquidity-as-a-service marketplace
santyr Feb 14, 2026
a34f84a
docs: unified client architecture + Nostr-first marketplace for liqui…
santyr Feb 14, 2026
c5f54e6
docs: ecosystem propagation dynamics + DID-NOSTR-MARKETPLACE.md forwa…
santyr Feb 14, 2026
5accf93
docs: NIP-15/NIP-99 compatibility for Nostr liquidity marketplace
santyr Feb 14, 2026
2cb023a
docs: DID Nostr Marketplace spec — unified Nostr integration for advi…
santyr Feb 15, 2026
87f9890
Update specs for cl-hive plugin architecture
santyr Feb 15, 2026
0385b60
Add backup/recovery section to Client spec (6 scenarios, Shamir thres…
santyr Feb 15, 2026
864558d
Remove audit report artifacts
santyr Feb 15, 2026
7a982cd
docs: standalone plugin design docs (cl-hive-comms, cl-hive-archon, c…
santyr Feb 15, 2026
f80cfc9
feat: Hex-as-advisor — OpenClaw cron replaces Claude Code advisor runs
santyr Feb 15, 2026
671ed81
mcf: slow fee optimization cycle to 30 minutes
santyr Feb 15, 2026
966730b
mcp-hive-server: record failed revenue_rebalance attempts for learning
santyr Feb 15, 2026
e6d5961
mcp-hive-server: default ADVISOR_DB_PATH to production advisor.db whe…
santyr Feb 15, 2026
9d587ee
mcp-hive-server: treat structured error results from revenue-rebalanc…
santyr Feb 15, 2026
8e43629
mcp-hive-server: auto-clear stale sling job locks and retry market re…
santyr Feb 15, 2026
e96b75a
mcp-hive-server: add askrene constraints/reservations MCP tools
santyr Feb 15, 2026
6f2a54a
advisor.db: add maintenance script (retention + WAL checkpoint)
santyr Feb 15, 2026
b1c0aba
mcp-hive-server: include sling-stats verification in revenue_rebalanc…
santyr Feb 15, 2026
2d9df3e
physarum: fix unbound now in execute_physarum_cycle
santyr Feb 15, 2026
41ff930
Route Boltz MCP tools via revenue-ops
santyr Feb 16, 2026
42e68d7
audit: enforce hive RPC wrappers
santyr Feb 16, 2026
a7d02dc
feat: add boltz loop-in MCP tool
santyr Feb 16, 2026
b85eb3d
audit: enforce hive RPC wrappers for sling/askrene/setchannel, fix ru…
santyr Feb 16, 2026
99835e6
feat: EV-based opportunity scoring, learning engine fixes, revenue pr…
santyr Feb 16, 2026
4892db7
feat: RPC connection pool + lightweight health endpoint
santyr Feb 16, 2026
ad551a7
fix: defer RPC pool proxy install until after init completes
santyr Feb 16, 2026
72aeea9
fix: guard plugin.run() for spawn workers, fix bridge socket resolution
santyr Feb 17, 2026
b0c7746
fix: use rpc.call() in pool workers to bypass method signature mismatch
santyr Feb 17, 2026
7ea8366
fix: RPC pool worker dispatch — use getattr with TypeError fallback
santyr Feb 17, 2026
7c1a955
fix: auto-backfill routing intelligence when data is stale (>24h)
santyr Feb 17, 2026
2c724ee
fix: RPC pool double-restart bug — TimeoutError caught by OSError han…
santyr Feb 17, 2026
b4d2246
audit: harden RPC pool, protocol handlers, DB bounds, and thread safety
santyr Feb 17, 2026
6271807
docs: DID ecosystem implementation plan (Phases 1-3)
santyr Feb 17, 2026
549016a
docs: DID ecosystem implementation plan (Phases 4-6)
santyr Feb 17, 2026
55a0a5a
docs: add Hive Node Provisioning spec — autonomous VPS lifecycle
santyr Feb 17, 2026
c56ed6c
docs: number and index planning documents logically
santyr Feb 17, 2026
e297969
audit: fix 40 issues in DID implementation plans
santyr Feb 17, 2026
8e62318
audit: second-pass fixes for DID implementation plans
santyr Feb 17, 2026
5853263
audit: fix 16 issues in Node Provisioning spec
santyr Feb 17, 2026
ce195fc
fix: replace IBD with assumeutxo for viable node provisioning
santyr Feb 17, 2026
12ff8e9
audit: fix 3 VPS showstoppers in Node Provisioning spec
santyr Feb 17, 2026
3c16ebf
fix: use Archon IPFS for assumeutxo snapshot hosting
santyr Feb 17, 2026
cd4c60a
feat: implement DID credential foundation (Phase 1)
santyr Feb 17, 2026
b1264c1
docs: update index and CLAUDE.md for Phase 1 DID implementation
santyr Feb 17, 2026
21b32b5
feat: implement management schemas + danger scoring (Phase 2)
santyr Feb 17, 2026
d952e05
audit: fix 16 security/correctness issues in DID Phase 1+2
santyr Feb 17, 2026
f09c6f9
fix(critical): add missing `global did_credential_mgr` in init()
santyr Feb 17, 2026
d6c6d4f
audit: fix DB layer issues — FK enforcement, revoke rowcount
santyr Feb 17, 2026
b307169
audit: fix protocol-layer issues in DID credential validation
santyr Feb 17, 2026
4618659
fix: boltz-loopout.py — 3 bugs found during first live swap
santyr Feb 17, 2026
2db953d
feat: implement Phase 3 — Credential Exchange Protocol
santyr Feb 17, 2026
0794f83
fix: boltz-loopout — use pay not xpay, fix status endpoint, strip sec…
santyr Feb 17, 2026
6b9c748
audit: fix 5 CRITICAL/HIGH issues in DID Phases 1-3
santyr Feb 17, 2026
259ee68
audit: fix NameError — safe_rpc undefined in DID/MGMT init
santyr Feb 17, 2026
b3a55f4
Phase 1-5 sync bundle (#71)
hexdaemon Feb 18, 2026
72a8bc8
Fix settlement pool accounting and distributed proposal integrity (#72)
hexdaemon Feb 18, 2026
f3c8ae7
fix(routing-pool): normalize uptime and correct snapshot capacity log…
hexdaemon Feb 18, 2026
e9ceb2b
Add planning overview and clarify Phase 6 marketplace boundaries
santyr Feb 19, 2026
135db08
docs: add docs-repo migration plan and subtree export tooling
santyr Feb 19, 2026
488f65b
docs: mark hive-docs repo migration as in progress
santyr Feb 19, 2026
d0d9ff1
feat(docker): add Boltz client v2.11.0 for submarine/reverse swaps
santyr Feb 19, 2026
ce2e0d5
docs: complete migration to hive-docs repo
santyr Feb 19, 2026
73a7231
Add full cl_revenue_ops revenue RPC parity to MCP server (#75)
hexdaemon Feb 19, 2026
3d6ab6d
feat(docker): optional Phase 6 plugin scaffolding (comms + archon) (#77)
hexdaemon Feb 20, 2026
016cfa0
feat(mcp): add boltz backup and mnemonic verify tools (#76)
hexdaemon Feb 20, 2026
40795f0
fix(docker): boltz tarball path mismatch, add PyNaCl, update plugin p…
hexdaemon Feb 20, 2026
75a6167
fix: add BatchedLogWriter to prevent IO thread starvation from write_…
hexdaemon Feb 20, 2026
a305dcc
perf(mcp): parallelize sequential RPC calls in 8 hot-path handlers
hexdaemon Feb 21, 2026
6b376bb
perf(mcp): parallelize remaining high-severity sequential RPC handlers
hexdaemon Feb 21, 2026
a508c17
perf(mcp): parallelize medium-severity sequential RPC handlers
hexdaemon Feb 21, 2026
7a57607
perf(mcp): parallelize low-severity sequential RPC handlers
hexdaemon Feb 21, 2026
11b3d3c
fix: offload forward_event and connect handlers from IO thread
hexdaemon Feb 21, 2026
18927e0
fix(settlement): critical bug fixes from audit 2026-02-23
hexdaemon Feb 23, 2026
54b31d7
fix: shutdown _msg_executor to prevent process hang on SIGTERM
hexdaemon Feb 23, 2026
7f8ec9f
fix: Docker build and runtime fixes (#79)
macterra Feb 23, 2026
43374b9
fix: add defaults to hive report/broadcast handler params
hexdaemon Feb 23, 2026
6d4a5f0
fix: audit fixes for handler defaults and shutdown ordering
hexdaemon Feb 24, 2026
e249d4d
fix: comprehensive audit fixes across 12 modules
hexdaemon Feb 24, 2026
7b97e48
fix: audit fixes for input validation, error handling, and resource l…
hexdaemon Feb 24, 2026
f034653
fix: update all managers with RPC pool proxy and fix channel map race
hexdaemon Feb 24, 2026
6d120d3
fix: splice state validation, DID revocation bypass, type coercion, f…
hexdaemon Feb 24, 2026
3a8ea47
fix: preserve fee fields when gossip replaces peer state
hexdaemon Feb 24, 2026
dd98524
Harden injected packet sender handling and shutdown logging
hexdaemon Feb 25, 2026
791200e
Remove internal Nostr transport fallback from cl-hive
hexdaemon Feb 25, 2026
a6a6de5
Retire legacy internal Nostr transport implementation
hexdaemon Feb 25, 2026
ab3047e
Clarify cl-hive-comms is optional when transport features are unused
hexdaemon Feb 25, 2026
5e5223d
Expose transport and signing capabilities in hive-status
hexdaemon Feb 25, 2026
b574ce8
Make legacy NostrTransport alias fail fast
hexdaemon Feb 25, 2026
9ea289d
Replace dual-fund opens with fundchannel batching
hexdaemon Feb 25, 2026
c6433ef
Gate optional companion features and fix listpeers proxy
hexdaemon Feb 25, 2026
64900bd
Expose revenue policy fee autoband fields in MCP
hexdaemon Feb 25, 2026
44de8c6
Update advisor prompts and PnL checkpoint for single-node fleet
hexdaemon Feb 25, 2026
7e4bb58
Expose Boltz balance planner tools in MCP
hexdaemon Feb 25, 2026
c65f5dd
Reserve unified spend budget for channel opens and splices
hexdaemon Feb 26, 2026
4563880
Improve channel deep dive lifecycle state and expose hot channel over…
hexdaemon Feb 26, 2026
edbf935
Settle unified spend reservations for opens and splices
hexdaemon Feb 26, 2026
8444d32
Expose Boltz external-pay ignore controls in MCP
hexdaemon Feb 26, 2026
8706550
Harden RPC pool and expose pool status
hexdaemon Feb 26, 2026
1e3a518
Fix settlement outbox rebroadcast telemetry and xpay edge
hexdaemon Feb 26, 2026
7f3a34c
Expire stale ready distributed settlement proposals
hexdaemon Feb 26, 2026
65373cf
Make backlog settlement reproposals safe and non-blocking
hexdaemon Feb 26, 2026
9034786
Wire Boltz daemon and cl-revenue-ops in Docker
hexdaemon Feb 26, 2026
3e0c08c
Support docker nodes with network-specific CLN dirs
hexdaemon Feb 26, 2026
2715c3e
Integrate Boltz fallback into advisor opportunity scanning
hexdaemon Feb 26, 2026
4f9ef49
Make advisor Boltz integration conditional on availability
hexdaemon Feb 26, 2026
81dd40d
Harden Docker Boltz startup across image variants
hexdaemon Feb 26, 2026
1b7d87d
Expose Boltz expansion treasury tools in MCP
hexdaemon Feb 26, 2026
01f9d64
Add filtered revenue rebalance debug support in MCP
hexdaemon Feb 26, 2026
a74c510
Expose hot-channel depletion trigger override in MCP
hexdaemon Feb 26, 2026
c8e400c
Reduce fee-gossip lock contention for settlement cost reports
hexdaemon Feb 26, 2026
07cb0ef
Fix thread safety and error handling issues from security audit
hexdaemon Feb 26, 2026
b2d57ee
Wrap intent cleanup in transaction for atomicity
hexdaemon Feb 26, 2026
9d5c6ad
Fix policy rate-limit cache eviction to use insertion order
hexdaemon Feb 26, 2026
ce37c00
Require force to remove hive members with active channels
hexdaemon Feb 26, 2026
12ce0e2
Stabilize backlog settlement proposal generation
hexdaemon Feb 26, 2026
16ea3bc
Fix 13 audit findings: broadcast tracking, quorum, welcome trust, and…
hexdaemon Feb 27, 2026
bf708cf
Fix 27 audit findings: intent TOCTOU, fee intel auth bypass, MCF pote…
hexdaemon Mar 1, 2026
6590312
Fix 43 audit findings across MCP server and production tools
hexdaemon Mar 2, 2026
33dd8d8
Fix 66 audit findings: circular rebalance params, channel close auto-…
hexdaemon Mar 2, 2026
0913031
Fix 19 audit findings: hive zero-fee guard gaps, bleeder→underwater r…
hexdaemon Mar 2, 2026
f72d634
Cap auto-execute opportunity overflow to 80 items max
hexdaemon Mar 2, 2026
f267df6
Fix fee change success detection and splice budget leak on non-dict r…
hexdaemon Mar 2, 2026
77d14eb
Fix settlement backlog infinite retry on zero-fee periods
hexdaemon Mar 3, 2026
a158b1e
Fix 4 settlement backlog bugs: expired proposal deadlock, unhandled s…
hexdaemon Mar 3, 2026
de81c3a
Fix stale hive policy on member removal and add startup cleanup
hexdaemon Mar 3, 2026
3888813
Add stale member auto-removal for nodes gone from gossip graph
hexdaemon Mar 3, 2026
62e2a57
Fix ghost member cleanup: check gossip graph not last_seen, run befor…
hexdaemon Mar 3, 2026
a4de09e
Add full member removal with state cleanup and forced gossip broadcast
hexdaemon Mar 3, 2026
f6fba1f
SECURITY: Block all outbound gossip and relay to banned/removed peers
hexdaemon Mar 3, 2026
d2d1a1b
Add missing planner_max_active_channels field to HiveConfig dataclass
hexdaemon Mar 4, 2026
55bb9c2
Add design doc: planner + advisor pipeline audit
hexdaemon Mar 4, 2026
c823e50
Add implementation plan: planner + advisor pipeline audit (6 fixes, 9…
hexdaemon Mar 4, 2026
8c364d0
feat(planner): add compute_node_summary() for accurate channel state …
hexdaemon Mar 4, 2026
e86b128
Fix planner→advisor pipeline: node_summary injection, backoff stall, …
hexdaemon Mar 4, 2026
2efc978
Add profitability gate and wire node_summary into MCP auto-evaluate
hexdaemon Mar 4, 2026
82fbe41
Add design doc: channel opener awareness systematic audit
hexdaemon Mar 4, 2026
0d0951a
Add implementation plan: channel opener awareness (7 fixes, 8 tasks)
hexdaemon Mar 4, 2026
f056c95
feat(planner): add we_opened/they_opened breakdown to compute_node_su…
hexdaemon Mar 4, 2026
4647698
feat: channel opener awareness across cl-hive (Fixes H2-H4)
hexdaemon Mar 4, 2026
b854b6e
Add Boltz integration audit design doc
hexdaemon Mar 4, 2026
58a9a80
Add Boltz integration audit implementation plan
hexdaemon Mar 4, 2026
8c79b82
Add Boltz swap approval criteria section to strategy prompts
hexdaemon Mar 4, 2026
2e01207
Add Boltz activity to gossip state for fleet-wide visibility
hexdaemon Mar 4, 2026
6da62dc
Add fleet_boltz_status MCP tool for fleet-wide Boltz activity dashboard
hexdaemon Mar 4, 2026
267888c
Wire boltz_activity through gossip storage and add fleet status RPC
hexdaemon Mar 4, 2026
3fa88c7
Accept boltz_costs_sats in hive-report-period-costs RPC
hexdaemon Mar 4, 2026
38d2d89
Change period format from YYYY-WW to YYYY-Www (ISO 8601)
hexdaemon Mar 4, 2026
ee97879
Fix nodes flagging themselves as needing onboarding
hexdaemon Mar 4, 2026
fe2461e
fix: hot-upgrade script fails with partial bind mounts (#80)
macterra Mar 5, 2026
a3a0bab
advisor: align market rebalance budget guidance to 3k sats
hexdaemon Mar 5, 2026
f293062
advisor: add persistent saturation handling and mandatory anchor cont…
hexdaemon Mar 5, 2026
aa059f6
fix: Announce onion address in tor mode and fix temp Tor cleanup (#82)
macterra Mar 6, 2026
3bf7dcc
Harden fee coordination signals and unify member broadcast delivery (…
santyr Mar 6, 2026
15b7aab
phase6: remove monolithic identity and transport code (#85)
santyr Mar 6, 2026
ea27bed
chore: add .worktrees/ to .gitignore
hexdaemon Mar 6, 2026
f9ac2ee
feat(docker): enable dual-funded channels by default
hexdaemon Mar 6, 2026
332ed82
fix: ignore stale gossip senders before graph lookup (#87)
santyr Mar 6, 2026
da8c7e4
docs: mark revenue_fee_anchor MCP tool as deprecated
hexdaemon Mar 7, 2026
6e39f5a
docs: cl-hive.py monolith decomposition design
hexdaemon Mar 8, 2026
e92f254
docs: cl-hive monolith decomposition implementation plan
hexdaemon Mar 8, 2026
431ea8c
refactor: extract plugin_options.py from cl-hive.py monolith
hexdaemon Mar 8, 2026
1c59a45
refactor: extract rpc_pool.py from cl-hive.py monolith
hexdaemon Mar 8, 2026
0d0e861
refactor: extract log_writer.py from cl-hive.py monolith
hexdaemon Mar 8, 2026
ec7a418
refactor: extract protocol_handlers.py from cl-hive.py monolith
hexdaemon Mar 8, 2026
7b07cad
refactor: extract background_loops.py from cl-hive.py monolith
hexdaemon Mar 8, 2026
29656de
fix: remove dead INTENT_ACK message type, resolve BAN handler gap
hexdaemon Mar 8, 2026
31847e6
fix: inject shutdown_event before background thread spawning
hexdaemon Mar 8, 2026
b8e5f08
fix: pass internal=true for hive policy set calls
hexdaemon Mar 8, 2026
3ad7381
refactor: remove CLBoss integration from cl-hive
hexdaemon Mar 8, 2026
12b8d8c
fix: defer background loop thread starts until after dep injection
hexdaemon Mar 8, 2026
970e928
docs: cl-hive module audit design — dead code removal and correctness…
hexdaemon Mar 8, 2026
85704e4
docs: cl-hive module audit implementation plan
hexdaemon Mar 8, 2026
bc33dc7
audit: database.py — remove 32 dead methods, efficiency fixes
hexdaemon Mar 8, 2026
cbba068
audit: protocol.py — remove dead code, clean redundant imports
hexdaemon Mar 8, 2026
9aa70fe
audit: rpc_commands.py — remove dead imports, hoist RPC call out of loop
hexdaemon Mar 8, 2026
071dd34
audit: fee_coordination.py — remove dead code, correctness fixes
hexdaemon Mar 8, 2026
e6c8df9
audit: anticipatory_liquidity.py — dead import, type fix, RPC efficiency
hexdaemon Mar 8, 2026
ad13f29
audit: settlement.py — remove dead code, hoist imports
hexdaemon Mar 8, 2026
e634ec3
audit: planner.py — hoist import, add missing stub
hexdaemon Mar 8, 2026
7f043e8
audit: strategic_positioning.py — remove dead code, correctness fixes
hexdaemon Mar 8, 2026
ffda80f
audit: cost_reduction.py — remove dead code, efficiency fixes
hexdaemon Mar 8, 2026
4aee1b7
audit: liquidity_coordinator.py — remove dead code, correctness fixes
hexdaemon Mar 8, 2026
0f677c7
audit: mcf_solver.py — fix add_node supply aggregation at capacity
hexdaemon Mar 8, 2026
3217d31
audit: channel_rationalization.py — remove dead code, correctness fixes
hexdaemon Mar 8, 2026
907d4d6
audit: fee_intelligence.py — remove dead code, correctness fixes
hexdaemon Mar 8, 2026
53eb2f5
audit: cooperative_expansion.py — correctness fixes, efficiency impro…
hexdaemon Mar 8, 2026
3ee82b0
audit: routing_intelligence.py — remove dead code, correctness fixes
hexdaemon Mar 8, 2026
a294b2d
audit: yield_metrics.py — remove dead code, correctness fixes
hexdaemon Mar 9, 2026
473f306
audit: splice_manager, state_manager, bridge — remove dead code, corr…
hexdaemon Mar 9, 2026
aa5dd4f
audit: network_metrics, routing_pool, vpn_transport — remove dead cod…
hexdaemon Mar 9, 2026
fb22be8
audit: membership, task_manager, intent_manager, peer_reputation, qua…
hexdaemon Mar 9, 2026
73f42aa
audit: 12 small modules — remove dead code, correctness fixes
hexdaemon Mar 9, 2026
bf33d03
docs: traffic intelligence design (issue #88, phases 2+3a)
hexdaemon Mar 9, 2026
1d976be
docs: traffic intelligence implementation plan (issue #88)
hexdaemon Mar 9, 2026
c5ac904
feat(traffic-intel): add fleet_traffic_intelligence table and CRUD me…
hexdaemon Mar 9, 2026
d4f3b23
feat(traffic-intel): add TRAFFIC_INTELLIGENCE_BATCH protocol functions
hexdaemon Mar 9, 2026
29c83d7
feat(traffic-intel): add TrafficIntelligenceManager core class
hexdaemon Mar 9, 2026
d19a642
feat(traffic-intel): add gossip create/handle for TRAFFIC_INTELLIGENC…
hexdaemon Mar 9, 2026
1c9a785
feat(traffic-intel): add rebalance conflict check and fleet demand fo…
hexdaemon Mar 9, 2026
8eecbd9
feat(traffic-intel): add protocol handler and broadcast loop
hexdaemon Mar 9, 2026
2d2ad40
feat(traffic-intel): add 4 RPC command implementations
hexdaemon Mar 9, 2026
de58f5a
feat(traffic-intel): wire TrafficIntelligenceManager into cl-hive.py
hexdaemon Mar 9, 2026
20b9b45
fix(traffic-intel): remove unused import, fix midnight wrap, drop dea…
hexdaemon Mar 9, 2026
c14bb32
docs: phases 3b, 3c & revenue-ops traffic intelligence design
hexdaemon Mar 9, 2026
f7a484e
docs: phases 3b, 3c & revenue-ops traffic intelligence implementation…
hexdaemon Mar 9, 2026
e0df66a
feat(traffic-intel): add traffic-aware MCF assignment scheduling (Pha…
hexdaemon Mar 9, 2026
7551795
feat(fee-coord): add size-aware fee enrichment (Phase 3c)
hexdaemon Mar 9, 2026
3d54ec3
feat: wire traffic_intel_mgr into FeeCoordinationManager
hexdaemon Mar 9, 2026
edf2279
fix(phase-3b): pass actual amount_sats, avoid double RPC, prune stale…
hexdaemon Mar 9, 2026
bad6681
chore: wire cl-revenue-ops custom config into entrypoint
hexdaemon Mar 9, 2026
5c5b401
docs: liquidity-aware proposal gate design
hexdaemon Mar 9, 2026
df4cbfa
docs: liquidity-aware gate implementation plan (3 tasks)
hexdaemon Mar 9, 2026
2f16149
feat: add get_pending_channel_open_total query for liquidity gate
hexdaemon Mar 9, 2026
2b7ab67
feat: deduct pending proposals from expansion budget gate
hexdaemon Mar 9, 2026
7934404
test: add pending_channel_open_total mock default for existing planne…
hexdaemon Mar 9, 2026
493ae92
docs: add settlement auto-pool design
hexdaemon Mar 12, 2026
0635a64
docs: add settlement auto-pool implementation plan
hexdaemon Mar 12, 2026
ed8a3c4
feat: persist routing pool settlement markers
hexdaemon Mar 12, 2026
6fd88f7
feat: add settlement bootstrap quorum diagnostics
hexdaemon Mar 12, 2026
b1c1aa6
fix: make settlement vote diagnostics thread local
hexdaemon Mar 12, 2026
b48cf63
feat: auto-settle routing pool backlog
hexdaemon Mar 12, 2026
30dde94
feat: log settlement auto-vote rejection reasons
hexdaemon Mar 12, 2026
d78b909
fix: harden settlement backlog reopening
hexdaemon Mar 12, 2026
15ba8b2
fix: refresh revenue ops integration surfaces
hexdaemon Mar 14, 2026
c4abebf
fix: route traffic intelligence through member gateway
hexdaemon Mar 14, 2026
6a06ef6
fix: ignore empty sling delete-all on first run
hexdaemon Mar 14, 2026
686d083
fix: keep sling control inside revenue ops
hexdaemon Mar 14, 2026
c4ee738
feat: expose hive egress desaturation bias
hexdaemon Mar 14, 2026
bed2427
fix: tighten hive egress bias matching
hexdaemon Mar 14, 2026
d77257d
docs: simplify operator readme
hexdaemon Mar 14, 2026
18dccfa
docs: simplify operator readme
hexdaemon Mar 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ htmlcov/
.idea/
.DS_Store

# Git worktrees
.worktrees/

# Local env files
.env
.env.*
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,42 @@

All notable changes to cl-hive will be documented in this file.

## [Unreleased]

### Fixed
- **Ban Enforcement**: Fixed ban enforcement race conditions and stigmergic marker thread safety (e94f63f)
- **Coordinated Splicing**: Fixed 6 bugs across splice_manager, splice_coordinator, and PSBT exchange (e1660c7)
- **Anticipatory Liquidity + NNLB**: Thread safety fixes, AttributeError on missing keys, key mismatch in pattern detection (4ecabac)
- **Intent Lock + MCF**: Thread safety, TOCTOU race condition, TypeError and AttributeError fixes (6423375)
- **HiveMap + Planner**: Feerate gate validation, freshness checks, defensive copies (f8f07f3)
- **MCF Coordination**: TypeError crashes, missing permission checks, encapsulation violations (64c9c0d)
- **Cooperative Rebalancing**: 10 bugs in crashes, thread safety, routing, MCF (656466e)
- **Pheromone Fee Learning**: Repaired broken loop between cl-hive and cl-revenue-ops (fb9c471)
- **State Manager**: Added capabilities field validation in state entries (d818771)
- **MCF Assignments**: Replaced private _mcf_assignments access with public API (cf37109)

## [2.2.8] - 2026-02-07

### Added
- vitality plugin v0.2.3 for automatic plugin health monitoring and restart
- Thread safety locks in 7 coordination modules (AdaptiveFeeController, StigmergicCoordinator, MyceliumDefenseSystem, TimeBasedFeeAdjuster, FeeCoordinationManager, VPNTransportManager)
- Cache bounds to prevent memory bloat (500-1000 entry limits on peer/route caches)
- Docker image version 2.2.8

### Fixed
- **Thread Safety**: Fixed race conditions in concurrent modification of shared state
- **Governance Bypass**: task_manager expansion now routes through governance engine (security)
- **Outbox Retry**: Parse/serialization errors now fail permanently instead of infinite retry
- **P0 Crashes**: Fixed AttributeError on _get_topology_snapshot() and None handling in task execution
- **P1 Logic Errors**: Fixed analyzer references, field names, method calls across 12 modules
- **P2 Edge Cases**: MCF solution validation, force_close counting, yield metric clamping

### Removed
- trustedcoin plugin (explorer-only Bitcoin backend no longer needed)

### Changed
- Updated .env.example documentation to reflect vitality instead of trustedcoin

## [1.9.0] - 2026-01-24

### Added
Expand Down
120 changes: 93 additions & 27 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Core Lightning
- **cl-revenue-ops**: Executes fee policies and rebalancing (called via RPC)
- **Core Lightning**: Underlying node operations and HSM-based crypto

### Module Organization
### Module Organization (41 modules)

| Module | Purpose |
|--------|---------|
Expand All @@ -51,17 +51,40 @@ Core Lightning
| `gossip.py` | Threshold-based gossip (10% capacity change) with 5-min heartbeat |
| `intent_manager.py` | Intent Lock protocol - Announce-Wait-Commit with lexicographic tie-breaker |
| `bridge.py` | Circuit Breaker pattern for cl-revenue-ops integration |
| `clboss_bridge.py` | Optional CLBoss integration for saturation control |
| `membership.py` | Three-tier system: Admin → Member → Neophyte with vouch-based promotion |
| `contribution.py` | Forwarding stats and anti-leech detection |
| `planner.py` | Topology optimization - saturation analysis, expansion election, feerate gate |
| `splice_manager.py` | Coordinated splice operations between hive members (Phase 11) |
| `splice_coordinator.py` | High-level splice coordination and recommendation engine |
| `mcf_solver.py` | Min-Cost Max-Flow solver for global fleet rebalance optimization |
| `liquidity_coordinator.py` | Liquidity needs aggregation and rebalance assignment distribution |
| `cost_reduction.py` | Fleet rebalance routing with MCF/BFS fallback |
| `anticipatory_manager.py` | Kalman-filtered flow prediction, intra-day pattern detection |
| `anticipatory_liquidity.py` | Kalman-filtered flow prediction, intra-day pattern detection |
| `fee_coordination.py` | Pheromone-based fee coordination + stigmergic markers |
| `fee_intelligence.py` | Fee intelligence aggregation and sharing across fleet |
| `cooperative_expansion.py` | Fleet-wide expansion election protocol (Nominate→Elect→Open) |
| `budget_manager.py` | Autonomous/failsafe mode budget tracking and enforcement |
| `idempotency.py` | Message deduplication via event ID tracking |
| `outbox.py` | Reliable message delivery with retry and exponential backoff |
| `routing_intelligence.py` | Routing path intelligence sharing across fleet |
| `routing_pool.py` | Routing pool management for fee distribution |
| `settlement.py` | BOLT12 settlement system - proposal/vote/execute consensus |
| `health_aggregator.py` | Fleet health scoring and NNLB status |
| `network_metrics.py` | Network-level metrics collection |
| `peer_reputation.py` | Peer reputation tracking and scoring |
| `quality_scorer.py` | Peer quality scoring for membership decisions |
| `relay.py` | Message relay logic for multi-hop fleet communication |
| `rpc_commands.py` | RPC command handlers for all hive-* commands |
| `channel_rationalization.py` | Channel optimization recommendations |
| `strategic_positioning.py` | Strategic network positioning analysis |
| `task_manager.py` | Background task coordination and scheduling |
| `vpn_transport.py` | VPN transport layer (WireGuard integration) |
| `yield_metrics.py` | Yield tracking and optimization metrics |
| `governance.py` | Decision engine (advisor/failsafe mode routing) |
| `config.py` | Hot-reloadable configuration with snapshot pattern |
| `database.py` | SQLite with WAL mode, thread-local connections |
| `did_credentials.py` | DID credential issuance, verification, reputation aggregation (Phase 16) |
| `management_schemas.py` | 15 management schema categories, danger scoring, credential lifecycle (Phase 2) |
| `database.py` | SQLite with WAL mode, thread-local connections, 50 tables |

### Key Patterns

Expand All @@ -87,14 +110,25 @@ Core Lightning
- "Peek & Check" pattern in custommsg hook
- JSON payload, max 65535 bytes per message

**Idempotent Delivery**:
- All protocol messages carry unique event IDs
- `proto_events` table tracks processed events
- `proto_outbox` table enables reliable retry with exponential backoff

**Relay Protocol**:
- Multi-hop message relay for peers not directly connected
- Relay logic in `relay.py` with TTL-based loop prevention

### Governance Modes

| Mode | Behavior |
|------|----------|
| `advisor` | **Primary mode** - Queue to pending_actions for AI/human approval via MCP server |
| `failsafe` | Emergency mode - Auto-execute only critical safety actions (bans) within strict limits |

### Database Tables
### Database Tables (50 tables)

Key tables (see `database.py` for complete schema):

| Table | Purpose |
|-------|---------|
Expand All @@ -103,10 +137,29 @@ Core Lightning
| `hive_state` | Key-value store for persistent state |
| `contribution_ledger` | Forwarding contribution tracking |
| `hive_bans` | Ban proposals and votes |
| `promotion_requests` | Pending promotion requests |
| `ban_proposals` / `ban_votes` | Distributed ban voting |
| `promotion_requests` / `promotion_vouches` | Promotion workflow |
| `hive_planner_log` | Planner decision audit log |
| `pending_actions` | Actions awaiting approval (advisor mode) |
| `splice_sessions` | Active and historical splice operations (Phase 11) |
| `splice_sessions` | Active and historical splice operations |
| `peer_fee_profiles` | Fee profiles shared by fleet members |
| `fee_intelligence` | Aggregated fee intelligence data |
| `fee_reports` | Fee earnings for settlement calculations |
| `liquidity_needs` / `member_liquidity_state` | Liquidity coordination |
| `pool_contributions` / `pool_revenue` / `pool_distributions` | Routing pool management |
| `settlement_proposals` / `settlement_ready_votes` / `settlement_executions` | BOLT12 settlement |
| `flow_samples` / `temporal_patterns` | Anticipatory liquidity data |
| `peer_reputation` | Peer reputation scores |
| `member_health` | Fleet member health tracking |
| `budget_tracking` / `budget_holds` | Budget enforcement |
| `proto_events` | Processed event IDs for idempotency |
| `proto_outbox` | Reliable message delivery outbox |
| `peer_presence` | Peer online/offline tracking |
| `peer_capabilities` | Peer protocol capabilities |
| `did_credentials` | DID reputation credentials (issued and received) |
| `did_reputation_cache` | Cached aggregated reputation scores |
| `management_credentials` | Management credentials (operator → agent permission) |
| `management_receipts` | Signed receipts of management action executions |

## Safety Constraints

Expand Down Expand Up @@ -140,19 +193,6 @@ The Planner proposes topology changes but cannot open channels directly:

## Optional Integrations

### CLBoss (Optional)
CLBoss is **not required** for cl-hive to function. The hive provides its own:
- **Channel opening**: Cooperative expansion with feerate gate
- **Fee management**: Delegated to cl-revenue-ops
- **Rebalancing**: Delegated to cl-revenue-ops + sling

If CLBoss IS installed, cl-hive will:
- Detect it automatically via plugin list
- Use `clboss-unmanage` to prevent redundant channel opens to saturated targets
- Coordinate via the "Gateway Pattern" to avoid conflicts

To run without CLBoss: Simply don't install it. No configuration needed.

### Sling (Optional for cl-hive)
Sling rebalancer is optional for cl-hive. cl-revenue-ops handles rebalancing coordination.
Note: Sling IS required for cl-revenue-ops itself.
Expand All @@ -162,7 +202,7 @@ Note: Sling IS required for cl-revenue-ops itself.
- Only external dependency: `pyln-client>=24.0`
- All crypto done via CLN HSM (signmessage/checkmessage) - no crypto libs imported
- Plugin options defined at top of `cl-hive.py` (30 configurable parameters)
- Background loops: intent_monitor_loop, membership_loop, planner_loop, gossip_loop
- Background loops (9): gossip_loop, membership_maintenance_loop, planner_loop, intent_monitor_loop, fee_intelligence_loop, settlement_loop, mcf_optimization_loop, outbox_retry_loop, did_maintenance_loop

## Testing Conventions

Expand All @@ -176,29 +216,55 @@ Note: Sling IS required for cl-revenue-ops itself.
```
cl-hive/
├── cl-hive.py # Main plugin entry point
├── modules/
├── modules/ # 41 modules
│ ├── protocol.py # Message types and encoding
│ ├── handshake.py # PKI authentication
│ ├── state_manager.py # Distributed state
│ ├── state_manager.py # Distributed state (HiveMap)
│ ├── gossip.py # Gossip protocol
│ ├── intent_manager.py # Intent locks
│ ├── bridge.py # cl-revenue-ops bridge
│ ├── clboss_bridge.py # Optional CLBoss bridge
│ ├── bridge.py # cl-revenue-ops bridge (Circuit Breaker)
│ ├── membership.py # Member management
│ ├── contribution.py # Contribution tracking
│ ├── planner.py # Topology planner
│ ├── cooperative_expansion.py # Fleet expansion elections
│ ├── splice_manager.py # Coordinated splice operations
│ ├── splice_coordinator.py # Splice coordination engine
│ ├── mcf_solver.py # Min-Cost Max-Flow solver
│ ├── liquidity_coordinator.py # Liquidity needs aggregation
│ ├── cost_reduction.py # Fleet rebalance routing
│ ├── anticipatory_liquidity.py # Kalman-filtered flow prediction
│ ├── fee_coordination.py # Pheromone-based fee coordination
│ ├── fee_intelligence.py # Fee intelligence sharing
│ ├── settlement.py # BOLT12 settlement system
│ ├── routing_intelligence.py # Routing path intelligence
│ ├── routing_pool.py # Routing pool management
│ ├── budget_manager.py # Budget tracking and enforcement
│ ├── idempotency.py # Message deduplication
│ ├── outbox.py # Reliable message delivery
│ ├── relay.py # Message relay logic
│ ├── health_aggregator.py # Fleet health scoring
│ ├── network_metrics.py # Network metrics collection
│ ├── peer_reputation.py # Peer reputation tracking
│ ├── quality_scorer.py # Peer quality scoring
│ ├── channel_rationalization.py # Channel optimization
│ ├── strategic_positioning.py # Network positioning
│ ├── yield_metrics.py # Yield tracking
│ ├── task_manager.py # Background task coordination
│ ├── vpn_transport.py # VPN transport layer
│ ├── rpc_commands.py # RPC command handlers
│ ├── governance.py # Decision engine (advisor/failsafe)
│ ├── did_credentials.py # DID credential issuance + reputation (Phase 16)
│ ├── management_schemas.py # Management schemas + danger scoring (Phase 2)
│ ├── config.py # Configuration
│ └── database.py # Database layer
│ └── database.py # Database layer (50 tables)
├── tools/
│ ├── mcp-hive-server.py # MCP server for Claude Code integration
│ ├── hive-monitor.py # Real-time monitoring daemon
│ └── ai_advisor.py # AI advisor utility
├── config/
│ ├── nodes.rest.example.json # REST API config example
│ └── nodes.docker.example.json # Docker/Polar config example
├── tests/ # Test suite
├── tests/ # 1,918 tests across 48 files
├── docs/ # Documentation
│ ├── design/ # Design documents
│ ├── planning/ # Implementation plans
Expand Down
4 changes: 2 additions & 2 deletions MOLTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ hive_reject_action # Reject a pending action
hive_set_fees # Change channel fees
revenue_set_fee # Set fee with coordination
revenue_rebalance # Trigger rebalance
revenue_policy # Set peer policies
revenue_policy # Inspect peer policies; writes need allow_write=true
```

## Example Monitoring Session
Expand Down Expand Up @@ -231,5 +231,5 @@ See `CLAUDE.md` for detailed development guidance.
## Related Documentation

- [MCP_SERVER.md](docs/MCP_SERVER.md) — Full tool reference
- [ARCHITECTURE.md](docs/ARCHITECTURE.md) — Protocol specification
- [hive-docs](https://github.com/lightning-goats/hive-docs) — Full documentation (architecture, specs, planning)
- [CLAUDE.md](CLAUDE.md) — Development guidance
Loading