[AIP-71][Discussion] Refactor Aptos Framework Events with Module Events
lightmark opened this issue · 2 comments
AIP Discussion
The default strategy is:
For each v1 event below, create a v2 event with a different name (Event
suffix stripped) and emit a v2 event together with each v1 event emitting.
Module | Event v1 Name | Event v2 Name | ABI update |
---|---|---|---|
account.move | KeyRotationEvent | KeyRotation | +account:address |
aptos_account.move | DirectCoinTransferConfigUpdatedEvent | DirectCoinTransferConfigUpdated | + account:address |
coin.move | DepositEvent | Deposit | + account:address |
coin.move | WithdrawEvent | Withdraw | + account: address |
object.move | TransferEvent | Transfer | |
aptos_governance.move | CreateProposalEvent | CreateProposal | |
aptos_governance.move | VoteEvent | Vote | |
aptos_governance.move | UpdateConfigEvent | UpdateConfig | |
block.move | NewBlockEvent | NewBlock | |
block.move | UpdateEpochIntervalEvent | UpdateEpochInterval | |
aptos-token-objects/token.move | MutationEvent | Mutation | + token:address |
aptos-token-objects/collection.move | MutationEvent | Mutation | + collection:address |
aptos-token-objects/collection.move | BurnEvent | Burn | + previous_owner |
aptos-token-objects/collection.move | MintEvent | Mint | + collection:address |
multisig_account.move | AddOwnersEvent | AddOwners | + account: address |
multisig_account.move | RemoveOwnersEvent | RemoveOwners | + account: address |
multisig_account.move | UpdateSignaturesRequiredEvent | UpdateSignaturesRequired | + account: address |
multisig_account.move | CreateTransactionEvent | CreateTransaction | + account: address |
multisig_account.move | VoteEvent | Vote | + account: address |
multisig_account.move | ExecuteRejectedTransactionEvent | ExecuteRejectedTransaction | + account: address |
multisig_account.move | TransactionExecutionSucceededEvent | TransactionExecutionSucceeded | + account: address |
multisig_account.move | TransactionExecutionFailedEvent | TransactionExecutionFailed | + account: address |
multisig_account.move | MetadataUpdatedEvent | MetadataUpdated | + account: address |
reconfiguration.move | NewEpochEvent | NewEpoch | |
stake.move | RegisterValidatorCandidateEvent | RegisterValidatorCandidate | |
stake.move | SetOperatorEvent | SetOperator | |
stake.move | AddStakeEvent | AddStake | |
stake.move | ReactivateStakeEvent | ReactivateStake | |
stake.move | RotateConsensusKeyEvent | RotateConsensusKey | |
stake.move | UpdateNetworkAndFullnodeAddressesEvent | UpdateNetworkAndFullnodeAddresses | |
stake.move | IncreaseLockupEvent | IncreaseLockup | |
stake.move | JoinValidatorSetEvent | JoinValidatorSet | |
stake.move | DistributeRewardsEvent | DistributeRewards | |
stake.move | UnlockStakeEvent | UnlockStake | |
stake.move | WithdrawStakeEvent | WithdrawStake | |
stake.move | LeaveValidatorSetEvent | LeaveValidatorSet | |
staking_contract.move | UpdateCommissionEvent | UpdateCommission | |
staking_contract.move | CreateStakingContractEvent | CreateStakingContract | |
staking_contract.move | UpdateVoterEvent | UpdateVoter | |
staking_contract.move | ResetLockupEvent | ResetLockup | |
staking_contract.move | AddStakeEvent | AddStake | |
staking_contract.move | RequestCommissionEvent | RequestCommission | |
staking_contract.move | UnlockStakeEvent | UnlockStake | |
staking_contract.move | SwitchOperatorEvent | SwitchOperator | |
staking_contract.move | AddDistributionEvent | AddDistribution | |
staking_contract.move | DistributeEvent | Distribute | |
staking_contract.move | SwitchOperatorEvent | SwitchOperator | |
vesting.move | CreateVestingContractEvent | CreateVestingContract | |
vesting.move | UpdateOperatorEvent | UpdateOperator | |
vesting.move | UpdateVoterEvent | UpdateVoter | |
vesting.move | ResetLockupEvent | ResetLockup | |
vesting.move | SetBeneficiaryEvent | SetBeneficiary | |
vesting.move | UnlockRewardsEvent | UnlockRewards | |
vesting.move | VestEvent | Vest | |
vesting.move | DistributeEvent | Distribute | |
vesting.move | TerminateEvent | Terminate | |
vesting.move | AdminWithdrawEvent | AdminWithdraw | |
voting.move | CreateProposalEvent | CreateProposal | |
voting.move | RegisterForumEvent | RegisterForum | |
voting.move | VoteEvent | Vote | |
voting.move | ResolveProposal | ||
token_event_store.move | CollectionDescriptionMutateEvent | CollectionDescriptionMutate | |
token_event_store.move | CollectionUriMutateEvent | CollectionUriMutate | |
token_event_store.move | CollectionMaxiumMutateEvent | CollectionMaxiumMutate | |
token_event_store.move | OptInTransferEvent | OptInTransfer | |
token_event_store.move | UriMutationEvent | UriMutation | |
token_event_store.move | DefaultPropertyMutateEvent | DefaultPropertyMutate | |
token_event_store.move | DescriptionMutateEvent | DescriptionMutate | |
token_event_store.move | RoyaltyMutateEvent | RoyaltyMutate | |
token_event_store.move | MaxiumMutateEvent | MaximumMutate |
Read more about it here: Link to AIP
@bowenyang007 @lightmark I don't foresee this immediately affecting Econia indexing, because Econia v4 (mainnet release) relies on custom v1 events and writesets only - there is no dependency on framework events
Of course the performance enhancement of v2 events is understandable, but the Econia package is also 63k and upgrading events will probably not happen. Rather I'd expect future releases (e.g. protocol rebuilds) will simply use v2 events going forward
As I understand it, v1 and v2 event indexing will be both be supported but protocols that opt for v2 style will see superior performance - is this correct? Or will v1 events be incompatibly deprecated?
v1 and v2 event indexing will be both be supported.
But the framework v1 emitting will be removed once most people in the community switch to tracking v2 only.