Skip to content

v1.3.0

Latest
Compare
Choose a tag to compare
@rdlrt rdlrt released this 21 Nov 12:56
· 1 commit to main since this release
a598e71

Koios 1.3.0

This release adds support for cardano db sync 13.6.0.4, alongwith underlying components supporting Conway HF. The major chunk of work for this release is behind the scenes, with minor value additions to input/output schema.
Please go through the changelogs below:

API Docs and Schedule for release:

The schedule for monitoring layers to apply update , as well as live documentation can be browsed as per table below:

Network Date URL Specs Release gRest Instance Release DBSync Node
GuildNet 20-11-2024 10:00 UTC https://guild.koios.rest/ v1.3.0 koios-1.3.0 13.6.0.4 10.1.3
Preview 21-11-2024 10:00 UTC https://preview.koios.rest/ v1.3.0 koios-1.3.0 13.6.0.4 10.1.3
PreProd 21-11-2024 12:45 UTC https://preprod.koios.rest/ v1.3.0 koios-1.3.0 13.6.0.4 10.1.3
Mainnet* 29-11-2024 23:00 UTC https://api.koios.rest/ v1.3.0 koios-1.3.0 13.6.0.4 10.1.3

Changes for API

Expand

New endpoints added:

  • None

Data Input/Output Changes:

  • Input - /block_tx_info and /tx_info - Fix for _bytecode flag set to false not setting all byte fields to null [#306] - Breaking
  • Input - /block_tx_info and /tx_info - _scripts flag set to false will no longer suppress reference_inputs, collateral_inputs or collateral_outputs [#306] - Breaking
  • Output - /drep_info, /drep_metadata - Rename url to meta_url and hash to meta_hash and json to meta_json, keeping it consistent with other endpoints [#306] - Breaking
  • Output - /proposal_voting_summary - Add new fields drep_abstain_votes_cast, pool_abstain_votes_cast and committee_abstain_votes_cast [#303]
  • Output - /tx_cbor - Add new fields block_hash, block_height, epoch_no, absolute_slot, tx_timestamp [#306]
  • Output - /pool_info - Add new fields reward_addr_delegated_drep and voting_power [#306]
  • Output - /pool_list - Add new field active_stake [#306]

Deprecations:

  • None

Retirements:

  • None

Chores:

  • Fix for when both key and script was registered with same hash [#302]
  • Fix for drep_script format according to CIP-105, implementation was in conflict with pre-defined roles [#302]
  • Pool stat fix, rollback to previous code until DBSync gets a fix [#302]
  • Replace usage of view column with own bech32 utility functions [#302]
  • Drop stake_address.view and drep_hash.view indexes and replace with hex correspondants [#303]
  • Update active_stake_cache_update to directly check epoch_stake_progress in function instead of bash [#306]
  • Account for stake de-registration in account_info for vote delegation [#306]
  • Changes in SQLs (and indexes) due to new address table available since DBSync v13.6.0.1 [#306]
  • Updated vote logic due to changes added for pool voting [#306]

Full Changelog can be found here for SQL queries and Specs , and here for scripts used.


Instructions for Instance Providers

Expand

If you're setting up as a new instance provider, you can find instructions here. The tag to use for setup-grest.sh would be koios-1.3.0

The update process as usual would be:

  1. Update your node, submitapi, dbsync and ogmios binaries. You can use the sample below as reference (change network and top folder according to your environment):
./guild-deploy.sh -n $NETWORK -t cnode -b koios-1.3.0 -s plfdom

Note that the use of f above is to force overwrite your configs , as newer node includes ConwayGenesis configs. The above command will overwrite your config.json, topology.json as well as user variables, and save them original ones backups, you'd want to copy your user variables into the files modified and re-add port customisations to config.json or topology peering.

  1. Shutdown your node and dbsync services - and start node back up (replace cnode as per your environment in instructions):
sudo systemctl stop cnode cnode-dbsync
sudo rm -f /etc/cron.d/cnode-*
sudo systemctl start cnode

Expect node to take a few hours to startup, you can short-circuit the process by copying $CNODE_HOME/db folder from already upgraded node - while both source and destination node folders were against node being in shutdown state (or use mithril-client or use https://csnapshots.io). You can also check node startup status by viewing node logs (tail -100f $CNODE_HOME/logs/node0.json)

  1. While you Wait for your node to be in sync (you can monitor via gLiveView), you can proceed with dropping current dbsync DB and restoring from snapshot. To do so, use the below (execute commands one by one - verifying output):

We'd recommend using Postgres 17.0 and above, but it's up to individuals.

cd ~/git/cardano-db-sync
git fetch
git checkout 13.6.0.2
./scripts/postgresql-setup.sh --recreatedb
rm -rf ${CNODE_HOME}/guild-db/ledger-state ; mkdir -p ${CNODE_HOME}/guild-db/ledger-state
ln -s ~/git/cardano-db-sync/schema ${CNODE_HOME}/guild-db/schema 
cd $CNODE_HOME/scripts ; ./dbsync.sh -d

If using snapshot below, please delete the line containing error-on-exit in scripts/postgresql-setup.sh (restore-snapshot function), as there are expected errors for missing roles/schemas that are safe to ignore while restoring from snapshot below.

If you're on mainnet, you'd likely want to restore from snapshot:

wget 'https://share.koios.rest/api/public/dl/xFdZDfM4/dbsync/mainnet-dbsyncsnap-latest.tgz' -O /tmp/dbsyncsnap.tgz
scripts/postgresql-setup.sh --restore-snapshot /tmp/dbsyncsnap.tgz ${CNODE_HOME}/guild-db/ledger-state

Once the above is complete, you can start dbsync by sudo systemctl start cnode-dbsync. Wait for dbsync to finish synching, you can tail logs via tail -10f $CNODE_HOME/logs/dbsync.json - on mainnet in particular, this could take a few days if not using snapshot).

  1. With dbsync updated and on tip, you'd now be ready to go to the next step - updating koios. You'd want to update all components and reset your grest schema, sample command below:
./setup-grest.sh -b koios-1.3.0 -r -i prmcd
sudo systemctl restart cnode-postgrest cnode-haproxy

Due to difference in script provisioning versions, it is possible that you might have trouble starting cnode-postgrest - if so, check and ensure that you can access $CNODE_HOME/priv/grest.conf file as authenticator user - you can use command as test : sudo -u authenticator cat /opt/cardano/gnode/priv/grest.conf

Since we're again re-building cache, expect the cache to take a bit (few minutes on non-mainnet, while a few hours on mainnet).


Other Notes

Expand

Bug Reports/Feature Requests

Everyone is invited to create future feature requests here to help us triage issues.

Support/Discussions Group

Please ensure to join the Koios Support/Discussions group.
We're open to have meetings to work together as well as discuss future additions, feel free to ask

Contributors

We are blessed to have community who contribute in various ways, be it by serving community instances, library implementations, testing, or feedbacks. Special thanks to all the contributors that have been helping us improve the query layer along the way
@Scitz0 , @rdlrt , @redoracle, @hodlonaut, @reqlez , @huths0lo , @chadle-git , @gufmar , @dostrelith678, @ray-wallet, @edridudi , @mkungla , @xray-robot , @nothingalike, @safestak-keith , @QuixoteSystems, @abdelkrimdev, @cardano-apexpool , @AlexDochioiu , @DCOneCrypto , @PatrickTobler , @agaffney , @rcmorano , @gitmachtl, @Crypto2099, @robinboening, @fallen-icarus , @M4rc0Russ0 , @HT-Moh , @ducpm2303 , @michele-nuzzi , @maxee , @Jack-0, @larestrepo