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] double emitting in account, coin, fungible asset and object and migrate move-examples #10532

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

lightmark
Copy link
Contributor

@lightmark lightmark commented Oct 16, 2023

Description

step 1 of #10529
leave other modules for grabs.

Test Plan

ut

@@ -157,6 +157,7 @@ module aptos_framework::object {
}

/// Emitted whenever the object's owner field is changed.
#[event]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: not sure reusing this struct or create a new one. seems unnecessary to me but a different opinion is welcomed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go for it...

/// Event emitted when a lock is canceled.
struct CancelLockupEvent has drop, store {
struct CancelLockup has drop, store {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it going to be the convention to drop the suffix "Event"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My current pattern for aptos-framework is:

  1. If the current event struct doesn't need add new field to migrate to v2, I will just add #[event] attribute directly to that struct to spare the hassle of creating a new struct.
  2. otherwise, create a new struct without Event suffix since attribute can tell whether it is an event or not and you cannot share the same event name in the same module.

Does it make sense?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense!
What if the current event v1 struct (for example AbcEvent) needs to add a new field? It will become AbcEventV2 or AbcV2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no way for them to add field. I think any new v2 does not need Event string in their name.

@lightmark lightmark changed the title [event v2] double emitting in account, coin, fungible asset and object [event v2] double emitting in account, coin, fungible asset and object and migrate move-examples Oct 24, 2023
@lightmark lightmark force-pushed the event_v2_migration branch 4 times, most recently from 83c8378 to 0354ae7 Compare October 25, 2023 18:28
@lightmark lightmark requested a review from CapCap November 1, 2023 20:39
@lightmark lightmark enabled auto-merge (squash) November 6, 2023 22:44

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0b5bb47) 69.7% compared to head (5c572e6) 69.7%.
Report is 16 commits behind head on main.

❗ Current head 5c572e6 differs from pull request most recent head 0e7026b. Consider uploading reports for the commit 0e7026b to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10532   +/-   ##
=======================================
  Coverage    69.7%    69.7%           
=======================================
  Files        2111     2111           
  Lines      401246   401243    -3     
=======================================
+ Hits       279797   279867   +70     
+ Misses     121449   121376   -73     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite compat success on aptos-node-v1.8.3 ==> 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9

Compatibility test results for aptos-node-v1.8.3 ==> 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9 (PR)
1. Check liveness of validators at old version: aptos-node-v1.8.3
compatibility::simple-validator-upgrade::liveness-check : committed: 4453 txn/s, latency: 7039 ms, (p50: 7500 ms, p90: 10000 ms, p99: 15900 ms), latency samples: 178140
2. Upgrading first Validator to new version: 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 1777 txn/s, latency: 15822 ms, (p50: 19300 ms, p90: 21900 ms, p99: 22700 ms), latency samples: 92420
3. Upgrading rest of first batch to new version: 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 1566 txn/s, latency: 16248 ms, (p50: 19100 ms, p90: 22000 ms, p99: 30000 ms), latency samples: 92400
4. upgrading second batch to new version: 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 2999 txn/s, latency: 10554 ms, (p50: 11400 ms, p90: 15800 ms, p99: 18100 ms), latency samples: 119980
5. check swarm health
Compatibility test for aptos-node-v1.8.3 ==> 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9 passed
Test Ok

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9

two traffics test: inner traffic : committed: 7111 txn/s, latency: 5366 ms, (p50: 4800 ms, p90: 7000 ms, p99: 14400 ms), latency samples: 3079120
two traffics test : committed: 100 txn/s, latency: 2244 ms, (p50: 2200 ms, p90: 2500 ms, p99: 2800 ms), latency samples: 1800
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.261, avg: 0.210", "QsPosToProposal: max: 0.147, avg: 0.142", "ConsensusProposalToOrdered: max: 0.572, avg: 0.538", "ConsensusOrderedToCommit: max: 0.508, avg: 0.486", "ConsensusProposalToCommit: max: 1.052, avg: 1.024"]
Max round gap was 2 [limit 4] at version 1101903. Max no progress secs was 9.009265 [limit 10] at version 1101903.
Test Ok

@lightmark lightmark merged commit c7375b8 into main Jan 17, 2024
51 of 52 checks passed
@lightmark lightmark deleted the event_v2_migration branch January 17, 2024 02:08
Copy link
Contributor

❌ Forge suite framework_upgrade failure on aptos-node-v1.8.3 ==> 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9

Compatibility test results for aptos-node-v1.8.3 ==> 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9 (PR)
Upgrade the nodes to version: 0e7026b64f6ab00e5ecd1d3ecac93b54d9296ab9
Test Failed: API error: Unknown error error sending request for url (http://aptos-node-3-validator.forge-framework-upgrade-pr-10532.svc:8080/v1/estimate_gas_price): operation timed out

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: __libc_start_main
  15: <unknown>
Trailing Log Lines:
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: __libc_start_main
  15: <unknown>


Swarm logs can be found here: See fgi output for more information.
thread 'main' panicked at testsuite/forge/src/backend/k8s/swarm.rs:676:18:
called `Result::unwrap()` on an `Err` value: ApiError: namespaces "forge-framework-upgrade-pr-10532" not found: NotFound (ErrorResponse { status: "Failure", message: "namespaces \"forge-framework-upgrade-pr-10532\" not found", reason: "NotFound", code: 404 })

Caused by:
    namespaces "forge-framework-upgrade-pr-10532" not found: NotFound

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: __libc_start_main
  16: <unknown>
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Debugging output:

junkil-park added a commit that referenced this pull request Feb 21, 2024
sherry-x pushed a commit that referenced this pull request Feb 21, 2024
lightmark added a commit that referenced this pull request Apr 16, 2024
lightmark added a commit that referenced this pull request Apr 17, 2024
…#12918)

* Revert "[event_v2] migrate account, coin, object (#10532)"

This reverts commit c7375b8.

* update objects.rs and transacitons.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CICD:run-e2e-tests when this label is present github actions will run all land-blocking e2e tests from the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants