-
Notifications
You must be signed in to change notification settings - Fork 94
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
Spv proof #1207
Spv proof #1207
Conversation
- native client should not return error on validate_spv_proof since there is no verification
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.
Thanks for the fixes. Last comments :)
@@ -315,6 +320,11 @@ pub trait UtxoCoinBuilderCommonOps { | |||
|
|||
fn ticker(&self) -> &str; | |||
|
|||
fn block_headers_storage(&self) -> Option<BlockHeaderStorage> { | |||
let params = json::from_value(self.conf()["block_header_params"].clone()).ok()?; |
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.
Could you please return an error if we couldn't parse block_header_params
?
fn block_headers_storage(&self) -> UtxoCoinBuildResult <Option<BlockHeaderStorage>> {
let params: Option<_> = json::from_value(self.conf()["block_header_params"].clone())?;
match params {
Some(params) => BlockHeaderStorage::new_from_ctx(self.ctx().clone(), params),
None => Ok(None)
}
}
@Milerius Is it ready for the next review iteration? |
I'm currently checking on #1207 (comment) other than that yes. edit: #1207 (comment) I confirm that we need to keep an Option for the block header storage, every coins doesn't need a storage for block headers, it depends if the option is set or not in the conf file - ready for review. |
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.
Next review iteration.
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.
Next review iteration
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.
Another comment :)
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.
Few minor code improvements proposals.
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.
🔥 Great work!
@shamardy @sergeyboyko0791 Please check if all your comments are resolved. |
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.
🔥
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.
LGTM!
spv_validation
crate with validation functions forheaders
andtransaction
nightly-2022-02-01
validate_payment
validate_payment
validate_spv
return immediatly Ok in native mode.is_aarch64_feature_detected!
undersimd_aarch64
feature rust-lang/stdarch#1239&
usage, I've usedclippy::allow
to bypass them.