Add SSZ support to register validator api #110
+5
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up on #104 to also add SSZ support to
registerValidator
api, which should help in cases where the validator client runs a lot of keys and reduce amount of failed requests.Since we can't really know if the server supports sending the validator registration as SSZ encoded payload the client will be responsible to retry the request using JSON which ideally should only be done if the error status code is 415, indicating an unsupported media type, but since right now we don't really know if all servers properly follow the spec, it is recommended to retry all HTTP errors and after the first error, the client should stop sending SSZ encoded validator registrations.