Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIP-71][Discussion] Refactor Aptos Framework Events with Module Events #367

Open
lightmark opened this issue Mar 6, 2024 · 2 comments
Open

Comments

@lightmark
Copy link
Contributor

lightmark commented Mar 6, 2024

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

@alnoki
Copy link

alnoki commented Mar 6, 2024

@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?

@lightmark
Copy link
Contributor Author

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.

@thepomeranian thepomeranian changed the title [AIP-X][Discussion] Refactor Aptos Framework Events with Module Events [AIP-71][Discussion] Refactor Aptos Framework Events with Module Events Mar 12, 2024
@thepomeranian thepomeranian added this to the aptos-node-v1.11 milestone Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants