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

select jwk in move #15107

Draft
wants to merge 1 commit into
base: zjma/regex
Choose a base branch
from
Draft

select jwk in move #15107

wants to merge 1 commit into from

Conversation

zjma
Copy link
Contributor

@zjma zjma commented Oct 29, 2024

Description

When validating a keyless txn, we find a JWK by iss.
This find_jwk_by_iss process is currently in VM, and we are moving it to the framework for better upgradability.

Potential dependency: #15139

How Has This Been Tested?

Key Areas to Review

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)

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 Oct 29, 2024

⏱️ 2h 42m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
rust-cargo-deny 24m 🟩🟩🟩🟩 (+9 more)
check-dynamic-deps 23m 🟩🟩🟩🟩🟩 (+10 more)
rust-move-tests 10m 🟥
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 8m
rust-move-tests 7m
general-lints 7m 🟩🟩🟩🟩🟩 (+9 more)
semgrep/ci 6m 🟩🟩🟩🟩🟩 (+10 more)
rust-move-tests 4m 🟥

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
check-dynamic-deps 3m 1m +118%

settingsfeedbackdocs ⋅ learn more about trunk.io

pk.inner_keyless_pk().iss_val.as_bytes().to_vec().as_move_value(),
sig.parse_jwt_header().unwrap().kid.as_bytes().to_vec().as_move_value(),
];
let move_ret_val = session.execute_function_bypass_visibility(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

bookmark 1

let federated_jwks = get_federated_jwks_onchain(resolver, &fed_pk.jwk_addr)
.map_err(|_| {
invalid_signature!(format!(
let jwk = if std::env::var("FIND_JWK_IN_MOVE").unwrap_or_default().as_str() == "1" { //TODO: gated by a flag instead
Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed!

}

all_times.sort();
println!("P50={:?}", all_times[50]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you running this with cargo test --release I hope? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@zjma zjma force-pushed the zjma/debug1026 branch 3 times, most recently from 38bfcb7 to 21d1b7e Compare November 2, 2024 11:00
@zjma zjma changed the base branch from main to zjma/regex November 2, 2024 11:09
@zjma zjma mentioned this pull request Nov 2, 2024
8 tasks
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