Skip to content

Commit

Permalink
feat: added dropping all attester certificates when doing hard fork (#…
Browse files Browse the repository at this point in the history
…2529)

Clean state at every fork is closer to what will happen during hard fork
on L1.
  • Loading branch information
pompon0 authored Jul 29, 2024
1 parent 6d86959 commit 5acd686
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.

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

8 changes: 8 additions & 0 deletions core/lib/dal/src/consensus_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ impl ConsensusDal<'_, '_> {
serde_json::value::Serializer,
)
.unwrap();
sqlx::query!(
r#"
DELETE FROM l1_batches_consensus
"#
)
.instrument("try_update_genesis#DELETE FROM l1_batches_consensus")
.execute(&mut txn)
.await?;
sqlx::query!(
r#"
DELETE FROM miniblocks_consensus
Expand Down

0 comments on commit 5acd686

Please sign in to comment.