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

Event V2 Translation #14615

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Event V2 Translation #14615

wants to merge 1 commit into from

Conversation

junkil-park
Copy link
Contributor

@junkil-park junkil-park commented Sep 12, 2024

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:

    • coin::CoinDeposit -> coin::DepositEvent
    • coin::CoinWithdraw -> coin::WithdrawEvent
    • account::CoinRegister -> account::CoinRegisterEvent
    • account::KeyRotation -> account::KeyRotationEvent
  • 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

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Other (specify)

How Has This Been Tested?

Tested on the localnet.
Added various e2e API tests.

Key Areas to Review

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Copy link

trunk-io bot commented Sep 12, 2024

⏱️ 2h 42m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
general-lints 20m 🟩🟩🟩🟩🟩 (+7 more)
rust-cargo-deny 18m 🟩🟩🟩🟩🟩 (+7 more)
check-dynamic-deps 13m 🟩🟩🟩🟩🟩 (+7 more)
rust-move-tests 10m 🟩
rust-move-tests 10m 🟩
rust-move-tests 10m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 6m
semgrep/ci 5m 🟩🟩🟩🟩🟩 (+7 more)

settingsfeedbackdocs ⋅ learn more about trunk.io

@junkil-park junkil-park force-pushed the jpark/event-v2-translation branch 9 times, most recently from 50b9c0f to 832b754 Compare September 16, 2024 16:22
storage/aptosdb/src/db/include/aptosdb_reader.rs Outdated Show resolved Hide resolved
storage/indexer/src/db_indexer.rs Outdated Show resolved Hide resolved
storage/indexer/src/db_indexer.rs Outdated Show resolved Hide resolved
storage/indexer/src/db_indexer.rs Outdated Show resolved Hide resolved
storage/indexer/src/db_indexer.rs Outdated Show resolved Hide resolved
@junkil-park junkil-park force-pushed the jpark/event-v2-translation branch 4 times, most recently from 80c5021 to bfbe123 Compare September 24, 2024 03:46
@junkil-park junkil-park force-pushed the jpark/event-v2-translation branch 10 times, most recently from 123fbfe to 27650b3 Compare October 3, 2024 16:15
@junkil-park junkil-park force-pushed the jpark/event-v2-translation branch 2 times, most recently from ccd6843 to c38fc96 Compare October 16, 2024 11:27
@junkil-park junkil-park force-pushed the jpark/event-v2-translation branch 2 times, most recently from 32088d7 to 523e22f Compare October 23, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants