Skip to content
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

Merged
merged 1 commit into from Jun 14, 2023

Conversation

bochaco
Copy link
Member

@bochaco bochaco commented Jun 8, 2023

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 the CmdResponse::StoreChunk function in the sn_protocol module to accept payment proofs. Finally, it modifies the PaymentProof struct in the sn_protocol module to add a new field dbc and update the audit_trail field.

@reviewpad reviewpad bot added the Medium Medium sized PR label Jun 8, 2023
// 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

Suspicious comment
@bochaco bochaco force-pushed the feat-attach-dbc-within-payment-proof branch 5 times, most recently from 72790b6 to bb941fe Compare June 12, 2023 12:34
@bochaco bochaco marked this pull request as ready for review June 12, 2023 12:55
@reviewpad reviewpad bot requested a review from RolandSherwin June 12, 2023 12:55
@bochaco bochaco enabled auto-merge June 12, 2023 13:12
@bochaco bochaco force-pushed the feat-attach-dbc-within-payment-proof branch 2 times, most recently from fa5b8ed to a620bc2 Compare June 12, 2023 14:41
@bochaco bochaco disabled auto-merge June 12, 2023 15:20
@joshuef joshuef enabled auto-merge June 13, 2023 03:01
@joshuef joshuef added this pull request to the merge queue Jun 13, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 13, 2023
@bochaco bochaco force-pushed the feat-attach-dbc-within-payment-proof branch from a620bc2 to 1955c82 Compare June 13, 2023 13:35
@@ -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,
Copy link
Member Author

@bochaco bochaco Jun 13, 2023

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.

@bochaco bochaco force-pushed the feat-attach-dbc-within-payment-proof branch from 1955c82 to db3c288 Compare June 14, 2023 07:53
@bochaco bochaco enabled auto-merge June 14, 2023 07:55
@bochaco bochaco added this pull request to the merge queue Jun 14, 2023
Merged via the queue into maidsafe:main with commit 08fccbe Jun 14, 2023
19 checks passed
@bochaco bochaco deleted the feat-attach-dbc-within-payment-proof branch June 14, 2023 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium Medium sized PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attach the output DBC when uploading a set of paid Chunks
2 participants