Skip to content

add DDO#644

Open
parkan wants to merge 5 commits intomainfrom
feat/ddo-deal-type
Open

add DDO#644
parkan wants to merge 5 commits intomainfrom
feat/ddo-deal-type

Conversation

@parkan
Copy link
Collaborator

@parkan parkan commented Mar 11, 2026

all singularity-side wiring for DDO allocations, coded against the
DDODealManager interface. path B (ddo-client SDK adapter) plugs in
at merge time with no further plumbing changes.

  • DealTypeDDO constant, DDO fields on Deal model (allocation ID,
    rail ID, payment token)
  • DDODealManager + DDOAllocationTracker interfaces and value types
  • runDDOSchedule executor: SP validation, car batching with dedup,
    piece submission, payments, allocation creation, deal records
  • dispatch in runSchedule switched from if/else to explicit switch;
    removed inferScheduleDealType -- unknown deal types now error
    instead of silently guessing from provider address shape
  • WithDDO* options on DealPusher
  • DDO CLI flags on deal-pusher command (contract, payments, token,
    batch size, confirmation depth, poll interval, term bounds)
  • DDO validation on schedule create (requires URL template)
  • DDO activation tracking in deal tracker via GetAllocationInfo poll
  • DealTrackerOption pattern for injecting DDOAllocationTracker

parkan added 2 commits March 11, 2026 11:33
all singularity-side wiring for DDO allocations, coded against the
DDODealManager interface. path B (ddo-client SDK adapter) plugs in
at merge time with no further plumbing changes.

- DealTypeDDO constant, DDO fields on Deal model (allocation ID,
  rail ID, payment token)
- DDODealManager + DDOAllocationTracker interfaces and value types
- runDDOSchedule executor: SP validation, car batching with dedup,
  piece submission, payments, allocation creation, deal records
- dispatch in runSchedule switched from if/else to explicit switch;
  removed inferScheduleDealType -- unknown deal types now error
  instead of silently guessing from provider address shape
- WithDDO* options on DealPusher
- DDO CLI flags on deal-pusher command (contract, payments, token,
  batch size, confirmation depth, poll interval, term bounds)
- DDO validation on schedule create (requires URL template)
- DDO activation tracking in deal tracker via GetAllocationInfo poll
- DealTrackerOption pattern for injecting DDOAllocationTracker
@parkan parkan marked this pull request as ready for review March 11, 2026 13:43
@parkan parkan requested a review from anjor March 11, 2026 13:43
## Summary
- add a local DDO scheduling/tracking interface and concrete on-chain
adapter backed by ddo-client
- implement piece-granular payment setup, tx confirmation-depth polling,
receipt event parsing, and allocation status reads
- add focused adapter tests and record the new ddo-client dependency

## Testing
- go test ./service/dealpusher

## Notes
- upstream ddo-client still requires a raw private key for write
clients, so this adapter currently enforces signer/address matching at
runtime until signer-based constructors exist

---------

Co-authored-by: Arkadiy Kukarkin <parkan@gmail.com>
@parkan
Copy link
Collaborator Author

parkan commented Mar 12, 2026

oops wires got a bit crossed, fixing

- uncomment Path B wiring: instantiate OnChainDDO when --ddo-contract is
  set, validate DDO config, require --eth-rpc
- move DDOAllocationStatus to model so dealpusher and dealtracker share
  the type without importing each other
- remove dead ddoAllocTracker field and WithDDOAllocationTracker option
  from dealpusher (only dealtracker uses allocation tracking)
- add mock-based tests for DDO schedule executor: happy path with
  allocation creation, inactive SP error, missing dependencies error,
  parseProviderActorID unit tests
@parkan parkan force-pushed the feat/ddo-deal-type branch from dec2c16 to 7f90165 Compare March 12, 2026 18:58
@parkan parkan changed the title add DDO as third deal type (path A plumbing) add DDO Mar 12, 2026
@parkan parkan force-pushed the feat/ddo-deal-type branch from dcf8588 to cbd64db Compare March 12, 2026 20:35
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.

2 participants