-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description <!--- Describe your changes --> [Re-created from #227 post renaming base-branch] - [x] pool_list: Return all fields from pool_info_cache (latest pool entry) - [x] Remove filter for returning only 'registered' pools from pool_list, pool_relays and pool_metadata endpoints - [x] Few more linting polishing (remove trailing spaces, move single column/table references onto same line) - [x] Update pool_info to return same metadata as pool_list and pool_metadata (latest w/o fallback) - [x] Update all tx_in joins to use the new tx_out.consumed_by_tx_in_id - [x] Dont include epoch_params in epoch_info_cache, update references accordingly - [x] Update `*_txs` as per #186 (point 4) - [x] Update `*_utxos` as per #186 (point 3) - [x] credential_utxos - [x] address_utxos - [x] account_utxos - [x] utxo_info - [x] asset_utxos - [x] script_utxos - [x] Add script_info and align all endpoints for scripts - [x] Add temporary cron for fixing epoch count mismatch - [x] Add pool_registrations/pool_deregistrations endpoint - [x] Add retired txs to `pool_updates` (other fields for such transactions will return `null`) - [x] Add reward_withdrawals/treasury_withdrawals endpoint - [x] Simplify address_assets and account_assets heirarchy to return flat table (helps do horizontal filtering as desired) - [x] API Spec updates: - [x] Add section for Authentication - [x] Bump Koios version - [x] pool_list - [x] pool_metadata - [x] pool_relay - [x] `*_txs` - [x] `*_utxos` - [x] `address_assets` - [x] `account_assets` - [x] `epoch_params` - [x] `pool_registrations`/`pool_deregistrations` - [x] `reward_withdrawals`/`treasury_withdrawals` - [x] All script-related endpoints - [x] Update examples - [x] Check re-usability - [x] Check schemathesis - [x] guild - [x] preview - [x] preprod - [x] mainnet - [x] Add v0 vs v1 to monitoring - [x] guild - [ ] preview (post merge) - [ ] preprod (post merge) - [ ] mainnet (post 1.1.0 - instead of 1.1.0rc) release - [x] Ogmios - [x] Add integration for tx Evaluation and submission using ogmios path - [x] Add health check based on /health (`version` and `networkSynchronization`) - [x] Update CHANGELOG - [x] Bump final specs version number to v1 ## Which issue it fixes? <!--- Link to issue: Closes #issue-number --> - [x] Closes #208 - [x] Closes #218 - [x] Closes #186 - [x] Closes #221 - [x] Closes #224 - [x] Closes #191 - [x] Closes #232 - [x] Closes #240 #241 --------- Co-authored-by: KoT_B_KocMoce <[email protected]> Co-authored-by: Ola [AHLNET] <[email protected]>
- Loading branch information
1 parent
d51289f
commit 9b3460b
Showing
68 changed files
with
5,196 additions
and
2,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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/bash | ||
DB_NAME=cexplorer | ||
|
||
tip=$(psql ${DB_NAME} -qbt -c "select extract(epoch from time)::integer from block order by id desc limit 1;" | xargs) | ||
tip=$(psql ${DB_NAME} -qbt -c "SELECT EXTRACT(EPOCH FROM time)::integer FROM block ORDER BY id DESC LIMIT 1;" | xargs) | ||
|
||
if [[ $(( $(date +%s) - tip )) -gt 300 ]]; then | ||
echo "$(date +%F_%H:%M:%S) Skipping as database has not received a new block in past 300 seconds!" && exit 1 | ||
fi | ||
|
||
echo "$(date +%F_%H:%M:%S) Running epoch info cache update..." | ||
psql ${DB_NAME} -qbt -c "SELECT GREST.EPOCH_INFO_CACHE_UPDATE();" 1>/dev/null 2>&1 | ||
psql ${DB_NAME} -qbt -c "SELECT grest.epoch_info_cache_update();" 1>/dev/null 2>&1 | ||
echo "$(date +%F_%H:%M:%S) Job done!" |
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,12 @@ | ||
#!/bin/bash | ||
DB_NAME=cexplorer | ||
|
||
tip=$(psql ${DB_NAME} -qbt -c "SELECT EXTRACT(EPOCH FROM time)::integer FROM block ORDER BY id DESC LIMIT 1;" | xargs) | ||
|
||
if [[ $(( $(date +%s) - tip )) -gt 300 ]]; then | ||
echo "$(date +%F_%H:%M:%S) Skipping as database has not received a new block in past 300 seconds!" && exit 1 | ||
fi | ||
|
||
echo "$(date +%F_%H:%M:%S) Running epoch summary corrections update..." | ||
psql ${DB_NAME} -qbt -c "SELECT GREST.EPOCH_SUMMARY_CORRECTIONS_UPDATE();" 1>/dev/null 2>&1 | ||
echo "$(date +%F_%H:%M:%S) Job done!" |
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,27 @@ | ||
CREATE OR REPLACE FUNCTION grest.reserve_withdrawals() | ||
RETURNS TABLE ( | ||
epoch_no word31type, | ||
epoch_slot word31type, | ||
tx_hash text, | ||
block_hash text, | ||
block_height word31type, | ||
amount text, | ||
stake_address text | ||
) | ||
LANGUAGE SQL STABLE | ||
AS $$ | ||
SELECT | ||
b.epoch_no, | ||
b.epoch_slot_no, | ||
ENCODE(tx.hash,'hex'), | ||
ENCODE(b.hash,'hex'), | ||
b.block_no, | ||
r.amount::text, | ||
sa.view | ||
FROM reserve AS r | ||
LEFT JOIN tx ON r.tx_id = tx.id | ||
INNER JOIN block AS b ON tx.block_id = b.id | ||
LEFT JOIN stake_address AS sa ON sa.id = r.addr_id; | ||
$$; | ||
|
||
COMMENT ON FUNCTION grest.reserve_withdrawals IS 'A list of withdrawals made from reserves (MIRs)'; --noqa: LT01 |
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,27 @@ | ||
CREATE OR REPLACE FUNCTION grest.treasury_withdrawals() | ||
RETURNS TABLE ( | ||
epoch_no word31type, | ||
epoch_slot word31type, | ||
tx_hash text, | ||
block_hash text, | ||
block_height word31type, | ||
amount text, | ||
stake_address text | ||
) | ||
LANGUAGE SQL STABLE | ||
AS $$ | ||
SELECT | ||
b.epoch_no, | ||
b.epoch_slot_no, | ||
ENCODE(tx.hash,'hex'), | ||
ENCODE(b.hash,'hex'), | ||
b.block_no, | ||
t.amount::text, | ||
sa.view | ||
FROM treasury AS t | ||
LEFT JOIN tx ON t.tx_id = tx.id | ||
INNER JOIN block AS b ON tx.block_id = b.id | ||
LEFT JOIN stake_address AS sa ON sa.id = t.addr_id; | ||
$$; | ||
|
||
COMMENT ON FUNCTION grest.treasury_withdrawals IS 'A list of withdrawals made from treasury'; --noqa: LT01 |
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 |
---|---|---|
|
@@ -38,7 +38,7 @@ BEGIN | |
decimals | ||
) | ||
VALUES( | ||
_asset_policy, | ||
_asset_policy, | ||
_asset_name, | ||
_name, | ||
_description, | ||
|
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
Oops, something went wrong.