-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix(maat): proofs #600
base: develop
Are you sure you want to change the base?
fix(maat): proofs #600
Conversation
runtime/src/configs/mod.rs
Outdated
( | ||
T::Hashing::hash(&[]), | ||
Output::decode(&mut TrailingZeroInput::new(subject)).unwrap_or_default(), |
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.
What's going on here?
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.
TrailingZeroInput adds zeros to subject and then decodes that. In our case we are using empty slice for subject. That is why we get [0; 32] randomness when called. Before the slice was hashed. Now it's only decoded.
While fixing the test I found TestRandomness. The latest commit uses that directly. So that we don't need to support our implementation.
) -> [u8; 32] { | ||
// This randomness digest is hardcoded because it's always same on testnet. | ||
// Check `PredictableRandomnessSource` struct for more details. | ||
let digest = [0u8; 32]; |
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.
But it's not [0u8; 32] on the testnet, right?
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.
Answered here. It is now :D
/// Sector number | ||
#[arg(long)] | ||
sector_id: u32, | ||
/// The height at which we draw the randomness for deriving a sealed cid. |
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.
We should propose the defaults that were hardcoded here, If I were a new user, I wouldn't know where to put it and which number needs to be after which one.
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 thought that we will eventually remove those commands? The defaults were also specific for a single use case
Description
Fixes maat proofs and adds a script for future use.