Skip to content

chore: fix availabilities definition #1181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 34 additions & 24 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ components:
maxLength: 66
example: 0x...

BigInt:
type: string
description: Integer represented as decimal string

Cid:
type: string
description: Content Identifier as specified at https://github.com/multiformats/cid
Expand All @@ -55,17 +51,18 @@ components:
description: The amount of tokens paid per byte per second per slot to hosts the client is willing to pay

Duration:
type: string
description: The duration of the request in seconds as decimal string
type: integer
format: int64
description: The duration of the request in seconds

ProofProbability:
type: string
description: How often storage proofs are required as decimal string

Expiry:
type: string
type: integer
format: int64
description: A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data.
default: 10 minutes

SPR:
type: string
Expand Down Expand Up @@ -153,8 +150,9 @@ components:
id:
$ref: "#/components/schemas/Id"
totalSize:
type: string
description: Total size of availability's storage in bytes as decimal string
type: integer
format: int64
description: Total size of availability's storage in bytes
duration:
$ref: "#/components/schemas/Duration"
minPricePerBytePerSecond:
Expand All @@ -170,8 +168,9 @@ components:
- type: object
properties:
freeSize:
type: string
description: Unused size of availability's storage in bytes as decimal string
type: integer
format: int64
description: Unused size of availability's storage in bytes

SalesAvailabilityCREATE:
allOf:
Expand All @@ -190,17 +189,19 @@ components:
request:
$ref: "#/components/schemas/StorageRequest"
slotIndex:
type: string
description: Slot Index as decimal string
type: integer
format: int64
description: Slot Index number

SlotAgent:
type: object
properties:
id:
$ref: "#/components/schemas/SlotId"
slotIndex:
type: string
description: Slot Index as decimal string
type: integer
format: int64
description: Slot Index number
requestId:
$ref: "#/components/schemas/Id"
request:
Expand Down Expand Up @@ -233,12 +234,15 @@ components:
availabilityId:
$ref: "#/components/schemas/Id"
size:
$ref: "#/components/schemas/BigInt"
type: integer
format: int64
description: Size of the slot in bytes
requestId:
$ref: "#/components/schemas/Id"
slotIndex:
type: string
description: Slot Index as decimal string
type: integer
format: int64
description: Slot Index number

StorageRequestCreation:
type: object
Expand All @@ -258,17 +262,20 @@ components:
nodes:
description: Minimal number of nodes the content should be stored on
type: integer
default: 1
default: 3
minimum: 3
tolerance:
description: Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost
type: integer
default: 0
default: 1
minimum: 1
collateralPerByte:
type: string
description: Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots
expiry:
type: string
description: Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself.
type: integer
format: int64
description: Number that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself.
StorageAsk:
type: object
required:
Expand All @@ -277,8 +284,10 @@ components:
slots:
description: Number of slots (eq. hosts) that the Request want to have the content spread over
type: integer
format: int64
slotSize:
type: string
type: integer
format: int64
description: Amount of storage per slot (in bytes) as decimal string
duration:
$ref: "#/components/schemas/Duration"
Expand All @@ -288,6 +297,7 @@ components:
$ref: "#/components/schemas/PricePerBytePerSecond"
maxSlotLoss:
type: integer
format: int64
description: Max slots that can be lost without data considered to be lost

StorageRequest:
Expand Down