Skip to content

Koios gRest v1.0.5

Pre-release
Pre-release
Compare
Choose a tag to compare
@rdlrt rdlrt released this 01 Jul 04:58
· 131 commits to main since this release
7bc2d7e

WARN: This is pre-release with initial support with dbsync v13 for guildnet and public testnet instances ONLY. Not to be used for mainnet

Koios v1.0.5

This is an initial release to start supporting dbsync v13, and thereby - also allow instances to progress post Vasil HF. We do expect some bugs to leak out as part of changes, and understand that there will be new tables we can fetch information from - this version intends to simply provide continuity of old endpoints with minimal breaking changes to consumers, while upgrading to use Postgres v14 and DBSync v13 as baseline.

Time for update for Monitoring instance: 02-07-2022 08:00 UTC

API Docs:

The OpenAPI specs for release are attached in the release notes. The live documentation can be browsed as per table below:

Network URL Release gRest Instance Release
Mainnet https://api.koios.rest/ v1.0.1 koios-1.0.1
Testnet https://testnet.koios.rest/ v1.0.1 => v1.0.5 koios-1.0.5
Guildnet https://guild.koios.rest/ v1.0.5 koios-1.0.5

Changes relevant to Consumers of API

Outputs

  • /epoch_info - Add total_rewards and avg_block_reward for a given epoch (#43)
  • Update all date output formats to return UNIX timestamp (as per poll held in discussions group): (#45)
    • /tip , /blocks, /block_info => block_time
    • /genesis => systemStart
    • /epoch_info => start_time, first_block_time, last_block_time, end_time
    • /tx_info => tx_timestamp
    • /asset_info => creation_time
  • /blocks, /block_info => Add proto_major and proto_minor for a given block to output (#55)

Inputs

  • None

Instructions for Instance Providers

For consistency between date formats, we highly recommend you to upgrade your instance to use Postgres 14 (prolly a good time, since you would already need to recreate DB for dbsync v13). You can find sample instructions to do so here

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.0.5 - for which you can visit the SQL queries used here. If you're an existing instance provider using older version, a small reminder of process below:

The rest of the upgrade process should be usual for major release:

  • You can download binary for dbsync v13 from IO Hydra build here.
  • Update your git folder references to new tag and recreate DB as usual (sample instructions below):
cd ~/git/cardano-db-sync
git pull
git clone 13.0.0
export PGPASSFILE="${CNODE_HOME}"/priv/.pgpass
./scripts/postgresql-setup.sh --createdb

You can use snapshots too, but at the time of writing - the dbsync snapshots were only available until rc3 (while rc4 was in progress).

  • Wait for your dbsync to sync to tip
  • Time to upgrade your koios instance, to do so - use:
cd ~/tmp
curl -sS -o prereqs.sh https://raw.githubusercontent.com/cardano-community/guild-operators/koios-1.0.5/scripts/cnode-helper-scripts/prereqs.sh
chmod 755 prereqs.sh
./prereqs.sh -b koios-1.0.5 -n testnet # Replace testnet with guild if using for guildnet, also add any other options, eg: -t if used before.
cd $CNODE_HOME/scripts
grep sync-extended dbsync.sh # Ensure there are no references to -extended, as the `extended` version was expired
  • Test your new dbsync by running ./dbsync.sh (ensure it doesnt give any errors after waiting for 30 seconds or so). If all good, stop and start it back as a service.

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

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.
There are bi-weekly meetings held for development activities on Koios gRest project at every 2nd and 4th Thursday of the month at 8am UTC, the details for which can be found in the group above.