-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to batched mode for validator list update. Update dependencies…
…. Bump version.
- Loading branch information
Showing
42 changed files
with
191 additions
and
170 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
1 change: 1 addition & 0 deletions
1
...ork/migrations/20241125143651_session_para_validator_validator_account_id_id_idx.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 @@ | ||
-- no-op |
2 changes: 2 additions & 0 deletions
2
...twork/migrations/20241125143651_session_para_validator_validator_account_id_id_idx.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,2 @@ | ||
CREATE INDEX IF NOT EXISTS sub_session_para_validator_idx_validator_account_id_id | ||
ON sub_session_para_validator (validator_account_id, id DESC); |
1 change: 1 addition & 0 deletions
1
_migrations/network/migrations/20241125150658_fx_validator_info_batch.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 FUNCTION sub_get_validator_info_batch; |
19 changes: 19 additions & 0 deletions
19
_migrations/network/migrations/20241125150658_fx_validator_info_batch.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,19 @@ | ||
CREATE OR REPLACE FUNCTION sub_get_validator_info_batch (block_hash_param VARCHAR(66), account_ids_param VARCHAR(66)[], is_active_param boolean[], era_index_param bigint) | ||
RETURNS SETOF sub_validator_info | ||
AS $$ | ||
|
||
DECLARE | ||
validator_info sub_validator_info; | ||
account_id VARCHAR(66); | ||
i INT = 1; | ||
is_active BOOLEAN = false; | ||
BEGIN | ||
FOREACH account_id IN ARRAY account_ids_param | ||
LOOP | ||
is_active := is_active_param[i]; | ||
validator_info := sub_get_validator_info(block_hash_param, account_id, is_active, era_index_param); | ||
RETURN NEXT validator_info; | ||
i:= i + 1; | ||
END LOOP; | ||
END | ||
$$ LANGUAGE plpgsql PARALLEL SAFE STABLE; |
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.