Skip to content

Commit

Permalink
[DataAPI] Implement metric for Disperser and Churner Service Availabi…
Browse files Browse the repository at this point in the history
…lity (#405)

Co-authored-by: Siddharth More <Siddhi More>
  • Loading branch information
siddimore authored Apr 1, 2024
1 parent 8a817e5 commit 409908c
Show file tree
Hide file tree
Showing 5 changed files with 445 additions and 34 deletions.
101 changes: 94 additions & 7 deletions disperser/dataapi/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const docTemplate = `{
"tags": [
"ServiceAvailability"
],
"summary": "Get status of public EigenDA services.",
"summary": "Get status of EigenDA services.",
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -200,6 +200,80 @@ const docTemplate = `{
}
}
},
"/metrics/churner-service-availability": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Churner ServiceAvailability"
],
"summary": "Get status of EigenDA churner service.",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dataapi.ServiceAvailabilityResponse"
}
},
"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"
}
}
}
}
},
"/metrics/disperser-service-availability": {
"get": {
"produces": [
"application/json"
],
"tags": [
"ServiceAvailability"
],
"summary": "Get status of EigenDA Disperser service.",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dataapi.ServiceAvailabilityResponse"
}
},
"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"
}
}
}
}
},
"/metrics/non-signers": {
"get": {
"produces": [
Expand Down Expand Up @@ -389,19 +463,19 @@ const docTemplate = `{
"core.SecurityParam": {
"type": "object",
"properties": {
"adversary_threshold": {
"adversaryThreshold": {
"description": "AdversaryThreshold is the maximum amount of stake that can be controlled by an adversary in the quorum as a percentage of the total stake in the quorum",
"type": "integer"
},
"quorum_id": {
"confirmationThreshold": {
"description": "ConfirmationThreshold is the amount of stake that must sign a message for it to be considered valid as a percentage of the total stake in the quorum",
"type": "integer"
},
"quorum_rate": {
"description": "Rate Limit. This is a temporary measure until the node can derive rates on its own using rollup authentication. This is used\nfor restricting the rate at which retrievers are able to download data from the DA node to a multiple of the rate at which the\ndata was posted to the DA node.",
"quorumID": {
"type": "integer"
},
"quorum_threshold": {
"description": "QuorumThreshold is the amount of stake that must sign a message for it to be considered valid as a percentage of the total stake in the quorum",
"quorumRate": {
"description": "Rate Limit. This is a temporary measure until the node can derive rates on its own using rollup authentication. This is used\nfor restricting the rate at which retrievers are able to download data from the DA node to a multiple of the rate at which the\ndata was posted to the DA node.",
"type": "integer"
}
}
Expand Down Expand Up @@ -533,7 +607,14 @@ const docTemplate = `{
"type": "number"
},
"total_stake": {
"description": "deprecated: use TotalStakePerQuorum instead. Remove when the frontend is updated.",
"type": "integer"
},
"total_stake_per_quorum": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
}
},
Expand All @@ -551,12 +632,18 @@ const docTemplate = `{
"dataapi.OperatorNonsigningPercentageMetrics": {
"type": "object",
"properties": {
"operator_address": {
"type": "string"
},
"operator_id": {
"type": "string"
},
"percentage": {
"type": "number"
},
"quorum_id": {
"type": "integer"
},
"total_batches": {
"type": "integer"
},
Expand Down
104 changes: 94 additions & 10 deletions disperser/dataapi/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"tags": [
"ServiceAvailability"
],
"summary": "Get status of public EigenDA services.",
"summary": "Get status of EigenDA services.",
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -196,6 +196,80 @@
}
}
},
"/metrics/churner-service-availability": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Churner ServiceAvailability"
],
"summary": "Get status of EigenDA churner service.",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dataapi.ServiceAvailabilityResponse"
}
},
"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"
}
}
}
}
},
"/metrics/disperser-service-availability": {
"get": {
"produces": [
"application/json"
],
"tags": [
"ServiceAvailability"
],
"summary": "Get status of EigenDA Disperser service.",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dataapi.ServiceAvailabilityResponse"
}
},
"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"
}
}
}
}
},
"/metrics/non-signers": {
"get": {
"produces": [
Expand Down Expand Up @@ -385,19 +459,19 @@
"core.SecurityParam": {
"type": "object",
"properties": {
"adversary_threshold": {
"adversaryThreshold": {
"description": "AdversaryThreshold is the maximum amount of stake that can be controlled by an adversary in the quorum as a percentage of the total stake in the quorum",
"type": "integer"
},
"quorum_id": {
"confirmationThreshold": {
"description": "ConfirmationThreshold is the amount of stake that must sign a message for it to be considered valid as a percentage of the total stake in the quorum",
"type": "integer"
},
"quorum_rate": {
"description": "Rate Limit. This is a temporary measure until the node can derive rates on its own using rollup authentication. This is used\nfor restricting the rate at which retrievers are able to download data from the DA node to a multiple of the rate at which the\ndata was posted to the DA node.",
"quorumID": {
"type": "integer"
},
"quorum_threshold": {
"description": "QuorumThreshold is the amount of stake that must sign a message for it to be considered valid as a percentage of the total stake in the quorum",
"quorumRate": {
"description": "Rate Limit. This is a temporary measure until the node can derive rates on its own using rollup authentication. This is used\nfor restricting the rate at which retrievers are able to download data from the DA node to a multiple of the rate at which the\ndata was posted to the DA node.",
"type": "integer"
}
}
Expand Down Expand Up @@ -529,7 +603,14 @@
"type": "number"
},
"total_stake": {
"description": "deprecated: use TotalStakePerQuorum instead. Remove when the frontend is updated.",
"type": "integer"
},
"total_stake_per_quorum": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
}
},
Expand All @@ -547,15 +628,18 @@
"dataapi.OperatorNonsigningPercentageMetrics": {
"type": "object",
"properties": {
"operator_id": {
"operator_address": {
"type": "string"
},
"operator_address": {
"operator_id": {
"type": "string"
},
"percentage": {
"type": "number"
},
"quorum_id": {
"type": "integer"
},
"total_batches": {
"type": "integer"
},
Expand Down Expand Up @@ -687,4 +771,4 @@
}
}
}
}
}
Loading

0 comments on commit 409908c

Please sign in to comment.