-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pruning): Record L1 batch root hash in pruning logs (#3266)
## What ❔ Records root hashes of the last hard-pruned L1 batch in pruning logs. ## Why ❔ This allows to check tree integrity after recovery after pruning. ## 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 `zkstack dev fmt` and `zkstack dev lint`.
- Loading branch information
Showing
19 changed files
with
473 additions
and
323 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...lib/dal/.sqlx/query-3785c01a8eb1eaeaf7baf0a8ba7f30cbc385e6fb6c8b8ae2c2d06b871a4cae72.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
...lib/dal/.sqlx/query-8bab3c429fc5bbf4a91819e55cfb71ef6258e011f424c705d56c9827e8277c84.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...lib/dal/.sqlx/query-c9a842d04e8b225e43f07f76541dc766262b5bdc58be0444e164b1bd9feed02d.json
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
core/lib/dal/migrations/20241112120944_add_batch_root_hash_to_pruning_logs.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE pruning_log | ||
DROP COLUMN pruned_l1_batch_root_hash; |
3 changes: 3 additions & 0 deletions
3
core/lib/dal/migrations/20241112120944_add_batch_root_hash_to_pruning_logs.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- nullable for backward compatibility | ||
ALTER TABLE pruning_log | ||
ADD COLUMN pruned_l1_batch_root_hash BYTEA DEFAULT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.