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): Add boxed L2 client and use it in DI #1627

Merged
merged 15 commits into from
Apr 17, 2024

Conversation

slowli
Copy link
Contributor

@slowli slowli commented Apr 10, 2024

What ❔

  • Adds boxed L2 client implementation and uses it in DI instead of a specific HTTP-based client.
  • Adds a mock L2 client.
  • Uses a mock L1 and L2 clients to test EN lifecycle in Rust, namely that it can start and timely terminates when sent a SIGINT.

Why ❔

  • L2 client abstraction is better for the node framework.
  • We have a frequent issue of newly added managed tasks being non-responsive, which leads to unnecessary delays during EN shutdown (30s in the worst case).
  • Using TypeScript integration tests for this purpose is slower and provides less control.

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.
  • Linkcheck has been run via zk linkcheck.

test(en): Add basic rust tests for EN

@slowli slowli marked this pull request as ready for review April 10, 2024 13:05
montekki
montekki previously approved these changes Apr 16, 2024
@slowli slowli added this pull request to the merge queue Apr 17, 2024
Merged via the queue into main with commit 9948187 Apr 17, 2024
34 checks passed
@slowli slowli deleted the aov-pla-875-add-basic-rust-tests-for-en branch April 17, 2024 07:43
RomanBrodetski pushed a commit that referenced this pull request Apr 22, 2024
🤖 I have created a release *beep* *boop*
---


##
[23.1.0](core-v23.0.0...core-v23.1.0)
(2024-04-22)


### Features

* **en:** Add boxed L2 client and use it in DI
([#1627](#1627))
([9948187](9948187))
* Extract block_reverter into separate crate
([#1632](#1632))
([8ab2488](8ab2488))
* Extract house keeper into separate crate
([#1685](#1685))
([f6f49b7](f6f49b7))
* remove enum index migration
([#1734](#1734))
([13c0f52](13c0f52))
* **state-keeper:** miniblock max payload size (BFT-417)
([#1284](#1284))
([a3c8e81](a3c8e81))


### Bug Fixes

* **en:** Fix miscellaneous snapshot recovery nits
([#1701](#1701))
([13bfecc](13bfecc))
* ensure two connections for both executor and async catchup
([#1755](#1755))
([3b14a9f](3b14a9f))
* made consensus store certificates asynchronously from statekeeper
([#1711](#1711))
([d1032ab](d1032ab))
* **merkle_tree:** don't panic in `BlockOutputWithProofs::verify_proofs`
([#1717](#1717))
([a44fac9](a44fac9))
* **types:** fix LegacyCall type
([#1739](#1739))
([712919f](712919f))


### Performance Improvements

* **en:** Monitor recovery latency by stage
([#1725](#1725))
([d7efdd5](d7efdd5))


### Reverts

* **env:** Remove `ZKSYNC_HOME` env var from server
([#1713](#1713))
([aed23e1](aed23e1))

---
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: perekopskiy <mikeson.dp@gmail.com>
Co-authored-by: perekopskiy <53865202+perekopskiy@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Apr 24, 2024
## What ❔

- Removes duplicate reorg detector initialization that sneaked in #1627
when updating the PR. Changes the health check API to detect duplicate
components.
- Fixes a race condition in the snapshot recovery test.

## Why ❔

Running multiple reorg detectors (or multiple component instances in
general) doesn't make sense.

## 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`.
- [x] Linkcheck has been run via `zk linkcheck`.
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.

None yet

2 participants