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

All payment tweaks #674

Merged
merged 36 commits into from Aug 30, 2023
Merged

All payment tweaks #674

merged 36 commits into from Aug 30, 2023

Conversation

joshuef
Copy link
Contributor

@joshuef joshuef commented Aug 28, 2023

Description

reviewpad:summary

let mut retries = 0;
// TODO: Move this put retry loop up above store cost checks so we can re-put if storecost failed.

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
sn_node/src/api.rs Dismissed Show dismissed Hide dismissed
@@ -76,5 +83,6 @@
#[derive(Debug, Eq, PartialEq, Clone, Serialize, Deserialize)]
pub struct ChunkWithPayment {
pub chunk: Chunk,
pub payment: PaymentProof,
/// TODO: encrypt this or supply only encrypted derivation index

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
addr_name,
reason: err.to_string(),
})?;
// TODO: properly verify which one of these was for this node, and check _that_

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
assert!(matches!(
verify_fee_output_and_proof(name, network_store_cost, &tx, audit_trail, &[]),
Err(err) if err == ProtocolError::PaymentProofInvalidFeeOutput(invalid_fee_id)));
// TODO: sort out what is acceptable based on the network store cost

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
inputs: vec![],
outputs: vec![],
outputs: tx_payments.clone(),
// TODO: Clean this up when we remove FeeOutput

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
return Err(ProtocolError::PaymentProofInsufficientAmount { paid, expected });
// the fee output the expected `acceptable_fee` nano per record.
for output in tx.outputs.iter() {
// TODO: Is an output

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
sn_networking/src/lib.rs Dismissed Show dismissed Hide dismissed
"Trust replictated spend for {:?}",
PrettyPrintRecordKey::from(key.clone())
);
// TODO: may need to tweak the `signed_spend_validation` function,

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
sn_cli/src/subcommands/files.rs Fixed Show fixed Hide fixed
@reviewpad reviewpad bot added the Large Large sized PR label Aug 28, 2023
@joshuef joshuef force-pushed the AllPaymentTweaks branch 2 times, most recently from afdf92c to b3293f1 Compare August 28, 2023 14:15
@RolandSherwin RolandSherwin force-pushed the AllPaymentTweaks branch 2 times, most recently from 54cbfd1 to 32066db Compare August 29, 2023 08:26
@maqi maqi force-pushed the AllPaymentTweaks branch 2 times, most recently from 4ef7dd2 to 790bd46 Compare August 29, 2023 14:07
joshuef and others added 19 commits August 30, 2023 12:15
starting to simplify payments to a per chunk basis

A first step in maidsafe#638
Sets us up to pay every node that will be storing the data.
We GetStoreCost and pay to their key, and put the chunk with the DBCs

This is not yet validated at the node side
This gives maximal resilience as a place to start.
(This is required for data location verification tests eg)
@joshuef joshuef marked this pull request as ready for review August 30, 2023 07:26
RolandSherwin and others added 3 commits August 30, 2023 13:04
with DBC parsing/passing mem is higher at the moment.
This should be reduce as we move to make use of UTXOs
@reviewpad
Copy link

reviewpad bot commented Aug 30, 2023

Reviewpad Report

‼️ Errors

  • Unconventional commit detected: 'feat!(protocol): remove chunk merkletree to simplify payment

starting to simplify payments to a per chunk basis

A first step in #638' (321cd19)

  • Unconventional commit detected: 'feat!(protocol): get price and pay for each chunk individually' (f670c09)
  • Unconventional commit detected: 'feat!(protocol): gets keys with GetStoreCost' (9a9cb25)
  • Unconventional title detected: 'All payment tweaks' illegal 'A' character in commit message type: col=00

@joshuef joshuef added this pull request to the merge queue Aug 30, 2023
Merged via the queue into maidsafe:main with commit 953d793 Aug 30, 2023
23 checks passed
@joshuef joshuef deleted the AllPaymentTweaks branch August 30, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Large Large sized PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants