diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ee2a9c..2601325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Removed + +- Removed inspect-state HTTP API + ## [0.6.0] - 2023-04-18 ### Changed diff --git a/Makefile b/Makefile index fa97467..a9046ef 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ SWAGGER_CODEGEN := swagger-codegen-cli.jar .PHONY: all -DOCS := docs/rollup docs/inspect +DOCS := docs/rollup all: $(DOCS) diff --git a/inspect.yaml b/inspect.yaml deleted file mode 100644 index af08845..0000000 --- a/inspect.yaml +++ /dev/null @@ -1,130 +0,0 @@ -openapi: 3.0.0 - -info: - title: Inspect-state HTTP API for Cartesi Rollups - version: 0.6.0 - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - - description: | - API that allows the DApp frontend to make inspect-state requests to the DApp backend. - -paths: - /{payload}: - get: - operationId: inspect - summary: Inspect DApp state via GET - description: | - This method sends an inspect-state request to the DApp backend, passing the payload string in the URL. - The payload string should be URL-encoded; the inspect server will decode the string to UTF-8. - If the DApp frontend needs to pass a binary string to the backend then it is advised to use the POST method. - - The response contains a status string and the reports generated by the DApp backend. - The status string can be either 'accept', 'reject', or 'exception'. - In case of exception, the field exception_payload will contain the exception payload; - Otherwise, this field will be null. - - When running on machine mode, the whole Cartesi machine is rolled back after processing the inspect-state request. - On host mode, it is advised against changing the DApp backend state when processing an inspect-state request. - Notice that this method is synchronous, so it is not advised to be used for performing resource-intensive operations. - - parameters: - - in: path - name: payload - required: true - schema: - type: string - - responses: - "200": - description: Inspect state response. - content: - application/json: - schema: - $ref: "#/components/schemas/InspectResponse" - - default: - description: Error response. - content: - text/plain: - schema: - $ref: "#/components/schemas/Error" - - post: - operationId: inspect_post - summary: Inspect DApp state via POST - description: | - Differently from the GET method, the POST method sends an inspect-state request to the DApp backend by passing its payload in the request body. - The payload should be a binary. - Other than that, it behaves the same way as described in the GET method. - - requestBody: - content: application/octet-stream - - responses: - "200": - description: Inspect state response. - content: - application/json: - schema: - $ref: "#/components/schemas/InspectResponse" - - default: - description: Error response. - content: - text/plain: - schema: - $ref: "#/components/schemas/Error" - -components: - schemas: - InspectResponse: - type: object - properties: - status: - $ref: "#/components/schemas/CompletionStatus" - exception_payload: - $ref: "#/components/schemas/Payload" - reports: - type: array - items: - $ref: "#/components/schemas/Report" - processed_input_count: - type: integer - description: Number of processed inputs since genesis - example: 0 - - CompletionStatus: - type: string - description: Whether inspection completed or not (and why not) - enum: - [ - Accepted, - Rejected, - Exception, - MachineHalted, - CycleLimitExceeded, - TimeLimitExceeded, - ] - example: "Accepted" - - Payload: - type: string - description: | - Payload in the Ethereum hex binary format. - The first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte. - For instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175. - An empty payload is represented by the string '0x'. - example: "0xdeadbeef" - - Report: - type: object - properties: - payload: - $ref: "#/components/schemas/Payload" - - Error: - type: string - description: Detailed error message. - example: "The request could not be understood by the server due to malformed syntax"