aptos-indexer-processors
aptos-indexer-processors copied to clipboard
[event_v2] indexer logic update to handle migration
PR description
In this PR we add event v2 migration indexing support.
PRs to handle:
- https://github.com/aptos-labs/aptos-core/pull/10532
- https://github.com/aptos-labs/aptos-core/pull/11688
- 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.