Skip to content

v1.3.1

Latest
Compare
Choose a tag to compare
@rdlrt rdlrt released this 06 Jan 05:24
· 3 commits to main since this release

Koios 1.3.1

This is a minor value-addition patch release over v1.3.0, addressing feedback from community from initial exposure to Conway functionality. There arent any breaking changes, but there are two new endpoints alongwith addition of fields to existing ones.
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 02-01-2025 10:00 UTC https://guild.koios.rest/ v1.3.1 koios-1.3.1 13.6.0.4 10.1.4
Preview 02-01-2025 10:00 UTC https://preview.koios.rest/ v1.3.1 koios-1.3.1 13.6.0.4 10.1.4
PreProd 05-01-2025 06:00 UTC https://preprod.koios.rest/ v1.3.1 koios-1.3.1 13.6.0.4 10.1.4
Mainnet* 06-01-2025 23:00 UTC https://api.koios.rest/ v1.3.1 koios-1.3.1 13.6.0.4 10.1.4

Changes for API

Expand

New endpoints added:

  • /block_tx_cbor - Get Raw transactions in CBOR format for given block hashes [#319]
  • /drep_history - Get history for dreps voting power distribution [#319]

Data Input/Output Changes:

  • Output - /totals - Add new fields fees, deposits_stake, deposits_dreps and deposits_proposals [#319]
  • Output - /proposal_summary - Add new fields drep_active_yes_vote_power, drep_active_no_vote_power, drep_active_abstain_vote_power, drep_always_abstain_vote_power, pool_active_yes_vote_power, pool_active_no_vote_power, pool_active_abstain_vote_power [#319]

Deprecations:

  • block_tx_info - Wasnt optimal for resources (and worked around payload limit for tx_info), use block_tx_cbor is much more scalable and non-breaking [#319]

Retirements:

  • None

Chores:

  • Fix for drep_info regarding active state (was missing by 1) [#319]
  • Fix Typo in API Specs (Preferred => Prefer) [#319]
  • Return is_valid field as-is from dbsync, current behaviour of showing true was invalid [#319]

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.1

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.1 -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/node.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.2 and above, but it's up to individuals.

cd ~/git/cardano-db-sync
git fetch
git checkout 13.6.0.4
./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.1 -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, @MadOrkestra