Skip to content

Commit

Permalink
Update specs (bump version, add proposal_voting_summary fields)
Browse files Browse the repository at this point in the history
Update indexes for stake_address and drep
  • Loading branch information
rdlrt committed Sep 19, 2024
1 parent 441c41f commit 0713a4d
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 14 deletions.
2 changes: 0 additions & 2 deletions files/grest/rpc/02_indexes/13_3_00.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
CREATE INDEX IF NOT EXISTS pool_stat_pool_hash_id ON pool_stat(pool_hash_id);
CREATE INDEX IF NOT EXISTS pool_stat_epoch_no ON pool_stat(epoch_no);
-- CREATE INDEX IF NOT EXISTS idx_drep_hash_view ON drep_hash (view);
CREATE INDEX IF NOT EXISTS idx_drep_hash_raw ON drep_hash (raw);
CREATE INDEX IF NOT EXISTS idx_reward_rest_addr_id ON reward_rest (addr_id);
CREATE INDEX IF NOT EXISTS idx_reward_rest_spendable_epoch ON reward_rest (spendable_epoch);
3 changes: 3 additions & 0 deletions files/grest/rpc/02_indexes/13_5_0_2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DROP INDEX IF EXISTS idx_stake_address_view;
CREATE INDEX IF NOT EXISTS idx_stake_address_hash_raw ON stake_address (hash_raw);
CREATE INDEX IF NOT EXISTS idx_drep_hash_raw ON drep_hash (raw);
4 changes: 2 additions & 2 deletions files/grest/rpc/governance/voter_proposal_list.sql
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ BEGIN
gap.type,
gap.description,
gap.deposit::text,
grest.cip5_hex_to_stake_addr(sa.hash_raw)::text,
grest.cip5_hex_to_stake_addr(sa.hash_raw)::varchar,
b.epoch_no,
gap.ratified_epoch,
gap.enacted_epoch,
Expand All @@ -81,7 +81,7 @@ BEGIN
ELSE
JSONB_BUILD_OBJECT(
'stake_address', (
SELECT grest.cip5_hex_to_stake_addr(sa2.hash_raw)::text
SELECT grest.cip5_hex_to_stake_addr(sa2.hash_raw)::varchar
FROM stake_address AS sa2
WHERE sa2.id = tw.stake_address_id
),
Expand Down
14 changes: 12 additions & 2 deletions specs/results/koiosapi-guild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.2.0
version: v1.2.1
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down Expand Up @@ -3061,7 +3061,7 @@ components:
example: "31235800000"
active_stake_pct:
type:
- string
- number
- 'null'
description: Active stake for the pool, expressed as a percentage of total active stake on network
example: 13.512182543475783
Expand Down Expand Up @@ -5494,6 +5494,10 @@ components:
type: number
description: Percentage of 'no' votes from dreps
example: 39.28
drep_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from dreps
example: 5
pool_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by pools
Expand All @@ -5518,6 +5522,9 @@ components:
type: number
description: Percentage of 'no' votes from pools
example: 0
pool_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from pools
committee_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by committee
Expand All @@ -5534,6 +5541,9 @@ components:
type: number
description: Percentage of 'no' votes from committee
example: 28.57
committee_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from committee
proposal_votes:
type: array
description: List of all votes cast on specified governance action
Expand Down
14 changes: 12 additions & 2 deletions specs/results/koiosapi-mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.2.0
version: v1.2.1
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down Expand Up @@ -3061,7 +3061,7 @@ components:
example: "31235800000"
active_stake_pct:
type:
- string
- number
- 'null'
description: Active stake for the pool, expressed as a percentage of total active stake on network
example: 13.512182543475783
Expand Down Expand Up @@ -5494,6 +5494,10 @@ components:
type: number
description: Percentage of 'no' votes from dreps
example: 39.28
drep_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from dreps
example: 5
pool_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by pools
Expand All @@ -5518,6 +5522,9 @@ components:
type: number
description: Percentage of 'no' votes from pools
example: 0
pool_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from pools
committee_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by committee
Expand All @@ -5534,6 +5541,9 @@ components:
type: number
description: Percentage of 'no' votes from committee
example: 28.57
committee_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from committee
proposal_votes:
type: array
description: List of all votes cast on specified governance action
Expand Down
14 changes: 12 additions & 2 deletions specs/results/koiosapi-preprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.2.0
version: v1.2.1
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down Expand Up @@ -3061,7 +3061,7 @@ components:
example: "31235800000"
active_stake_pct:
type:
- string
- number
- 'null'
description: Active stake for the pool, expressed as a percentage of total active stake on network
example: 13.512182543475783
Expand Down Expand Up @@ -5494,6 +5494,10 @@ components:
type: number
description: Percentage of 'no' votes from dreps
example: 39.28
drep_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from dreps
example: 5
pool_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by pools
Expand All @@ -5518,6 +5522,9 @@ components:
type: number
description: Percentage of 'no' votes from pools
example: 0
pool_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from pools
committee_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by committee
Expand All @@ -5534,6 +5541,9 @@ components:
type: number
description: Percentage of 'no' votes from committee
example: 28.57
committee_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from committee
proposal_votes:
type: array
description: List of all votes cast on specified governance action
Expand Down
14 changes: 12 additions & 2 deletions specs/results/koiosapi-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.2.0
version: v1.2.1
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down Expand Up @@ -3061,7 +3061,7 @@ components:
example: "31235800000"
active_stake_pct:
type:
- string
- number
- 'null'
description: Active stake for the pool, expressed as a percentage of total active stake on network
example: 13.512182543475783
Expand Down Expand Up @@ -5494,6 +5494,10 @@ components:
type: number
description: Percentage of 'no' votes from dreps
example: 39.28
drep_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from dreps
example: 5
pool_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by pools
Expand All @@ -5518,6 +5522,9 @@ components:
type: number
description: Percentage of 'no' votes from pools
example: 0
pool_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from pools
committee_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by committee
Expand All @@ -5534,6 +5541,9 @@ components:
type: number
description: Percentage of 'no' votes from committee
example: 28.57
committee_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from committee
proposal_votes:
type: array
description: List of all votes cast on specified governance action
Expand Down
2 changes: 1 addition & 1 deletion specs/templates/1-api-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.2.0
version: v1.2.1
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down
12 changes: 11 additions & 1 deletion specs/templates/4-api-schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ schemas:
example: "31235800000"
active_stake_pct:
type:
- string
- number
- 'null'
description: Active stake for the pool, expressed as a percentage of total active stake on network
example: 13.512182543475783
Expand Down Expand Up @@ -2659,6 +2659,10 @@ schemas:
type: number
description: Percentage of 'no' votes from dreps
example: 39.28
drep_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from dreps
example: 5
pool_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by pools
Expand All @@ -2683,6 +2687,9 @@ schemas:
type: number
description: Percentage of 'no' votes from pools
example: 0
pool_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from pools
committee_yes_votes_cast:
type: number
description: Number of 'yes' votes casted by committee
Expand All @@ -2699,6 +2706,9 @@ schemas:
type: number
description: Percentage of 'no' votes from committee
example: 28.57
committee_abstain_votes_cast:
type: number
description: Percentage of 'abstain' votes from committee
proposal_votes:
type: array
description: List of all votes cast on specified governance action
Expand Down

0 comments on commit 0713a4d

Please sign in to comment.