-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump Versions, Change Ledger Loading, Update Proposal Schema (#8)
Co-authored-by: John Marcou <[email protected]>
- Loading branch information
1 parent
6403df8
commit 0953aa8
Showing
12 changed files
with
199 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ DB_PORT=5432 | |
DB_NAME=db | ||
DATABASE_URL=postgresql://granola:[email protected]:5432/db | ||
|
||
BUCKET_NAME="673156464838-mina-staking-ledgers" | ||
|
||
# [REQUIRED] - the connection URL for the archive database. | ||
# ARCHIVE_DATABASE_URL=postgresql://granola:[email protected]:5432/db | ||
|
||
|
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,6 @@ | ||
{ | ||
"[rust]": { | ||
"editor.defaultFormatter": "rust-lang.rust-analyzer" | ||
}, | ||
"editor.formatOnSave": true | ||
} |
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
58 changes: 50 additions & 8 deletions
58
server/migrations/2023-08-20-211633_add_initial_schema/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,23 +1,65 @@ | ||
-- Your SQL goes here | ||
|
||
CREATE TYPE proposal_version AS ENUM ('V1', 'V2'); | ||
CREATE TYPE proposal_category AS ENUM ('Core', 'Networking', 'Interface', 'ERC', 'Cryptography'); | ||
|
||
CREATE TYPE proposal_category AS ENUM ( | ||
'Core', | ||
'Networking', | ||
'Interface', | ||
'ERC', | ||
'Cryptography' | ||
); | ||
CREATE TABLE mina_proposals ( | ||
id SERIAL PRIMARY KEY, | ||
key TEXT NOT NULL UNIQUE, | ||
start_time BIGINT NOT NULL, | ||
end_time BIGINT NOT NULL, | ||
epoch BIGINT NOT NULL, | ||
ledger_hash TEXT, | ||
category proposal_category NOT NULL, | ||
version proposal_version NOT NULL DEFAULT 'V2', | ||
title TEXT NOT NULL, | ||
description TEXT NOT NULL, | ||
url TEXT NOT NULL | ||
); | ||
|
||
CREATE INDEX mina_proposals_key_idx ON mina_proposals (key); | ||
|
||
INSERT INTO mina_proposals VALUES (1, 'MIP1', 1672848000000, 1673685000000, 'jxQXzUkst2L9Ma9g9YQ3kfpgB5v5Znr1vrYb1mupakc5y7T89H8', 'Core', 'V1', 'Remove supercharged rewards', 'Removing the short-term incentive of supercharged rewards.', 'https://github.com/MinaProtocol/MIPs/blob/main/MIPS/mip-remove-supercharged-rewards.md'); | ||
INSERT INTO mina_proposals VALUES (3, 'MIP3', 1684562400000, 1685253600000, 'jw8dXuUqXVgd6NvmpryGmFLnRv1176oozHAro8gMFwj8yuvhBeS', 'Cryptography', 'V2', 'Kimchi, a new proof system', 'Kimchi is an update to the proof system currently used by Mina.', 'https://github.com/MinaProtocol/MIPs/blob/main/MIPS/mip-kimchi.md'); | ||
INSERT INTO mina_proposals VALUES (4, 'MIP4', 1684562400000, 1685253600000, 'jw8dXuUqXVgd6NvmpryGmFLnRv1176oozHAro8gMFwj8yuvhBeS', 'Core', 'V2', 'Easier zkApp programmability on mainnet', 'Adding programmable smart contracts (zkApps) to the Mina protocol.', 'https://github.com/MinaProtocol/MIPs/blob/main/MIPS/mip-zkapps.md') | ||
INSERT INTO mina_proposals | ||
VALUES ( | ||
1, | ||
'MIP1', | ||
1672848000000, | ||
1673685000000, | ||
46, | ||
'jxQXzUkst2L9Ma9g9YQ3kfpgB5v5Znr1vrYb1mupakc5y7T89H8', | ||
'Core', | ||
'V1', | ||
'Remove supercharged rewards', | ||
'Removing the short-term incentive of supercharged rewards.', | ||
'https://github.com/MinaProtocol/MIPs/blob/main/MIPS/mip-remove-supercharged-rewards.md' | ||
); | ||
INSERT INTO mina_proposals | ||
VALUES ( | ||
3, | ||
'MIP3', | ||
1684562400000, | ||
1685253600000, | ||
55, | ||
'jw8dXuUqXVgd6NvmpryGmFLnRv1176oozHAro8gMFwj8yuvhBeS', | ||
'Cryptography', | ||
'V2', | ||
'Kimchi, a new proof system', | ||
'Kimchi is an update to the proof system currently used by Mina.', | ||
'https://github.com/MinaProtocol/MIPs/blob/main/MIPS/mip-kimchi.md' | ||
); | ||
INSERT INTO mina_proposals | ||
VALUES ( | ||
4, | ||
'MIP4', | ||
1684562400000, | ||
1685253600000, | ||
55, | ||
'jw8dXuUqXVgd6NvmpryGmFLnRv1176oozHAro8gMFwj8yuvhBeS', | ||
'Core', | ||
'V2', | ||
'Easier zkApp programmability on mainnet', | ||
'Adding programmable smart contracts (zkApps) to the Mina protocol.', | ||
'https://github.com/MinaProtocol/MIPs/blob/main/MIPS/mip-zkapps.md' | ||
) |
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
Oops, something went wrong.