From 65ed23fe0625cf9e4bb19230bdd131db7ccf62b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Uhl=C3=AD=C5=99?= Date: Mon, 31 Mar 2025 17:36:40 +0200 Subject: [PATCH 1/3] chore: fix availabilities definition --- openapi.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 70da398bf..fcca74f41 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -153,8 +153,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: @@ -170,8 +171,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: From dfab870d62b307a64c3e69c00e180d40b274d66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Uhl=C3=AD=C5=99?= Date: Mon, 31 Mar 2025 17:48:35 +0200 Subject: [PATCH 2/3] chore: fix more number types --- openapi.yaml | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index fcca74f41..6d2bc3657 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -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 @@ -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 @@ -192,8 +189,9 @@ 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 @@ -201,8 +199,9 @@ components: 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: @@ -235,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 @@ -260,17 +262,18 @@ components: nodes: description: Minimal number of nodes the content should be stored on type: integer - default: 1 + default: 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 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: From 833aec659330c9faa0caf854279d8f037e562502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Uhl=C3=AD=C5=99?= Date: Mon, 31 Mar 2025 18:46:20 +0200 Subject: [PATCH 3/3] chore: slotsize integer --- openapi.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 6d2bc3657..689e6224e 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -263,10 +263,12 @@ components: description: Minimal number of nodes the content should be stored on type: integer 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: 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 @@ -282,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" @@ -293,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: