Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP-4844 External Signer integration for blob sidecar and blinded blob sidecar #7428

Merged

Conversation

usmansaleem
Copy link
Contributor

@usmansaleem usmansaleem commented Aug 17, 2023

PR Description

External signer integration for offloading signing request for blob sidecar and blinded blob sidecar (EIP 4844)

Summary of changes:

tech.pegasys.teku.validator.client.signer

  • ExternalSigner: Implemented signBlobSidecar and signBlindedBlobSidecar. Both methods send BlindedBlobSidecar converted to json. The BlobSidecar.getBlob().hashTreeRoot() makes it compatible with
    BlindedBlobSidecar for the purpose of calculating signature remotely.
  • SignType: Introduced SignType.BLOB_SIDECAR
  • ExternalSignerDenebIntegrationTest: Integration test for above methods.

tech.pegasys.teku.api.schema

  • BlindedBlobSidecar: To convert internal BlobSidecar and BlindedBlobSidecar to JSON. Used by ExternalSigner.
  • KZGProof: Used in BlindedBlobSidecar class.

tech.pegasys.teku.provider

  • JsonProvider Register KZGProof serializer and deserializer i.e. KZGProofSerializer and KZGProofDeserializer that helps in de/serializing BlindedBlobSidecar.

The resultant JSON request would look like:

{
  "signingRoot" : "0x0ea97276a6af2d49815d0e7061280c81a480ca0291110ab3d00879ea24eec6de",
  "type" : "blob_sidecar",
  "fork_info" : {
    "genesis_validators_root" : "0x103ac9406cdc59b89027eb1c9e97f607dd5fdccfa8fb2da4eaeea9d25032add9",
    "fork" : {
      "previous_version" : "0x235bc340",
      "current_version" : "0x367cbd40",
      "epoch" : "4669978815449698508"
    }
  },
  "blob_sidecar" : {
    "block_root" : "0x8200a6402ca295554fb9562193cc71d60272d63beeaf2201fdf53e846e77f919",
    "index" : "4663368873993027404",
    "slot" : "4661716390776343276",
    "block_parent_root" : "0x1f86d83f0bf91cc0d7e07410828140e0dddbb331dc20b6743f9f79e549b50b11",
    "proposer_index" : "4598922002772542634",
    "blob_root" : "0xa1c1d7626338e1a3a4c162fe5837fe526866ee2ff3fdcbf0e8b9bd6755eeef0c",
    "kzg_commitment" : "0x0c65de3f6bad3d7be19d0de5aff82b13d6d8b49f26588dba111e361d6f5454861bed3cdff318101d882b08568904dc47",
    "kzg_proof" : "0x6b0ac13f8a279ad3abec11bed1a49214f6e7af79b643595df6a38706b338e93b118b1bb9d7fd71c2eca457b36debcec7"
  }
}

Fixed Issue(s)

fixes #6963

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Copy link
Contributor

@StefanBratanov StefanBratanov left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks a lot. :)

CHANGELOG.md Outdated Show resolved Hide resolved
@usmansaleem
Copy link
Contributor Author

The openapi spec for these changes are covered here: ethereum/remote-signing-api#4

@StefanBratanov
Copy link
Contributor

The openapi spec for these changes are covered here: ethereum/remote-signing-api#4

Oh great. I knew there were discussions about such a repo. Great to see it up and running. :)

@StefanBratanov StefanBratanov merged commit eafb4ef into Consensys:master Aug 17, 2023
4 checks passed
@usmansaleem usmansaleem deleted the blobsidecar_external_signer branch August 17, 2023 09:59
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.

Implement blob sidecars external signing
2 participants