feat: chunk payments using UTXOs instead of DBCs #721
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Summary generated by Reviewpad on 12 Sep 23 04:49 UTC
This pull request includes the following changes:
In the file
sn_protocol/src/messages/mod.rs
:utxo
module was removed from the module imports.Utxo
struct was removed from the public exports.Transfer
struct was removed from the public exports.In the file
api.rs
:sn_dbc::Token
has been removed.sn_transfers::client_transfers::SpendRequest
has been added.sn_transfers::wallet::Transfer
has been added.payment
parameter in thestore_chunk
method has been changed fromVec<Dbc>
toVec<Transfer>
.In the file
Cargo.toml
:rmp-serde
with version1.1.1
.sn_dbc
dependency by commenting out the version19.1.1
and adding a new line that specifies a path to thesn_dbc
crate with theserdes
feature.sn_protocol
dependency to version0.6.4
.tokio
dependency to version1.32.0
with the featuresmacros
andrt
.thiserror
with version1.0.23
.In the file
error.rs
:Error
enum, theRecordNotStored
variant has been modified to include an additional String parameter.RecordNotStored(PrettyPrintRecordKey)
RecordNotStored(PrettyPrintRecordKey, String)
UtxoSerialisationFailed
andUtxoDecryptionFailed
variants have been removed from theError
enum.In the file
mod.rs
:utxo
.Transfer
andUtxo
types from the moduleutxo
.A new file named
receive_transfer.rs
has been added in thesn_node/src
directory. This file contains a license header, which states that the SAFE Network Software is licensed under the General Public License (GPL), version 3. The license grants permissions and limitations for using the software.In the file
sequential_transfers.rs
:create_transfer
fromsn_transfers::client_transfers
has been changed to importcreate_offline_transfer
.create_transfer
is replaced withcreate_offline_transfer
in the code.In the file
local_store.rs
in thesn_transfers/src/wallet
directory:Error
,Transfer
, andUtxo
types from the current module.create_transfer
function tocreate_offline_transfer
.create_offline_transfer
.create_transfers
that creates transfers from the given DBCs.decipher_transfer
that deciphers a transfer using the secret key.decipher_transfer_for_us
that deciphers a transfer for us.derive_key
that derives a key using the derivation index.In the file
sn_client/src/wallet.rs
:wallet::Transfer
fromsn_transfers
module.get_payment_dbcs
toget_payment_transfers
.get_payment_transfers
toResult<Vec<Transfer>>
.The file
transfer.rs
shows a change in the function namecreate_transfer
tocreate_offline_transfer
. Additionally, there are changes in the function parameters and their types. Theavailable_dbcs
parameter is now of typeVec<(Dbc, DerivedKey)>
, therecipients
parameter is of typeVec<(Token, PublicAddress, DerivationIndex)>
, and thechange_to
parameter is of typePublicAddress
.In the
Cargo.toml
file:sn_dbc
has been modified. It was previously version19.1.1
with the feature"serdes"
, but now it is commented out and a new dependency with a path to../../sn_dbc
and the feature"serdes"
has been added.sn_client
dependency has been updated to0.88.9
.sn_logging
dependency has been updated to0.2.5
.sn_networking
dependency has been updated to0.5.9
.Please let me know if you have any questions or need further clarification.