-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Event V2 Translation #14615
base: main
Are you sure you want to change the base?
Event V2 Translation #14615
Conversation
⏱️ 2h 42m total CI duration on this PR
|
50b9c0f
to
832b754
Compare
80c5021
to
bfbe123
Compare
123fbfe
to
27650b3
Compare
27650b3
to
c202506
Compare
ccd6843
to
c38fc96
Compare
32088d7
to
523e22f
Compare
8bd7449
to
26f2530
Compare
58a7d26
to
7fd09ac
Compare
@@ -132,6 +132,7 @@ pub enum FeatureFlag { | |||
TransactionSimulationEnhancement, | |||
CollectionOwner, | |||
EnableLoaderV2, | |||
AccountAndCoinModuleEventMigration, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we call it Transaction instead of migration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean "translation" instead of migration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but why you want a separate migration flag for coin and account?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to toggle only the switches for account and coin events in this PR (or release) so the other event translation (e.g., for tokens) can come later.
@@ -741,7 +741,7 @@ module aptos_framework::account { | |||
); | |||
table::add(address_map, new_auth_key, originating_addr); | |||
|
|||
if (std::features::module_event_migration_enabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same reason as: https://github.com/aptos-labs/aptos-core/pull/14615/files#r1841101915
@@ -413,6 +482,22 @@ impl DBIndexer { | |||
|
|||
assert_eq!(num_transactions, version - start_version); | |||
|
|||
if self.indexer_db.event_v2_translation_enabled() { | |||
batch.put::<InternalIndexerMetadataSchema>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do you plan to handle seq number backup and restore? since all data are in one db now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will sync with you about this offline soon.
788fc94
to
7bae9ad
Compare
7bae9ad
to
3c8c2ca
Compare
Description
This PR introduces the Event V2 Translation Engine, a framework for translating well-known V2 events into V1 format. So, the Node APIs can output those events in the V1 format.
Added the new flag
enable_event_v2_translation
to the node config for feature-gating.Added the event translators in the account and coin modules, translating:
Added a new feature flag
ACCOUNT_AND_COIN_MODULE_EVENT_MIGRATION
, and used it to guard the event migration for the account and coin modules. So, we can ship this first.Implemented the e2e API test environment where we can simulate and test the module event migration. And, added the e2e tests for the event transaction for the account and coin modules.
Type of Change
Which Components or Systems Does This Change Impact?
How Has This Been Tested?
Tested on the localnet.
Added various e2e API tests.
Key Areas to Review
Checklist