Integrate BACKBEAT SDK and resolve KACHING license validation

Major integrations and fixes:
- Added BACKBEAT SDK integration for P2P operation timing
- Implemented beat-aware status tracking for distributed operations
- Added Docker secrets support for secure license management
- Resolved KACHING license validation via HTTPS/TLS
- Updated docker-compose configuration for clean stack deployment
- Disabled rollback policies to prevent deployment failures
- Added license credential storage (CHORUS-DEV-MULTI-001)

Technical improvements:
- BACKBEAT P2P operation tracking with phase management
- Enhanced configuration system with file-based secrets
- Improved error handling for license validation
- Clean separation of KACHING and CHORUS deployment stacks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
anthonyrawlins
2025-09-06 07:56:26 +10:00
parent 543ab216f9
commit 9bdcbe0447
4730 changed files with 1480093 additions and 1916 deletions

View File

@@ -17,7 +17,7 @@ import (
"crypto/sha256"
)
// LibP2PDHT provides distributed hash table functionality for BZZZ peer discovery
// LibP2PDHT provides distributed hash table functionality for CHORUS peer discovery
type LibP2PDHT struct {
host host.Host
kdht *dht.IpfsDHT
@@ -42,7 +42,7 @@ type Config struct {
// Bootstrap nodes for initial DHT discovery
BootstrapPeers []multiaddr.Multiaddr
// Protocol prefix for BZZZ DHT
// Protocol prefix for CHORUS DHT
ProtocolPrefix string
// Bootstrap timeout
@@ -71,7 +71,7 @@ type PeerInfo struct {
// DefaultConfig returns a default DHT configuration
func DefaultConfig() *Config {
return &Config{
ProtocolPrefix: "/bzzz",
ProtocolPrefix: "/CHORUS",
BootstrapTimeout: 30 * time.Second,
DiscoveryInterval: 60 * time.Second,
Mode: dht.ModeAuto,
@@ -373,7 +373,7 @@ func (d *LibP2PDHT) FindPeersByRole(ctx context.Context, role string) ([]*PeerIn
d.peersMutex.RUnlock()
// Also search DHT for role-based keys
roleKey := fmt.Sprintf("bzzz:role:%s", role)
roleKey := fmt.Sprintf("CHORUS:role:%s", role)
providers, err := d.FindProviders(ctx, roleKey, 10)
if err != nil {
// Return local peers even if DHT search fails
@@ -408,13 +408,13 @@ func (d *LibP2PDHT) FindPeersByRole(ctx context.Context, role string) ([]*PeerIn
// AnnounceRole announces this peer's role to the DHT
func (d *LibP2PDHT) AnnounceRole(ctx context.Context, role string) error {
roleKey := fmt.Sprintf("bzzz:role:%s", role)
roleKey := fmt.Sprintf("CHORUS:role:%s", role)
return d.Provide(ctx, roleKey)
}
// AnnounceCapability announces a capability to the DHT
func (d *LibP2PDHT) AnnounceCapability(ctx context.Context, capability string) error {
capKey := fmt.Sprintf("bzzz:capability:%s", capability)
capKey := fmt.Sprintf("CHORUS:capability:%s", capability)
return d.Provide(ctx, capKey)
}
@@ -474,8 +474,8 @@ func (d *LibP2PDHT) performDiscovery() {
ctx, cancel := context.WithTimeout(d.ctx, 30*time.Second)
defer cancel()
// Look for general BZZZ peers
providers, err := d.FindProviders(ctx, "bzzz:peer", 10)
// Look for general CHORUS peers
providers, err := d.FindProviders(ctx, "CHORUS:peer", 10)
if err != nil {
return
}