-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from ethpandaops/pk910/validators-in-db
Validator set persistence
- Loading branch information
Showing
36 changed files
with
2,224 additions
and
746 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
|
||
CREATE TABLE IF NOT EXISTS public."validators" ( | ||
validator_index BIGINT NOT NULL, | ||
pubkey bytea NOT NULL, | ||
withdrawal_credentials bytea NOT NULL, | ||
effective_balance BIGINT NOT NULL, | ||
slashed BOOLEAN NOT NULL, | ||
activation_eligibility_epoch BIGINT NOT NULL, | ||
activation_epoch BIGINT NOT NULL, | ||
exit_epoch BIGINT NOT NULL, | ||
withdrawable_epoch BIGINT NOT NULL, | ||
CONSTRAINT validators_pkey PRIMARY KEY (validator_index) | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "validators_pubkey_idx" | ||
ON public."validators" ("pubkey"); | ||
|
||
-- +goose StatementEnd | ||
-- +goose Down | ||
-- +goose StatementBegin | ||
SELECT 'NOT SUPPORTED'; | ||
-- +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 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
|
||
CREATE TABLE IF NOT EXISTS "validators" ( | ||
validator_index BIGINT NOT NULL, | ||
pubkey BLOB NOT NULL, | ||
withdrawal_credentials BLOB NOT NULL, | ||
effective_balance BIGINT NOT NULL, | ||
slashed BOOLEAN NOT NULL, | ||
activation_eligibility_epoch BIGINT NOT NULL, | ||
activation_epoch BIGINT NOT NULL, | ||
exit_epoch BIGINT NOT NULL, | ||
withdrawable_epoch BIGINT NOT NULL, | ||
PRIMARY KEY (validator_index) | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "validators_pubkey_idx" | ||
ON "validators" ("pubkey"); | ||
|
||
-- +goose StatementEnd | ||
-- +goose Down | ||
-- +goose StatementBegin | ||
SELECT 'NOT SUPPORTED'; | ||
-- +goose StatementEnd |
Oops, something went wrong.