Skip to content

Conversation

@iurii-ssv
Copy link

This PR should allow a commit-boost operator to use the API of their own SSV node (instead of relying on a 3rd party API that is currently available at api.ssv.network).

The SSV node API looks like this (it is different from the API-endpoint exposed by api.ssv.network service):

  • request example:
curl --request GET \
  --url {ssv_node_base_url}/v1/validators \
  --header 'Content-Type: application/json' \
  --data '{
  "operators": [1]
}'
  • response example:
{
  "data": [
    {
      "public_key": "aa370f6250d421d00437b9900407a7ad93b041aeb7259d99b55ab8b163277746680e93e841f87350737bceee46aa104d",
      "index": "1311498",
      "status": "active_ongoing",
      "activation_epoch": "273156",
      "exit_epoch": "18446744073709551615",
      "owner": "5e33db0b37622f7e6b2f0654aa7b985d854ea9cb",
      "committee": [
        1,
        2,
        3,
        4
      ],
      "quorum": 0,
      "partial_quorum": 0,
      "graffiti": "",
      "liquidated": false
    }
  ]
}

See also the original implementation PR (the old way)

@jclapis
Copy link
Collaborator

jclapis commented Dec 9, 2025

I did a little cleanup and modified the SSV setup so now there are 2 separate parameters: ssv_node_api_url for the local node, and ssv_public_api_url for the 3rd-party public API server we previously used. Queries will try the local node first, and only use the public API as a fallback if the local node fails, I also added unit tests to confirm that the local node request routine works properly according to the above example, and to confirm the failover works transparently.

@jclapis jclapis self-assigned this Dec 9, 2025
@jclapis jclapis requested a review from ltitanb December 9, 2025 02:17
Copy link
Author

@iurii-ssv iurii-ssv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants