-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!(consensus): implement preshards and shard groups
- Loading branch information
Showing
113 changed files
with
2,365 additions
and
1,423 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
10 changes: 5 additions & 5 deletions
10
.../src/substate_storage_sqlite/migrations/2024-04-04-201211_create_scanned_block_ids/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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
-- Latests scanned blocks, separatedly by committee (epoch + shard) | ||
-- Used mostly for effient scanning of events in the whole network | ||
-- Latest scanned blocks, separately by committee (epoch + shard) | ||
-- Used mostly for efficient scanning of events in the whole network | ||
create table scanned_block_ids | ||
( | ||
id integer not NULL primary key AUTOINCREMENT, | ||
epoch bigint not NULL, | ||
shard bigint not null, | ||
shard_group integer not null, | ||
last_block_id blob not null | ||
); | ||
|
||
|
||
-- There should only be one last scanned block by committee (epoch + shard) | ||
create unique index scanned_block_ids_unique_commitee on scanned_block_ids (epoch, shard); | ||
create unique index scanned_block_ids_unique_committee on scanned_block_ids (epoch, shard_group); | ||
|
||
-- DB index for faster retrieval of the latest block by committee | ||
create index scanned_block_ids_commitee on scanned_block_ids (epoch, shard); | ||
create index scanned_block_ids_committee on scanned_block_ids (epoch, shard_group); |
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
Oops, something went wrong.