-
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(en): consistency checker persistent cursor (#1466)
## What ❔ Makes the L1 batch number cursor used by the consistency checker (i.e., the last checked L1 batch) persistent. ## Why ❔ Consistency checker seems to be the only component that has a logical L1 batch number cursor influencing pruning without persistence. (E.g., metadata calc, commitment generator and batch status updater all have persistent cursors stored in Postgres.) --------- Signed-off-by: tomg10 <lemures64@gmail.com>
- Loading branch information
Showing
7 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...lib/dal/.sqlx/query-ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
...lib/dal/.sqlx/query-f5854ce2c37bc66d38b05c9fb985618fd95722a77cc44a2e0519f3740191dc75.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
core/lib/dal/migrations/20240320173835_consistency-checker-cursor.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 @@ | ||
DROP TABLE consistency_checker_info; |
9 changes: 9 additions & 0 deletions
9
core/lib/dal/migrations/20240320173835_consistency-checker-cursor.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,9 @@ | ||
CREATE TABLE consistency_checker_info | ||
( | ||
last_processed_l1_batch BIGINT NOT NULL, | ||
created_at TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP NOT NULL | ||
); | ||
|
||
INSERT INTO consistency_checker_info(last_processed_l1_batch, created_at, updated_at) | ||
VALUES (0, NOW(), NOW()); |
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
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
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