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(pricing): make QuotingMetrics supports data_type and data_size pricing #2638

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

maqi
Copy link
Member

@maqi maqi commented Jan 15, 2025

Description

Future support for the pricing on data_type and data_size

@@ -144,7 +148,13 @@

let address = GraphEntryAddress::from_owner(pk);
let xor = *address.xorname();
let store_quote = self.get_store_quotes(std::iter::once(xor)).await?;
// TODO: define default size of GraphEntry

Check notice

Code scanning / devskim

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

Suspicious comment
@@ -63,7 +63,12 @@
let xor_name = *address.xorname();
debug!("Paying for pointer at address: {address:?}");
let (payment_proofs, _skipped_payments) = self
.pay(std::iter::once(xor_name), wallet)
// TODO: define Pointer default size for pricing

Check notice

Code scanning / devskim

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

Suspicious comment
@@ -126,7 +131,10 @@

let address = PointerAddress::from_owner(pk);
let xor = *address.xorname();
let store_quote = self.get_store_quotes(std::iter::once(xor)).await?;
// TODO: define default size of Pointer

Check notice

Code scanning / devskim

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

Suspicious comment
@@ -261,8 +261,13 @@
let reg_xor = register.address().xorname();

// get cost to store register
// NB TODO: register should be priced differently from other data
let store_quote = self.get_store_quotes(std::iter::once(reg_xor)).await?;
// TODO: define default size of Register

Check notice

Code scanning / devskim

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

Suspicious comment
@@ -320,11 +325,16 @@
let reg_xor = address.xorname();
debug!("Paying for register at address: {address}");
let (payment_proofs, skipped_payments) = self
.pay(std::iter::once(reg_xor), wallet)
// TODO: define Register default size for pricing

Check notice

Code scanning / devskim

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

Suspicious comment
@@ -151,8 +151,13 @@
let scratch = Scratchpad::new(client_pk, content_type);
let vault_xor = scratch.address().xorname();

// NB TODO: vault should be priced differently from other data
let store_quote = self.get_store_quotes(std::iter::once(vault_xor)).await?;
// TODO: define default size of Scratchpad

Check notice

Code scanning / devskim

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

Suspicious comment
Copy link
Member

@grumbach grumbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maqi maqi added this pull request to the merge queue Jan 16, 2025
Merged via the queue into maidsafe:main with commit 674f4e1 Jan 16, 2025
25 checks passed
@maqi maqi deleted the pricing_on_DataType branch January 16, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants