Skip to content

Commit

Permalink
Reachability check against v2 dispersal port (#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
pschork authored Jan 24, 2025
1 parent 0e2be0c commit d2f0be3
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 25 deletions.
8 changes: 8 additions & 0 deletions core/serialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,14 @@ func (s OperatorSocket) GetV1DispersalSocket() string {
return fmt.Sprintf("%s:%s", ip, v1DispersalPort)
}

func (s OperatorSocket) GetV2DispersalSocket() string {
ip, _, _, v2DispersalPort, err := ParseOperatorSocket(string(s))
if err != nil || v2DispersalPort == "" {
return ""
}
return fmt.Sprintf("%s:%s", ip, v2DispersalPort)
}

func (s OperatorSocket) GetRetrievalSocket() string {
ip, _, retrievalPort, _, err := ParseOperatorSocket(string(s))
if err != nil {
Expand Down
33 changes: 33 additions & 0 deletions disperser/dataapi/docs/v1/V1_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,9 @@ const docTemplateV1 = `{
"dispersal_socket": {
"type": "string"
},
"dispersal_status": {
"type": "string"
},
"operator_id": {
"type": "string"
},
Expand All @@ -935,6 +938,18 @@ const docTemplateV1 = `{
},
"retrieval_socket": {
"type": "string"
},
"retrieval_status": {
"type": "string"
},
"v2_dispersal_online": {
"type": "boolean"
},
"v2_dispersal_socket": {
"type": "string"
},
"v2_dispersal_status": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -1126,6 +1141,12 @@ const docTemplateV1 = `{
"items": {
"type": "integer"
}
},
"y": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
Expand All @@ -1134,6 +1155,9 @@ const docTemplateV1 = `{
"properties": {
"x": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
},
"y": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
}
}
},
Expand All @@ -1142,6 +1166,9 @@ const docTemplateV1 = `{
"properties": {
"x": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
},
"y": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
}
}
},
Expand Down Expand Up @@ -1172,6 +1199,12 @@ const docTemplateV1 = `{
"items": {
"type": "integer"
}
},
"a1": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
Expand Down
33 changes: 33 additions & 0 deletions disperser/dataapi/docs/v1/V1_swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,9 @@
"dispersal_socket": {
"type": "string"
},
"dispersal_status": {
"type": "string"
},
"operator_id": {
"type": "string"
},
Expand All @@ -931,6 +934,18 @@
},
"retrieval_socket": {
"type": "string"
},
"retrieval_status": {
"type": "string"
},
"v2_dispersal_online": {
"type": "boolean"
},
"v2_dispersal_socket": {
"type": "string"
},
"v2_dispersal_status": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -1122,6 +1137,12 @@
"items": {
"type": "integer"
}
},
"y": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
Expand All @@ -1130,6 +1151,9 @@
"properties": {
"x": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
},
"y": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
}
}
},
Expand All @@ -1138,6 +1162,9 @@
"properties": {
"x": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
},
"y": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
}
}
},
Expand Down Expand Up @@ -1168,6 +1195,12 @@
"items": {
"type": "integer"
}
},
"a1": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
Expand Down
22 changes: 22 additions & 0 deletions disperser/dataapi/docs/v1/V1_swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,22 @@ definitions:
type: boolean
dispersal_socket:
type: string
dispersal_status:
type: string
operator_id:
type: string
retrieval_online:
type: boolean
retrieval_socket:
type: string
retrieval_status:
type: string
v2_dispersal_online:
type: boolean
v2_dispersal_socket:
type: string
v2_dispersal_status:
type: string
type: object
dataapi.OperatorStake:
properties:
Expand Down Expand Up @@ -253,16 +263,24 @@ definitions:
items:
type: integer
type: array
"y":
items:
type: integer
type: array
type: object
encoding.G2Commitment:
properties:
x:
$ref: '#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2'
"y":
$ref: '#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2'
type: object
encoding.LengthProof:
properties:
x:
$ref: '#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2'
"y":
$ref: '#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2'
type: object
github_com_Layr-Labs_eigenda_disperser.BlobStatus:
enum:
Expand All @@ -286,6 +304,10 @@ definitions:
items:
type: integer
type: array
a1:
items:
type: integer
type: array
type: object
semver.SemverMetrics:
properties:
Expand Down
48 changes: 48 additions & 0 deletions disperser/dataapi/docs/v2/V2_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,12 @@ const docTemplateV2 = `{
"items": {
"type": "integer"
}
},
"y": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
Expand All @@ -671,6 +677,9 @@ const docTemplateV2 = `{
"properties": {
"x": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
},
"y": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
}
}
},
Expand Down Expand Up @@ -703,6 +712,12 @@ const docTemplateV2 = `{
"items": {
"type": "integer"
}
},
"y": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
Expand Down Expand Up @@ -731,6 +746,12 @@ const docTemplateV2 = `{
"items": {
"type": "integer"
}
},
"y": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
Expand All @@ -739,6 +760,9 @@ const docTemplateV2 = `{
"properties": {
"x": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
},
"y": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
}
}
},
Expand All @@ -747,6 +771,9 @@ const docTemplateV2 = `{
"properties": {
"x": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
},
"y": {
"$ref": "#/definitions/github_com_consensys_gnark-crypto_ecc_bn254_internal_fptower.E2"
}
}
},
Expand Down Expand Up @@ -949,6 +976,12 @@ const docTemplateV2 = `{
"items": {
"type": "integer"
}
},
"a1": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
Expand Down Expand Up @@ -1227,6 +1260,9 @@ const docTemplateV2 = `{
"dispersal_socket": {
"type": "string"
},
"dispersal_status": {
"type": "string"
},
"operator_id": {
"type": "string"
},
Expand All @@ -1235,6 +1271,18 @@ const docTemplateV2 = `{
},
"retrieval_socket": {
"type": "string"
},
"retrieval_status": {
"type": "string"
},
"v2_dispersal_online": {
"type": "boolean"
},
"v2_dispersal_socket": {
"type": "string"
},
"v2_dispersal_status": {
"type": "string"
}
}
},
Expand Down
Loading

0 comments on commit d2f0be3

Please sign in to comment.