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] fixes to randomness.move #12250

Merged
merged 3 commits into from
Feb 29, 2024
Merged

[move] fixes to randomness.move #12250

merged 3 commits into from
Feb 29, 2024

Conversation

alinush
Copy link
Contributor

@alinush alinush commented Feb 27, 2024

TODOs

  • Update randomness.spec.move to pass prover

Description

  • Fixed top level comments in randomness.move
  • Added a random bytes function and tests for it
  • Added a test for the random permutation function
  • Every randomness call now emits a RandomnessGeneratedEvent
  • Tested that events are emitted correctly

Copy link

trunk-io bot commented Feb 27, 2024

⏱️ 9h 13m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-move-unit-coverage 2h 12m 🟩🟩🟩
rust-unit-tests 2h 3m 🟥🟩🟩
windows-build 1h 41m 🟩🟩🟩🟩🟩
rust-move-tests 1h 24m 🟥🟩🟩
run-tests-main-branch 39m 🟥🟥🟥🟥🟥 (+1 more)
rust-lints 32m 🟥🟩🟥🟩
check 17m 🟩🟩🟩🟩
check-dynamic-deps 11m 🟩🟩🟩🟩🟩
general-lints 8m 🟩🟩🟩🟩
semgrep/ci 2m 🟩🟩🟩🟩🟩
file_change_determinator 52s 🟩🟩🟩🟩🟩
file_change_determinator 44s 🟩🟩🟩🟩
permission-check 22s 🟩🟩🟩🟩🟩
permission-check 17s 🟩🟩🟩🟩🟩
permission-check 16s 🟩🟩🟩🟩🟩
permission-check 14s 🟩🟩🟩🟩🟩

🚨 2 jobs on the last run were significantly faster/slower than expected

Job Duration vs 7d avg Delta
rust-move-unit-coverage 36m 19m +94%
run-tests-main-branch 7m 4m +79%

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.1%. Comparing base (9ef872b) to head (d9fe739).
Report is 218 commits behind head on randomnet.

❗ Current head d9fe739 differs from pull request most recent head c74a74f. Consider uploading reports for the commit c74a74f to get more accurate results

Additional details and impacted files
@@              Coverage Diff               @@
##           randomnet   #12250       +/-   ##
==============================================
+ Coverage       69.8%    70.1%     +0.3%     
==============================================
  Files           2199      854     -1345     
  Lines         417217   189784   -227433     
==============================================
- Hits          291411   133160   -158251     
+ Misses        125806    56624    -69182     

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

@alinush alinush marked this pull request as draft February 28, 2024 18:18
Fixed the spec to unblock the PR.

Need to prove the introduced assumptions with proper loop invariants, which should be provable.
@alinush alinush marked this pull request as ready for review February 29, 2024 21:27
@danielxiangzl danielxiangzl merged commit 1595bac into randomnet Feb 29, 2024
44 checks passed
@danielxiangzl danielxiangzl deleted the alin/emit-event branch February 29, 2024 21:42
zjma pushed a commit that referenced this pull request Mar 1, 2024
* [move] fixes to randomness.move

* Fixed the Prover spec

Fixed the spec to unblock the PR.

Need to prove the introduced assumptions with proper loop invariants, which should be provable.

* lint

---------

Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>
zjma pushed a commit that referenced this pull request Mar 2, 2024
* [move] fixes to randomness.move

* Fixed the Prover spec

Fixed the spec to unblock the PR.

Need to prove the introduced assumptions with proper loop invariants, which should be provable.

* lint

---------

Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>
zjma added a commit that referenced this pull request Mar 2, 2024
* [move] fixes to `randomness.move` (#12250)

* [move] fixes to randomness.move

* Fixed the Prover spec

Fixed the spec to unblock the PR.

Need to prove the introduced assumptions with proper loop invariants, which should be provable.

* lint

---------

Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>

* fix specs

---------

Co-authored-by: Alin Tomescu <tomescu.alin@gmail.com>
Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>
zjma added a commit that referenced this pull request Mar 2, 2024
* [move] fixes to `randomness.move` (#12250)

* [move] fixes to randomness.move

* Fixed the Prover spec

Fixed the spec to unblock the PR.

Need to prove the introduced assumptions with proper loop invariants, which should be provable.

* lint

---------

Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>

* fix specs

---------

Co-authored-by: Alin Tomescu <tomescu.alin@gmail.com>
Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>
zjma added a commit that referenced this pull request Mar 2, 2024
* [move] fixes to `randomness.move` (#12250)

* [move] fixes to randomness.move

* Fixed the Prover spec

Fixed the spec to unblock the PR.

Need to prove the introduced assumptions with proper loop invariants, which should be provable.

* lint

---------

Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>

* fix specs

---------

Co-authored-by: Alin Tomescu <tomescu.alin@gmail.com>
Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>
zjma added a commit that referenced this pull request Mar 3, 2024
* randomness type update 3 (#12202)

* randomness #4: RandManager update from randomnet (#12224)

* RandManager update from randomnet

* lint

* lint

* randomness #5: consensus update from randomnet (#12225)

* consensus update from randomnet

* update

* randomness #6: dkg manager update from randomnet (#12226)

* consensus update from randomnet

* update

* update execution client api

* dkg manager update from randomnet

* avoid panic

* make api, indexer, fake aptos db aware of block metadata ext txns (#12227)

* randomness #8: framework update from randomnet (#12228)

* framework update from randomnet

Squashed commit of the following to fix jwk smoke tests:

commit 3bd0154
Author: zhoujun.ma <zhoujun@aptoslabs.com>
Date:   Tue Feb 27 02:47:57 2024 -0800

    update

commit 2eb6add
Author: zhoujun.ma <zhoujun@aptoslabs.com>
Date:   Tue Feb 27 02:12:27 2024 -0800

    update

commit 9d82151
Author: zhoujun.ma <zhoujun@aptoslabs.com>
Date:   Tue Feb 27 01:51:08 2024 -0800

    debug

fix doc test

fix spec

fix doc

update initialization in genesis

update features.move

initialize randomness in genesis

update golden files

private entry fun check and vm updates

* postpone release builder changes

* update goldenfiles

* fix is_safe_call spec

* randomness #9: smoke tests from randomnet (#12282)

* smoke test deps and 1st case from randomnet

* update

* more smoke tests

* randomness #10: randomness API update from randomnet (#12335)

* [move] fixes to `randomness.move` (#12250)

* [move] fixes to randomness.move

* Fixed the Prover spec

Fixed the spec to unblock the PR.

Need to prove the introduced assumptions with proper loop invariants, which should be provable.

* lint

---------

Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>

* fix specs

---------

Co-authored-by: Alin Tomescu <tomescu.alin@gmail.com>
Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>

* lint

* update genesis

* on-chain resources to indicate dkg/randomness failure injection (#12345)

* dkg/randomness failure injection

* update

* smoke test

* update

* update

* fix scripts

---------

Co-authored-by: Alin Tomescu <tomescu.alin@gmail.com>
Co-authored-by: Junkil Park <juki14@gmail.com>
Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com>
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