Skip to content

Commit 6bd5377

Browse files
committed
refactor(storage): remove all PostgreSQL dependencies and code
Remove the entire PostgreSQL storage layer, keeping only P2P/local storage backends (sled chain storage + SQLite local storage). Deleted files: - storage/src/pg.rs (connection pool: PgConfig, PgPool, create_pool) - storage/src/postgres/ directory (mod.rs, evaluations.rs, leaderboard.rs, submissions.rs, task_logs.rs, validators.rs) Updated files: - storage/src/lib.rs: removed pub mod pg and pub mod postgres - storage/src/traits.rs: removed From<tokio_postgres::Error> and From<deadpool_postgres::PoolError> impls - storage/Cargo.toml: removed tokio-postgres, deadpool-postgres, postgres-types dependencies - AGENTS.md: removed pg.rs and postgres/ from architecture section - Cargo.lock: regenerated without PostgreSQL crates
1 parent b02d2a8 commit 6bd5377

12 files changed

Lines changed: 5 additions & 1365 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,7 @@ term-challenge/
6565
│ ├── lib.rs # Root module, re-exports, From impls for StorageError
6666
│ ├── traits.rs # ChallengeStorage trait, StorageError, Result alias
6767
│ ├── chain.rs # Chain storage (sled)
68-
│ ├── local.rs # Local storage (SQLite)
69-
│ ├── pg.rs # PostgreSQL connection pool (deadpool-postgres)
70-
│ └── postgres/
71-
│ ├── mod.rs # Submodule declarations
72-
│ ├── evaluations.rs # Evaluation CRUD using EvaluationResult (f64 score, UUID ChallengeId)
73-
│ ├── leaderboard.rs # Leaderboard queries using WeightAssignment (f64 weight)
74-
│ ├── submissions.rs # Submission storage with ChallengeId (UUID) and Hotkey (SS58)
75-
│ ├── task_logs.rs # Task log storage and retrieval
76-
│ └── validators.rs # Validator management with Hotkey (SS58 encoding)
68+
│ └── local.rs # Local storage (SQLite)
7769
├── cli/
7870
│ ├── Cargo.toml # native binary, ratatui TUI
7971
│ └── src/

Cargo.lock

Lines changed: 3 additions & 232 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

storage/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ platform-core = { workspace = true }
1111
platform-challenge-sdk = { workspace = true }
1212

1313
tokio = { version = "1.40", features = ["full"] }
14-
tokio-postgres = { version = "0.7", features = ["with-uuid-1", "with-chrono-0_4", "with-serde_json-1"] }
15-
deadpool-postgres = { version = "0.14", features = ["serde"] }
16-
postgres-types = { version = "0.2", features = ["derive", "with-uuid-1", "with-chrono-0_4", "with-serde_json-1"] }
1714

1815
sled = "0.34"
1916
rusqlite = { version = "0.31", features = ["bundled"] }
@@ -27,4 +24,4 @@ tracing = "0.1"
2724
hex = "0.4"
2825

2926
[dev-dependencies]
30-
tempfile = "3"
27+
tempfile = "3"

0 commit comments

Comments
 (0)