-
Notifications
You must be signed in to change notification settings - Fork 19
Conversation
30c212c
to
9a27200
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think for most users these are one-time configured values which means they probably should remain in the config.
I think generally an override pattern is fine here, however, you'll also need to find a solution for the variable amount case that was fixed in #91. This might mean we need to introduce a per-channel/request ServiceConfig
that is stored (and will be persisted) in the OutboundJITChannel
that allows to override the defaults set via LSPS2ServiceConfig
.
Hm yeah. It's tricky because currently we don't even create the There's really no way to link the GetInfo request/response with the BuyRequest that comes in. So we don't really know what min/max payment we gave them in the GetInfo when they make the BuyRequest. I guess we could just match on Thoughts? |
Ah, yeah, that's kind of what I meant with "you'll also need to find a solution" above. 😁 I think the issue really is that |
2181388
to
0e63f35
Compare
@tnull Just updated this PR assuming the spec change you proposed gets merged. It looks like it will since it has two "LGTM" comments. I moved the min/max into the promised params and then copy them into outbound jit channel state where they can be used to enforce limits on the payment size that were previously using the config. This makes it pretty pointless to have these fields in the config so I removed them. |
0e63f35
to
42aa570
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, although we'll want to wait until the change is actually merged in the spec, which was deferred until the next meeting.
Can you in the meantime squash commits so that we only have changes of the new approach?
move min/max_payment_size into promised params
42aa570
to
307f0cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, BitcoinAndLightningLayerSpecs/lsp#82 has just been merged.
C= will need to provide a dynamic max payment size based on the current total capacity a user has open with us at the time of the request. In order to do that we need to be able to provide a value at the time of fee request.
I wasn't sure if we should just remove these from the config and make these required when calling
opening_fee_params_generated
.