github baking-bad/tzkt v1.16.0

one month ago

General notes

  • Staker rewards indexing;
  • Min-over-cycle delegation snapshots indexing;
  • Seoul protocol support;
  • Minor models refactoring;
  • Minor bugfixes and improvements.

To update from v1.15.* to v1.16.0 you will have to drop the indexer database and restore it from the latest snapshot, or re-index from scratch. This is due to breaking changes, that make automatic DB migration impossible.

Changes in the API endpoints

  • [BREAKING] query parameter ?types in the /v1/accounts/activity now accepts double_consensus, attestation, preattestation, attestation_reward and update_secondary_key instead of double_endorsing, double_preendorsing, endorsement, preendorsement, endorsing_reward and update_consensus_key;
  • [BREAKING] query parameter ?type in the /v1/rights now accepts attestation instead of endorsing;
  • [BREAKING] /v1/operations/endorsements* was deprecated, use /v1/operations/attestations* instead;
  • [BREAKING] /v1/operations/preendorsements* was deprecated, use /v1/operations/preattestations* instead;
  • [BREAKING] /v1/operations/double_endorsing* was deprecated, use /v1/operations/double_consensus* instead;
  • [BREAKING] /v1/operations/double_preendorsing* was deprecated, use /v1/operations/double_consensus* instead;
  • [BREAKING] /v1/operations/update_consensus_key* was deprecated, use /v1/operations/update_secondary_key* instead;
  • [BREAKING] /v1/operations/endorsing_rewards* was deprecated, use /v1/operations/attestation_rewards* instead;
  • added endpoint /v1/rewards/stakers/{address};
  • added endpoint /v1/rewards/stakers/{address}/count.

Changes in the API models

  • [BREAKING] operation types endorsement, preendorsement, endorsing_reward and update_consensus_key were renamed to attestation, preattestation, attestation_reward and update_secondary_key;
  • [BREAKING] operations double_endorsing and double_preendorsing were merged into double_consensus;
  • [BREAKING] fields expectedDalShards, expectedEndorsements, futureEndorsements, futureEndorsementRewards, endorsements, endorsementRewardsDelegated, endorsementRewardsStakedOwn, endorsementRewardsStakedEdge, endorsementRewardsStakedShared, missedEndorsements and missedEndorsementRewards were renamed to expectedDalAttestations, expectedAttestations, futureAttestations, futureAttestationRewards, attestations, attestationRewardsDelegated, attestationRewardsStakedOwn, attestationRewardsStakedEdge, attestationRewardsStakedShared, missedAttestations and missedAttestationRewards in baker rewards;
  • [BREAKING] fields doubleEndorsing* and doublePreendorsing* were replaced with doubleConsensus* in baker rewards;
  • [BREAKING] field type in baking rights now uses "attestation" instead of "endorsing";
  • [BREAKING] field endorsementRewardPerSlot was renamed to attestationRewardPerSlot in cycles;
  • [BREAKING] field stakedBalance in delegator rewards is now nullable;
  • [BREAKING] all fields in delegator rewards related to baker rewards were moved into the bakerRewards object, which is equal to what /rewards/bakers/{address} returns;
  • [BREAKING] field stakedBalance was removed from rewards split delegators;
  • [BREAKING] fields doubleEndorsingOpId and doublePreendorsingOpId were replaced with doubleConsensusOpId in staking updates;
  • [BREAKING] fields endorsements, preendorsements, endorsingRewards and updateConsensusKeyOps were renamed to attestations, preattestations, attestationRewards and updateSecondaryKeyOps in blocks;
  • [BREAKING] fields doubleEndorsing and doublePreendorsing were replaced with doubleConsensus in blocks;
  • [BREAKING] fields endorsersPerBlock, endorsementDeposit and endorsementReward were renamed to attestersPerBlock, attestationDeposit and attestationReward in protocol constants;
  • field issuedPseudotokens was added to baker rewards;
  • field stakedPseudotokens was added to delegator rewards;
  • fields stakers and actualStakers were added to rewards split;
  • field publicKey was added to reveal operations;
  • field staker was added to staking operations;
  • field keyType was added to update_secondary_key operations.

Changes in the DB models

Accounts table:

  • UpdateConsensusKeyCount was renamed to UpdateSecondaryKeyCount;
  • EndorsementsCount was renamed to AttestationsCount;
  • PreendorsementsCount was renamed to PreattestationsCount;
  • EndorsingRewardsCount was renamed to AttestationRewardsCount;
  • DoubleEndorsingCount and DoublePreendorsingCount were replaced with DoubleConsensusCount;
  • MinTotalDelegated and MinTotalDelegatedLevel were added.

AppState table:

  • UpdateConsensusKeyOpsCount was renamed to UpdateSecondaryKeyOpsCount;
  • EndorsementsOpsCount was renamed to AttestationsOpsCount;
  • PreendorsementsOpsCount was renamed to PreattestationsOpsCount;
  • EndorsingRewardOpsCount was renamed to AttestationRewardOpsCount;
  • DoubleEndorsingOpsCount and DoublePreendorsingOpsCount were replaced with DoubleConsensusOpsCount.

BakerCycles table:

  • IssuedPseudotokens was added;
  • FutureEndorsements was renamed to FutureAttestations;
  • Endorsements was renamed to Attestations;
  • MissedEndorsements was renamed to MissedAttestations;
  • ExpectedEndorsements was renamed to ExpectedAttestations;
  • ExpectedDalShards was renamed to ExpectedDalAttestations;
  • FutureEndorsementRewards was renamed to FutureAttestationRewards;
  • MissedEndorsementRewards was renamed to MissedAttestationRewards;
  • EndorsementRewardsDelegated was renamed to AttestationRewardsDelegated;
  • EndorsementRewardsStakedOwn was renamed to AttestationRewardsStakedOwn;
  • EndorsementRewardsStakedEdge was renamed to AttestationRewardsStakedEdge;
  • EndorsementRewardsStakedShared was renamed to AttestationRewardsStakedShared;
  • DoubleEndorsingRewards and DoublePreendorsingRewards were replaced with DoubleConsensusRewards;
  • DoubleEndorsingLostStaked and DoublePreendorsingLostStaked were replaced with DoubleConsensusLostStaked;
  • DoubleEndorsingLostUnstaked and DoublePreendorsingLostUnstaked were replaced with DoubleConsensusLostUnstaked;
  • DoubleEndorsingLostExternalStaked and DoublePreendorsingLostExternalStaked were replaced with DoubleConsensusLostExternalStaked;
  • DoubleEndorsingLostExternalUnstaked and DoublePreendorsingLostExternalUnstaked were replaced with DoubleConsensusLostExternalUnstaked.

Cycles table:

  • EndorsementRewardPerSlot was renamed to AttestationRewardPerSlot.

DelegatorCycles table:

  • StakedPseudotokens was added.

SnapshotBalances table:

  • Id was removed;
  • DelegatorsCount, ExternalDelegatedBalance, OwnStakedBalance, ExternalStakedBalance and StakersCount are now nullable;
  • Pseudotokens was added;

StakingUpdates table:

  • DoubleEndorsingOpId and DoublePreendorsingOpId were replaced with DoubleConsensusOpId.

Blocks table:

  • Events and Operations enums were updated.

Protocols table:

  • EndorsersPerBlock was renamed to AttestersPerBlock;
  • EndorsementDeposit was renamed to AttestationDeposit;
  • EndorsementReward0 was renamed to AttestationReward0;
  • EndorsementReward1 was renamed to AttestationReward1;
  • MaxEndorsingReward was renamed to MaxAttestationReward;
  • DoubleEndorsingSlashedPercentage was renamed to DoubleConsensusSlashedPercentage.

StakingOps table:

  • StakerId was added.

UpdateConsensusKeyOps table:

  • was renamed to UpdateSecondaryKeyOps;
  • KeyType was added.

Other tables:

  • DelegationSnapshot table was added;
  • StakerCycles table was added;
  • EndorsementOps table was renamed to AttestationOps;
  • DoubleEndorsingOps and DoublePreendorsingOps tables were merged into DoubleConsensusOps;
  • EndorsingRewardOps table was renamed to AttestationRewardOps;
  • PreendorsementOps table was renamed to PreattestationOps.

Commits

  • 33c1e81: Proto23 scaffold (Maksim Strebkov) #191
  • 1b77f43: Add update_companion_key operation and merge it with update_consensus_key (Maksim Strebkov) #191
  • 86442cb: Handle duplications in bootstrap accounts (Maksim Strebkov) #191
  • bc7d2b9: Handle attestations/preattestations aggregate operations (Maksim Strebkov) #191
  • 626d917: Better backward compatibility for deprecated /update_consensus_key API endpoints (Maksim Strebkov) #191
  • c4f3c8c: Rework double attestation/preattestation, handle double consensus ops (Maksim Strebkov) #191
  • 3242317: Rework dal entrapment handler (Maksim Strebkov) #191
  • 95dddb1: Implement protocol migration (Maksim Strebkov) #191
  • ef98dda: Allow finalise unstake to be performed by any account (Maksim Strebkov) #191
  • 9ee294b: Add DB migration (Maksim Strebkov) #191
  • e152a8a: Use timestamp from db for autostaking ops (Maksim Strebkov) #191
  • b97ab50: Add public key to reveal op API model (Maksim Strebkov) #191
  • dc2dce6: Remove limits for "op by hash" db queries (Maksim Strebkov) #191
  • ebe4694: Rename endorsing to attestation (Maksim Strebkov) #191
  • d64fdd6: Init expected dal rewards at bootstrap (257Byte) #191
  • 08541f8: Update Seoul protocol hash (257Byte) #191
  • ed6321f: Rework (pre)attestation aggregate handler (257Byte) #191
  • 9da8995: Index staker cycles, add staker rewards API (Maksim Strebkov) #191
  • 218c74c: Rework delegation and staking rewards indexing and API (Maksim Strebkov) #191
  • c723692: Merge double_attestation and double_preattestation into double_consensus (Maksim Strebkov) #191
  • e4cd2aa: Reset DB migrations (Maksim Strebkov) #191
  • a220177: Add seoulnet chain id (257Byte) #191
  • 0a0f18c: Handle missed forbidden delegate (Maksim Strebkov) #191
  • 4171ade: Skip diagnostics of staking parameters cut by RPC (Maksim Strebkov) #191
  • 881fc7b: Set default sort for /rewards/* (257Byte) #191
  • c5c6a9a: Fix home stats blocks fields (Maksim Strebkov) #191
  • 411c27c: Bump netezos version (257Byte) #191
  • afe6d98: Update snapshot links (257Byte)
  • 7cb10a7: Update docs and docker files (257Byte)
  • a29c4cd: v1.16.0 (257Byte)

Don't miss a new tzkt release

NewReleases is sending notifications on new releases.