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-m0-implementation): send blob id to l1 #332

Merged

Conversation

juan518munoz
Copy link

What ❔

Send Eigend DA blob id to L1, in order to persist it and be able to rebuild the chain from it.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

let latest_block = provider.get_block_number().await?;
let mut json_array = Vec::new();

for block_number in 0..=latest_block {

Choose a reason for hiding this comment

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

For holesky testing we should not start at 0 or it will take too long, maybe this could be a parameter

Comment on lines 122 to 125
let validator_timelock_address =
Address::from_str("0x95af79aAB990f9740c029013ef18f3D3d666B4e8")?;
let commit_batches_selector = "6edd4f12";

Choose a reason for hiding this comment

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

The validator_timelock_address is different each init, so it should be a parameter, the function selector usually does not change, so it is fine.

We should also add the url as parameter, for testing on holesky

@gianbelinche
Copy link

We should add steps on how to run the get all blobs on the Readme

Copy link

@gianbelinche gianbelinche Nov 11, 2024

Choose a reason for hiding this comment

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

Does it needs all those workspaces? Specially the zksync one, since it makes the compile time longer

Comment on lines 97 to 99
let pubdata_commitments = commit_batch_info.last().ok_or(anyhow::anyhow!(
"pubdata_commitments not found in commitBatchesSharedBridge input"
))?;

Choose a reason for hiding this comment

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

Instead of taking the last, we should loop it and for each one decode a blob info and push it to the json


let validator_timelock_address = Address::from_str(&args[1])?;

let commit_batches_selector = "6edd4f12";

Choose a reason for hiding this comment

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

this can be a constant

}

async fn decode_blob_data_input(input: &[u8]) -> anyhow::Result<Vec<BlobData>> {
let path = "./abi/commitBatchesSharedBridge.json";

Choose a reason for hiding this comment

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

this can be a constant too

Copy link

@gianbelinche gianbelinche left a comment

Choose a reason for hiding this comment

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

LGTM

@juan518munoz juan518munoz merged commit 5e3b125 into eigen-client-m0-implementation Nov 20, 2024
6 of 9 checks passed
@juan518munoz juan518munoz deleted the eigen-client-m0-send-blobid-to-l1 branch November 20, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants