Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
3a0fcea
Commented out everything except the core mutual_credit module.
realcr May 15, 2019
998a740
Initial work: Changing some data types, keeping offst-funder compiling.
realcr May 15, 2019
d7426d6
Ranamed FailureSendFunds -> CancelSendFunds.
realcr May 15, 2019
db58463
Added a basic hash lock (Based of sha512/256).
realcr May 15, 2019
114d0d4
Renamed Confirmation -> MultiConfirmation.
realcr May 15, 2019
441513f
Added Op prefix to names of operations.
realcr May 15, 2019
239e13d
Added Confirmation, MultiConfirmation, CommitOp.
realcr May 15, 2019
c1f5c70
Added messages to FriendTcOp.
realcr May 15, 2019
e38abad
PendingTransaction.left_fees.
realcr May 15, 2019
a7e9b03
mutual_credit: incoming outline.
realcr May 15, 2019
649f96a
Added IncomimgMessage::Commit(...).
realcr May 15, 2019
0859e37
Added SetRate mutation.
realcr May 15, 2019
fdee2b4
Removed old comment.
realcr May 15, 2019
a5816df
Don't sign over RequestSendFunds.left_fees, because it changes.
realcr May 15, 2019
cc63542
Changed RateError to be public.
realcr May 15, 2019
0c2a811
Implemented process_request_send_funds().
realcr May 15, 2019
bd5be65
docs: Fixed signature definitions
realcr May 15, 2019
7d2f0f8
Added missing destPayment field in Receipt.
realcr May 15, 2019
26e11dd
Updated some signature buffers.
realcr May 15, 2019
9d45011
Implemented process_response_send_funds()
realcr May 15, 2019
43b953c
Renamed CommitOp -> CommitSendFundsOp.
realcr May 15, 2019
ac3eef4
Implemented process_commit_send_funds().
realcr May 15, 2019
a66db11
docs: Removed signature related fields from CancelSendFundsOps
realcr May 15, 2019
09ca4f3
Implemented process_cancel_send_funds().
realcr May 15, 2019
0852063
Removed old comment.
realcr May 15, 2019
b535d7a
Removed some unused ProcessOperationError variants.
realcr May 15, 2019
358bc85
Initial mutual credit outgoing outline.
realcr May 15, 2019
cc38432
Removed unused import (CreditCalculator).
realcr May 15, 2019
399e731
Renamed tc_mutation -> mc_mutation.
realcr May 15, 2019
620ecdc
Implemented queue_request_send_funds().
realcr May 15, 2019
d2dbacb
incoming mutual credit: Fixed Remote -> Local.
realcr May 15, 2019
d39c7c0
Implemented queue_response_send_funds().
realcr May 15, 2019
c16da19
Implemented queue_cancel_send_funds().
realcr May 15, 2019
3014b94
Preparation to implement queue_commit_send_funds().
realcr May 15, 2019
c1d5ecf
Implemented queue_commit_send_funds().
realcr May 15, 2019
27a0c2a
Removed unused QueueOperationError variants.
realcr May 15, 2019
88e665b
Removed credit_calc.
realcr May 15, 2019
f68428f
Some work on mutual_credit/tests.rs. Not compiling yet.
realcr May 15, 2019
f1cb967
Added create_pending_transaction().
realcr May 15, 2019
a4e4f87
Two basic mutual credit tests pass.
realcr May 15, 2019
8decce7
test_request_response_send_funds() compiles but fails.
realcr May 15, 2019
375e711
Fixed asserts in test_request_response_commit_send_funds().
realcr May 15, 2019
8efb5bb
Added commit part to test_request_response_commit_send_funds().
realcr May 15, 2019
5f1fd55
Added test_request_cancel_send_funds().
realcr May 15, 2019
a67d118
Added test_request_response_cancel_send_funds().
realcr May 15, 2019
6785f29
Re-added funder/src/types.rs.
realcr May 16, 2019
3c308cf
Re-added token_channel to funder.
realcr May 16, 2019
541c64f
Re-added liveness to funder.
realcr May 16, 2019
88c2464
Re-added ephemeral to funder.
realcr May 16, 2019
9b05229
Initial re-addition of friend.rs to funder. Not done yet.
realcr May 16, 2019
02e46e0
Updated friend.rs to take new atomic payment design into account.
realcr May 16, 2019
9856383
Initial re-adding of funder/src/state.rs. Not done yet.
realcr May 16, 2019
4f738a8
Removed old comment.
realcr May 16, 2019
d90b62e
Updated comments.
realcr May 16, 2019
0e33261
Renamed fields of McPendingTransactions.
realcr May 16, 2019
cde7804
Re-added report.rs to funder.
realcr May 16, 2019
a6eba8d
Restored export (FunderMutation, FunderState).
realcr May 16, 2019
2a76349
Refactored some code from handler.rs into state_wrap.rs and utils.rs.
realcr May 16, 2019
46fd807
Restored handle_init.rs
realcr May 16, 2019
0d67bfe
Updated import in handle_liveness.
realcr May 16, 2019
e559fa1
Some work on sender.rs. Still commented out.
realcr May 16, 2019
4495ca9
Added payment_id to offst-crypto.
realcr May 16, 2019
c377f92
Added open_invoices, open_transactions to FunderState.
realcr May 16, 2019
7303987
Added random generation of PlainLock.
realcr May 16, 2019
c408766
Funder: sender.rs compiles, logic currently incorrect.
realcr May 16, 2019
f8fa223
Some tentative work on BackwardsOp::UnsignedResponse structure. Will …
realcr May 16, 2019
ea62220
Removed BackwardsOp::UnsignedResponse.
realcr May 17, 2019
21af9e9
Removed some unnecessary async.
realcr May 17, 2019
5e02142
Added MutableFunderState.queue_unsigned_response()
realcr May 17, 2019
f73b69f
funder.rs: Added TODO comment
realcr May 18, 2019
0d81328
Restored canceler.rs. Compiling but contains incorrect logic.
realcr May 18, 2019
a851baf
Restored handle_liveness.rs.
realcr May 18, 2019
fa1f562
handle_friend.rs compiles (but currently incorrect).
realcr May 18, 2019
b7745b9
Added totalDestPayment, renamed Commit -> Collect, Confirmation -> Co…
realcr May 18, 2019
70f8cea
Some work on handle_control.rs. Compiling but not correct.
realcr May 18, 2019
ad72e04
Updated interface with node (buyer/seller).
realcr May 18, 2019
d7cd066
Renamed CommitSendFunds -> CollectSendFunds.
realcr May 18, 2019
0856ec9
docs: Updated arguments of CreateTransaction and AddInvoice.
realcr May 18, 2019
94497b5
Added CreatePayment, CreateTransaction, AddInvoice structs.
realcr May 18, 2019
1418907
Added total_dest_payment to RequestSendFundsOp.
realcr May 18, 2019
8e17542
Restored handle_control.rs. Compiling but incorrect.
realcr May 18, 2019
516a900
Restored handler.rs. Compiles but currently incorrect.
realcr May 18, 2019
a486f4e
Moved TODO comment.
realcr May 18, 2019
e95a16d
Some work on MutableFunderState.sign_responses(). Not done yet.
realcr May 18, 2019
a4d71d0
Some work on sign_responses(). Not done yet.
realcr May 18, 2019
daf8e2b
Initial implementation of sign_responses().
realcr May 18, 2019
8fe469f
Updated comment.
realcr May 18, 2019
5b4dd53
Created empty function control_create_payment().
realcr May 18, 2019
5bc90f6
Added FunderState.open_payments.
realcr May 18, 2019
f2ca396
Added OpenPayment struct inside FunderState.
realcr May 22, 2019
0466059
Updated comment.
realcr May 22, 2019
99c5995
Added SetFriendRate to FunderControl.
realcr May 22, 2019
e8d8f4e
Removed rate considerations from mutual_credit.
realcr May 22, 2019
aa9562e
Added rate field to FriendState.
realcr May 22, 2019
19d3696
Added control_set_friend_rate().
realcr May 22, 2019
93037c8
Implemented control_create_payment().
realcr May 22, 2019
c3ceeff
Implemented control_create_transaction_inner().
realcr May 22, 2019
e99f7c4
Removed last unimplemented macro line in control_create_transaction_i…
realcr May 22, 2019
b6e7c57
Renamed ResponseReceived -> TransactionResult.
realcr May 22, 2019
932a766
docs: Refactored MultiCommit to contain repeating values from Commit.
realcr May 23, 2019
1e62b58
RequestResult returns a (single) Commit on success.
realcr May 23, 2019
2bd2f6b
Updated payments closing related Funder API.
realcr May 23, 2019
b4ce646
An idea for Payment design. Not compiling yet.
realcr May 23, 2019
5ec37bd
Updated comment. Funder not yet compiling.
realcr May 23, 2019
c8ff1e3
Some work on Payment design. Not done yet. Not compiling.
realcr May 23, 2019
62850a6
Updated Payment to be an enum of states.
realcr May 23, 2019
6504ff4
Removed old comment.
realcr May 23, 2019
7b664a0
Added a TODO comment.
realcr May 23, 2019
8d6d2c4
Implemented control_request_close_payment().
realcr May 23, 2019
e824801
Implemented control_ack_close_payment()
realcr May 26, 2019
0b5e886
Changed AddInvoice fields to be public.
realcr May 26, 2019
9cbb1eb
Fixed RequestClosePayment::AddInvoice to also take total_dest_amount.
realcr May 26, 2019
8cfc37e
Implemented control_add_invoice().
realcr May 26, 2019
810b664
Implemented control_cancel_invoice().
realcr May 26, 2019
a747976
Fixed capnp fields in atomic_proposal.md.
realcr May 26, 2019
beb1cfa
Changed fields in Commit, MultiCommit to be public.
realcr May 26, 2019
9edccf7
Updated FunderControl::CommitInvoice content to be MultiCommit.
realcr May 26, 2019
2a4907d
Implemented verify_multi_commit().
realcr May 26, 2019
2e88733
Some perparations for implementation of control_commit_invoice().
realcr May 26, 2019
a7696c7
Implemented control_commit_invoice().
realcr May 26, 2019
6cd2282
Removed TODO comment.
realcr May 26, 2019
87bd594
Updated comments.
realcr May 26, 2019
f144ce8
Canceler now updates transaction records when removing a request.
realcr May 26, 2019
7e8a3e4
Updated comment.
realcr May 26, 2019
0d051f5
Updated handle_request_send_funds(): taking our fee.
realcr May 26, 2019
5db9271
Updated handle_response_send_funds() for the case of response heading…
realcr May 26, 2019
ade3cb2
Changed remove_transaction() to be public.
realcr May 26, 2019
f213a07
Updated handle_cancel_send_funds(): Calling remove_transaction().
realcr May 26, 2019
48e43ec
Some work on implementing handle_collect_send_funds(). Not done yet.
realcr May 26, 2019
90e92bb
Keeping received response in OpenTransaction.
realcr May 26, 2019
1f12cef
Keeping response_send_funds in handle_response_send_funds().
realcr May 26, 2019
1663320
Fixed destTotalPayment -> totalDestPayment.
realcr May 26, 2019
f845a28
Updated signature comment for Receipt.
realcr May 26, 2019
e6685c9
Implemented prepare_receipt() at signature_buff.rs.
realcr May 26, 2019
e960ab0
Implemented handle_collect_send_funds().
realcr May 26, 2019
a39e3ce
Funder: Renamed failure -> cancel in sender.rs.
realcr May 26, 2019
72d0a87
Fixed unused warnings for funder/src/handler/utils.rs.
realcr May 26, 2019
44b353d
state_wrap.rs: Fixed unused warnings.
realcr May 26, 2019
ad2c244
Removed unused comment.
realcr May 26, 2019
a53e2a8
sender.rs: Fixed unused warnings.
realcr May 26, 2019
fa06492
handler.rs: Fixed some unused warnings, not done yet.
realcr May 26, 2019
c255f8d
Restored mod funder.
realcr May 26, 2019
e23b998
Funder: Removed some unused warnings.
realcr May 26, 2019
5de26bc
Funder: Removed some allow(unused) hints.
realcr May 26, 2019
31a10ed
friend.rs: Fixed unused warnings.
realcr May 26, 2019
87f549c
Removed comment.
realcr May 26, 2019
8d0f565
Funder handler: fixed some unused warnings.
realcr May 26, 2019
2c94bcc
Fixed unused warnings for handle_control.rs.
realcr May 26, 2019
455dcca
Fixed unused warnings for canceler.rs.
realcr May 26, 2019
55f0202
Funder: Removed allow(unused) hint from handler module.
realcr May 26, 2019
ac879ee
First part of pair_basic.rs test passes.
realcr May 27, 2019
534ef0a
Funder: Reject incoming Requests without a matching open invoice.
realcr May 27, 2019
e049676
Fixed bug in handle_control.rs (Returning InProgress instead of Payme…
realcr May 27, 2019
5e8bd1d
Reordered variants in ResponseClosePayment enum.
realcr May 27, 2019
2bad489
Removed old comment.
realcr May 27, 2019
0e0ae6d
Funder: Fixed pair_basic.rs test.
realcr May 27, 2019
41c4092
Removed unused warnings from tests.
realcr May 27, 2019
7aaff89
Funder: Restored pair_inconsistency.rs test.
realcr May 27, 2019
b7b0fda
Funder: Restored change_address.rs test.
realcr May 27, 2019
b9db91f
Restored some code in funder/src/tests/utils.rs.
realcr May 27, 2019
3a2d408
Restored test_funder_basic() in funder/src/tests/tests.rs
realcr May 27, 2019
71457cb
Restored test_funder_forward_payment() test: Added mediator fees.
realcr May 27, 2019
016f28b
Added assertion for mediator fees in test_funder_forward_payment().
realcr May 27, 2019
2d7e2df
Added TODO comment.
realcr May 27, 2019
4a3fabb
Fixed case of Payment::InProgress(_) at control_request_close_payment().
realcr May 27, 2019
d6b799c
Restored test_funder_payment_failure().
realcr May 27, 2019
f753945
Restored test_funder_inconsistency_basic().
realcr May 27, 2019
53eda41
Fixed failing channel send()-s during teardown.
realcr May 27, 2019
f4b6608
Restored test_funder_add_relay().
realcr May 27, 2019
b08bf63
control_create_transaction_inner(): dest_public_key must be last in r…
realcr May 27, 2019
e08d41b
Removed unused warnings from mod utils.
realcr May 27, 2019
8e44766
Fixed unused warnings in mod tests.
realcr May 27, 2019
c475d7c
Dealing with the case of already having an outgoing transaction.
realcr May 27, 2019
49cec5c
Refactored AckClosePayment into a struct (Instead of anonymous tuple).
realcr May 28, 2019
5729e37
Some updates to offst-app-server to allow atomic payments. Not done yet.
realcr May 28, 2019
10ec87b
ResponseClosePayment now contains PaymentId (Helps matching request/r…
realcr May 28, 2019
0314890
Updated offst-app-server for new atomic payments design.
realcr May 28, 2019
b666700
Restored app_server/src/tests/utils.rs.
realcr May 28, 2019
4278d6a
offst-app-server tests: Restored some tests.
realcr May 28, 2019
f7c1a0a
offst-app-server: Restored request_send_funds test. All tests restored.
realcr May 28, 2019
2cbdab9
Updated offst-index-client code for new atomic payments design.
realcr May 28, 2019
509d585
Restored offst-index-client tests.
realcr May 28, 2019
e3a271b
index_server: Showing friend rate in debug print.
realcr May 28, 2019
4a3ed50
Updated offst-index-server messages (proto). Updated offst-index-clie…
realcr May 28, 2019
2978cb7
Omitted some modules from offst-index-server. Starting to gradually a…
realcr May 28, 2019
0e8f5d5
Updated simple_capacity_graph.
realcr May 28, 2019
425fe2a
offst-index-server: Refactored to use new style CapacityEdge.
realcr May 28, 2019
e57e204
offst-index-server: Restored graph_service.rs
realcr May 28, 2019
27ccfed
offst-index-server: Restored verifier module.
realcr May 28, 2019
ea44955
offst-index-server: Restored server module.
realcr May 28, 2019
60ecea6
offst-index-server: Restored net_server module.
realcr May 28, 2019
da985eb
Removed unused warnings.
realcr May 28, 2019
970b976
Temporarily commented out node modules (To make compilation work).
realcr May 28, 2019
a598b60
node config: Implemented set_friend_rate().
realcr May 28, 2019
e85738c
node connect: Restored report and routes modules.
realcr May 28, 2019
5e7e198
node_connection: Restored send_funds module
realcr May 28, 2019
2b582a2
node_connection: Restored node_connection module.
realcr May 28, 2019
1b9101a
node_connections: Restored exports.
realcr May 28, 2019
c9ad92a
Restored node/src/connect
realcr May 28, 2019
247b292
Fully restored offst-node.
realcr May 28, 2019
b539e4c
Restored offst-app.
realcr May 28, 2019
e15aac3
Some initial work on stctrl (atomic payments). Not done yet.
realcr May 28, 2019
1756b03
get_route_rate(): Do not add the rate of the last hop.
realcr May 29, 2019
d99e20c
Temporarily removed serialize tests in offst-proto (To make offst-pro…
realcr May 29, 2019
ac25020
Implemented Rate::max_payable().
realcr May 29, 2019
5d4ef63
Removed parts of offst-stctrl to allow it to compile.
realcr May 29, 2019
48f1051
ser_string: Added HashedLock and PlainLock string conversion functions.
realcr May 29, 2019
24d1231
Added TODO comment in ser_string.rs.
realcr May 29, 2019
387b0d1
Restored offst-stctrl file/receipt.rs.
realcr May 29, 2019
4f994c2
Removed comment.
realcr May 29, 2019
3796773
offst-app is now exporting Commit and MultiCommit.
realcr May 29, 2019
ff6ee73
Added MultiCommit file in offst-stctrl.
realcr May 29, 2019
c56f6c9
Updated serialization test string.
realcr May 29, 2019
5117f85
Some work on stctrl: funds.rs. Not done yet.
realcr May 29, 2019
63878a0
Added TODO comment.
realcr May 29, 2019
646cb30
Added initial implementation for choosing multi route amounts.
realcr May 29, 2019
7c7350a
Initial implementation of multi_route_util.rs + one basic test.
realcr May 29, 2019
c4283cd
Some work on funds_pay_invoice(). Not done yet.
realcr May 29, 2019
5e9322d
Some work on funds_pay_invoice(): Added creation of transactions. Not…
realcr May 29, 2019
f75fa83
Added printing of payment id in case payment is successful.
realcr May 30, 2019
3456ca4
offst-stctrl: Added PaymentStatusCmd.
realcr May 30, 2019
f1228b1
stctrl: Added name to PaymentStatusCmd.
realcr May 30, 2019
cf68249
stctrl: Added VerifyTokenCmd to info subcommand.
realcr May 30, 2019
7f47279
stctrl: Added VerifyReceipt info command.
realcr May 30, 2019
83834e9
Renamed stctrl funds subcommand -> buyer subcommand.
realcr May 30, 2019
68fd247
stctrl: Initial work on seller subcommand.
realcr May 30, 2019
d71bdf4
stctrl: Initial skeleton of seller() implementation.
realcr May 30, 2019
d88508b
cargo fmt.
realcr May 30, 2019
a868d76
Added missing seller api (offst-app-server).
realcr May 30, 2019
c208d92
Added seller's {add,cancel,commit}-invoice.
realcr May 30, 2019
9af7141
Updated permissions in stmgr to have: buyer, seller.
realcr May 30, 2019
b859661
Initial compiling seller.rs in stctrl.
realcr May 30, 2019
0b42117
stctrl: Implemented seller_create_invoice().
realcr May 30, 2019
b42226c
stctrl: Implemented seller_cancel_invoice().
realcr May 30, 2019
bddee9b
stctrl: Initial seller.rs implementation.
realcr May 30, 2019
6c01b43
Added seller subcommand to stctrl.
realcr May 30, 2019
91f0614
stctrl: seller.rs: removed unused warnings.
realcr May 30, 2019
5246ec7
stctrl: buyer: removed unused warnings.
realcr May 30, 2019
b009d4d
Removed stregisterlib.rs.
realcr May 30, 2019
dbd86df
Removed comment.
realcr May 30, 2019
de33810
Updated AppPermissions fields in app_server and proto.
realcr May 30, 2019
47a0fc1
proto/src/file/app.rs: Updated AppPermissions fields.
realcr May 30, 2019
59040ad
Temporarily turn off integration tests.
realcr May 30, 2019
3d02fb0
Fixed some clippy warnings.
realcr May 30, 2019
d830189
Refactor app_server/server.rs
pzmarzly May 31, 2019
39c4799
Fix clippy lints
pzmarzly May 31, 2019
4c0ee36
Fix more clippy lints
pzmarzly Jun 1, 2019
66e619b
cargo fmt
pzmarzly Jun 1, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ identity = { path = "../identity", version = "0.1.0" , package = "offst-identity
timer = { path = "../timer", version = "0.1.0" , package = "offst-timer" }
proto = { path = "../proto", version = "0.1.0" , package = "offst-proto" }
net = { path = "../net", version = "0.1.0" , package = "offst-net" }
bin = { path = "../bin", version = "0.1.0" , package = "offst-bin" }
# TODO: How can we avoid taking all of node?
# This is a very heavy dependency:
node = { path = "../node", version = "0.1.0" , package = "offst-node" }
Expand Down
9 changes: 9 additions & 0 deletions components/app/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use crypto::uid::Uid;
pub use crypto::uid::UID_LEN;

use crypto::invoice_id::InvoiceId;
use crypto::payment_id::PaymentId;

use node::connect::{node_connect, NodeConnection};

Expand All @@ -21,3 +22,11 @@ pub fn gen_invoice_id() -> InvoiceId {

InvoiceId::new(&rng)
}

/// Generate a random PaymentId:
pub fn gen_payment_id() -> PaymentId {
// Obtain secure cryptographic random:
let rng = system_random();

PaymentId::new(&rng)
}
7 changes: 4 additions & 3 deletions components/app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ pub use proto::file::relay::load_relay_from_file;
pub use proto::file::ser_string;

pub use proto::app_server::messages::{AppPermissions, NamedRelayAddress, RelayAddress};
pub use proto::funder::messages::Receipt;
pub use proto::funder::messages::{Commit, MultiCommit, PaymentStatus, Rate, Receipt};
pub use proto::funder::signature_buff::verify_receipt;
pub use proto::index_server::messages::NamedIndexServerAddress;
pub use proto::report::signature_buff::verify_move_token_hashed_report;

pub use node::connect::{AppConfig, AppReport, AppRoutes, AppSendFunds, NodeConnection};
pub use node::connect::{AppBuyer, AppConfig, AppReport, AppRoutes, AppSeller, NodeConnection};

pub use self::connect::{connect, ConnectError};
pub use self::identity::{identity_from_file, IdentityFromFileError};
Expand All @@ -58,10 +58,11 @@ pub mod invoice {

pub mod route {
pub use proto::funder::messages::FriendsRoute;
pub use proto::index_server::messages::RouteWithCapacity;
pub use proto::index_server::messages::{MultiRoute, RouteCapacityRate};

}

pub use crypto::crypto_rand::{RandValue, RAND_VALUE_LEN};
pub use crypto::hash::{HashResult, HASH_RESULT_LEN};
pub use crypto::hash_lock::{HashedLock, PlainLock, HASHED_LOCK_LEN, PLAIN_LOCK_LEN};
pub use crypto::identity::{PublicKey, Signature, PUBLIC_KEY_LEN, SIGNATURE_LEN};
Loading