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

[move-vm][rac] Bytecode verification #16092

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

[move-vm][rac] Bytecode verification #16092

wants to merge 2 commits into from

Conversation

wrwg
Copy link
Contributor

@wrwg wrwg commented Mar 10, 2025

Description

This adds bound checking bytecode verification to access specifiers. Besides this, no further action the verifier is needed for RAC specifiers.

How Has This Been Tested?

Unit tests have been added for verification failures.

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
  • Move Compiler
  • Other (specify)

Copy link

trunk-io bot commented Mar 10, 2025

⏱️ 38m total CI duration on this PR
Job Cumulative Duration Recent Runs
check-dynamic-deps 22m 🟩🟩🟩🟩🟩 (+4 more)
rust-cargo-deny 9m 🟩🟩🟩🟩🟩
semgrep/ci 3m 🟩🟩🟩🟩🟩 (+4 more)
general-lints 2m 🟩🟩🟩🟩🟩
file_change_determinator 54s 🟩🟩🟩 (+3 more)
permission-check 21s 🟩🟩🟩🟩🟩 (+4 more)
permission-check 19s 🟩🟩🟩🟩🟩 (+4 more)
check-branch-prefix 1s 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor Author

wrwg commented Mar 10, 2025

@wrwg wrwg changed the base branch from wrwg/rac to graphite-base/16092 March 15, 2025 04:21
@wrwg wrwg force-pushed the wrwg/rac-verify branch from 1c207aa to ea21c20 Compare March 15, 2025 04:29
@wrwg wrwg force-pushed the graphite-base/16092 branch from 7023bd5 to 0e8c4e6 Compare March 15, 2025 04:29
@wrwg wrwg force-pushed the wrwg/rac-verify branch from ea21c20 to 5898655 Compare March 17, 2025 02:43
@wrwg wrwg force-pushed the graphite-base/16092 branch from 0e8c4e6 to a0922c9 Compare March 17, 2025 02:43
@wrwg wrwg force-pushed the wrwg/rac-verify branch from 5898655 to 7983e9a Compare March 17, 2025 04:39
@wrwg wrwg force-pushed the graphite-base/16092 branch from a0922c9 to 1a0505c Compare March 17, 2025 04:39
@wrwg wrwg changed the base branch from graphite-base/16092 to main March 17, 2025 04:39
@wrwg wrwg force-pushed the wrwg/rac-verify branch 2 times, most recently from aa0025b to 94c132d Compare March 23, 2025 06:36
@rahxephon89
Copy link
Contributor

@wrwg prop test is still failing with unmatched txn execution status.

wrwg added 2 commits March 23, 2025 23:33
This adds bound checking bytecode verification to access specifiers. Besides this, no further action the verifier is needed for RAC specifiers.

Unit tests have been added for verification failures.
@wrwg wrwg force-pushed the wrwg/rac-verify branch from 94c132d to 6d25d3c Compare March 24, 2025 06:33
check_bounds_impl(self.view.address_identifiers(), *addr_idx)?
},
AddressSpecifier::Parameter(loc_idx, fun_opt) => {
let sign = self.view.signature_at(function.parameters);
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on documentation:

/// The index of a parameter of the current function. If `modifier` is not given, the
/// parameter must have address type. Otherwise `modifier` must be a function which takes
/// a value (or reference) of the parameter type and delivers an address.

I am not familiar with this code, where do we check that the type at index in sign is address iff fun_opt.is_none()? Where do we check the function signature that it returns an address?

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.

4 participants