forked from 0xPolygon/cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: write on database the number of retries per certificate and the…
… certificates in a history table (0xPolygon#208) - Add new field `retries` to database, that keep the count of times of regenerated the certificate - The discarded certificates are move (if configuration allow that) to a new table `certificate_info_history` - Cherry-picked 0xPolygon#202 to fix e2e-test ## Configuration ``` [AggSender] KeepCertificatesHistory = true ``` --------- Co-authored-by: Léo Vincent <28714795+leovct@users.noreply.github.com> Co-authored-by: Toni Ramírez <58293609+ToniRamirezM@users.noreply.github.com> Co-authored-by: Stefan Negovanović <stefan@ethernal.tech>
- Loading branch information
1 parent
f9e53b7
commit f792176
Showing
17 changed files
with
136 additions
and
88 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
-- +migrate Down | ||
DROP TABLE IF EXISTS certificate_info; | ||
DROP TABLE IF EXISTS certificate_info_history; | ||
DROP TABLE IF EXISTS certificate_info_history; | ||
|
||
-- +migrate Up | ||
CREATE TABLE certificate_info ( | ||
height INTEGER NOT NULL, | ||
certificate_id VARCHAR NOT NULL PRIMARY KEY, | ||
retry_count INTEGER DEFAULT 0, | ||
certificate_id VARCHAR NOT NULL, | ||
status INTEGER NOT NULL, | ||
previous_local_exit_root VARCHAR, | ||
new_local_exit_root VARCHAR NOT NULL, | ||
from_block INTEGER NOT NULL, | ||
to_block INTEGER NOT NULL, | ||
created_at INTEGER NOT NULL, | ||
updated_at INTEGER NOT NULL, | ||
signed_certificate TEXT | ||
); | ||
signed_certificate TEXT, | ||
PRIMARY KEY (height) | ||
); | ||
|
||
CREATE TABLE certificate_info_history ( | ||
height INTEGER NOT NULL , | ||
retry_count INTEGER DEFAULT 0, | ||
certificate_id VARCHAR NOT NULL, | ||
status INTEGER NOT NULL, | ||
previous_local_exit_root VARCHAR, | ||
new_local_exit_root VARCHAR NOT NULL, | ||
from_block INTEGER NOT NULL, | ||
to_block INTEGER NOT NULL, | ||
created_at INTEGER NOT NULL, | ||
updated_at INTEGER NOT NULL, | ||
signed_certificate TEXT, | ||
PRIMARY KEY (height, retry_count) | ||
); |
Oops, something went wrong.