github baking-bad/tzkt v1.15.0

latest releases: v1.16.0, v1.15.1
3 months ago

General notes

  • massive code refactoring and optimizations;
  • 2-5x increase in indexing performance;
  • enabled indexer cache configuration;
  • extended indexer metrics with sync state/health metrics;
  • source generated regexes for ultimate performance;
  • more flexible configuration of metadata plugins;
  • more accurate adaptive issuance estimation;
  • API improvements and feature requests from community;
  • fixed inability to index from scratch due to broken RPC compatibility.

To update from v1.14.* to v1.15.0 you will have to update to .NET9.0 and Postgres 17 (see installation guide), then drop the indexer database and restore it from the latest snapshot, or re-index from scratch. This is due to a lot of DB models changes, that make automatic DB migration too complicated.

In fact, updating to v1.15 is not mandatory, and you can safely stay with v1.14 till the next Tezos protocol upgrade.

Breaking changes

  • all previously deprecated stuff was finally removed (see details below);
  • internal IDs of operations were shifted due to more migration operations were indexed, so IDs from v1.15 won't match with IDs from v1.14;
  • migrated to .NET 9.0, so you will need to install it;
  • migrated to Postgres 17, so if you use our daily snapshots you will need to update Postgres as well.

Changes in the API endpoints

  • added endpoint /v1/accounts/activity;
  • added query parameters ?tokensCount and ?ticketsCount to the endpoint /v1/contracts;
  • added query parameters ?totalMinted, ?totalBurned, ?totalSupply and ?globalId to the endpoints /v1/tokens and /v1/tokens/count;
  • [BREAKING] endpoint /v1/accounts/{address}/operations was deprecated, use /v1/accounts/activity instead.
  • [BREAKING] query parameter ?manager was removed from /v1/contracts;
  • [BREAKING] query parameter ?contractManager was removed from /v1/operations/originations;
  • [BREAKING] previously deprecated endpoint /v1/events was removed;
  • [BREAKING] previously deprecated endpoint /v1/blocks/levels was removed;
  • [BREAKING] previously deprecated endpoint /v1/metadata was removed;
  • [BREAKING] previously deprecated endpoint /v1/bakers/{address}/{cycle} was removed;
  • [BREAKING] previously deprecated endpoint /v1/delegators/{address}/{cycle} was removed;
  • [BREAKING] previously deprecated query parameters ?baker and ?priority were removed from /v1/blocks;
  • [BREAKING] previously deprecated query parameter ?baker was removed from /v1/operations/baking;
  • [BREAKING] previously deprecated query parameter ?priority was removed from /v1/rights and /v1/rights/count;
  • [BREAKING] previously deprecated query parameter ?legacy was removed from /v1/accounts/{address} and /v1/contracts/{address}.

Changes in the API models

  • [BREAKING] field manager was removed from contract accounts;
  • [BREAKING] field contractManager was removed from origination operations;
  • [BREAKING] according to previous deprecation the metadata field in contract accounts now contains TZIP-16 metadata, just like with ?legacy=false previously, and tzkt profiles and other custom offchain data were moved to the extras field. For other accounts, blocks, constants, proposals, protocols and software the metadata was removed (replaced with extras).
  • [BREAKING] previously deprecated fields lostBalance, frozenDeposit, frozenDeposits, frozenRewards and frozenFees were removed from baker accounts;
  • [BREAKING] previously deprecated field lostBalance was removed from user accounts;
  • [BREAKING] previously deprecated fields blockRewardsLiquid, endorsementRewardsLiquid, nonceRevelationRewardsLiquid, vdfRevelationRewardsLiquid, revelationRewards, revelationLosses, doublePreendorsingLosses, doubleEndorsingLosses, doubleBakingLosses, endorsementRewards, blockRewards, stakingBalance, activeStake, selectedStake, delegatedBalance, numDelegators, ownBlocks, extraBlocks, missedOwnBlocks, missedExtraBlocks, uncoveredOwnBlocks, uncoveredExtraBlocks, uncoveredEndorsements, ownBlockRewards, extraBlockRewards, missedOwnBlockRewards, missedExtraBlockRewards, uncoveredOwnBlockRewards, uncoveredExtraBlockRewards, uncoveredEndorsementRewards, ownBlockFees, extraBlockFees, missedOwnBlockFees, missedExtraBlockFees, uncoveredOwnBlockFees, uncoveredExtraBlockFees, doubleBakingLostDeposits, doubleBakingLostRewards, doubleBakingLostFees, doubleEndorsingLostDeposits, doubleEndorsingLostRewards, doubleEndorsingLostFees, revelationLostRewards, revelationLostFees, futureBlockDeposits, blockDeposits, futureEndorsementDeposits and endorsementDeposits were removed from baker rewards and rewards split;
  • [BREAKING] previously deprecated field priority was removed from baking rights;
  • [BREAKING] previously deprecated fields snapshotIndex, lbSubsidy, totalStaking, totalDelegators, totalDelegated, selectedBakers, selectedStake and totalRolls were removed from cycles;
  • [BREAKING] previously deprecated fields blockRewardsLiquid, endorsementRewardsLiquid, nonceRevelationRewardsLiquid, vdfRevelationRewardsLiquid, revelationRewards, revelationLosses, doublePreendorsingLosses, doubleEndorsingLosses, doubleBakingLosses, endorsementRewards, blockRewards, stakingBalance, activeStake, selectedStake, balance, ownBlocks, extraBlocks, missedOwnBlocks, missedExtraBlocks, uncoveredOwnBlocks, uncoveredExtraBlocks, uncoveredEndorsements, ownBlockRewards, extraBlockRewards, missedOwnBlockRewards, missedExtraBlockRewards, uncoveredOwnBlockRewards, uncoveredExtraBlockRewards, uncoveredEndorsementRewards, ownBlockFees, extraBlockFees, missedOwnBlockFees, missedExtraBlockFees, uncoveredOwnBlockFees, uncoveredExtraBlockFees, doubleBakingLostDeposits, doubleBakingLostRewards, doubleBakingLostFees, doubleEndorsingLostDeposits, doubleEndorsingLostRewards, doubleEndorsingLostFees, revelationLostRewards and revelationLostFees were removed from delegator rewards;
  • [BREAKING] previously deprecated fields currentDelegatedBalance, currentStakedBalance, balance and currentBalance were removed from reward split delegators;
  • [BREAKING] previously deprecated fields rolls and rollsPercentage were removed from proposals;
  • [BREAKING] previously deprecated field cycle was removed from autostaking operations;
  • [BREAKING] previously deprecated fields rewardLiquid, bonusLiquid, reward, bonus, baker and priority were removed from baking operations;
  • [BREAKING] previously deprecated field rolls was removed from ballot operations;
  • [BREAKING] previously deprecated fields unstakedPseudotokens, unstakedBalance and unstakedRewards were removed from delegation operations;
  • [BREAKING] previously deprecated fields roundingLoss, offenderLoss, accuserReward, accuserRewards, offenderLostDeposits, offenderLostRewards and offenderLostFees were removed from double baking and double endorsing operations;
  • [BREAKING] previously deprecated fields roundingLoss, offenderLoss and accuserReward were removed from double preendorsing operations;
  • [BREAKING] previously deprecated fields rewardLiquid and received were removed from endorsing reward operations;
  • [BREAKING] previously deprecated fields rewardLiquid, reward and bakerRewards were removed from nonce revelation operations;
  • [BREAKING] previously deprecated field rolls was removed from proposal operations;
  • [BREAKING] previously deprecated fields lostReward and lostFees were removed from revelation penalty operations;
  • [BREAKING] previously deprecated fields kind, pseudotokens, limitOfStakingOverBaking, edgeOfBakingOverStaking and activationCycle were removed from staking pperations;
  • [BREAKING] previously deprecated fields rewardLiquid and reward were removed from vdf revelation operations;
  • [BREAKING] previously deprecated field totalVested was removed from statistics;
  • [BREAKING] previously deprecated field rolls was removed from voting snapshots;
  • [BREAKING] previously deprecated fields totalRolls, topRolls, yayRolls, nayRolls and passRolls were removed from voting periods;
  • [BREAKING] previously deprecated fields rewardLiquid, bonusLiquid, reward, bonus, priority, baker, lbEscapeVote and lbEscapeEma were removed from blocks;
  • [BREAKING] previously deprecated fields maxSlashingPeriod, preservedCycles, lbEscapeThreshold, lbSunsetLevel, frozenDepositsPercentage, txRollupOriginationSize, txRollupCommitmentBond, doubleBakingPunishment, doubleEndorsingPunishmentNumerator, doubleEndorsingPunishmentDenominator, revelationReward, lbSubsidy and tokensPerRoll were removed from protocol constants.

Changes in the DB models

  • Accounts table: Spendable, ManagerId and WeirdDelegateId columns were removed;
  • AppState table: ProposalsCount column was renamed to ProposalCounter, and SoftwareCounter column was added;
  • BakingRights table: types of the Id, Type and Status columns were changed to bigint, integer and integer respectively;
  • SnapshotBalances table: type of the Id column was changed to bigint;
  • Blocks table: values of the Events column were updated due to updating the block events enum;
  • DelegationOps table: ResetDeactivation column was removed, and PrevDelegationLevel and PrevDeactivationLevel columns were added;
  • AutostakingOps table: Timestamp column was added;
  • IncreasePaidStorageOps table: type of the ContractId column was changed to nullable integer;
  • OriginationOps table: ManagerId column was removed;
  • PreendorsementOps table: ResetDeactivation column was removed;
  • Tokens table: Value column was added.

Commits

  • 1e89323: Add filter by pkh for update_consensus_key ops (Maksim Strebkov)
  • 13ce18c: Rework DB models, get rid of FKs (Maksim Strebkov) #186
  • 642042d: Enable nullability checks (pt.1) (Maksim Strebkov) #186
  • 6663990: Enable nullability checks (pt.2) (257Byte) #186
  • 8d6d6a7: Enable nullability checks (pt.3) (Maksim Strebkov) #186
  • 38e3ed4: Migrate to .NET 9 and update deps (Maksim Strebkov) #186
  • 4450b8b: Optimize indexer cache (pt.1) (Maksim Strebkov) #186
  • 8b0f897: Optimize indexer cache (pt.2) (257Byte) #186
  • c488752: Make use of generated regexes (257Byte) #186
  • 9d3ece5: Optimize baking rights cache (Maksim Strebkov) #186
  • ecd6715: Fix counter reset (Maksim Strebkov) #186
  • 5259be5: Get rid of legacy contract data, optimize weird delegators handling (257Byte) #186
  • c6b693e: Simplify ActivationsCommit (257Byte) #186
  • 07c01be: Rework delegator contracts handling (Maksim Strebkov) #186
  • 3af1ae1: Introduce binary writers for largest tables, minor fixes (Maksim Strebkov) #186
  • 5128f53: Reset db migrations (Maksim Strebkov) #186
  • e171dca: Update docker files (Maksim Strebkov) #186
  • a86e81d: Remove previously deprecated stuff (Maksim Strebkov) #186
  • 9fae30a: Add more filters to /tokens (Maksim Strebkov) #186
  • ed3c541: Patch Npgsql converters (Maksim Strebkov) #186
  • 49d3bda: More accurate issuance stats (Maksim Strebkov) #186
  • 082cced: Add /accounts/activity API endpoint, optimize timestamp filters (Maksim Strebkov) #186
  • f383873: Fix inherited OpenAPI schemas (Maksim Strebkov) #186
  • 37ed44d: Add filter by tokens and tickets count for /contracts endpoint (Maksim Strebkov) #186
  • 4b47f75: Add sync state metrics, close #122 (Maksim Strebkov) #186
  • d3a021c: Add filter by global id for /tokens endpoint (Maksim Strebkov) #186
  • cccd0bd: Optimize API times and quotes caches initialization (Maksim Strebkov) #186
  • abe3f3f: Allow deletion and enable filtering for metadata plugins (Maksim Strebkov) #186
  • e3cce74: Update snapshot links (Maksim Strebkov)
  • 20c4f1a: v1.15.0 (Maksim Strebkov)

Don't miss a new tzkt release

NewReleases is sending notifications on new releases.