Skip to content

Commit

Permalink
Merge branch 'alpha' into koios-registered-authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorBenson authored Sep 2, 2024
2 parents c0c6e81 + 5531f8a commit 0d97a81
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 22 deletions.
30 changes: 29 additions & 1 deletion docs/Build/grest-changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
# Koios gRest Changelog

## [1.2.0a] - For all networks.
## [1.2.0] - For all networks.

This is a finalised release that builds on `1.2.0a` to provide support for CIP-129 and add a summary of votes for given proposal. The changes accordingly are primarily only targetting Governance endpoints. This will be the version used for mainnet upgrade as well. Please go through the changelogs below

### New endpoints added:
- `/proposal_voting_summary` - Get a summary of votes cast on specified governance action [#300]

### Data Input/Output Changes:
- Input - `/commitee_votes` - Will require `_cc_hot_id` which will accept committee member hot key formatted in bech32 as per CIP-0005/129 [#300]
- Input - `/voter_proposal_list` - Will require `_voter_id` which will accept DRep/SPO/Committee member formatted in bech32 as per CIP-0005/129 [#300]
- Input - `/proposal_votes` - Will require `_proposal_id` which will accept government proposal ID formatted in bech32 as per CIP-129 [#300]
- Output - `/drep_metadata` , `/drep_updates`, - added column `has_script` which shows if given credential is a script hash [#300]
- Output - `/drep_votes` , `/proposal_list` , `/committee_info` - added column `proposal_id` to show proposal action ID in accordance with CIP-129 [#300]
- Output - `/proposal_votes` , - `voter` is renamed to `voter_id` and shows DRep/Pool/Committee member formatted in bech32 as per CIP-129 [#300]
- Output - Any references to drep in output columns is now assumed to be in CIP-129 format [#300]

### Deprecations:
- None

### Retirements:
- None

### Chores:
- Change indexing for dreps from view to hex [#300]
- Extend utility functions for CIP-129 conversions from hex [#300]

[#300]: https://github.com/cardano-community/koios-artifacts/pull/300

## [1.2.0a] - For non-mainnet networks.

This release starts providing Conway support providing 14 new endpoints - primarily focusing on new governance data. Also, based on community requests/feedbacks - it introduces a few breaking changes for `tx_info` and `block_tx_info` endpoints. Please go through the changelogs below

Expand Down
2 changes: 1 addition & 1 deletion files/configs/mainnet/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"RequiresNetworkMagic": "RequiresNoMagic",
"ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json",
"SnapshotInterval": 86400,
"MempoolCapacityBytesOverride": 8388608,
"MempoolCapacityBytesOverride": 67108864,
"EnableLogging": true,
"EnableLogMetrics": false,
"TargetNumberOfActivePeers": 20,
Expand Down
6 changes: 6 additions & 0 deletions files/node-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"sodium": "dbb48cce5429cb6585c9034f002568964f1ce567"
},
"8.9.4":
{
"blst": "3dd0f804b1819e5d03fb22ca2e6fac105932043a",
"secp256k1": "v0.3.2",
"sodium": "dbb48cce5429cb6585c9034f002568964f1ce567"
},
"9.1.0":
{
"blst": "3dd0f804b1819e5d03fb22ca2e6fac105932043a",
"secp256k1": "v0.3.2",
Expand Down
2 changes: 1 addition & 1 deletion scripts/cnode-helper-scripts/cnode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ mithril_snapshot_download() {
if [[ ! -f "${MITHRIL_CLIENT}" ]] || [[ ! -e "${MITHRIL_CLIENT}" ]]; then
echo "ERROR: Could not locate mithril-client.sh script or script is not executable. Skipping mithril cardano-db snapshot download!!"
else
"${MITHRIL_CLIENT}" cardano-db download
"${MITHRIL_CLIENT}" -u cardano-db download
fi
}

Expand Down
20 changes: 15 additions & 5 deletions scripts/cnode-helper-scripts/mithril-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
usage() {
cat <<-EOF
Usage: $(basename "$0") [-u] <command> <subcommand> [<sub arg>]
Usage: $(basename "$0") [-h] [-u] <command> <subcommand> [<sub arg>]
A script to run Cardano Mithril Client
-u Skip script update check overriding UPDATE_CHECK value in env (must be first argument to script)
[ -h | --help] Print this help
[ -u | --skip-update ] Skip script update check overriding UPDATE_CHECK value in env (must be first argument to script)
Commands:
environment Manage mithril environment file
Expand All @@ -46,14 +47,25 @@ EOF
}

SKIP_UPDATE=N
[[ $1 = "-u" ]] && export SKIP_UPDATE=Y && shift
[[ $1 =~ "-u" ]] || [[ $1 =~ "--skip-update" ]] && export SKIP_UPDATE=Y && shift


#####################
# Execution/Main #
#####################

function parse_opt_for_help() {
for value in "$@"; do
if [[ $value == "-h" ]] || [[ $value == "--help" ]]; then
usage
exit 0
fi
done
}

function main() {
parse_opt_for_help "$@"

. "$(dirname $0)"/mithril.library

update_check "$@"
Expand Down Expand Up @@ -135,9 +147,7 @@ function main() {
esac
;;
*)
echo "Invalid $(basename "$0") command: $1" >&2
usage
exit 1
;;
esac

Expand Down
24 changes: 13 additions & 11 deletions scripts/cnode-helper-scripts/mithril.library
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CI_MODE='N'
# setting it to an incompatible version with the currently suported cardano-node
# version. There is no need to source the environment file in CI mode.
if [[ ${CI_MODE} == 'N' ]] ; then
. "$(dirname $0)"/env
. "$(dirname $0)"/env offline
fi

#############################
Expand Down Expand Up @@ -235,30 +235,32 @@ set_node_minimum_version() {
}

update_check() {
# Check availability of checkUpdate function
if [[ ! $(command -v checkUpdate) ]]; then
echo -e "\nCould not find checkUpdate function in env, make sure you're using official guild docos for installation!"
exit 1
fi
# Check if flag is set by script to skip update check
[[ ${SKIP_UPDATE} == Y ]] && return 0
# Check if flag is set by user as a global (container environments etc.) to skip update check
if [[ ${UPDATE_CHECK} = Y ]]; then
# Check if flag is set by user as a global or script to skip update check
if [[ ${UPDATE_CHECK} = Y && ${SKIP_UPDATE} != Y ]]; then

echo "Checking for script updates..."

# Check availability of checkUpdate function
if [[ ! $(command -v checkUpdate) ]]; then
echo -e "\nCould not find checkUpdate function in env, make sure you're using official guild docos for installation!"
exit 1
fi

# check for env update
ENV_UPDATED=${BATCH_AUTO_UPDATE}
checkUpdate "${PARENT}"/env N N N
case $? in
1) ENV_UPDATED=Y ;;
2) exit 1 ;;
esac

# check for mithril.library update
checkUpdate "${PARENT}"/mithril.library N N N
# borrow ENV_UPDATED for mithril.library updates
case $? in
1) ENV_UPDATED=Y ;;
2) exit 1 ;;
esac

# check the script update
checkUpdate "${PARENT}"/"$(basename "$0")" ${ENV_UPDATED}
case $? in
Expand Down
4 changes: 2 additions & 2 deletions scripts/grest-helper-scripts/getmetrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exec 2>/dev/null
[[ -z ${DBSYNC_PROM_PORT} ]] && DBSYNC_PROM_PORT=8080
[[ -z ${PGDATABASE} ]] && PGDATABASE=cexplorer

function get-metrics() {
function get_metrics() {
shopt -s expand_aliases
if [ -n "$SERVED" ]; then
echo "Content-type: text/plain" # Tells the browser what kind of content to expect
Expand Down Expand Up @@ -99,4 +99,4 @@ function get-metrics() {
done
}

get-metrics
get_metrics
2 changes: 1 addition & 1 deletion scripts/grest-helper-scripts/setup-grest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Do NOT modify code below #
######################################

SGVERSION=v1.2.0b
SGVERSION=v1.2.0

######## Functions ########
usage() {
Expand Down

0 comments on commit 0d97a81

Please sign in to comment.