@@ -16,6 +16,8 @@ pub struct PrismSubmissionRow {
1616 pub id : String ,
1717 /// Miner hotkey (lowercase 64 hex).
1818 pub miner_hotkey : String ,
19+ /// Owning coldkey (lowercase 64 hex), when known at intake.
20+ pub miner_coldkey : Option < String > ,
1921 /// Epoch at acceptance.
2022 pub epoch : i64 ,
2123 /// Netuid.
@@ -61,6 +63,8 @@ pub struct NewPrismSubmission<'a> {
6163 pub id : & ' a str ,
6264 /// miner hotkey.
6365 pub miner_hotkey : & ' a str ,
66+ /// owning coldkey (optional).
67+ pub miner_coldkey : Option < & ' a str > ,
6468 /// epoch.
6569 pub epoch : i64 ,
6670 /// netuid.
@@ -85,9 +89,9 @@ pub struct NewPrismStageEvent<'a> {
8589}
8690
8791/// Column list shared by all row reads.
88- const COLS : & str = "id, miner_hotkey, epoch, netuid, status, label, architecture_py, training_py , \
89- pod_id, pod_provider, receipt_json, metrics_json, bpb, review_json, similarity_json, kind , \
90- score, absence_reason, retry_count, error_detail";
92+ const COLS : & str = "id, miner_hotkey, miner_coldkey, epoch, netuid, status, label, \
93+ architecture_py, training_py, pod_id, pod_provider, receipt_json, metrics_json, bpb, \
94+ review_json, similarity_json, kind, score, absence_reason, retry_count, error_detail";
9195
9296/// Insert the queued row.
9397///
@@ -98,11 +102,13 @@ pub async fn insert_prism_submission(
98102 n : & NewPrismSubmission < ' _ > ,
99103) -> Result < ( ) , DbError > {
100104 sqlx:: query (
101- "INSERT INTO prism_submission (id, miner_hotkey, epoch, netuid, status, label, architecture_py, training_py) \
102- VALUES ($1, $2, $3, $4, 'queued', $5, $6, $7)",
105+ "INSERT INTO prism_submission \
106+ (id, miner_hotkey, miner_coldkey, epoch, netuid, status, label, architecture_py, training_py) \
107+ VALUES ($1, $2, $3, $4, $5, 'queued', $6, $7, $8)",
103108 )
104109 . bind ( n. id )
105110 . bind ( n. miner_hotkey )
111+ . bind ( n. miner_coldkey )
106112 . bind ( n. epoch )
107113 . bind ( n. netuid )
108114 . bind ( n. label )
0 commit comments