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
feat: include output DBC within payment proof for Chunks storage #358
feat: include output DBC within payment proof for Chunks storage #358
Conversation
// Reason-hash value set in the input/parent DBCs spent for this storage payment. | ||
// TOOD: pass the output DBC instead, nodes can check input/parent DBCs' reason-hash among other pending validations. | ||
// TODO: remove it since nodes should get this from the input/parent spent DBC/s |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
72790b6
to
bb941fe
Compare
fa5b8ed
to
a620bc2
Compare
a620bc2
to
1955c82
Compare
@@ -103,11 +103,14 @@ pub type MerkleTreeNodesType = [u8; 32]; | |||
|
|||
#[derive(Clone, Eq, PartialEq, Serialize, Deserialize, custom_debug::Debug)] | |||
pub struct PaymentProof { | |||
// Output DBC for nodes to check the Chunk payment is valid and inputs have | |||
// been effectivelly spent on the network. | |||
pub dbc: Dbc, |
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 believe we'll need a Vec<Dbc>
here actually, I'll take care of that on later PRs since this is likely to change anyways.
1955c82
to
db3c288
Compare
Resolves #342
Description
Summary generated by Reviewpad on 08 Jun 23 14:35 UTC
This pull request includes various changes across multiple files related to the
PaymentProofsMap
type. It adds new fields and modifies the return types of some functions. It also removes some unused imports and changes imports from one module to another. Additionally, it updates theCmdResponse::StoreChunk
function in thesn_protocol
module to accept payment proofs. Finally, it modifies thePaymentProof
struct in thesn_protocol
module to add a new fielddbc
and update theaudit_trail
field.