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
Unique salt generation #973
Conversation
Codecov Report
@@ Coverage Diff @@
## master #973 +/- ##
==========================================
+ Coverage 74.22% 74.25% +0.02%
==========================================
Files 89 89
Lines 8815 8813 -2
==========================================
+ Hits 6543 6544 +1
+ Misses 2272 2269 -3
Continue to review full report at Codecov.
|
Docs should also be provided! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have 2 main suggestions:
- Introduce some kind of
ProgramCreator
(or other suitable name). The idea is described in the comment. - Try isolating unsafe code by wrapping it into safe functions and the using these safe functions with other safe code.
919530bPallet tests (values are in nanosegconds)name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
1ca58a9Pallet tests (values are in nanoseconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
3a78e9aPallet tests (values are in nanoseconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
c095148Pallet tests (values are in nanoseconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
4af5193Pallet tests (values are in nanoseconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good idea is to add an example or test that demonstrates the new feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many issues discussed on sync up.
In short:
- static mut program creator itself
- remove default (and program creator ability to construct)
- remove second salt (also depend on first point)
- provide demo + yaml test
…into sl-salt-uniqueness
…into sl-salt-uniqueness
…into sl-salt-uniqueness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes only due to invalid check for uniqueness.
Fix it and ping me to receive approve!
Resolves #693.
Release Notes: Before, the user had to specify the salt manually when creating a program from the program by calling gstd::prog::create_program function. Now one may use the ProgramGenerator::create_program function instead which calculates the salt automatically. This takes the hassle out of keeping track of salt uniqueness from the user.