mirror of
https://github.com/logos-storage/logos-storage-docs-obsidian.git
synced 2026-01-08 16:23:09 +00:00
Marketplace workflows. Central data models
This commit is contained in:
parent
b99bd876a9
commit
d29038fc60
@ -74,7 +74,7 @@ Performance, security, scalability, reliability, etc.
|
|||||||
Description of algorithms, workflows, or state machines.
|
Description of algorithms, workflows, or state machines.
|
||||||
Include diagrams if needed.
|
Include diagrams if needed.
|
||||||
|
|
||||||
### Data
|
### Data workflows
|
||||||
#### Block retrieval
|
#### Block retrieval
|
||||||
- Given a CID
|
- Given a CID
|
||||||
1. Engage local data storage module to check for block presence
|
1. Engage local data storage module to check for block presence
|
||||||
@ -112,18 +112,57 @@ Include diagrams if needed.
|
|||||||
1. Engage the local data storage module to store the serialized manifest data. It will yield a CID.
|
1. Engage the local data storage module to store the serialized manifest data. It will yield a CID.
|
||||||
1. Yield the manifest CID.
|
1. Yield the manifest CID.
|
||||||
|
|
||||||
*** EACH FLOW ***
|
### Marketplace workflows
|
||||||
<!--
|
#### Storage request creation
|
||||||
### Marketplace
|
- Given a dataset CID
|
||||||
| Interface | Description | Input | Output |
|
- Given the manifest was read successfully
|
||||||
|-----------|-------------|-------|--------|
|
- Given duration and durability information
|
||||||
| `requestStorage` | Activates and applies erasure-coding to the dataset. Activates the slot builder module to construct slots and produce a verifiable manifest. Then activates the purchasing module to create a new on-chain storage-request object. | CID, storage contract duration and expiry times, storage contract durability parameters. | Purchase ID |
|
1. Apply erasure-coding to the manifest in accordance with the provided durability information. This yields a new manifest object that includes erasure-coding information.
|
||||||
| `onStore` | Activated as callback from Sales module when a new storage-request slot is to be stored by the node. Activates local data storage, block exchange, and slot builder modules in order to retrieve or repair a single slot that is part of a verifiable manifest. Data expiration values are adjusted to match the storage-request duration. | Storage-request object, expiry duration, slot index. | - | -->
|
1. Engage slot-builder module to perform slot building in accordance with the provided durability information. This yields a new manifest object that includes verification information.
|
||||||
|
1. Using the manifest provided by the slot builder, engage the purchasing module to create an on-chain storage-request object in accordance with the provided duration information. This yields a purchase ID.
|
||||||
|
1. Yield the purchase ID.
|
||||||
|
|
||||||
|
#### Slot hosting
|
||||||
|
- Given the sales module has activated this workflow using a correct dataset CID and slot index.
|
||||||
|
- Given the manifest was read successfully
|
||||||
|
- Given the manifest contains verification information
|
||||||
|
1. Engage the block exchange module in order to fetch the blocks of the slot as indicated by the slot index and manifest information.
|
||||||
|
1. Engage the slot-builder module to build a slot in accordance with the provided slot index. This will ensure the slot data is contained in the local data storage module.
|
||||||
|
|
||||||
## 6. Dependencies
|
## 6. Dependencies
|
||||||
| Dependency | Implementation |
|
This component depends on every other component. It contributes no additional dependencies unique to itself.
|
||||||
|------------|----------------|
|
|
||||||
|
|
||||||
## 7. Data Models
|
## 7. Data Models
|
||||||
Data structures, schemas, or classes used or produced.
|
Data structures, schemas, or classes used or produced.
|
||||||
|
|
||||||
|
### Node
|
||||||
|
Central orchestrator component of the Codex node application.
|
||||||
|
```
|
||||||
|
Contracts* =
|
||||||
|
tuple[
|
||||||
|
client: ?ClientInteractions,
|
||||||
|
host: ?HostInteractions,
|
||||||
|
validator: ?ValidatorInteractions,
|
||||||
|
]
|
||||||
|
|
||||||
|
CodexNode* = object
|
||||||
|
switch: Switch
|
||||||
|
networkId: PeerId
|
||||||
|
networkStore: NetworkStore
|
||||||
|
engine: BlockExcEngine
|
||||||
|
prover: ?Prover
|
||||||
|
discovery: Discovery
|
||||||
|
contracts*: Contracts
|
||||||
|
clock*: Clock
|
||||||
|
storage*: Contracts
|
||||||
|
taskpool: Taskpool
|
||||||
|
trackedFutures: TrackedFutures
|
||||||
|
```
|
||||||
|
|
||||||
|
### API
|
||||||
|
Module responsible for exposing Codex node functionality via HTTP requests. Contains categories:
|
||||||
|
- Data API
|
||||||
|
- Sales API
|
||||||
|
- Purchasing API
|
||||||
|
- Node API
|
||||||
|
- Debug API
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user