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(en): Fetch old L1 batch hashes from L1 #2000

Merged
merged 9 commits into from
Jun 3, 2024

Conversation

slowli
Copy link
Contributor

@slowli slowli commented May 21, 2024

What ❔

Fetches commitment hashes for old L1 batches from L1 instead of using a trusted L2 node.

Why ❔

This requires slightly less trust than a trusted L2 node. While the main node can theoretically write arbitrary hash to L1, it cannot equivocate, so a "fake" hash will be discovered soon enough, and it would be impossible to prove.

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 zk fmt and zk lint.
  • Spellcheck has been run via zk spellcheck.

@slowli slowli marked this pull request as ready for review May 22, 2024 12:26
perekopskiy
perekopskiy previously approved these changes May 28, 2024
Copy link
Member

@popzxc popzxc left a comment

Choose a reason for hiding this comment

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

LGTM, though probably it makes sense to add metrics (e.g. how often do we have to use fallback provider, how many guesses we do in the binary search, etc).

@slowli
Copy link
Contributor Author

slowli commented May 31, 2024

@popzxc I was sure I've added metrics (thought about them as well) 🙃 Let me do that in a follow-up PR.

@slowli slowli added this pull request to the merge queue May 31, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 31, 2024
@slowli slowli added this pull request to the merge queue Jun 3, 2024
Merged via the queue into main with commit dc5a918 Jun 3, 2024
44 checks passed
@slowli slowli deleted the aov-pla-818-fetch-old-l1-batch-hashes-from-l1 branch June 3, 2024 07:25
github-merge-queue bot pushed a commit that referenced this pull request Jun 3, 2024
🤖 I have created a release *beep* *boop*
---


##
[24.6.0](core-v24.5.1...core-v24.6.0)
(2024-06-03)


### Features

* **en:** Fetch old L1 batch hashes from L1
([#2000](#2000))
([dc5a918](dc5a918))
* use semver for metrics, move constants to prover workspace
([#2098](#2098))
([7a50a9f](7a50a9f))


### Bug Fixes

* **api:** correct default fee data in eth call
([#2072](#2072))
([e71f6f9](e71f6f9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Jun 4, 2024
## What ❔

Adds a couple of metrics / logs for tree data fetcher related to
fetching data from L1. Follow-up after #2000.

## Why ❔

These metrics / logs would allow to track tree data fetcher health more
thoroughly.

## Checklist

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] Code has been formatted via `zk fmt` and `zk lint`.
- [x] Spellcheck has been run via `zk spellcheck`.
@iandareen iandareen mentioned this pull request Jun 6, 2024
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.

3 participants