Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
ed7e6d3
feat: Remote Seal
magik6k Feb 11, 2026
8652f2e
Merge origin/main into feat/remote-seal
magik6k Feb 15, 2026
b7d4bc8
make gen: run codegen after merge, fix /usr/bin/time path for Arch Linux
magik6k Feb 15, 2026
87c1ae3
fix: address errcheck lint violations in remoteseal code
magik6k Feb 15, 2026
44cf145
fix: address remaining errcheck lint in task_client_fetch.go
magik6k Feb 15, 2026
eacf6de
revert Makefile go-generate change (breaks CI gen-check)
magik6k Feb 15, 2026
80486ec
fix: match CI swagger gen output for AllocationId format
magik6k Feb 15, 2026
cf9220c
fix: pin swag version in marketgen to match CI
magik6k Feb 15, 2026
ba66150
fix: register storage before starting tasks in itest to avoid race co…
magik6k Feb 15, 2026
5b9bdf3
fix: remove rseal_provider_pipeline refs from SyntheticProofs task
magik6k Feb 15, 2026
ce439df
fix: make remote seal integration test functional
magik6k Feb 15, 2026
fb142fb
fix: enforce sector ownership checks in seal market API endpoints
magik6k Feb 15, 2026
df5671c
refactor: eliminate C1 exchange task, improve delegate and poll tasks
magik6k Feb 15, 2026
c873263
refactor: remove ticket exchange, provider computes ticket locally
magik6k Feb 15, 2026
5f36207
fix: add cascade-delete triggers for batch_sector_refs and provider p…
magik6k Feb 15, 2026
edbeb3a
perf: send C1 output as raw bytes instead of JSON
magik6k Feb 15, 2026
ed4328e
docs: add remote seal documentation with task dependency diagram
magik6k Feb 15, 2026
38fe3d4
fix: wire provider poller to SDR/TreeD/TreeRC tasks and add remote se…
magik6k Feb 15, 2026
ecbfc9c
fix: gate PoRep on after_fetch for remote sectors and remove unused t…
magik6k Feb 15, 2026
38d48bb
feat: auto-start YugabyteDB via testcontainers for integration tests
magik6k Feb 15, 2026
814bcce
fix: generate synthetic proofs for provider C1 and enable Finalize fo…
magik6k Feb 15, 2026
a74499c
fix: resolve integration test failures in remote seal happy path
magik6k Feb 15, 2026
a74b8c8
feat: add resumable downloads, provider max tasks, and configurable c…
magik6k Feb 16, 2026
2127fc5
docs: add aria2 and time to build dependency lists
magik6k Feb 16, 2026
ea371c3
chore: make gen (config docs for remote seal settings, import fix)
magik6k Feb 16, 2026
3225b76
fix: check os.Setenv error return to satisfy errcheck lint
magik6k Feb 16, 2026
9d416f8
fix: enable sealing subsystems in TestCurioHappyPath
magik6k Feb 16, 2026
11546e1
feat: migrate CI from Docker containers to testcontainers-go for Yuga…
magik6k Feb 16, 2026
059513f
fix: use -run patterns instead of file paths for itest CI targets
magik6k Feb 16, 2026
4590dcd
perf: speed up test schema migrations with colocated DB and reduced t…
magik6k Feb 16, 2026
d004f2d
feat: add Prometheus metrics for remote seal endpoints
magik6k Feb 16, 2026
558cf18
make gen
magik6k Feb 16, 2026
2140cc1
Merge remote-tracking branch 'origin/main' into feat/remote-seal
magik6k Feb 16, 2026
53668a5
test: add duplicate migration date-prefix check and fix existing coll…
magik6k Feb 16, 2026
13f8cd1
docs: add remote seal pages to Experimental Features in GitBook TOC
magik6k Feb 16, 2026
efddb4a
test: add remote seal API unit tests for auth and quota constraints
magik6k Feb 16, 2026
3e62e0d
Merge remote-tracking branch 'origin/main' into feat/remote-seal
magik6k Feb 16, 2026
61d5df4
fix: correct SQL bugs in FixRawSize task (column names and array cast…
magik6k Feb 16, 2026
badbe01
feat: overhaul remote seal UI with tabs, labels, dropdowns, and self-…
magik6k Feb 16, 2026
d33d612
feat: add allowed proof types to remote seal partners
magik6k Feb 16, 2026
5e30a63
fix: nil ticker panic on calibnet in IPNI StartPublishing
magik6k Feb 17, 2026
3e2392a
feat: add CC scheduler for single-sector SDR and remote seal delegation
magik6k Feb 17, 2026
0dfadac
fix: set task_id_sdr in rseal_client_pipeline during delegation claim
magik6k Feb 17, 2026
d7c28ac
feat: adaptive scheduling rate for RSealDelegate (1s active, 15s idle)
magik6k Feb 17, 2026
60cb8d5
feat: show task IDs with retry in remote seal client pipeline UI
magik6k Feb 17, 2026
31b7a1d
fix: add 20s retry wait to RSealDelegate to avoid rapid retries on pr…
magik6k Feb 17, 2026
f479956
fix: use allowance_total for availability check; add provider name ed…
magik6k Feb 17, 2026
9f6bdfd
feat: add ffi GPU device listing to 'curio test supra system-info'
magik6k Feb 17, 2026
3701842
Merge remote-tracking branch 'origin/main' into feat/remote-seal
magik6k Feb 17, 2026
361f80a
fix: add missing downgrade stubs for remote seal migrations
magik6k Feb 17, 2026
35e147a
fix: remove stale YugabyteDB env vars from CI (tests use testcontainers)
magik6k Feb 17, 2026
390a1cb
webui: optional sidebar color border to distinguish clusters
magik6k Feb 23, 2026
2513e30
Merge remote-tracking branch 'origin/main' into feat/remote-seal
magik6k Feb 23, 2026
3252418
supra: Remote ticket is generated local also
magik6k Feb 23, 2026
b99ef43
mod tidy
magik6k Feb 23, 2026
957e7fc
remoteseal aggregate pipeline stats
magik6k Feb 23, 2026
00c1ced
drop correct batch fkey
magik6k Feb 24, 2026
e4cb451
gen, fix itest
magik6k Feb 24, 2026
8ee13b8
fix: persist ticket_epoch/ticket_value for remote sectors in SupraSea…
magik6k Feb 24, 2026
05edcd0
no sdr pipeline until dl
magik6k Feb 25, 2026
8d6885a
make client pipeline make sense
magik6k Feb 26, 2026
79ddfc7
fix http urls, fetch overhead
magik6k Feb 26, 2026
5e3a5a9
more url joinery fixing
magik6k Feb 26, 2026
ead5fbc
fetch task: move logic to SC
magik6k Feb 26, 2026
605f2d0
fix provider data serve
magik6k Feb 26, 2026
ecc71c4
add remote_fetch.go: DownloadRemoteSealData and fetch helpers for rem…
magik6k Feb 26, 2026
e913aec
fix remote ticket get
magik6k Feb 26, 2026
5c04b6f
correct allowance limit
magik6k Feb 26, 2026
1f76699
fix: errcheck lint violations and IPv6 address parsing
magik6k Feb 28, 2026
f31f074
fix: return 404 for unknown sectors in Status endpoint
magik6k Feb 28, 2026
12a711e
Revert "fix: return 404 for unknown sectors in Status endpoint"
magik6k Feb 28, 2026
3f5e169
test: update sealmarket tests to expect 'gone' state for unknown sectors
magik6k Feb 28, 2026
d348e6a
rfin: allow missing files
magik6k Mar 1, 2026
2d5528f
fix batch ref free
magik6k Mar 1, 2026
d30c7db
fix finalize reg
magik6k Mar 1, 2026
6cefb25
rseal: download sector data to .tmp and rename on success
magik6k Mar 2, 2026
aadc64d
rseal: never fall back from aria2c to Go HTTP downloader
magik6k Mar 2, 2026
cbc425b
fetch max
magik6k Mar 2, 2026
461abb7
rseal: tune aria2c params for resilient large downloads
magik6k Mar 2, 2026
18f25e2
Merge branch 'main' into feat/remote-seal
snadrus May 8, 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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ jobs:
target: "./itests/pdp_prove_test.go"
- name: test-itest-pieces-unseal
target: "./itests/pieces_unseal_test.go"
- name: test-itest-remoteseal
target: "./itests/remoteseal_test.go"
- name: test-itest-retrievals-test
target: "./itests/retrievals_test.go"
- name: test-itest-sql-idempotent-test
Expand Down Expand Up @@ -210,6 +212,7 @@ jobs:

- name: Run tests with coverage
env:
CURIO_OPTIMAL_LIBFILCRYPTO: 0
FFI_USE_OPENCL: 1
run: |
mkdir -p coverage
Expand Down
100 changes: 91 additions & 9 deletions cmd/curio/tasks/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"github.com/filecoin-project/curio/lib/slotmgr"
"github.com/filecoin-project/curio/lib/storiface"
"github.com/filecoin-project/curio/market/libp2p"
"github.com/filecoin-project/curio/market/sealmarket"
"github.com/filecoin-project/curio/tasks/balancemgr"
"github.com/filecoin-project/curio/tasks/expmgr"
"github.com/filecoin-project/curio/tasks/f3"
Expand All @@ -51,6 +52,7 @@ import (
"github.com/filecoin-project/curio/tasks/pdpv0"
piece2 "github.com/filecoin-project/curio/tasks/piece"
"github.com/filecoin-project/curio/tasks/proofshare"
"github.com/filecoin-project/curio/tasks/remoteseal"
"github.com/filecoin-project/curio/tasks/scrub"
"github.com/filecoin-project/curio/tasks/seal"
"github.com/filecoin-project/curio/tasks/sealsupra"
Expand Down Expand Up @@ -234,7 +236,9 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps, shutdownChan chan
cfg.Subsystems.EnableUpdateSubmit ||
cfg.Subsystems.EnableCommP ||
cfg.Subsystems.EnableProofShare ||
cfg.Subsystems.EnableRemoteProofs
cfg.Subsystems.EnableRemoteProofs ||
cfg.Subsystems.EnableRemoteSealProvider ||
cfg.Subsystems.EnableRemoteSealClient

var p2Active sealsupra.P2Active
if hasAnySealingTask {
Expand Down Expand Up @@ -375,11 +379,15 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps, shutdownChan chan
pdpv0IpniTask := indexing.NewPDPV0IPNITask(db, cfg, idxMax, iStore)
activeTasks = append(activeTasks, ipniTask, indexingTask, pdpv1IdxTask, pdpv1IPNITask, fixRawSizeTask, pdpv0IndexingTask, pdpv0IpniTask)

// Create SealMarket for remote seal HTTP API
if cfg.Subsystems.EnableRemoteSealProvider || cfg.Subsystems.EnableRemoteSealClient {
sdeps.SealMarket = sealmarket.NewSealMarket(db, stor, full)
}

if cfg.HTTP.Enable {
// TODO: Put this back once PDPv1 is also being used
//if !cfg.Subsystems.EnableDealMarket {
// return nil, xerrors.New("deal market must be enabled on HTTP server")
//}
if !cfg.Subsystems.EnableDealMarket && !cfg.Subsystems.EnableRemoteSealProvider && !cfg.Subsystems.EnableRemoteSealClient {
return nil, xerrors.New("deal market or remote seal must be enabled on HTTP server")
}
err = cuhttp.StartHTTPServer(ctx, dependencies, &sdeps)
if err != nil {
return nil, xerrors.Errorf("failed to start the HTTP server: %w", err)
Expand Down Expand Up @@ -450,6 +458,11 @@ func addSealingTasks(
var slotMgr *slotmgr.SlotMgr
var addFinalize bool

// Create the provider poller unconditionally so that sealing nodes (SDR/Batch)
// can register the RSealProviderFinalize task even without EnableRemoteSealProvider.
// RunPoller is started by the addFinalize block or the EnableRemoteSealProvider block.
provPoller := remoteseal.NewProviderPoller(db)

// NOTE: Tasks with the LEAST priority are at the top
if cfg.Subsystems.EnableCommP {
scrubUnsealedTask := scrub.NewCommDCheckTask(db, slr)
Expand Down Expand Up @@ -477,21 +490,48 @@ func addSealingTasks(
if cfg.Subsystems.EnableSealSDR {
sdrMax := taskhelp.Max(cfg.Subsystems.SealSDRMaxTasks)

sdrTask := seal.NewSDRTask(full, db, sp, slr, sdrMax, cfg.Subsystems.SealSDRMinTasks)
// provPoller is passed so SDR registers its AddTaskFunc with both SealPoller
// and RSealProviderPoller. When EnableRemoteSealProvider is off, only the
// local SealPoller is used for scheduling SDR tasks.
var sdrProvPoller seal.ProviderPollerSDR
if cfg.Subsystems.EnableRemoteSealProvider {
sdrProvPoller = provPoller
}
sdrTask := seal.NewSDRTask(full, db, sp, slr, sdrMax, cfg.Subsystems.SealSDRMinTasks, sdrProvPoller)
keyTask := unseal.NewTaskUnsealSDR(slr, db, sdrMax, full)

activeTasks = append(activeTasks, sdrTask, keyTask)
}
if cfg.Subsystems.EnableSealSDRTrees {
treeDTask := seal.NewTreeDTask(sp, db, slr, cfg.Subsystems.SealSDRTreesMaxTasks, cfg.Subsystems.BindSDRTreeToNode)
treeRCTask := seal.NewTreeRCTask(sp, db, slr, cfg.Subsystems.SealSDRTreesMaxTasks)
var treeDProvPoller seal.ProviderPollerTreeD
var treeRCProvPoller seal.ProviderPollerTreeRC
if cfg.Subsystems.EnableRemoteSealProvider {
treeDProvPoller = provPoller
treeRCProvPoller = provPoller
}
treeDTask := seal.NewTreeDTask(sp, db, slr, cfg.Subsystems.SealSDRTreesMaxTasks, cfg.Subsystems.BindSDRTreeToNode, treeDProvPoller)
treeRCTask := seal.NewTreeRCTask(sp, db, slr, cfg.Subsystems.SealSDRTreesMaxTasks, treeRCProvPoller)
synthTask := seal.NewSyntheticProofTask(sp, db, slr, cfg.Subsystems.SyntheticPoRepMaxTasks)
activeTasks = append(activeTasks, treeDTask, synthTask, treeRCTask)
addFinalize = true
}
// Remote seal client needs the Finalize task to run after PoRep.
// The client skips SDR/Trees (done by provider) but still runs the
// standard pipeline from precommit onward, which requires Finalize.
if cfg.Subsystems.EnableRemoteSealClient {
addFinalize = true
}
if addFinalize {
finalizeTask := seal.NewFinalizeTask(cfg.Subsystems.FinalizeMaxTasks, sp, slr, db, slotMgr)
activeTasks = append(activeTasks, finalizeTask)
// RSealProviderFinalize must run on sealing nodes (SDR/Batch) that hold
// the sector data and batch slots, not only on EnableRemoteSealProvider nodes.
provFinalizeTask := remoteseal.NewProviderFinalizeTask(db, provPoller, slr, slotMgr, cfg.Subsystems.FinalizeMaxTasks)
activeTasks = append(activeTasks, finalizeTask, provFinalizeTask)

// Start the provider poller so it can schedule RSealProviderFinalize tasks
// on sealing nodes. The poller safely skips task types whose AddTaskFunc
// hasn't been registered (e.g. Notify, Cleanup on non-provider nodes).
go provPoller.RunPoller(ctx)
}

if cfg.Subsystems.EnableSendPrecommitMsg {
Expand Down Expand Up @@ -564,6 +604,48 @@ func addSealingTasks(
activeTasks = append(activeTasks, remoteUploadTask, remotePollTask, remoteSendTask)
}

// Remote seal provider tasks (Notify, Cleanup; Finalize is registered above with addFinalize)
if cfg.Subsystems.EnableRemoteSealProvider {
if !addFinalize {
// If no sealing tasks started the poller, start it now for the provider.
go provPoller.RunPoller(ctx)
}

provMaxTasks := cfg.Subsystems.RemoteSealProviderMaxTasks
cleanupTimeout := cfg.Subsystems.RemoteSealCleanupTimeout

notifyTask := remoteseal.NewProviderNotifyTask(db, provPoller, provMaxTasks, cleanupTimeout)
provCleanupTask := remoteseal.NewProviderCleanupTask(db, provPoller, stor, slotMgr, cfg.Subsystems.FinalizeMaxTasks)

activeTasks = append(activeTasks, notifyTask, provCleanupTask)

if !addFinalize {
// If the provider finalize task wasn't already registered via addFinalize
// (e.g. provider-only node without local sealing), register it here.
provFinalizeTask := remoteseal.NewProviderFinalizeTask(db, provPoller, slr, slotMgr, cfg.Subsystems.FinalizeMaxTasks)
activeTasks = append(activeTasks, provFinalizeTask)
}

// Provider-side SDR/Tree tasks are handled by the existing SDR/TreeD/TreeRC tasks
// via UNION ALL queries - they just need to be enabled (EnableSealSDR/EnableSealSDRTrees).
// The SDR/TreeD/TreeRC tasks register their AddTaskFunc with provPoller in their Adder() methods.
}

// Remote seal client tasks
if cfg.Subsystems.EnableRemoteSealClient {
clientPoller := remoteseal.NewRSealClientPoller(db)
go clientPoller.RunPoller(ctx)

rsealClient := remoteseal.NewRSealClient()

delegateTask := remoteseal.NewRSealDelegate(db, full, rsealClient)
pollTask := remoteseal.NewRSealClientPoll(db, rsealClient, clientPoller)
fetchTask := remoteseal.NewRSealClientFetch(db, rsealClient, slr, clientPoller, cfg.Subsystems.RSealClientFetchMaxTasks)
cleanupTask := remoteseal.NewRSealClientCleanup(db, rsealClient, clientPoller)

activeTasks = append(activeTasks, delegateTask, pollTask, fetchTask, cleanupTask)
}

// harmony treats the first task as highest priority, so reverse the order
// (we could have just appended to this list in the reverse order, but defining
// tasks in pipeline order is more intuitive)
Expand Down
23 changes: 23 additions & 0 deletions cmd/curio/test-supra.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ import (
"github.com/urfave/cli/v2"
"golang.org/x/xerrors"

ffi "github.com/filecoin-project/filecoin-ffi"
"github.com/filecoin-project/go-state-types/abi"

"github.com/filecoin-project/curio/build"
"github.com/filecoin-project/curio/cmd/curio/internal/translations"
"github.com/filecoin-project/curio/harmony/resources"
"github.com/filecoin-project/curio/lib/ffi/cunative"
"github.com/filecoin-project/curio/lib/supraffi"
)
Expand Down Expand Up @@ -64,6 +67,26 @@ var testSupraSystemInfoCmd = &cli.Command{

fmt.Println("CUDA:")
fmt.Printf(" Usable CUDA GPU detected: %s\n", yesNo(supraffi.HasUsableCUDAGPU()))
fmt.Println()

fmt.Println("GPU Devices (ffi):")
gpuMode := "OpenCL"
if build.IsOpencl != "1" {
gpuMode = "CUDA"
}
fmt.Printf(" Mode: %s\n", gpuMode)
fmt.Printf(" Overprovision factor: %d\n", resources.GpuOverprovisionFactor)
gpus, err := ffi.GetGPUDevices()
if err != nil {
fmt.Printf(" Error listing GPUs: %s\n", err)
} else if len(gpus) == 0 {
fmt.Println(" No GPU devices found")
} else {
fmt.Printf(" Devices (%d):\n", len(gpus))
for i, name := range gpus {
fmt.Printf(" [%d] %s\n", i, name)
}
}

return nil
},
Expand Down
69 changes: 41 additions & 28 deletions cuhttp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"net"
"net/http"
"os"
"strings"
Expand All @@ -29,6 +30,7 @@ import (
ipni_provider "github.com/filecoin-project/curio/market/ipni/ipni-provider"
"github.com/filecoin-project/curio/market/libp2p"
"github.com/filecoin-project/curio/market/retrieval"
"github.com/filecoin-project/curio/market/sealmarket"
"github.com/filecoin-project/curio/pdp"
"github.com/filecoin-project/curio/tasks/message"
storage_market "github.com/filecoin-project/curio/tasks/storage-market"
Expand Down Expand Up @@ -143,6 +145,7 @@ func isWebSocketUpgrade(r *http.Request) bool {
type ServiceDeps struct {
EthSender *message.SenderETH
DealMarket *storage_market.CurioStorageDealMarket
SealMarket *sealmarket.SealMarket
AlertTask *alertmanager.AlertTask
}

Expand Down Expand Up @@ -206,7 +209,6 @@ func StartHTTPServer(ctx context.Context, d *deps.Deps, sd *ServiceDeps) error {

// Set up the HTTP server with proper timeouts
server := &http.Server{
Addr: cfg.ListenAddress,
Handler: libp2pConnMiddleware(loggingMiddleware(compressionMw(chiRouter))), // Attach middlewares
ReadTimeout: cfg.ReadTimeout,
WriteTimeout: time.Hour * 2,
Expand All @@ -225,19 +227,27 @@ func StartHTTPServer(ctx context.Context, d *deps.Deps, sd *ServiceDeps) error {
server.TLSConfig = certManager.TLSConfig()
}

// We don't need to run an HTTP server. Any HTTP request should simply be handled as HTTPS.
// Bind the listener before starting the goroutine so the caller knows
// the actual address (important when ListenAddress uses port 0).
ln, err := net.Listen("tcp", cfg.ListenAddress)
if err != nil {
return xerrors.Errorf("binding HTTP listener on %s: %w", cfg.ListenAddress, err)
}

d.HTTPListenAddr = ln.Addr().String()
log.Infof("HTTP server listening on %s (requested %s)", d.HTTPListenAddr, cfg.ListenAddress)

// Start the server with TLS
// Start the server
go func() {
log.Infof("Starting HTTPS server for https://%s on %s", cfg.DomainName, cfg.ListenAddress)
log.Infof("Starting HTTP server for %s on %s", cfg.DomainName, d.HTTPListenAddr)
var serr error
if !cfg.DelegateTLS {
serr = server.ListenAndServeTLS("", "")
serr = server.ServeTLS(ln, "", "")
} else {
serr = server.ListenAndServe()
serr = server.Serve(ln)
}
if serr != nil && !errors.Is(serr, http.ErrServerClosed) {
log.Errorf("Failed to start HTTPS server: %s", serr)
log.Errorf("Failed to start HTTP server: %s", serr)
panic(serr)
}
}()
Expand Down Expand Up @@ -294,37 +304,40 @@ func (c cache) Delete(ctx context.Context, key string) error {
var _ autocert.Cache = cache{}

func attachRouters(ctx context.Context, r *chi.Mux, d *deps.Deps, sd *ServiceDeps) (*chi.Mux, error) {
// Create denylist filter for retrieval endpoints
df := denylist.NewFilter(ctx, d.Cfg.HTTP.DenylistServers)

// Attach retrievals with denylist filtering at both URL and blockstore level
rp := retrieval.NewRetrievalProvider(ctx, d.DB, d.IndexStore, d.CachedPieceReader, df)
retrieval.Router(r, rp, df)
// Deal market routers (retrieval, IPNI, libp2p, market handler) are only
// attached when the deal market subsystem is enabled. Other HTTP features
// (e.g. remote seal) can run without these dependencies.
if d.Cfg.Subsystems.EnableDealMarket {
df := denylist.NewFilter(ctx, d.Cfg.HTTP.DenylistServers)
rp := retrieval.NewRetrievalProvider(ctx, d.DB, d.IndexStore, d.CachedPieceReader, df)
retrieval.Router(r, rp, df)

ipp, err := ipni_provider.NewProvider(d)
if err != nil {
return nil, xerrors.Errorf("failed to create new ipni provider: %w", err)
}
ipni_provider.Routes(r, ipp)

// Attach IPNI
ipp, err := ipni_provider.NewProvider(d)
if err != nil {
return nil, xerrors.Errorf("failed to create new ipni provider: %w", err)
}
ipni_provider.Routes(r, ipp)
go ipp.StartPublishing(ctx)

go ipp.StartPublishing(ctx)
rd := libp2p.NewRedirector(d.DB)
libp2p.Router(r, rd)

// Attach LibP2P redirector
rd := libp2p.NewRedirector(d.DB)
libp2p.Router(r, rd)
dh, err := mhttp.NewMarketHandler(d.DB, d.Cfg, sd.DealMarket, must.One(d.EthClient.Get()), d.Chain, sd.EthSender, d.LocalStore)
if err != nil {
return nil, xerrors.Errorf("failed to create new market handler: %w", err)
}
mhttp.Router(r, dh)
}

if sd.EthSender != nil {
pdsvc := pdp.NewPDPService(ctx, d.DB, d.LocalStore, must.One(d.EthClient.Get()), d.Chain, sd.EthSender, sd.AlertTask)
pdp.Routes(r, pdsvc)
}

// Attach the market handler
dh, err := mhttp.NewMarketHandler(d.DB, d.Cfg, sd.DealMarket, must.One(d.EthClient.Get()), d.Chain, sd.EthSender, d.LocalStore)
if err != nil {
return nil, xerrors.Errorf("failed to create new market handler: %w", err)
if sd.SealMarket != nil {
sealmarket.Routes(r, sd.SealMarket)
}
mhttp.Router(r, dh)

return r, nil
}
Loading
Loading