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

feat(eigen-client-pr-comments): Eigen client pr comments #365

Merged
merged 17 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions core/lib/config/src/configs/da_client/eigen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,10 @@ pub struct EigenConfig {
pub eigenda_eth_rpc: String,
/// Address of the service manager contract
pub eigenda_svc_manager_address: String,
/// Maximun amount of time in milliseconds to wait for a status query response
pub status_query_timeout: u64,
/// Interval in milliseconds to query the status of a blob
pub status_query_interval: u64,
/// Wait for the blob to be finalized before returning the response
pub wait_for_finalization: bool,
/// Authenticated dispersal
pub authenticated: bool,
/// Verify the certificate of dispatched blobs
pub verify_cert: bool,
/// Path or link to the file containing the points used for KZG
pub points_source: PointsSource,
/// Chain ID of the Ethereum network
Expand Down
9 changes: 0 additions & 9 deletions core/lib/env_config/src/da_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@ impl FromEnv for DAClientConfig {
.parse()?,
eigenda_eth_rpc: env::var("DA_EIGENDA_ETH_RPC")?,
eigenda_svc_manager_address: env::var("DA_EIGENDA_SVC_MANAGER_ADDRESS")?,
status_query_timeout: env::var("DA_STATUS_QUERY_TIMEOUT")?.parse()?,
status_query_interval: env::var("DA_STATUS_QUERY_INTERVAL")?.parse()?,
wait_for_finalization: env::var("DA_WAIT_FOR_FINALIZATION")?.parse()?,
authenticated: env::var("DA_AUTHENTICATED")?.parse()?,
verify_cert: env::var("DA_VERIFY_CERT")?.parse()?,
points_source: match env::var("DA_POINTS_SOURCE")?.as_str() {
"Path" => zksync_config::configs::da_client::eigen::PointsSource::Path(
env::var("DA_POINTS_PATH")?,
Expand Down Expand Up @@ -281,11 +278,8 @@ mod tests {
DA_SETTLEMENT_LAYER_CONFIRMATION_DEPTH=0
DA_EIGENDA_ETH_RPC="http://localhost:8545"
DA_EIGENDA_SVC_MANAGER_ADDRESS="0x123"
DA_STATUS_QUERY_TIMEOUT=2
DA_STATUS_QUERY_INTERVAL=3
DA_WAIT_FOR_FINALIZATION=true
DA_AUTHENTICATED=false
DA_VERIFY_CERT=false
DA_POINTS_SOURCE="Path"
DA_POINTS_PATH="resources"
DA_CHAIN_ID=1
Expand All @@ -300,11 +294,8 @@ mod tests {
settlement_layer_confirmation_depth: 0,
eigenda_eth_rpc: "http://localhost:8545".to_string(),
eigenda_svc_manager_address: "0x123".to_string(),
status_query_timeout: 2,
status_query_interval: 3,
wait_for_finalization: true,
authenticated: false,
verify_cert: false,
points_source: PointsSource::Path("resources".to_string()),
chain_id: 1
})
Expand Down
8 changes: 0 additions & 8 deletions core/lib/protobuf_config/src/da_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,9 @@ impl ProtoRepr for proto::DataAvailabilityClient {
eigenda_svc_manager_address: required(&conf.eigenda_svc_manager_address)
.context("eigenda_svc_manager_address")?
.clone(),
status_query_timeout: *required(&conf.status_query_timeout)
.context("status_query_timeout")?,
status_query_interval: *required(&conf.status_query_interval)
.context("status_query_interval")?,
wait_for_finalization: *required(&conf.wait_for_finalization)
.context("wait_for_finalization")?,
authenticated: *required(&conf.authenticated).context("authenticated")?,
verify_cert: *required(&conf.verify_cert).context("verify_cert")?,
points_source: match conf.points_source.clone() {
Some(proto::eigen_config::PointsSource::Path(path)) => {
let path = required(&path.path).context("path")?;
Expand Down Expand Up @@ -133,11 +128,8 @@ impl ProtoRepr for proto::DataAvailabilityClient {
),
eigenda_eth_rpc: Some(config.eigenda_eth_rpc.clone()),
eigenda_svc_manager_address: Some(config.eigenda_svc_manager_address.clone()),
status_query_timeout: Some(config.status_query_timeout),
status_query_interval: Some(config.status_query_interval),
wait_for_finalization: Some(config.wait_for_finalization),
authenticated: Some(config.authenticated),
verify_cert: Some(config.verify_cert),
points_source: Some(match &config.points_source {
zksync_config::configs::da_client::eigen::PointsSource::Path(path) => {
proto::eigen_config::PointsSource::Path(Path {
Expand Down
13 changes: 5 additions & 8 deletions core/lib/protobuf_config/src/proto/config/da_client.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,13 @@ message EigenConfig {
optional int32 settlement_layer_confirmation_depth = 4;
optional string eigenda_eth_rpc = 5;
optional string eigenda_svc_manager_address = 6;
optional uint64 status_query_timeout = 7;
optional uint64 status_query_interval = 8;
optional bool wait_for_finalization = 9;
optional bool authenticated = 10;
optional bool verify_cert = 11;
optional bool wait_for_finalization = 8;
optional bool authenticated = 9;
oneof points_source {
Path path = 12;
Link link = 13;
Path path = 10;
Link link = 11;
}
optional uint64 chain_id = 14;
optional uint64 chain_id = 12;
reserved 1,2;
reserved "rpc_node_url","inclusion_polling_interval_ms";
}
Expand Down
2 changes: 1 addition & 1 deletion core/node/da_clients/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ pbjson-types.workspace = true

# Eigen dependencies
tokio-stream.workspace = true
rlp.workspace = true
rand.workspace = true
sha3.workspace = true
tiny-keccak.workspace = true
Expand All @@ -66,3 +65,4 @@ num-bigint.workspace = true
serial_test.workspace = true
zksync_web3_decl.workspace = true
zksync_eth_client.workspace = true
url.workspace = true
24 changes: 0 additions & 24 deletions core/node/da_clients/src/eigen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,6 @@ EigenDA is as a high-throughput data availability layer for rollups. It is an Ei
Service), so it leverages Ethereum's economic security instead of bootstrapping a new network with its own validators.
For more information you can check the [docs](https://docs.eigenda.xyz/).

## Status

There a 3 milestones defined, we are currently on the first one.

### M0: Read and Write integration

The scope of this first milestone is to spin up a local EigenDA dev environment, spin up a local zksync-era dev
environment and integrate them. Instead of sending 4844 blobs, the zksync-era sends blobs to EigenDA. On L1, mock the
verification logic, such that blocks continue building. Increase the blob size from 4844 size to 2MiB blob. Deploy the
integration to Holesky testnet and provide scripts to setup a network using EigenDA as DA provider.

### M1: Secure integration with ZKProver

For this milestone the scope is to replace the mocked L1 verification logic with EigenDA compatible verifier. It should
integrate EigenDA certificate verification, and use it as the equivalent part for 4844 versioned hash. More importantly
modify the equivalence proof in Zksync L1 contract such that the proof can be verified correctly with respect to the
EigenDA commitment, which also lives in BN254 as zksync. Start with 128MiB blob, then 2MiB, up-to 32MiB blobs. Prepare
documentation and tooling in order to onboard rollups with EigenDA.

### M2: Secure and cost efficient

The scope is to explore approaches to reduce cost. For example, faster proof generation time. Verify EigenDA signature
inside circuit, this requires L2 having access to L1 state. Integrate EigenDA into ZKporter.

## Temporary

In order to implement the integration we generated some `.proto` files from EigenDA repo that were compiled using the
Expand Down
Loading
Loading