From 8f6e00208483506c3e54398e4e5306e12d60ec34 Mon Sep 17 00:00:00 2001 From: Ola Date: Sat, 2 Nov 2024 09:08:43 +0100 Subject: [PATCH 01/32] CNTools 13.3.0 for node 10 with additional fixes --- scripts/cnode-helper-scripts/cntools.library | 118 ++++++++++++++----- 1 file changed, 87 insertions(+), 31 deletions(-) diff --git a/scripts/cnode-helper-scripts/cntools.library b/scripts/cnode-helper-scripts/cntools.library index 14f8f89c1..ff3acee78 100644 --- a/scripts/cnode-helper-scripts/cntools.library +++ b/scripts/cnode-helper-scripts/cntools.library @@ -13,9 +13,9 @@ # Major: Any considerable change in the code base, big feature, workflow or breaking change from previous version CNTOOLS_MAJOR_VERSION=13 # Minor: Changes and features of minor character that can be applied without breaking existing functionality or workflow -CNTOOLS_MINOR_VERSION=2 +CNTOOLS_MINOR_VERSION=3 # Patch: Backwards compatible bug fixes. No additional functionality or major changes -CNTOOLS_PATCH_VERSION=3 +CNTOOLS_PATCH_VERSION=0 CNTOOLS_VERSION="${CNTOOLS_MAJOR_VERSION}.${CNTOOLS_MINOR_VERSION}.${CNTOOLS_PATCH_VERSION}" DUMMYFEE=20000 @@ -2690,7 +2690,7 @@ registerStakeWallet() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -2721,7 +2721,11 @@ registerStakeWallet() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Wallet Registration"; then return 1; fi @@ -2824,7 +2828,7 @@ deregisterStakeWallet() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -2855,7 +2859,11 @@ deregisterStakeWallet() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Wallet De-Registration"; then return 1; fi @@ -2956,7 +2964,7 @@ sendAssets() { build_args+=( --tx-out "${s_addr}+${assets_left[lovelace]}${assets_tx_out_s}" --tx-out "${d_addr}+${assets_to_send[lovelace]}${assets_tx_out_d}" ) fi - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} ${outCount} ${witness_cnt} || return 1 @@ -3006,7 +3014,11 @@ sendAssets() { fi fi - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Payment"; then return 1; fi @@ -3104,7 +3116,7 @@ delegate() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -3135,7 +3147,11 @@ delegate() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Wallet Delegation"; then return 1; fi @@ -3223,7 +3239,7 @@ withdrawRewards() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -3254,7 +3270,11 @@ withdrawRewards() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Wallet Rewards Withdrawal"; then return 1; fi @@ -3350,7 +3370,7 @@ registerPool() { ) [[ -n ${owner_delegation_cert} ]] && build_args+=( --certificate-file "${owner_delegation_cert}" ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -3496,7 +3516,7 @@ modifyPool() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -3527,7 +3547,11 @@ modifyPool() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Pool Update"; then return 1; fi @@ -3635,7 +3659,7 @@ deRegisterPool() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -3666,7 +3690,11 @@ deRegisterPool() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Pool De-Registration"; then return 1; fi @@ -3865,7 +3893,7 @@ sendMetadata() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -3896,7 +3924,11 @@ sendMetadata() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Metadata"; then return 1; fi @@ -3989,7 +4021,7 @@ mintAsset() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -4022,7 +4054,11 @@ mintAsset() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Asset Minting"; then return 1; fi @@ -4122,7 +4158,7 @@ burnAsset() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -4155,7 +4191,11 @@ burnAsset() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Asset Burning"; then return 1; fi @@ -4260,7 +4300,7 @@ voteDelegation() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -4291,7 +4331,11 @@ voteDelegation() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Wallet Vote Delegation"; then return 1; fi @@ -4380,7 +4424,7 @@ registerDRep() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -4418,7 +4462,11 @@ registerDRep() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Wallet DRep Registration"; then return 1; fi @@ -4499,7 +4547,7 @@ retireDRep() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -4531,7 +4579,11 @@ retireDRep() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Wallet DRep Retire"; then return 1; fi @@ -4610,7 +4662,7 @@ governanceVote() { --out-file "${TMP_DIR}"/tx0.tmp ) - if ! buildTx; then return 1; fi + buildTx || return 1 calcMinFee "${TMP_DIR}"/tx0.tmp ${utxo_cnt} 1 ${witness_cnt} || return 1 @@ -4641,7 +4693,11 @@ governanceVote() { --out-file "${TMP_DIR}"/tx.raw ) - if ! buildTx "${TMP_DIR}/tx.raw"; then return 1; fi + if [[ ${wallet_type} -eq 0 ]]; then + buildTx "${TMP_DIR}/tx.raw" || return 1 + else + buildTx || return 1 + fi if [[ ${op_mode} = "hybrid" ]]; then if ! buildOfflineJSON "Wallet Governance Vote"; then return 1; fi From 74cc10ebba4113fc28f2186ece9116dd8bed8ed1 Mon Sep 17 00:00:00 2001 From: Ola Date: Sat, 2 Nov 2024 09:46:34 +0100 Subject: [PATCH 02/32] Koios v1.3.0 changes --- files/configs/guild/db-sync-config.json | 4 ++-- files/configs/mainnet/db-sync-config.json | 4 ++-- files/configs/preprod/db-sync-config.json | 4 ++-- files/configs/preview/db-sync-config.json | 4 ++-- files/configs/sanchonet/db-sync-config.json | 4 ++-- scripts/grest-helper-scripts/setup-grest.sh | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/files/configs/guild/db-sync-config.json b/files/configs/guild/db-sync-config.json index 4ca1b32ae..7c015ceb3 100644 --- a/files/configs/guild/db-sync-config.json +++ b/files/configs/guild/db-sync-config.json @@ -17,7 +17,8 @@ ], "insert_options": { "tx_out": { - "value": "consumed" + "value": "consumed", + "use_address_table": true }, "ledger": "enable", "shelley": { @@ -36,7 +37,6 @@ "json_type": "text", "offchain_pool_data": "enable", "pool_stat": "enable", - "pool_stats": "enable", "tx_cbor": "enable" }, "minSeverity": "Info", diff --git a/files/configs/mainnet/db-sync-config.json b/files/configs/mainnet/db-sync-config.json index 9193d6bc6..f023d424c 100644 --- a/files/configs/mainnet/db-sync-config.json +++ b/files/configs/mainnet/db-sync-config.json @@ -17,7 +17,8 @@ ], "insert_options": { "tx_out": { - "value": "consumed" + "value": "consumed", + "use_address_table": true }, "ledger": "enable", "shelley": { @@ -36,7 +37,6 @@ "json_type": "text", "offchain_pool_data": "enable", "pool_stat": "enable", - "pool_stats": "enable", "tx_cbor": "enable" }, "minSeverity": "Info", diff --git a/files/configs/preprod/db-sync-config.json b/files/configs/preprod/db-sync-config.json index e018289a4..ebd31458d 100644 --- a/files/configs/preprod/db-sync-config.json +++ b/files/configs/preprod/db-sync-config.json @@ -17,7 +17,8 @@ ], "insert_options": { "tx_out": { - "value": "consumed" + "value": "consumed", + "use_address_table": true }, "ledger": "enable", "shelley": { @@ -36,7 +37,6 @@ "json_type": "text", "offchain_pool_data": "enable", "pool_stat": "enable", - "pool_stats": "enable", "tx_cbor": "enable" }, "minSeverity": "Info", diff --git a/files/configs/preview/db-sync-config.json b/files/configs/preview/db-sync-config.json index 51d0ab3ff..fdbc51d75 100644 --- a/files/configs/preview/db-sync-config.json +++ b/files/configs/preview/db-sync-config.json @@ -17,7 +17,8 @@ ], "insert_options": { "tx_out": { - "value": "consumed" + "value": "consumed", + "use_address_table": true }, "ledger": "enable", "shelley": { @@ -36,7 +37,6 @@ "json_type": "text", "offchain_pool_data": "enable", "pool_stat": "enable", - "pool_stats": "enable", "tx_cbor": "enable" }, "minSeverity": "Info", diff --git a/files/configs/sanchonet/db-sync-config.json b/files/configs/sanchonet/db-sync-config.json index ad5d76ea5..2ac04c2cd 100644 --- a/files/configs/sanchonet/db-sync-config.json +++ b/files/configs/sanchonet/db-sync-config.json @@ -17,7 +17,8 @@ ], "insert_options": { "tx_out": { - "value": "consumed" + "value": "consumed", + "use_address_table": true }, "ledger": "enable", "shelley": { @@ -36,7 +37,6 @@ "json_type": "text", "offchain_pool_data": "enable", "pool_stat": "enable", - "pool_stats": "enable", "tx_cbor": "enable" }, "minSeverity": "Info", diff --git a/scripts/grest-helper-scripts/setup-grest.sh b/scripts/grest-helper-scripts/setup-grest.sh index a08172fd0..fe6ad234f 100755 --- a/scripts/grest-helper-scripts/setup-grest.sh +++ b/scripts/grest-helper-scripts/setup-grest.sh @@ -16,7 +16,7 @@ # Do NOT modify code below # ###################################### -SGVERSION=v1.2.1 +SGVERSION=v1.3.0 ######## Functions ######## usage() { From ee4e5cf73280ef75cef262223ceb2bf9dbdcf90e Mon Sep 17 00:00:00 2001 From: Ola Date: Sat, 2 Nov 2024 10:02:26 +0100 Subject: [PATCH 03/32] Bump node/cli versions to 10.1 and add new docker cli version file to mimic node behavior --- files/docker/node/release-versions/cardano-cli-latest.txt | 1 + files/docker/node/release-versions/cardano-node-latest.txt | 2 +- scripts/cnode-helper-scripts/env | 4 ++-- scripts/cnode-helper-scripts/guild-deploy.sh | 5 +++-- 4 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 files/docker/node/release-versions/cardano-cli-latest.txt diff --git a/files/docker/node/release-versions/cardano-cli-latest.txt b/files/docker/node/release-versions/cardano-cli-latest.txt new file mode 100644 index 000000000..b5640a978 --- /dev/null +++ b/files/docker/node/release-versions/cardano-cli-latest.txt @@ -0,0 +1 @@ +10.1.1.0 \ No newline at end of file diff --git a/files/docker/node/release-versions/cardano-node-latest.txt b/files/docker/node/release-versions/cardano-node-latest.txt index 4ae7a7206..8af8c37db 100644 --- a/files/docker/node/release-versions/cardano-node-latest.txt +++ b/files/docker/node/release-versions/cardano-node-latest.txt @@ -1 +1 @@ -9.2.1 \ No newline at end of file +10.1.1 \ No newline at end of file diff --git a/scripts/cnode-helper-scripts/env b/scripts/cnode-helper-scripts/env index 9b74a9cf9..f02eb3c12 100644 --- a/scripts/cnode-helper-scripts/env +++ b/scripts/cnode-helper-scripts/env @@ -1110,8 +1110,8 @@ fi node_version="$(${CNODEBIN} version | head -1 | cut -d' ' -f2)" cli_version="$(${CCLI} version | head -1 | cut -d' ' -f2)" -if ! versionCheckNode "9.1.1" "${node_version}" || ! versionCheckNode "9.2.1.0" "${cli_version}"; then - echo -e "\nKoios scripts have now been upgraded to support cardano-node 9.1.x ('${node_version}' found) / cardano-cli 9.2.x.x ('${cli_version}' found).\nPlease update cardano-node binaries (ensure to read release notes and update various configs using guild-deploy (use appropriate options to download/install/overwrite parts you need) or use tagged branches for older node version (eg: ./