Skip to content

Commit

Permalink
chore: update mithril spec to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
slowbackspace committed Jul 18, 2024
1 parent d1ab656 commit 013d5cc
Show file tree
Hide file tree
Showing 5 changed files with 197 additions and 109 deletions.
2 changes: 1 addition & 1 deletion json-schema.json

Large diffs are not rendered by default.

79 changes: 48 additions & 31 deletions mithril.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ info:
# `mithril-common/src/lib.rs` file. If you plan to update it
# here to reflect changes in the API, please also update the constant in the
# Rust file.
version: 0.1.21
version: 0.1.27
title: Mithril Aggregator Server
description: |
The REST API provided by a Mithril Aggregator Node in a Mithril network.
Expand Down Expand Up @@ -33,13 +33,14 @@ paths:
* Open API version
* URL of Mithril documentation
* Capabilities of the aggregator
* Cardano transactions prover capabilities
responses:
"200":
description: root found
content:
application/json:
schema:
$ref: "#/components/schemas/RootMessage"
$ref: "#/components/schemas/AggregatorFeaturesMessage"
"412":
description: API version mismatch
default:
Expand Down Expand Up @@ -382,8 +383,8 @@ paths:
type: array
items:
type: string
format: bytes
example: "6dbb104ed68481ef829a26a20142916d17985e01774d72d72c2f"
format: bytes
example: "6dbb104ed68481ef829a26a20142916d17985e01774d72d72c2f"
explode: false
responses:
"200":
Expand Down Expand Up @@ -560,8 +561,8 @@ paths:

components:
schemas:
RootMessage:
description: Aggregator public information
AggregatorFeaturesMessage:
description: Represents general information about Aggregator public information and signing capabilities
type: object
additionalProperties: false
required:
Expand Down Expand Up @@ -596,6 +597,17 @@ components:
- CardanoStakeDistribution
- CardanoImmutableFilesFull
- CardanoTransactions
cardano_transactions_prover:
description: Cardano transactions prover capabilities
type: object
additionalProperties: false
required:
- max_hashes_allowed_by_request
properties:
max_hashes_allowed_by_request:
description: Maximum number of hashes allowed for a single request
type: integer
format: int64
example:
{
"open_api_version": "0.1.17",
Expand All @@ -608,6 +620,8 @@ components:
"CardanoImmutableFilesFull",
"CardanoTransactions",
],
"cardano_transactions_prover":
{ "max_hashes_allowed_by_request": 100 },
},
}

Expand Down Expand Up @@ -694,7 +708,6 @@ components:
additionalProperties: false
required:
- epoch
- beacon
- entity_type
- protocol
- next_protocol
Expand Down Expand Up @@ -1002,10 +1015,14 @@ components:
description: Aggregate verification key (AVK) that will be used to create the next multi signature
type: string
format: bytes
latest_block_number:
description: The latest signed block number
type: string
example:
{
"snapshot_digest": "6367ee65d0d1272e6e70736a1ea2cae34015874517f6328364f6b73930966732",
"next_aggregate_verification_key": "b132362c3232352c36392c31373133352c31323235392c3235332c3233342c34226d745f636f6d6d69746d656e74223a7b22726f6f74223a5b33382c3382c3138322c3231322c2c363",
"latest_block_number": "123456",
}

ProtocolMessage:
Expand Down Expand Up @@ -1117,7 +1134,6 @@ components:
- hash
- previous_hash
- epoch
- beacon
- signed_entity_type
- metadata
- protocol_message
Expand Down Expand Up @@ -1241,7 +1257,6 @@ components:
- hash
- previous_hash
- epoch
- beacon
- signed_entity_type
- metadata
- protocol_message
Expand Down Expand Up @@ -1615,7 +1630,8 @@ components:
- hash
- certificate_hash
- merkle_root
- beacon
- epoch
- block_number
- created_at
properties:
hash:
Expand All @@ -1630,8 +1646,12 @@ components:
description: Merkle root of the Cardano transactions set
type: string
format: bytes
beacon:
$ref: "#/components/schemas/CardanoDbBeacon"
epoch:
$ref: "#/components/schemas/Epoch"
block_number:
description: Cardano block number
type: integer
format: int64
created_at:
description: Date and time at which the Cardano transactions set was created
type: string
Expand All @@ -1641,12 +1661,8 @@ components:
"hash": "6367ee65d0d1272e6e70736a1ea2cae34015874517f6328364f6b73930966732",
"certificate_hash": "7905e83ab5d7bc082c1bbc3033bfd19c539078830d19080d1f241c70aa532572",
"merkle_root": "33bfd17bc082ab5dd1fc0788241c70aa5325241c70aa532530d190809c5391bbc307905e8372",
"beacon":
{
"network": "mainnet",
"epoch": 329,
"immutable_file_number": 7060000,
},
"epoch": 123,
"block_number": 1234,
"created_at": "2022-06-14T10:52:31Z",
}

Expand All @@ -1658,7 +1674,8 @@ components:
- hash
- certificate_hash
- merkle_root
- beacon
- epoch
- block_number
- created_at
properties:
hash:
Expand All @@ -1673,8 +1690,12 @@ components:
description: Merkle root of the Cardano transactions set
type: string
format: bytes
beacon:
$ref: "#/components/schemas/CardanoDbBeacon"
epoch:
$ref: "#/components/schemas/Epoch"
block_number:
description: Cardano block number
type: integer
format: int64
created_at:
description: Date and time at which the Cardano transactions set was created
type: string
Expand All @@ -1684,12 +1705,8 @@ components:
"hash": "6367ee65d0d1272e6e70736a1ea2cae34015874517f6328364f6b73930966732",
"certificate_hash": "7905e83ab5d7bc082c1bbc3033bfd19c539078830d19080d1f241c70aa532572",
"merkle_root": "33bfd17bc082ab5dd1fc0788241c70aa5325241c70aa532530d190809c5391bbc307905e8372",
"beacon":
{
"network": "mainnet",
"epoch": 329,
"immutable_file_number": 7060000,
},
"epoch": 123,
"block_number": 1234,
"created_at": "2022-06-14T10:52:31Z",
}

Expand All @@ -1701,7 +1718,7 @@ components:
- certificate_hash
- certified_transactions
- non_certified_transactions
- latest_immutable_file_number
- latest_block_number
properties:
certificate_hash:
description: Hash of the certificate that validate the merkle root of this proof
Expand Down Expand Up @@ -1732,8 +1749,8 @@ components:
description: Hash of the non certified Cardano transactions
type: string
format: bytes
latest_immutable_file_number:
description: Last immutable file number
latest_block_number:
description: Last block number
type: integer
format: int64
example:
Expand All @@ -1752,7 +1769,7 @@ components:
],
"non_certified_transactions":
["732d0d1272e6e70736367ee6f6328364f6b739309666a1ea2cae34015874517"],
"latest_immutable_file_number": 7060000,
"latest_block_number": 7060000,
}

Error:
Expand Down
Loading

0 comments on commit 013d5cc

Please sign in to comment.