aptos-indexer-processors icon indicating copy to clipboard operation
aptos-indexer-processors copied to clipboard

[event_v2] indexer logic update to handle migration

Open lightmark opened this issue 9 months ago • 0 comments

PR description

In this PR we add event v2 migration indexing support.

PRs to handle:

  1. https://github.com/aptos-labs/aptos-core/pull/10532
  2. https://github.com/aptos-labs/aptos-core/pull/11688
  3. https://github.com/aptos-labs/aptos-core/pull/13147

Events to migrate

  • V1 + V2: means dedupe is required
  • only V1 or V2: means no dedupe is required due to no double emission.
Module Event Name Migration Note
account KeyRotation not indexed
aptos_account DirectCoinTransferConfigUpdated not indexed
coin Deposit only V1 or V2; not both
Withdraw only V1 or V2; not both
fungible_asset Deposit only V1 or V2; not both
Withdraw only V1 or V2; not both
Frozen only V1 or V2; not both
object Transfer V1 + V2
aptos_governance CreateProposal not indexed
Vote V1 + V2
UpdateConfig not indexed
block NewBlock not indexed
UpdateEpochInterval not indexed
multisig_account -- all events -- not indexed
reconfiguration NewEpoch not indexed
stake RegisterValidatorCandidate not indexed
SetOperator not indexed
AddStake V1 + V2
ReactivateStakeEvent not indexed
RotateConsensusKey not indexed
UpdateNetworkAndFullnodeAddresses not indexed
IncreaseLockup not indexed
JoinValidatorSet not indexed
DistributeRewards V1 + V2
UnlockStake not indexed
WithdrawStake not indexed
LeaveValidatorSet not indexed
staking_contract -- all events -- not indexed
vesting -- all events -- not indexed
voting -- all events -- not indexed
token Mutation V1 + V2
token_event_store -- all events -- not indexed
token_transfers -- all events -- not indexed

Notes

An example for event v2 migration.

whether a new field would be added can be seen here: https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-71.md But the ground truth is in the code. Please verify.

lightmark avatar May 01 '24 06:05 lightmark