Skip to content

Commit

Permalink
Add support for blob certification and verification info lookup APIs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jianoaix authored Dec 21, 2024
1 parent 122a438 commit f8b0d31
Show file tree
Hide file tree
Showing 5 changed files with 987 additions and 12 deletions.
305 changes: 302 additions & 3 deletions disperser/dataapi/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"Feed"
"Batch"
],
"summary": "Fetch batch by the batch header hash",
"parameters": [
Expand All @@ -37,7 +37,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dataapi.BlobResponse"
"$ref": "#/definitions/dataapi.BatchResponse"
}
},
"400": {
Expand Down Expand Up @@ -67,7 +67,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"Feed"
"Blob"
],
"summary": "Fetch blob metadata by blob key",
"parameters": [
Expand Down Expand Up @@ -107,6 +107,105 @@ const docTemplate = `{
}
}
},
"/blobs/{blob_key}/certificate": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Blob"
],
"summary": "Fetch blob certificate by blob key",
"parameters": [
{
"type": "string",
"description": "Blob key in hex string",
"name": "blob_key",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dataapi.BlobCertificateResponse"
}
},
"400": {
"description": "error: Bad request",
"schema": {
"$ref": "#/definitions/dataapi.ErrorResponse"
}
},
"404": {
"description": "error: Not found",
"schema": {
"$ref": "#/definitions/dataapi.ErrorResponse"
}
},
"500": {
"description": "error: Server error",
"schema": {
"$ref": "#/definitions/dataapi.ErrorResponse"
}
}
}
}
},
"/blobs/{blob_key}/verification-info": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Blob"
],
"summary": "Fetch blob verification info by blob key and batch header hash",
"parameters": [
{
"type": "string",
"description": "Blob key in hex string",
"name": "blob_key",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Batch header hash in hex string",
"name": "batch_header_hash",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dataapi.BlobVerificationInfoResponse"
}
},
"400": {
"description": "error: Bad request",
"schema": {
"$ref": "#/definitions/dataapi.ErrorResponse"
}
},
"404": {
"description": "error: Not found",
"schema": {
"$ref": "#/definitions/dataapi.ErrorResponse"
}
},
"500": {
"description": "error: Server error",
"schema": {
"$ref": "#/definitions/dataapi.ErrorResponse"
}
}
}
}
},
"/feed/batches/{batch_header_hash}/blobs": {
"get": {
"produces": [
Expand Down Expand Up @@ -1062,6 +1161,25 @@ const docTemplate = `{
"big.Int": {
"type": "object"
},
"core.G1Point": {
"type": "object",
"properties": {
"x": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"core.G2Point": {
"type": "object",
"properties": {
"x": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
}
}
},
"core.PaymentMetadata": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1107,6 +1225,42 @@ const docTemplate = `{
}
}
},
"core.Signature": {
"type": "object",
"properties": {
"x": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"dataapi.BatchResponse": {
"type": "object",
"properties": {
"batch_header_hash": {
"type": "string"
},
"blob_verification_infos": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_Layr-Labs_eigenda_core_v2.BlobVerificationInfo"
}
},
"signed_batch": {
"$ref": "#/definitions/dataapi.SignedBatch"
}
}
},
"dataapi.BlobCertificateResponse": {
"type": "object",
"properties": {
"blob_certificate": {
"$ref": "#/definitions/github_com_Layr-Labs_eigenda_core_v2.BlobCertificate"
}
}
},
"dataapi.BlobMetadataResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1177,6 +1331,14 @@ const docTemplate = `{
}
}
},
"dataapi.BlobVerificationInfoResponse": {
"type": "object",
"properties": {
"blob_verification_info": {
"$ref": "#/definitions/github_com_Layr-Labs_eigenda_core_v2.BlobVerificationInfo"
}
}
},
"dataapi.BlobsResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1444,6 +1606,17 @@ const docTemplate = `{
}
}
},
"dataapi.SignedBatch": {
"type": "object",
"properties": {
"attestation": {
"$ref": "#/definitions/github_com_Layr-Labs_eigenda_core_v2.Attestation"
},
"batch_header": {
"$ref": "#/definitions/github_com_Layr-Labs_eigenda_core_v2.BatchHeader"
}
}
},
"dataapi.Throughput": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1499,6 +1672,101 @@ const docTemplate = `{
}
}
},
"github_com_Layr-Labs_eigenda_core_v2.Attestation": {
"type": "object",
"properties": {
"apkg2": {
"description": "APKG2 is the aggregate public key of all signers",
"allOf": [
{
"$ref": "#/definitions/core.G2Point"
}
]
},
"attestedAt": {
"description": "AttestedAt is the time the attestation was made",
"type": "integer"
},
"batchRoot": {
"description": "BatchRoot is the root of a Merkle tree whose leaves are the keys of the blobs in the batch",
"type": "array",
"items": {
"type": "integer"
}
},
"nonSignerPubKeys": {
"description": "NonSignerPubKeys are the public keys of the operators that did not sign the blob",
"type": "array",
"items": {
"$ref": "#/definitions/core.G1Point"
}
},
"quorumAPKs": {
"description": "QuorumAPKs is the aggregate public keys of all operators in each quorum",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/core.G1Point"
}
},
"quorumNumbers": {
"description": "QuorumNumbers contains the quorums relevant for the attestation",
"type": "array",
"items": {
"type": "integer"
}
},
"quorumResults": {
"description": "QuorumResults contains the results of the quorum verification",
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"referenceBlockNumber": {
"description": "ReferenceBlockNumber is the block number at which all operator information (stakes, indexes, etc.) is taken from",
"type": "integer"
},
"sigma": {
"description": "Sigma is the aggregate signature of all signers",
"allOf": [
{
"$ref": "#/definitions/core.Signature"
}
]
}
}
},
"github_com_Layr-Labs_eigenda_core_v2.BatchHeader": {
"type": "object",
"properties": {
"batchRoot": {
"description": "BatchRoot is the root of a Merkle tree whose leaves are the keys of the blobs in the batch",
"type": "array",
"items": {
"type": "integer"
}
},
"referenceBlockNumber": {
"description": "ReferenceBlockNumber is the block number at which all operator information (stakes, indexes, etc.) is taken from",
"type": "integer"
}
}
},
"github_com_Layr-Labs_eigenda_core_v2.BlobCertificate": {
"type": "object",
"properties": {
"blobHeader": {
"$ref": "#/definitions/github_com_Layr-Labs_eigenda_core_v2.BlobHeader"
},
"relayKeys": {
"description": "RelayKeys",
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"github_com_Layr-Labs_eigenda_core_v2.BlobHeader": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1532,6 +1800,37 @@ const docTemplate = `{
}
}
},
"github_com_Layr-Labs_eigenda_core_v2.BlobVerificationInfo": {
"type": "object",
"properties": {
"BlobKey": {
"type": "array",
"items": {
"type": "integer"
}
},
"batchRoot": {
"description": "BatchRoot is the root of a Merkle tree whose leaves are the keys of the blobs in the batch",
"type": "array",
"items": {
"type": "integer"
}
},
"blobIndex": {
"type": "integer"
},
"inclusionProof": {
"type": "array",
"items": {
"type": "integer"
}
},
"referenceBlockNumber": {
"description": "ReferenceBlockNumber is the block number at which all operator information (stakes, indexes, etc.) is taken from",
"type": "integer"
}
}
},
"github_com_Layr-Labs_eigenda_disperser.BlobStatus": {
"type": "integer",
"enum": [
Expand Down
Loading

0 comments on commit f8b0d31

Please sign in to comment.