-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
695 additions
and
256 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
|
||
CREATE TABLE IF NOT EXISTS dashboard_data_epoch ( | ||
validatorindex int, | ||
epoch int, | ||
attestations_source_reward BIGINT, | ||
attestations_target_reward BIGINT, | ||
attestations_head_reward BIGINT, | ||
attestations_inactivity_reward BIGINT, | ||
attestations_inclusion_reward BIGINT, | ||
attestations_reward BIGINT, | ||
attestations_ideal_source_reward BIGINT, | ||
attestations_ideal_target_reward BIGINT, | ||
attestations_ideal_head_reward BIGINT, | ||
attestations_ideal_inactivity_reward BIGINT, | ||
attestations_ideal_inclusion_reward BIGINT, | ||
attestations_ideal_reward BIGINT, | ||
blocks_scheduled smallint, | ||
blocks_proposed smallint, | ||
blocks_cl_reward BIGINT, -- gwei | ||
blocks_el_reward NUMERIC, -- wei | ||
sync_scheduled smallint, | ||
sync_executed smallint, | ||
sync_rewards BIGINT, | ||
slashed BOOLEAN, | ||
balance_start BIGINT, | ||
balance_end BIGINT, | ||
deposits_count smallint, | ||
deposits_amount BIGINT, | ||
withdrawals_count smallint, | ||
withdrawals_amount BIGINT | ||
) PARTITION BY range (epoch); | ||
|
||
create index on dashboard_data_epoch (validatorindex, epoch); | ||
|
||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
|
||
-- +goose StatementEnd |
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,24 @@ | ||
#!/bin/bash | ||
|
||
# Ask for name of migration | ||
echo "Enter name of migration file (for example add_validators_indices): " | ||
read -r name | ||
|
||
# This script creates a new migration file with the current timestamp | ||
# as the filename prefix. | ||
filename=$(date +"%Y%m%d%H%M%S")_$name.sql | ||
touch $filename | ||
|
||
cat <<EOF > $filename | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
-- +goose StatementEnd | ||
-- +goose Down | ||
-- +goose StatementBegin | ||
-- +goose StatementEnd | ||
EOF | ||
|
||
|
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.