aptos-core
aptos-core copied to clipboard
[Compiler-v2] Generate bytecode version V7 when using compiler V2
Description
This PR guarantees that the CompiledModule/Script generated by the compiler V2 must be 7 so that only when the feature flag VM_BINARY_FORMAT_V7 is set, the module can be published.
Type of Change
- [x] 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.)
- [x] Move/Aptos Virtual Machine
- [ ] Aptos Framework
- [ ] Aptos CLI/SDK
- [ ] Developer Infrastructure
- [ ] Other (specify)
How Has This Been Tested?
Added an e2e move test
Key Areas to Review
- V2 compiler generates bytecode version 7 by default;
- the newly added e2e move test checks that V2 generated code can only be published when VM_BINARY_FORMAT_V7 is set;
- V1 compiler is not affected.
Checklist
- [x] I have read and followed the CONTRIBUTING doc
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I identified and added all stakeholders and component owners affected by this change as reviewers
- [x] I tested both happy and unhappy path of the functionality
- [x] I have made corresponding changes to the documentation
⏱️ 7h 6m total CI duration on this PR
Job | Cumulative Duration | Recent Runs |
---|---|---|
rust-targeted-unit-tests | 2h 13m | ⬜ 🟥 🟥 🟩 🟩 (+2 more) |
rust-move-unit-coverage | 1h 59m | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
rust-move-tests | 1h 12m | 🟥 🟥 🟩 🟩 🟩 (+2 more) |
rust-lints | 37m | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
run-tests-main-branch | 29m | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
general-lints | 14m | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
check-dynamic-deps | 14m | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
semgrep/ci | 3m | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
file_change_determinator | 1m | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
file_change_determinator | 1m | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
permission-check | 27s | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
permission-check | 24s | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
permission-check | 18s | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
permission-check | 14s | 🟩 🟩 🟩 🟩 🟩 (+2 more) |
🚨 1 job on the last run was significantly faster/slower than expected
Job | Duration | vs 7d avg | Delta |
---|---|---|---|
rust-move-tests | 14m | 9m |
Codecov Report
Attention: Patch coverage is 94.73684%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 57.6%. Comparing base (
5422dc1
) to head (cea7f55
). Report is 232 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
...r-v2/src/file_format_generator/module_generator.rs | 80.0% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #12996 +/- ##
=======================================
Coverage 57.6% 57.6%
=======================================
Files 834 834
Lines 198369 198384 +15
=======================================
+ Hits 114306 114319 +13
- Misses 84063 84065 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This issue is stale because it has been open 45 days with no activity. Remove the stale
label, comment or push a commit - otherwise this will be closed in 15 days.