Skip to content

Add f05 paid deal scaffolding#649

Open
anjor wants to merge 5 commits intomainfrom
feat/f05-paid-scaffold
Open

Add f05 paid deal scaffolding#649
anjor wants to merge 5 commits intomainfrom
feat/f05-paid-scaffold

Conversation

@anjor
Copy link
Collaborator

@anjor anjor commented Mar 20, 2026

Summary

  • add a first-class f05_paid deal type and payment metadata fields to deal models
  • wire schedule handling, CLI/docs, and swagger surfaces to accept the new paid f05 path
  • route f05_paid schedules through an injectable deal manager with tests for configured and unconfigured behavior

Testing

  • go test ./handler/deal/schedule ./service/dealpusher
  • go test ./cmd/deal/... ./handler/deal/...

Follow-ups

  • implement the actual paid PoRep submission path against the Singularity f05 contract
  • add wallet balance / insufficient-funds preflight checks
  • add contract event tracking for paid f05 deals

@anjor anjor requested a review from parkan March 20, 2026 19:33
@parkan parkan force-pushed the main branch 2 times, most recently from 35b56b1 to 3c132b0 Compare March 26, 2026 15:10
@anjor
Copy link
Collaborator Author

anjor commented Mar 26, 2026

Pushed an incremental update on top of the scaffold. This adds an experimental paid-f05 adapter behind new deal-pusher flags: f05-experimental, f05-min-wallet-balance, f05-sp-registry-contract, and f05-payments-contract. The adapter now does SP Registry lookup and FIL wallet-balance preflight, and returns explicit schedule errors for missing provider registration, inactive providers, missing payees, or insufficient FIL. Full repo test pass is green after codegen (go test ./...). The actual paid f05 submission path is still not implemented; this commit stops at validated preflight and runtime wiring.

@anjor
Copy link
Collaborator Author

anjor commented Mar 27, 2026

Pushed another incremental update on top of the experimental paid-f05 adapter. This now checks the provider SP Registry PDP product details more strictly and adds payments-contract preflight before any eventual submission path: it verifies service provider address, service URL, payment token, available funds in the payments account, and operator approval for the provider service. Local verification is green with go test ./.... I also tried staticcheck ./..., but the checker in this environment is built against Go 1.25 while the installed toolchain is Go 1.26, so it exits on a toolchain mismatch before analyzing the repo.

@anjor
Copy link
Collaborator Author

anjor commented Mar 27, 2026

Pushed a follow-up incremental update. The deal tracker now polls F05 payment tx receipts when ETH RPC is configured, using stored f05_payment_tx_hash values. Successful receipts mark f05_payment_status=confirmed; failed receipts mark f05_payment_status=failed and move the deal to error with an explicit message. This is receipt-based tracking only for now, not full contract-event parsing. I regenerated docs and re-ran go generate ./... plus go test ./.... staticcheck is still blocked in this environment by the same Go 1.25 vs 1.26 toolchain mismatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant