Open renepickhardt opened 2 years ago
This is my understanding of what is happening when pickhardt_pay
is called on SyncSimulatedPaymentSession
:
pickhardt_pay
is called on the SyncSimulatedPaymentSession
_attempt_payments
in same Class_attempt_payments
checks/calls send_onion
on OracleLightningNetwork
. send_onion
in OracleLightningNetwork
success
to True and Erring Channel
as Nonesuccess
to False and Erring Channel
with the respective failing channelcan_foward
in OracleChannel Class
)update_knowledge
on UncertaintyChannel
which sets new liquidity need, by increasing either minimum or maximum liquidity (subject to condition)So far no update on OracleChannels
in OracleLightningNetwork
. This is what would make sense to be added.
This is a very accurate summary of what is happening! Note that _attempt_payments
is having this line:
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 OracleChannels
after all rounds have been completed. There may be two paths to success:
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
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.