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: integrate gateway changes for some components #3274

Merged
merged 14 commits into from
Nov 27, 2024

Conversation

perekopskiy
Copy link
Contributor

@perekopskiy perekopskiy commented Nov 14, 2024

What ❔

Generally moves some code from gateway integration branch into main. High-level list of changes:

  • eth_watch: refactors watcher's client so it can use L2-specific features if gateway is queried. New event processor is added for chains that settle on gateway, it calculates part of merkle proof for L2->L1 logs.
  • api: new method is added to unstable namespace that is utilized by the new event processor. This method encapsulates a few storage reads + builds merkle tree. This is a temporary measure and method will likely be removed (that's why it's in unstable namespace) pretty soon after a contract getter that does exactly the same is merged into contracts, replacing unstable_getChainLogProof invocation with a simple eth_call
  • consistency_checker, tree_data_fetcher: adds support for reading batch commitment from either L1 or GW depending on what the SL is for a batch.
  • adds support for new format of commitBatches, proveBatches, executeBatches data encoding
  • bug fixes: L2_NATIVE_TOKEN_VAULT_ADDRESS was used instead of L2_ASSET_ROUTER_ADDRESS in core/bin/external_node/src/node_builder.rs, mixed up if/else branches in core/node/commitment_generator/src/lib.rs
  • some clean up, renaming, refactoring: resolve_l1_batch_to_l2_block + get_block_details are replaced with just get_batch_details in batch_status_updater, some code for old protocol versions (pre-boojum or pre-shared-bridge) removed, l1_ prefix is added to some addresses to avoid confusion

Why ❔

Finalize and merge some gateway features

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.

@perekopskiy perekopskiy marked this pull request as ready for review November 14, 2024 14:47
Copy link
Contributor

@slowli slowli left a comment

Choose a reason for hiding this comment

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

May have another round of review later. I feel that not being quite familiar with the domain (i.e., how gateway works in detail) is my problem.

core/bin/external_node/src/config/mod.rs Show resolved Hide resolved
core/lib/contracts/src/lib.rs Show resolved Hide resolved
core/lib/dal/src/blocks_dal.rs Show resolved Hide resolved
core/node/eth_watch/src/lib.rs Show resolved Hide resolved
core/node/node_sync/src/tree_data_fetcher/mod.rs Outdated Show resolved Hide resolved
core/node/node_sync/src/tree_data_fetcher/provider/mod.rs Outdated Show resolved Hide resolved
@perekopskiy perekopskiy requested review from slowli and tomg10 November 19, 2024 15:51
tomg10
tomg10 previously approved these changes Nov 25, 2024
Copy link
Contributor

@tomg10 tomg10 left a comment

Choose a reason for hiding this comment

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

I only had some minor comments

core/lib/config/src/configs/secrets.rs Outdated Show resolved Hide resolved
core/lib/constants/src/contracts.rs Outdated Show resolved Hide resolved
core/lib/dal/src/blocks_dal.rs Show resolved Hide resolved
core/node/eth_watch/src/tests/mod.rs Show resolved Hide resolved
@tomg10 tomg10 self-requested a review November 27, 2024 14:20
@perekopskiy perekopskiy added this pull request to the merge queue Nov 27, 2024
Merged via the queue into main with commit cbc91e3 Nov 27, 2024
43 checks passed
@perekopskiy perekopskiy deleted the integrate-gateway-into-more-components branch November 27, 2024 16:16
github-merge-queue bot pushed a commit that referenced this pull request Dec 11, 2024
🤖 I have created a release *beep* *boop*
---


##
[25.3.0](core-v25.2.0...core-v25.3.0)
(2024-12-11)


### Features

* change seal criteria for gateway
([#3320](#3320))
([a0a74aa](a0a74aa))
* **contract-verifier:** Download compilers from GH automatically
([#3291](#3291))
([a10c4ba](a10c4ba))
* integrate gateway changes for some components
([#3274](#3274))
([cbc91e3](cbc91e3))
* **proof-data-handler:** exclude batches without object file in GCS
([#2980](#2980))
([3e309e0](3e309e0))
* **pruning:** Record L1 batch root hash in pruning logs
([#3266](#3266))
([7b6e590](7b6e590))
* **state-keeper:** mempool io opens batch if there is protocol upgrade
tx ([#3360](#3360))
([f6422cd](f6422cd))
* **tee:** add error handling for unstable_getTeeProofs API endpoint
([#3321](#3321))
([26f630c](26f630c))
* **zksync_cli:** Health checkpoint improvements
([#3193](#3193))
([440fe8d](440fe8d))


### Bug Fixes

* **api:** batch fee input scaling for `debug_traceCall`
([#3344](#3344))
([7ace594](7ace594))
* **tee:** correct previous fix for race condition in batch locking
([#3358](#3358))
([b12da8d](b12da8d))
* **tee:** fix race condition in batch locking
([#3342](#3342))
([a7dc0ed](a7dc0ed))
* **tracer:** adds vm error to flatCallTracer error field if exists
([#3374](#3374))
([5d77727](5d77727))

---
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 <[email protected]>
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.

4 participants