Skip to content

Conversation

jtraglia
Copy link
Collaborator

📝 Summary

This PR adds SSZ support to the Proposer API endpoints, as described here:

✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy
  • I have seen and agree to CONTRIBUTING.md

@jtraglia jtraglia marked this pull request as ready for review February 21, 2025 17:38
err = signedValidatorRegistrations.UnmarshalSSZ(regBytes)
default:
log.Debug("Parsing registrations as JSON")
err = json.Unmarshal(regBytes, signedValidatorRegistrations)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This request comes in huge bursts (at epoch boundary), and decoding the JSON is a huge bottleneck. That's why we've moved to the fast json decode above, that this PR deleted. We definitely need the previous fast json decoding, otherwise it's a huge bottleneck in production.

Comment on lines +57 to +62
ApplicationJSON = "application/json"
ApplicationOctetStream = "application/octet-stream"

HeaderAccept = "Accept"
HeaderContentType = "Content-Type"
HeaderEthConsensusVersion = "Eth-Consensus-Version"
Copy link
Collaborator

Choose a reason for hiding this comment

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

best move to constants.go

Copy link
Collaborator

@metachris metachris left a comment

Choose a reason for hiding this comment

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

looks good overall. has it been tested successfully on testnets/devnet tests yet?

@jtraglia
Copy link
Collaborator Author

It has not been thoroughly tested.

@metachris metachris merged commit 47cc71d into main Apr 24, 2025
4 checks passed
@metachris metachris deleted the ssz branch April 24, 2025 13:18
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