-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: EigenDAV2 commitment processing and generation (#265)
* fix(#251): better error logging for RPC lookup errors against service manager (#254) * chore: modify verifier to not require eth archive node (#241) * chore: force verifier's EthConfirmationDepth to be <64 We panic in the flag's action, as well as in the verifier's constructor when this condition is not respected. This will make sure that an archival node is not required. * chore: modify verifier to load quorum parameters only once at initialization This removes the need for running with an eth archive node. * style: fix minor lint issue * docs: update README to mention that archival node is no longer needed * docs: clean-up README archival node requirement explanation * docs: fix verify/cert.go comment typo Co-authored-by: Ethen <[email protected]> * docs: for eg -> e.g. * style(cert): remove unecessary bound checks from inside loop * style: create consts package with EthHappyPathFinalizationDepthBlocks = 64 * style: change panic into error return * docs: change op reference for eth reference * docs: make flag comment simpler * Update verify/cert.go Co-authored-by: EthenNotEthan <[email protected]> --------- Co-authored-by: Ethen <[email protected]> * docs: pimp out readme with blob lifecycle diagrams (#233) * chore: move pull_request_template.md under .github/ dir * docs: reorder README sections to feel more natural (move flags to bottom) * docs (wip): add blob lifecycle diagrams to README * docs: remove Sidecar from README title (proxy is not necessarily a side) * docs: add blob lifecycle section to README * docs: add TOC to README * style(routing): rename raw_commitment -> payload We changed the name in README so should be consistent in the code * docs: update README sections to use Payload instead of Blob Posting Blobs -> Posting Payloads Retrieving Blobs -> Retrieving Payloads * docs: remove "obviously" word * Required quorums glitch (#255) * Avoid quorum 1 check on range of Holesky blocks * Improve SVC address check * Update verify/verifier.go Co-authored-by: Samuel Laferriere <[email protected]> * Update verify/verifier.go Co-authored-by: Samuel Laferriere <[email protected]> * Avoid unnecessary cast * Rename constant * Fix lint --------- Co-authored-by: Samuel Laferriere <[email protected]> * docs: update README posting payload image (#256) * fix: remove last eth_call that required archive node (#259) Forgot this one in #241 * docs: update SECURITY.md with audit commit + fix small typos (#263) * docs: update SECURITY.md * docs: update SECURITY.md with audited release number + release where findings were addressed * feat: EigenDAV2 commitment processing and generation * feat: EigenDAV2 commitment processing and generation - add note describing follow up todo --------- Co-authored-by: Samuel Laferriere <[email protected]> Co-authored-by: Gaston Ponti <[email protected]>
- Loading branch information
1 parent
355fc24
commit 33b2cc8
Showing
20 changed files
with
432 additions
and
294 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,14 @@ Please see [Releases](https://github.com/Layr-Labs/eigenda-proxy/releases) | |
|
||
## Audit reports | ||
|
||
Audit reports are published in the `docs/audits` folder: https://github.com/Layr-Labs/eigenda-proxy/main/docs/audits | ||
Audit reports are published in the [docs/audits](https://github.com/Layr-Labs/eigenda-proxy/tree/main/docs/audits) folder. | ||
|
||
| Date | Report Link | | ||
| ------- | ----------- | | ||
| 202501 | [pdf](https://github.com/Layr-Labs/eigenda-proxy/blob/main/docs/audits/Sigma_Prime_EigenDA_Proxy_Security_Assessment_Report.pdf) | | ||
| Date | Release (Commit) Audited | Report Link | Findings Addressed in Release | | ||
| ------ | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | | ||
| 202501 | v1.6.1 (9e1b746) | [pdf](https://github.com/Layr-Labs/eigenda-proxy/blob/main/docs/audits/Sigma_Prime_EigenDA_Proxy_Security_Assessment_Report.pdf) | v1.6.2 | | ||
|
||
## Reporting a Vulnerability | ||
|
||
**Please do not file a public ticket** mentioning the vulnerability. | ||
**Please do not file a public ticket** mentioning a vulnerability. | ||
|
||
Please report security vulnerabilities to [email protected] with the all the relavent details included in the email. | ||
Please report security vulnerabilities to [email protected] with all the relavent details included in the email. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
package commitments | ||
|
||
type CertEncodingCommitment byte | ||
type EigenDACommit byte | ||
|
||
const ( | ||
CertV0 CertEncodingCommitment = 0 | ||
// EigenDA V1 | ||
CertV0 EigenDACommit = iota | ||
CertV1 | ||
) | ||
|
||
// OPCommitment is the binary representation of a commitment. | ||
// CertCommitment is the binary representation of a commitment. | ||
type CertCommitment interface { | ||
CommitmentType() CertEncodingCommitment | ||
CommitmentType() EigenDACommit | ||
Encode() []byte | ||
Verify(input []byte) error | ||
} | ||
|
||
type CertCommitmentV0 []byte | ||
|
||
// NewV0CertCommitment creates a new commitment from the given input. | ||
func NewV0CertCommitment(input []byte) CertCommitmentV0 { | ||
return CertCommitmentV0(input) | ||
type EigenDACommitment struct { | ||
prefix EigenDACommit | ||
b []byte | ||
} | ||
|
||
// DecodeCertCommitment validates and casts the commitment into a Keccak256Commitment. | ||
func DecodeCertCommitment(commitment []byte) (CertCommitmentV0, error) { | ||
if len(commitment) == 0 { | ||
return nil, ErrInvalidCommitment | ||
// NewV0CertCommitment creates a new commitment from the given input. | ||
func NewCertCommitment(input []byte, v EigenDACommit) EigenDACommitment { | ||
return EigenDACommitment{ | ||
prefix: v, | ||
b: input, | ||
} | ||
return commitment, nil | ||
} | ||
|
||
// CommitmentType returns the commitment type of Keccak256. | ||
func (c CertCommitmentV0) CommitmentType() CertEncodingCommitment { | ||
return CertV0 | ||
// CommitmentType returns the commitment type of EigenDACommitment. | ||
func (c EigenDACommitment) CommitmentType() EigenDACommit { | ||
return c.prefix | ||
} | ||
|
||
// Encode adds a commitment type prefix self describing the commitment. | ||
func (c CertCommitmentV0) Encode() []byte { | ||
return append([]byte{byte(CertV0)}, c...) | ||
func (c EigenDACommitment) Encode() []byte { | ||
return append([]byte{byte(c.prefix)}, c.b...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package consts | ||
|
||
// EthHappyPathFinalizationDepth is the number of blocks that must be included on top of a block for it to be considered "final", | ||
// under happy-path aka normal network conditions. | ||
// | ||
// See https://www.alchemy.com/overviews/ethereum-commitment-levels for a quick TLDR explanation, | ||
// or https://eth2book.info/capella/part3/transition/epoch/#finalisation for full details. | ||
var EthHappyPathFinalizationDepthBlocks = uint8(64) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.