From 6d6db305578e51ee57e8fb3b77105371647d4206 Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 18 Feb 2026 10:55:18 +0000 Subject: [PATCH 1/3] Clean up PDP tracker integration wording --- cmd/run/pdptracker.go | 5 +---- service/pdptracker/pdptracker.go | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/cmd/run/pdptracker.go b/cmd/run/pdptracker.go index 8169e26f..ee9fa9d4 100644 --- a/cmd/run/pdptracker.go +++ b/cmd/run/pdptracker.go @@ -19,10 +19,7 @@ where data is verified through cryptographic challenges. This tracker: - Monitors proof sets for tracked wallets - Updates deal status based on on-chain proof set state -- Tracks challenge epochs and live status - -Note: Full functionality requires the go-synapse library integration. -See: https://github.com/data-preservation-programs/go-synapse`, +- Tracks challenge epochs and live status`, Flags: []cli.Flag{ &cli.DurationFlag{ Name: "interval", diff --git a/service/pdptracker/pdptracker.go b/service/pdptracker/pdptracker.go index 1222056d..483d9792 100644 --- a/service/pdptracker/pdptracker.go +++ b/service/pdptracker/pdptracker.go @@ -4,8 +4,6 @@ // PDP deals use proof sets managed through the PDPVerifier contract, where data is verified // through cryptographic challenges rather than the traditional sector sealing process. // -// Note: This package requires the go-synapse library for full functionality. -// See: https://github.com/data-preservation-programs/go-synapse package pdptracker import ( @@ -44,7 +42,6 @@ type ProofSetInfo struct { } // PDPClient is the interface for interacting with PDP on-chain state. -// This will be implemented using the go-synapse library once it's available. type PDPClient interface { // GetProofSetsForClient returns all proof sets associated with a client address GetProofSetsForClient(ctx context.Context, clientAddress address.Address) ([]ProofSetInfo, error) @@ -78,7 +75,7 @@ type PDPTracker struct { // - db: Database connection for storing deal information // - interval: How often to check for updates // - rpcURL: Filecoin RPC endpoint URL -// - pdpClient: Client for interacting with PDP contracts (can be nil for stub mode) +// - pdpClient: Client for interacting with PDP contracts (can be nil to disable tracking) // - once: If true, run only once instead of continuously func NewPDPTracker( db *gorm.DB, @@ -104,7 +101,7 @@ func (*PDPTracker) Name() string { // Start begins the PDP tracker service. func (p *PDPTracker) Start(ctx context.Context, exitErr chan<- error) error { if p.pdpClient == nil { - Logger.Warn("PDP client not configured - PDP tracking will be disabled until go-synapse is integrated") + Logger.Warn("PDP client not configured - PDP tracking disabled") if exitErr != nil { exitErr <- nil } From 5c4a46504406e9f2d744bf1138807acd1777e3bf Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 18 Feb 2026 10:55:45 +0000 Subject: [PATCH 2/3] Require eth-rpc for pdp-tracker --- cmd/run/pdptracker.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/run/pdptracker.go b/cmd/run/pdptracker.go index ee9fa9d4..c2055595 100644 --- a/cmd/run/pdptracker.go +++ b/cmd/run/pdptracker.go @@ -1,6 +1,7 @@ package run import ( + "fmt" "time" "github.com/data-preservation-programs/singularity/database" @@ -30,16 +31,22 @@ This tracker: Name: "eth-rpc", Usage: "Ethereum RPC endpoint for FEVM (e.g., https://api.node.glif.io)", EnvVars: []string{"ETH_RPC_URL"}, + Required: true, }, }, Action: func(c *cli.Context) error { + rpcURL := c.String("eth-rpc") + if rpcURL == "" { + return fmt.Errorf("eth-rpc is required") + } + db, closer, err := database.OpenFromCLI(c) if err != nil { return err } defer closer.Close() - pdpClient, err := pdptracker.NewPDPClient(c.Context, c.String("eth-rpc")) + pdpClient, err := pdptracker.NewPDPClient(c.Context, rpcURL) if err != nil { return err } @@ -48,7 +55,7 @@ This tracker: tracker := pdptracker.NewPDPTracker( db, c.Duration("interval"), - c.String("eth-rpc"), + rpcURL, pdpClient, false, ) From f3960392e1930fe5c21ef33eafab9d2fb4750055 Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 18 Feb 2026 13:49:56 +0000 Subject: [PATCH 3/3] Remove dead PDP client nil checks --- service/pdptracker/pdptracker.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/service/pdptracker/pdptracker.go b/service/pdptracker/pdptracker.go index 483d9792..216242c9 100644 --- a/service/pdptracker/pdptracker.go +++ b/service/pdptracker/pdptracker.go @@ -100,14 +100,6 @@ func (*PDPTracker) Name() string { // Start begins the PDP tracker service. func (p *PDPTracker) Start(ctx context.Context, exitErr chan<- error) error { - if p.pdpClient == nil { - Logger.Warn("PDP client not configured - PDP tracking disabled") - if exitErr != nil { - exitErr <- nil - } - return nil - } - var regTimer *time.Timer for { alreadyRunning, err := healthcheck.Register(ctx, p.dbNoContext, p.workerID, model.PDPTracker, false) @@ -215,10 +207,6 @@ func (p *PDPTracker) cleanup(ctx context.Context) error { // runOnce performs a single cycle of PDP deal tracking. // It queries wallets, fetches their PDP proof sets, and updates deal status. func (p *PDPTracker) runOnce(ctx context.Context) error { - if p.pdpClient == nil { - return nil - } - db := p.dbNoContext.WithContext(ctx) // Get all wallets to track