Skip to content

Commit

Permalink
refactor(dal): Deprecate l1_batches.l2_to_l1_logs (#2175)
Browse files Browse the repository at this point in the history
**review notes**: 
- changes in `core/lib/types/src/commitment/tests/**.json`s - only
formatting.
- as a follow-up to this PR there should be another PR that adds drop
`l1_batches.l2_to_l1_logs` column migration.

## What ❔

- New dal method `get_l2_to_l1_logs_by_number` that fetches logs for a
specific number from `l2_to_l1_logs` table.
- More complicated way to construct `L1BatchHeader`. Now we fetch data
from the `l1_batches` table as `StorageL1BatchHeader `..then fetch l2l1
logs using `get_l2_to_l1_logs_by_number` and after, use the helper
`into_l1_batch_header_with_logs ` method to construct `L1BatchHeader`.

## Why ❔

The main motivation for this change is to avoid keeping info about l2l1
logs in 2 tables.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] 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`.
  • Loading branch information
AnastasiiaVashchuk authored Jun 28, 2024
1 parent 3d047ea commit 4f77439
Show file tree
Hide file tree
Showing 28 changed files with 818 additions and 2,459 deletions.

This file was deleted.

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

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

Loading

0 comments on commit 4f77439

Please sign in to comment.