-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[randomness] Add entry function annotation (#12134)
Adds `#[randomness]` annotation which should be used to mark entry functions which use randomness. For example ``` #[randomness] entry fun foo() { let _ = randomness::u64_integer(); } ``` The attribute has the following semantics: 1. It can only be used for entry functions. Using it on other type of functions is not allowed. 2. It can be used on entry functions even if they don't use randomness. 3. If an entry function doesn't have an annotation, but uses randomness, the randomness call fails at runtime. GitOrigin-RevId: 0c7a0ae23909b9a48a8ae8ca875c090b3fc108d6
- Loading branch information
1 parent
a54dc94
commit e70a03f
Showing
3 changed files
with
36 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters