Skip to content

v1.2.0

Latest
Compare
Choose a tag to compare
@rdlrt rdlrt released this 30 Aug 14:32
· 3 commits to main since this release
613ff7b

Koios 1.2.0

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. While we do not have object types created on different testnet eras, our testing and specs are accordingly primitive at best, and we expect a follow-up release once there is enough participation.
Please go through the changelogs below (and if you werent using koios-1.2.0a, please go through previous changelogs as well):

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 30-08-2024 10:00 UTC https://guild.koios.rest/ v1.2.0 koios-1.2.0 13.5.0.1 9.1.1
Preview 30-08-2024 10:00 UTC https://preview.koios.rest/ v1.2.0 koios-1.2.0 13.5.0.1 9.1.1
PreProd 30-08-2024 14:00 UTC https://preprod.koios.rest/ v1.2.0 koios-1.2.0 13.5.0.1 9.1.1
Mainnet* 31-08-2024 15:30 UTC https://api.koios.rest/ v1.2.0 koios-1.2.0 13.5.0.1 9.1.1

Changes for API

Expand

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]

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.2.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.2.0 -s plfdom

Note that the use of f above is to force overwrite your configs , as newer node includes ConwayGenesis placeholder keys. 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 16.3 and above, but it's up to individuals.

cd ~/git/cardano-db-sync
git fetch
git checkout 13.5.0.1
./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-dbsnap-epoch505-x86_64.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 up to 2 days).

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