feat(sidecar): Signature checks (user, proposer) + refactor #42
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.
Signatures in Bolt
In Bolt, various parties must provide signed values to securely exchange information.
The key types of signatures required are:
User Signature
Commitment requests from users must be signed using the sender's private key, the same secp256k1 private key used for signing Ethereum transactions. The structure of these messages is as follows:
To request an inclusion commitment, users sign this struct. The sidecar verifies that the sender, recovered via ecrecover from the message and signature, matches the sender of the transaction requested 1.
Proposer Signature
Proposers (entities operating the Bolt sidecar) must sign any
SignedCommitment
:Commitments signed by the proposer's private key are essential for attributing faults and enforcing slashing.
Discussion on Signature Types
There has been extensive debate over which signature types to use: ECDSA, Schnorr, BLS, etc. Our current requirements do not mandate a specific cryptographic signature "at runtime" (i.e., during the operation of the Bolt protocol and signing commitments).
However, the opt-in procedure must be linked to the beacon chain validator identity. Proposers need to bind a private key to their validator pubkey, allowing them to use this new private key to authenticate commitments.
For now, the specific way to perform this binding is out of scope of the sidecar and will not be important for the devnet.
Footnotes
Note: This constraint can be relaxed in the future; for V0.1, we will continue to enforce this check. ↩