Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
be3560b
add pdp subgraph
silent-cipher Apr 16, 2025
5f3d2d6
fix tx input decoding for addRoots
silent-cipher Apr 17, 2025
e94ff92
add tests for handleRootsAdded handler
silent-cipher Apr 17, 2025
9825c2a
store cid in bytes format
silent-cipher Apr 17, 2025
3221aa8
remove unused dependencies
silent-cipher Apr 17, 2025
76c2994
add relations between entities
silent-cipher Apr 17, 2025
6d38c01
remove duplicate tx storing
silent-cipher Apr 17, 2025
45705d6
add pdp network metrics
silent-cipher Apr 18, 2025
39f7686
add provider and proof set metrics
silent-cipher Apr 19, 2025
8adb355
fix handleFaultRecord and other bugs
silent-cipher Apr 21, 2025
7c68233
pdp subgraph integration with client
silent-cipher Apr 21, 2025
cb055ca
add roots column to proof sets landing table
silent-cipher Apr 21, 2025
182d301
fix chart label
silent-cipher Apr 21, 2025
8067dc5
consistent styling for overview section
silent-cipher Apr 21, 2025
550044d
add subgraph documentation
silent-cipher Apr 22, 2025
89ea435
remove unused env vars
silent-cipher Apr 22, 2025
161a4ce
sumTree implementation
silent-cipher Apr 23, 2025
3329c32
remove unused files
silent-cipher Apr 23, 2025
4df9414
fix heatmap max limit
silent-cipher Apr 24, 2025
495d6e2
fix: proofset fetching
silent-cipher Apr 24, 2025
9be3c61
fix possessionProven handler
silent-cipher Apr 24, 2025
d252dba
fix: pass blockNumber instead timestamp
silent-cipher Apr 24, 2025
4c4fac5
fix provider totalProofSets calculation
silent-cipher Apr 25, 2025
a8b974a
feat: single deployment for mainnet and calibration
silent-cipher Apr 26, 2025
26f3e8f
fix: landing search
silent-cipher Apr 26, 2025
7dd47fc
fix: proofSets pagination on providers page
silent-cipher Apr 26, 2025
f93f650
offload unused entities ( to save cost )
silent-cipher Apr 28, 2025
4a7189f
fix: leafIndex generation
silent-cipher Apr 28, 2025
6ad3d12
fix: pad seed to 32 bytes
silent-cipher Apr 28, 2025
c4ab118
update subgraph docs
silent-cipher Apr 28, 2025
c4f2e93
update header
silent-cipher Apr 28, 2025
ebec8a9
add graphql-api documentation
silent-cipher Apr 28, 2025
cd0b562
Add docs page to subgraph client
silent-cipher Apr 28, 2025
249e3a1
doc: fix path
silent-cipher Apr 28, 2025
d46ba81
feat: add gas calculator
silent-cipher Apr 29, 2025
c7ee3b1
update doc
silent-cipher Apr 29, 2025
305e60c
feat: search using rootCids for proofSets
silent-cipher Apr 30, 2025
ed74783
improve search functionality
silent-cipher Apr 30, 2025
f8764e0
feat: allow to copy values
silent-cipher Apr 30, 2025
6a83797
include package
silent-cipher Apr 30, 2025
0a77182
add network slug in url path
silent-cipher Jun 4, 2025
af58a71
use try_getRandomness to check for reverts
silent-cipher Jun 6, 2025
60ccc86
track service contracts
silent-cipher Jun 6, 2025
07821b9
fix: service contract stats
silent-cipher Jun 6, 2025
f9e792f
show pdp services
silent-cipher Jun 6, 2025
a7c03b3
fix: proof set searching
silent-cipher Jun 6, 2025
9e89b03
feat: UI consistency and navigation improvements maintained by storswift
MaBarnabas Jun 17, 2025
93176e2
Renaming of data fields
kaola526 Aug 1, 2025
4a78d1a
Renaming of data fields
kaola526 Aug 1, 2025
410cec7
upgrade subgraph
kaola526 Aug 12, 2025
2b99bb8
filecoin-testnet use goldsky rpc
kaola526 Sep 10, 2025
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
28 changes: 14 additions & 14 deletions assets/pdp-explorer-mockups.excalidraw
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@
"updated": 1733889770087,
"link": null,
"locked": false,
"text": "Search for a ProofSet/Owner 🔍 ",
"text": "Search for a DataSet/Owner 🔍 ",
"fontSize": 16,
"fontFamily": 5,
"textAlign": "center",
"verticalAlign": "top",
"containerId": null,
"originalText": "Search for a ProofSet/Owner 🔍 ",
"originalText": "Search for a DataSet/Owner 🔍 ",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -1883,13 +1883,13 @@
"updated": 1733892069758,
"link": null,
"locked": false,
"text": "ProofSet#",
"text": "DataSet#",
"fontSize": 16,
"fontFamily": 5,
"textAlign": "center",
"verticalAlign": "top",
"containerId": null,
"originalText": "ProofSet#",
"originalText": "DataSet#",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -2586,13 +2586,13 @@
"updated": 1733892286732,
"link": null,
"locked": false,
"text": "ProofSet\nSize",
"text": "DataSet\nSize",
"fontSize": 16,
"fontFamily": 5,
"textAlign": "center",
"verticalAlign": "top",
"containerId": null,
"originalText": "ProofSet\nSize",
"originalText": "DataSet\nSize",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -3060,13 +3060,13 @@
"updated": 1733893406824,
"link": null,
"locked": false,
"text": "ProofSet #ID Overview",
"text": "DataSet #ID Overview",
"fontSize": 19.200000000000003,
"fontFamily": 5,
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "ProofSet #ID Overview",
"originalText": "DataSet #ID Overview",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -3173,13 +3173,13 @@
"updated": 1733896128383,
"link": null,
"locked": false,
"text": "ProofSet Change",
"text": "DataSet Change",
"fontSize": 16,
"fontFamily": 5,
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "ProofSet Change",
"originalText": "DataSet Change",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -6572,13 +6572,13 @@
"updated": 1733896159564,
"link": null,
"locked": false,
"text": "# of active proof sets\n# of all proof sets (including deleted ones)\n# of total data size stored\n# of total pieces stored\n# of faults\nFirst Seen\nLast Seen\n\n",
"text": "# of active proof sets\n# of all proof sets (including deleted ones)\n# of total data size stored\n# of total Pieces stored\n# of faults\nFirst Seen\nLast Seen\n\n",
"fontSize": 16,
"fontFamily": 5,
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "# of active proof sets\n# of all proof sets (including deleted ones)\n# of total data size stored\n# of total pieces stored\n# of faults\nFirst Seen\nLast Seen\n\n",
"originalText": "# of active proof sets\n# of all proof sets (including deleted ones)\n# of total data size stored\n# of total Pieces stored\n# of faults\nFirst Seen\nLast Seen\n\n",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -7914,13 +7914,13 @@
"updated": 1733896243335,
"link": null,
"locked": false,
"text": "ProofSet\nSize",
"text": "DataSet\nSize",
"fontSize": 16,
"fontFamily": 5,
"textAlign": "center",
"verticalAlign": "top",
"containerId": null,
"originalText": "ProofSet\nSize",
"originalText": "DataSet\nSize",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down
6 changes: 3 additions & 3 deletions backend/indexer/internal/infrastructure/database/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (p *PostgresDB) DeleteReorgedData(ctx context.Context, startHeight, endHeig
return fmt.Errorf("failed to delete reorged proof sets: %w", err)
}

// Proofs
// Data
if err := p.DeleteReorgedProofs(ctx, startHeight, endHeight); err != nil {
return fmt.Errorf("failed to delete reorged proofs: %w", err)
}
Expand All @@ -87,7 +87,7 @@ func (p *PostgresDB) DeleteReorgedData(ctx context.Context, startHeight, endHeig
return fmt.Errorf("failed to delete reorged fault records: %w", err)
}

// Roots
// Pieces
if err := p.DeleteReorgedRoots(ctx, startHeight, endHeight); err != nil {
return fmt.Errorf("failed to delete reorged roots: %w", err)
}
Expand Down Expand Up @@ -131,6 +131,6 @@ func (p *PostgresDB) CleanupFinalizedData(ctx context.Context, currentBlockNumbe
if err := p.CleanupFinalizedRoots(ctx, currentBlockNumber); err != nil {
return fmt.Errorf("failed to cleanup finalized roots: %w", err)
}

return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

// StoreProofSet stores a proof set record with version control
func (p *PostgresDB) StoreProofSet(ctx context.Context, proofSet *models.ProofSet) error {
func (p *PostgresDB) StoreProofSet(ctx context.Context, proofSet *models.DataSet) error {
_, err := p.pool.Exec(ctx, `
INSERT INTO proof_sets (
set_id, owner, listener_addr, total_faulted_periods, total_data_size,
Expand Down Expand Up @@ -44,7 +44,7 @@ func (p *PostgresDB) StoreProofSet(ctx context.Context, proofSet *models.ProofSe
}

// FindProofSet finds a proof set by its set_id, optionally including historical versions
func (p *PostgresDB) FindProofSet(ctx context.Context, setId int64, includeHistory bool) ([]*models.ProofSet, error) {
func (p *PostgresDB) FindProofSet(ctx context.Context, setId int64, includeHistory bool) ([]*models.DataSet, error) {
query := `
SELECT id, set_id, owner, listener_addr, total_faulted_periods, total_proved_roots, total_data_size,
total_roots, total_fee_paid, last_proven_epoch, next_challenge_epoch, challenge_range,
Expand All @@ -63,9 +63,9 @@ func (p *PostgresDB) FindProofSet(ctx context.Context, setId int64, includeHisto
}
defer rows.Close()

var proofSets []*models.ProofSet
var proofSets []*models.DataSet
for rows.Next() {
ps := &models.ProofSet{}
ps := &models.DataSet{}
var totalFeePaidStr string
var totalDataSizeStr string

Expand Down
2 changes: 1 addition & 1 deletion backend/indexer/internal/models/proof_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"
)

type ProofSet struct {
type DataSet struct {
ReorgModel // Embed ReorgModel to inherit base fields and methods
SetId int64 `db:"set_id" json:"set_id"`
Owner string `db:"owner" json:"owner"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (h *ProofSetCreatedHandler) HandleEvent(ctx context.Context, eventLog *type
}

// Create new proof set
proofSet := &models.ProofSet{
proofSet := &models.DataSet{
ReorgModel: models.ReorgModel{
BlockNumber: blockNumber,
BlockHash: eventLog.BlockHash,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (h *RootsRemovedHandler) HandleEvent(ctx context.Context, eventLog *types.L
// First get the root to get its raw_size
root, err := h.db.FindRoot(ctx, setId.Int64(), rootIdInt)
if err != nil {
return fmt.Errorf("[Roots Removed] failed to find root: %w", err)
return fmt.Errorf("[Pieces Removed] failed to find root: %w", err)
}

if root != nil {
Expand Down
6 changes: 3 additions & 3 deletions backend/indexer/internal/processor/handlers/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ type Database interface {
StoreProvider(ctx context.Context, provider *models.Provider) error
FindProvider(ctx context.Context, address string, includeHistory bool) ([]*models.Provider, error)

// ProofSet methods
StoreProofSet(ctx context.Context, proofSet *models.ProofSet) error
FindProofSet(ctx context.Context, setId int64, includeHistory bool) ([]*models.ProofSet, error)
// DataSet methods
StoreProofSet(ctx context.Context, proofSet *models.DataSet) error
FindProofSet(ctx context.Context, setId int64, includeHistory bool) ([]*models.DataSet, error)

// ProofFee methods
StoreProofFee(ctx context.Context, proofFee *models.ProofFee) error
Expand Down
8 changes: 4 additions & 4 deletions backend/server/internal/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ type Handler struct {
type Service interface {
GetProviders(offset, limit int) ([]Provider, int, error)
GetProviderDetails(providerID string) (*ProviderDetails, error)
GetProofSets(sortBy string, order string, offset, limit int) ([]ProofSet, int, error)
GetProofSets(sortBy string, order string, offset, limit int) ([]DataSet, int, error)
GetProofSetDetails(proofSetID string) (*ProofSetDetails, error)
GetProofSetHeatmap(proofSetID string) ([]HeatmapEntry, error)
GetNetworkMetrics(ctx context.Context) (map[string]interface{}, error)
Search(ctx context.Context, query string, limit int) ([]map[string]interface{}, error)
GetProviderProofSets(providerID string, offset, limit int) ([]ProofSet, int, error)
GetProviderProofSets(providerID string, offset, limit int) ([]DataSet, int, error)
GetProviderActivities(providerID string, activityType string) ([]Activity, error)
GetProofSetEventLogs(proofSetID string, filter string, offset, limit int) ([]EventLog, int, error)
GetProofSetTxs(proofSetID string, filter string, offset, limit int) ([]Transaction, int, error)
Expand All @@ -45,7 +45,7 @@ type Provider struct {
LastSeen time.Time `json:"lastSeen"`
}

type ProofSet struct {
type DataSet struct {
ID int64 `json:"id"`
SetID int64 `json:"setId"`
Owner string `json:"owner"`
Expand Down Expand Up @@ -77,7 +77,7 @@ type ProviderDetails struct {
NumRoots int64 `json:"numRoots"`
FirstSeen time.Time `json:"firstSeen"`
LastSeen time.Time `json:"lastSeen"`
ProofSets []ProofSet `json:"proofSets"`
ProofSets []DataSet `json:"proofSets"`
}

type ProofSetDetails struct {
Expand Down
Loading