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

Ed25519 PK validation in Move should return None instead of aborting on wrong length #7043

Merged
merged 31 commits into from
Mar 20, 2023

Conversation

mstraka100
Copy link
Contributor

@mstraka100 mstraka100 commented Mar 10, 2023

This PR updates the native_public_key_validate native Move function to return false when a key of the wrong length is passed in, rather than aborting.

This change in behavior is feature-gated via a new Ed25519PubkeyValidateReturnFalseWrongLength feature flag which is checked inside the Rust native implementation itself.

Testing

Ran replay tests here to see if they trigger any problems in past TXNs. All passed.

@alinush
Copy link
Contributor

alinush commented Mar 10, 2023

@mstraka100, I updated your PR's description to be a little more precise.

Also, can you change the base branch of this PR to be https://github.com/aptos-labs/aptos-core/tree/alin/native-feature-flag-context?

This way, only your commits & changes will show up in "Files Changed."

@alinush alinush marked this pull request as draft March 10, 2023 16:57
@mstraka100 mstraka100 changed the base branch from main to alin/native-feature-flag-context March 10, 2023 18:23
@alinush alinush requested a review from zjma March 10, 2023 23:29
Base automatically changed from alin/native-feature-flag-context to main March 11, 2023 00:05
@alinush
Copy link
Contributor

alinush commented Mar 11, 2023

Hey Michael, as you can see once my stuff merged, this PR got rebased to main. You will somehow need to make sure only your changes show up in "Files changed"... not sure how... 🤔

@alinush alinush changed the title Add feature flag for ed25519 abort on wrong length ed25519 PK validation in Move should return none instead of aborting on wrong length Mar 16, 2023
@alinush alinush changed the title ed25519 PK validation in Move should return none instead of aborting on wrong length Ed25519 PK validation in Move should return None instead of aborting on wrong length Mar 16, 2023
Copy link
Contributor

@movekevin movekevin left a comment

Choose a reason for hiding this comment

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

Approval pending removing the unused getter functions in features.move

@alinush alinush marked this pull request as ready for review March 16, 2023 22:39
Copy link
Contributor

@alinush alinush left a comment

Choose a reason for hiding this comment

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

LGTM, but fix the errors, since it seems you might be missing a clause in a match.

@mstraka100 mstraka100 enabled auto-merge (squash) March 20, 2023 17:58
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

✅ Forge suite land_blocking success on d48c4a53ab7c3705b5c685bfd73b940b2eb01692

performance benchmark with full nodes : 5893 TPS, 6746 ms latency, 10200 ms p99 latency,no expired txns
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite framework_upgrade success on cb4ba0a57c998c60cbab65af31a64875d2588ca5 ==> d48c4a53ab7c3705b5c685bfd73b940b2eb01692

Compatibility test results for cb4ba0a57c998c60cbab65af31a64875d2588ca5 ==> d48c4a53ab7c3705b5c685bfd73b940b2eb01692 (PR)
Upgrade the nodes to version: d48c4a53ab7c3705b5c685bfd73b940b2eb01692
framework_upgrade::framework-upgrade::full-framework-upgrade : 6514 TPS, 5962 ms latency, 9900 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for cb4ba0a57c998c60cbab65af31a64875d2588ca5 ==> d48c4a53ab7c3705b5c685bfd73b940b2eb01692 passed
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> d48c4a53ab7c3705b5c685bfd73b940b2eb01692

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> d48c4a53ab7c3705b5c685bfd73b940b2eb01692 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 7930 TPS, 4829 ms latency, 6800 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: d48c4a53ab7c3705b5c685bfd73b940b2eb01692
compatibility::simple-validator-upgrade::single-validator-upgrade : 4901 TPS, 8217 ms latency, 10100 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: d48c4a53ab7c3705b5c685bfd73b940b2eb01692
compatibility::simple-validator-upgrade::half-validator-upgrade : 5067 TPS, 7960 ms latency, 11600 ms p99 latency,no expired txns
4. upgrading second batch to new version: d48c4a53ab7c3705b5c685bfd73b940b2eb01692
compatibility::simple-validator-upgrade::rest-validator-upgrade : 6839 TPS, 5642 ms latency, 10100 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> d48c4a53ab7c3705b5c685bfd73b940b2eb01692 passed
Test Ok

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.

3 participants