-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add option to settle
payments in SyncSimulatedPaymentSession
#16
Comments
This is my understanding of what is happening when
So far no update on |
This is a very accurate summary of what is happening! Note that
This is where we update our belief on the uncertainty network. IF you were to also update the Oracle here all future statistics would be skewed. Therefor I guess it would be best from the point of view of the simulation to update the
It's quite remarkable how involved such a little change would be and how much refactorig would probably be necessary. From the point of view that a siulation may wish to do concurrent tests it is probably better and cleaner to persue the 2nd option. That being said if you have better / other ideas I will be open |
first stub of a method as described in renepickhardt#16 Still needs to be tested
first stub of a method as described in renepickhardt#16 Still needs to be tested
first stub of a method as described in renepickhardt#16 Still needs to be tested
first stub of a method as described in renepickhardt#16 Still needs to be tested
first stub of a method as described in renepickhardt#16 Still needs to be tested
first stub of a method as described in renepickhardt#16 Still needs to be tested
* add .gitignore * introduce register payment method on OracleLightningNetwork.py * adding settlement_payment in OracleLightningNetwork first stub of a method as described in #16 Still needs to be tested * rewriting setter for `actual_liquidity` using properties (python way) * adjust channels in both directions when payment is made * Settlement of onions with partial payments only after all onions were routed successfully * deletion of unused import * shell for a Payment Class * Revert "shell for a Payment Class" This reverts commit 8dffa28. * shell for a Payment Class for issue #20 * shell for as Attempt Class for issue #20 * Indroduction of Payment and Attempt class, refactoring. * Introduction of PaymentClass and AttemptClass, refactoring. * error fixing, semantic changes and refinement of Payment ant Attempt class * adding types in methods for Attempt and Payment Class and amending relative paths on imports * initializes fee and probability w/ none (instead of -1) #20 * adjustment of relative paths for modules in import * extending .gitignore * correcting tipo for gitignore * init for documentation * configuration updated * correction in filter function for Attempt.Status #24 * changing imports back to initial call * fixing issues from partial review #24 (review) * deleting docs folder and moving _estimate_payment_statistics into attempt class * deleting docs folder and moving _estimate_payment_statistics into attempt class * removed doc folder * adding CHANGELOG * Cleaning up after Attempt and Payment PR review * changed filter function in payment to generator * added setter to OracleChannel and fixed imports in init.py * Fix typos in documentation * rewriting setter for `actual_liquidity` using properties (python way) * Indroduction of Payment and Attempt class, refactoring. * Introduction of PaymentClass and AttemptClass, refactoring. * adjustment of relative paths for modules in import * changing imports back to initial call * another rebasing hassle ;) Co-authored-by: Sebastian <[email protected]> Co-authored-by: Rene Pickhardt <[email protected]> Co-authored-by: nassersaazi <[email protected]>
first stub of a method as described in renepickhardt#16 Still needs to be tested
* introduce register payment method on OracleLightningNetwork.py * adding settlement_payment in OracleLightningNetwork first stub of a method as described in #16 Still needs to be tested * rewriting setter for `actual_liquidity` using properties (python way) * adjust channels in both directions when payment is made * Settlement of onions with partial payments only after all onions were routed successfully * deletion of unused import * updating to rene/main * introducing logging #17 * refactoring min cost flow solver in Payment Class * updating the PaymentSession so that the calls to the Payment method are clear. Balances are still wrong, but pushing this, so that @Lagrang3 can have a look at the PaymenSession structure * first code cleanup in PaymentSession * Settlement and Payment completely implemented. - In UncertaintyNetwork in_flights, minimum and maximum liquidity are adjusted accordingly after result of send_onion. - In OracleNetwork in_flights are adjusted after changing attempt status to INFLIGHT and SETTLED. this is a very verbose version, lots of logging everywhere :) ideal for testing and checking if amounts are adjusted correctly in the respective situations * Verbosity removed. Verbosity removed, because a lot of the logging of nodes were tied to the specific ChannelGraph. Checks added, for - when the OracleNetwork is updated and reverse channels might not be public - when the UncertaintyNetwork is updated and reverse channels might not exist * settlement implemented * adding info on return channel when updating knowledge in UncertaintyNetwork * settle_payment changed to settle_attempt the payment iterates over the attempts and for each attempt calls the method (on oracle and uncertainty network). Thus, naming is now correct. * example fails. logging of channel characteristics added. currently the example in this commit fails. This might be because the in_flights are not handled correctly and min_liquidity (of max_liquidity?) might be adjusted incorrectly. to monitor this, I added some logging verbosity for the main sections in the process. * good example to check the learning of the UncertaintyNetwork This is an example for the current implementation of learning from successful and unsuccessful onions. for better visualisation it's run on the smaller graph `channels.sample.json` with four nodes. The logfile is very verbose and demonstrates the changes step by step. * refactoring update_knowledge now update_knowledge does not need a flag from send_onion and takes the result from the attempt status. * adding a new example for the simulation simulation_example.py uses the "small graph" and executes the pickhard payment twice - one successful payment and one failing. The logfile is rather verbose and the change of information in the uncertainty network can nicely be observed. * Channel balances now randomized again * catching error if MCF throws infeasible Added Exception handling if MCF solver throws infeasible. Also moved to counter for MCF computations, so that failed computations are included. * adding loglevel to method call to manage verbosity * corrected update_knowledge method corrected update_knowledge method and added bits of comments and documentation * debug message corrected and seed added There was a call in a debug message that lead to a reference error. In line with Eduardo's works I added the seed initialisation with the same seed. * adding debug level in simulation example to pickhard_pay call * initialization of randomness in OracleNetwork. logging adjusted. * adding code improvements from master thesis * adding method for consistency check in uncertainty network * Raising ValueError if path Argument in Attempt() is not a List of Channels * redundancy removed when logging errors in update_knowledge method --------- Co-authored-by: Sebastian <[email protected]>
As realized through discussions with @sebulino in #15 the current lib does only decide if a payment can be delivered or not. In many cases it would be preferable that the liquidity is actually being moved in the
OracleChannel
and our belief about the uncertainty is updated in both arcs of theUncertaintyChannel
where we would also have to set theinflight
back to 0.The text was updated successfully, but these errors were encountered: