-
Notifications
You must be signed in to change notification settings - Fork 25
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 --> Todo: - [x] Update active_stake_cache, no longer requires maintaining account active stake lookup, remove log scan references - [x] Perf improvement for address_txs for 90% of addresses (postgres filtering nuance) - [x] Update cip67_strip_label - [x] Reduce asset info cache rollback to 250 - [x] Update specs (view updates already covered in previous commits, didnt see much to do beyond bumping version) - [x] Retire stake_distribution_new_accounts_update (current query is overkill) - [x] Adapt as per 13.2.0.1 schema - [x] Replace consumed_by_tx_in_id - [x] Replace pool_offline_data - [x] Update epoch references (no longer need 2 epoch wait time) for cache - [x] Remove leftover tx_in references - [x] MIRs (both extract from reserves as well as treasury) are no longer in rewards table, but moved to it's own `instant_rewards` table - update endpoints impacted (I think that's primarily SDC only) - [x] Update `reserve_withdrawals` and `treasury_withdrawals` to include `earned` and `spendable` epochs - [x] Add an endpoint for asset/policy mint history - [x] Retire asset_address_list and asset_policy_info (was deprecated 3 versions ago, and usage-wise had only a single hit in past 48 hours on mainnet) - [x] Fix script_utxos ->> asset_list - [x] New endpoint + cron job to get current protocol parameters - [x] Add is_dangling_delegation check - [x] Specs Testing on guildnet - [x] Update changelog Bugs from testing: - [x] Fix script_utxos, asset_list was not being returned as array , closes #272 - [x] Include burn asset transactions in asset_txs , closes #276 - [x] tx_info: Fix spend_redeemers CTE Join condition, closes #275 - [x] Update Changelog/specs post testing results --------- Co-authored-by: KoT_B_KocMoce <[email protected]> Co-authored-by: XRAY | Robot <[email protected]> Co-authored-by: Scitz0 <[email protected]> Co-authored-by: Greg Beresnev <[email protected]>
- Loading branch information
1 parent
d6ce49a
commit b68c894
Showing
73 changed files
with
1,376 additions
and
1,293 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
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,33 @@ | ||
#!/bin/bash | ||
DB_NAME=cexplorer | ||
CCLI="${HOME}"/.local/bin/cardano-cli | ||
SOCKET="$(dirname "$0")"/../../sockets/node.socket | ||
|
||
echo "$(date +%F_%H:%M:%S) - START - CLI Protocol Parameters Update" | ||
nwmagic=$(psql ${DB_NAME} -qbt -c "SELECT networkmagic FROM grest.genesis()" | xargs) | ||
last_epoch=$(psql ${DB_NAME} -qbt -c "SELECT last_value FROM grest.control_table WHERE key='cli_protocol_params'" | xargs) | ||
current_epoch=$(psql ${DB_NAME} -qbt -c "SELECT epoch_no FROM grest.tip()" | xargs) | ||
|
||
if [[ -z ${current_epoch} ]] || ! [[ ${current_epoch} =~ ^[0-9]+$ ]]; then | ||
echo "$(date +%F_%H:%M:%S) - Unable to fetch epoch_no from grest.tip" | ||
echo "$(date +%F_%H:%M:%S) - Error message: ${current_epoch}" | ||
exit 1 | ||
fi | ||
|
||
[[ -n ${last_epoch} && ${last_epoch} -eq ${current_epoch} ]] && echo "$(date +%F_%H:%M:%S) - END - CLI Protocol Parameters Update, no update necessary." && exit 0 | ||
|
||
prot_params="$(${CCLI} query protocol-parameters --testnet-magic "${nwmagic}" --socket-path "${SOCKET}" 2>&1)" | ||
|
||
if grep -q "Network.Socket.connect" <<< "${prot_params}"; then | ||
echo "$(date +%F_%H:%M:%S) - Node socket path wrongly configured or node not running, please verify that socket set in env file match what is used to run the node" | ||
echo "$(date +%F_%H:%M:%S) - Error message: ${prot_params}" | ||
exit 1 | ||
elif [[ -z "${prot_params}" ]] || ! jq -er . <<< "${prot_params}" &>/dev/null; then | ||
echo "$(date +%F_%H:%M:%S) - Failed to query protocol parameters, ensure your node is running with correct genesis (the node needs to be in sync to 1 epoch after the hardfork)" | ||
echo "$(date +%F_%H:%M:%S) - Error message: ${prot_params}" | ||
exit 1 | ||
fi | ||
|
||
psql ${DB_NAME} -qb -c "INSERT INTO grest.control_table (key, last_value, artifacts) VALUES ('cli_protocol_params','${current_epoch}','${prot_params}') ON CONFLICT(key) DO UPDATE SET last_value='${current_epoch}', artifacts='${prot_params}'" | ||
|
||
echo "$(date +%F_%H:%M:%S) - END - CLI Protocol Parameters Update, updated for epoch ${current_epoch}." |
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
12 changes: 0 additions & 12 deletions
12
files/grest/cron/jobs/stake-distribution-new-accounts-update.sh
This file was deleted.
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
This file was deleted.
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
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.