Skip to content

Commit

Permalink
Merge branch 'alpha' into cncli_epochdata_load
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt authored Sep 4, 2024
2 parents 8fdf2a5 + b6eb9de commit 731efe1
Show file tree
Hide file tree
Showing 41 changed files with 276 additions and 2,415 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: SH Linter

on:
# push:
# branches: [ '*' ]
# branches: [ master,alpha ]
pull_request:
branches: [ '*' ]

jobs:
shlint:
name: Shellcheck
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: SH Lint Check
uses: ludeeus/action-shellcheck@master
with:
scandir: "./scripts"
severity: "error"
additional_files: "./scripts/cnode-helper-scripts/env, ./scripts/cnode-helper-scripts/cntools.library, ./scripts/cnode-helper-scripts/mithril.library"
jsonlint:
name: JSON and YAML Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: JSON/YAML Validate
uses: GrantBirki/[email protected]
21 changes: 0 additions & 21 deletions .github/workflows/shlint.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/Build/dbsync.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ln -s ~/git/cardano-db-sync/schema $CNODE_HOME/guild-db/schema

#### Restore using Snapshot

If you're running a mainnet/preview/preprod instance of dbsync, you might want to consider use of dbsync snapshots as documented [here](https://github.com/intersectmbo/cardano-db-sync/blob/master/doc/state-snapshot.md). The snapshot files as of recent epoch are available via links in [release notes](https://github.com/intersectmbo/cardano-db-sync/releases).
If you're running a mainnet/preview/preprod instance of dbsync, you might want to consider use of dbsync snapshots as documented [here](https://github.com/intersectmbo/cardano-db-sync/blob/master/doc/state-snapshot.md). The snapshot files from IO for their default configs as of recent epoch are available via links in [release notes](https://github.com/intersectmbo/cardano-db-sync/releases). Note that the snapshots should only be used pertaining to their specific configs, if using configs from Koios - you'd want to look at snapshots [here](https://share.koios.rest/share/xFdZDfM4/dbsync/) instead.

At high-level, this would involve steps as below (read and update paths as per your environment):

Expand Down
83 changes: 83 additions & 0 deletions docs/Build/grest-changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,88 @@
# Koios gRest Changelog

## [1.2.0] - For all networks.

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. This will be the version used for mainnet upgrade as well. Please go through the changelogs below

### 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]

[#300]: https://github.com/cardano-community/koios-artifacts/pull/300

## [1.2.0a] - For non-mainnet networks.

This release starts providing Conway support providing 14 new endpoints - primarily focusing on new governance data. Also, based on community requests/feedbacks - it introduces a few breaking changes for `tx_info` and `block_tx_info` endpoints. Please go through the changelogs below

### New endpoints added:
- `/tx_cbor` - Raw transaction CBOR against a transaction [#298]
- `/drep_epoch_summary` - Summary of voting power and DRep count for each epoch [#298]
- `/drep_list` - List of all active delegated representatives (DReps) [#298]
- `/drep_info` - Get detailed information about requested delegated representatives (DReps) [#298]
- `/drep_metadata` - List metadata for requested delegated representatives (DReps) [#298]
- `/drep_updates` - List of updates for requested (or all) delegated representatives (DReps) [#298]
- `/drep_votes` - List of all votes casted by requested delegated representative (DRep) [#298]
- `/drep_delegators` - List of all delegators to requested delegated representative (DRep) [#298]
- `/committee_info` - Information about active committee and its members [#298]
- `/committee_votes` - List of all votes casted by given committee member or collective [#298]
- `/proposal_list` - List of all governance proposals [#298]
- `/voter_proposal_list` - List of all governance proposals for specified DRep, SPO or Committee credential [#298]
- `/proposal_votes` - List of all votes cast on specified governance action [#298]
- `/pool_votes` - List of all votes casted by a pool [#298]

### Data Input/Output Changes:

- Input - `/block_tx_info`, `/tx_info` - `collateral_tx_out` -> `asset_list` - Outputs for collateral tx out are never created on-chain and thus, cannot be queried from `ma_tx_out`. Instead a rough description of assets involved are saved , which is now returned as info from ledger. This is returned as-is from dbsync and does not adhere to `asset_list` schema we use in other endpoints. [#298]
- Input - `/tx_info` , `/block_tx_info` - These endpoints now require you to specify what all information you'd like to retrieve from a transaction, providing flags `_inputs` , `_metadata`, `_assets` , `_withdrawals`, `_certs`, `_scripts`, `_bytecode`, `_governance` [#298]
- Output - `/policy_asset_mints` , `/policy_asset_info`, `/asset_info` - Will return latest mint transaction that has metadata (instead of latest mint transaction) details (excluding burn transactions) [#298]
- Output - `/account_info` , `/pool_info` , `/pool_list` - Add `deposit` field to output for deposit associated with registration [#298]
- Output - `/account_info` - Add `delegated_drep` field to the output [#298]
- Output - `/block_tx_info` , `/tx_info` - Add `treasury_deposit`, `voting_procedures` and `proposal_procedures` to the output [#298]
- Output - `/epoch_params` - Add various fields to `epoch_params` as per Conway protocol parameters [#298]
- Output - `/pool_metadata`, `/pool_relays` - Remove `pool_status` field from output (it's already listed in pool_info and list) [#298]
- Output - `/pool_updates` - owners is now a JSONB field instead of JSONB array [#298]

### Deprecations:
- None

### Retirements:
- None

### Chores:

- Remove unused info from `asset_info_cache` - `first_mint_tx_id` , `first_mint_keys` , `last_mint_keys` are not used/required [#286]
- Add `last_mint_meta_tx_id` field to `asset_info_cache` - to return latest asset that does have metadata [#286]
- Reduce redundant cache information for pool stake as we now only retain 3 epochs in pool_active_stake_cache as the rest is already in `pool_history_cache` [#289]
- Retire v0 SQL files (endpoints were already removed) from repository [#286]
- Overwrite next epoch once on every execution (this is to avoid nonce mismatch if calculated too early from node) [#286]
- Reduce reliance on pool_info_cache where possible to query live metadata [#298]
- Make use of `pool_stat` instead of `epoch_stake` for `pool_history_cache` [#294]
- `instant_reward` table in dbsync moved to `reward_rest`
- `ada_pots` : `deposit` now split into three different types of deposits

[#298]: https://github.com/cardano-community/koios-artifacts/pull/298
[#289]: https://github.com/cardano-community/koios-artifacts/pull/289
[#286]: https://github.com/cardano-community/koios-artifacts/pull/286
[#294]: https://github.com/cardano-community/koios-artifacts/pull/294

## [1.1.2] - For all networks.

This release is minor bugfix for data consistency changes behind the scenes. It has no impact to any of the API endpoints.
Expand Down
2 changes: 2 additions & 0 deletions files/configs/guild/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"RequiresNetworkMagic": "RequiresMagic",
"PBftSignatureThreshold": 1,
"ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json",
"SnapshotInterval": 1800,
"MempoolCapacityBytesOverride": 8388608,
"EnableLogging": true,
"EnableLogMetrics": false,
"TargetNumberOfActivePeers": 10,
Expand Down
1 change: 1 addition & 0 deletions files/configs/guild/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"json_type": "text",
"offchain_pool_data": "enable",
"pool_stat": "enable",
"pool_stats": "enable",
"tx_cbor": "enable"
},
"minSeverity": "Info",
Expand Down
2 changes: 2 additions & 0 deletions files/configs/mainnet/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"Protocol": "Cardano",
"RequiresNetworkMagic": "RequiresNoMagic",
"ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json",
"SnapshotInterval": 86400,
"MempoolCapacityBytesOverride": 67108864,
"EnableLogging": true,
"EnableLogMetrics": false,
"TargetNumberOfActivePeers": 20,
Expand Down
1 change: 1 addition & 0 deletions files/configs/mainnet/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"json_type": "text",
"offchain_pool_data": "enable",
"pool_stat": "enable",
"pool_stats": "enable",
"tx_cbor": "enable"
},
"minSeverity": "Info",
Expand Down
2 changes: 2 additions & 0 deletions files/configs/preprod/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"Protocol": "Cardano",
"RequiresNetworkMagic": "RequiresMagic",
"ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json",
"SnapshotInterval": 86400,
"MempoolCapacityBytesOverride": 8388608,
"EnableLogging": true,
"EnableLogMetrics": false,
"TargetNumberOfActivePeers": 20,
Expand Down
1 change: 1 addition & 0 deletions files/configs/preprod/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"json_type": "text",
"offchain_pool_data": "enable",
"pool_stat": "enable",
"pool_stats": "enable",
"tx_cbor": "enable"
},
"minSeverity": "Info",
Expand Down
2 changes: 2 additions & 0 deletions files/configs/preview/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"Protocol": "Cardano",
"RequiresNetworkMagic": "RequiresMagic",
"ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json",
"SnapshotInterval": 43200,
"MempoolCapacityBytesOverride": 8388608,
"EnableLogging": true,
"EnableLogMetrics": false,
"TargetNumberOfActivePeers": 20,
Expand Down
1 change: 1 addition & 0 deletions files/configs/preview/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"json_type": "text",
"offchain_pool_data": "enable",
"pool_stat": "enable",
"pool_stats": "enable",
"tx_cbor": "enable"
},
"minSeverity": "Info",
Expand Down
2 changes: 2 additions & 0 deletions files/configs/sanchonet/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"Protocol": "Cardano",
"RequiresNetworkMagic": "RequiresMagic",
"ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json",
"SnapshotInterval": 43200,
"MempoolCapacityBytesOverride": 8388608,
"EnableLogging": true,
"EnableLogMetrics": false,
"TargetNumberOfActivePeers": 20,
Expand Down
1 change: 1 addition & 0 deletions files/configs/sanchonet/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"json_type": "text",
"offchain_pool_data": "enable",
"pool_stat": "enable",
"pool_stats": "enable",
"tx_cbor": "enable"
},
"minSeverity": "Info",
Expand Down
2 changes: 1 addition & 1 deletion files/docker/node/release-versions/cardano-node-latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.1.0
9.1.1
6 changes: 6 additions & 0 deletions files/node-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"sodium": "dbb48cce5429cb6585c9034f002568964f1ce567"
},
"8.9.4":
{
"blst": "3dd0f804b1819e5d03fb22ca2e6fac105932043a",
"secp256k1": "v0.3.2",
"sodium": "dbb48cce5429cb6585c9034f002568964f1ce567"
},
"9.1.1":
{
"blst": "3dd0f804b1819e5d03fb22ca2e6fac105932043a",
"secp256k1": "v0.3.2",
Expand Down
39 changes: 39 additions & 0 deletions guild.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 731efe1

Please sign in to comment.