Skip to content

Instantly share code, notes, and snippets.

@Gozala
Last active March 5, 2024 22:01
Show Gist options
  • Save Gozala/ba820732d375387a7c0f5efe59b8af53 to your computer and use it in GitHub Desktop.
Save Gozala/ba820732d375387a7c0f5efe59b8af53 to your computer and use it in GitHub Desktop.
flowchart LR
    Add[πŸ‘©β€πŸ’» store/add πŸ€–]
    Allocate[πŸ€– blob/allocate πŸ€–]
    Receive[πŸ€– blob/receive πŸ€–]
    Write[πŸ€– blob/write πŸ‘©β€πŸ’»]
    Close[πŸ€– blob/close πŸ€–]
    Claim[πŸ€– assert/location 🌐]

    Add --> Allocate
    Add --> Receive
    Allocate --> Receive
    Receive --> Write
    Receive --> Close
    Write --> Close

    Close --> Claim
Loading
@Gozala
Copy link
Author

Gozala commented Mar 5, 2024

  • Emoji on the left denotes agent issuing invocation.
  • Emoji on the right denotes agent performing invocation.
  • πŸ‘©β€πŸ’» Denotes user agent
  • πŸ€– Denotes service agent
  • 🌐 Denotes global network

Overview

  1. Alice invokes store/add task
  2. Service schedules blob/allocate and blob/receive tasks where later depends on former (using promise/await from invocation spec)
  3. blob/receive schedules blob/write and blob/close tasks where later awaits on former
  4. blob/write is executed by user agent, implying that on completion receipt will be issuer unblocking blob/close
  5. blob/close verifies that written blob corresponds to the blob address (hash).
  6. blob/close on success schedules assert/location claim

Note that errors in dependencies propagate, meaning if task depends on the failed task it will never run and be considered failed.

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