Skip to content

Commit

Permalink
Bump spec version and Align pool_info to be same as pool_list/pool_me…
Browse files Browse the repository at this point in the history
…tadata
  • Loading branch information
rdlrt committed Aug 16, 2023
1 parent 9dcdde4 commit d1bc2df
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 24 deletions.
29 changes: 10 additions & 19 deletions files/grest/rpc/pool/pool_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,13 @@ BEGIN
ROUND((live.stake / _saturation_limit) * 100, 2)
FROM _all_pool_info AS api
LEFT JOIN LATERAL (
(
SELECT pod.json
FROM public.pool_offline_data AS pod
WHERE pod.pool_id = api.pool_hash_id
AND pod.pmr_id = api.meta_id
)
UNION ALL
(
SELECT pod.json
FROM public.pool_offline_data AS pod
WHERE pod.pool_id = api.pool_hash_id
AND pod.json IS NOT NULL
ORDER BY pod.pmr_id DESC
)
SELECT pod.json
FROM public.pool_offline_data AS pod
WHERE pod.pool_id = api.pool_hash_id
AND pod.pmr_id = api.meta_id
ORDER BY pod.pmr_id DESC
LIMIT 1
) offline_data ON TRUE
) AS offline_data ON TRUE
LEFT JOIN LATERAL (
SELECT
SUM(COUNT(b.id)) OVER () AS cnt,
Expand All @@ -106,18 +97,18 @@ BEGIN
b.op_cert_counter
ORDER BY b.op_cert_counter DESC
LIMIT 1
) block_data ON TRUE
) AS block_data ON TRUE
LEFT JOIN LATERAL(
SELECT amount::lovelace AS as_sum
FROM grest.pool_active_stake_cache AS pasc
WHERE pasc.pool_id = api.pool_id_bech32
AND pasc.epoch_no = _epoch_no
) active_stake ON TRUE
) AS active_stake ON TRUE
LEFT JOIN LATERAL(
SELECT amount::lovelace AS es_sum
FROM grest.epoch_active_stake_cache AS easc
WHERE easc.epoch_no = _epoch_no
) epoch_stake ON TRUE
) AS epoch_stake ON TRUE
LEFT JOIN LATERAL(
SELECT
CASE WHEN api.pool_status = 'retired'
Expand All @@ -138,7 +129,7 @@ BEGIN
END AS pledge
FROM grest.stake_distribution_cache AS sdc
WHERE sdc.pool_id = api.pool_id_bech32
) live ON TRUE;
) AS live ON TRUE;
END;
$$;

Expand Down
2 changes: 1 addition & 1 deletion specs/results/koiosapi-guild.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.2
info:
title: Koios API
version: 1.0.10
version: 1.0.11rc
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
2 changes: 1 addition & 1 deletion specs/results/koiosapi-mainnet.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.2
info:
title: Koios API
version: 1.0.10
version: 1.0.11rc
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
2 changes: 1 addition & 1 deletion specs/results/koiosapi-preprod.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.2
info:
title: Koios API
version: 1.0.10
version: 1.0.11rc
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
2 changes: 1 addition & 1 deletion specs/results/koiosapi-preview.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.2
info:
title: Koios API
version: 1.0.10
version: 1.0.11rc
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
2 changes: 1 addition & 1 deletion specs/templates/1-api-info.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
info:
title: Koios API
version: 1.0.10
version: 1.0.11rc
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

0 comments on commit d1bc2df

Please sign in to comment.