mirror of
https://github.com/aljazceru/lspd.git
synced 2026-02-07 15:24:30 +01:00
Add channel creation minimum fees
This commit is contained in:
@@ -27,6 +27,9 @@ import (
|
||||
|
||||
func checkPayment(incomingAmountMsat, outgoingAmountMsat int64) error {
|
||||
fees := incomingAmountMsat * channelFeePermyriad / 10_000 / 1_000 * 1_000
|
||||
if fees < channelMinimumFeeMsat {
|
||||
fees = channelMinimumFeeMsat
|
||||
}
|
||||
if incomingAmountMsat-outgoingAmountMsat < fees {
|
||||
return fmt.Errorf("not enough fees")
|
||||
}
|
||||
|
||||
130
rpc/lspd.pb.go
130
rpc/lspd.pb.go
@@ -90,10 +90,11 @@ type ChannelInformationReply struct {
|
||||
ChannelFeePermyriad int64 `protobuf:"varint,10,opt,name=channel_fee_permyriad,json=channelFeePermyriad,proto3" json:"channel_fee_permyriad,omitempty"`
|
||||
LspPubkey []byte `protobuf:"bytes,11,opt,name=lsp_pubkey,json=lspPubkey,proto3" json:"lsp_pubkey,omitempty"`
|
||||
// The channel can be closed if not used this duration in seconds.
|
||||
MaxInactiveDuration int64 `protobuf:"varint,12,opt,name=max_inactive_duration,json=maxInactiveDuration,proto3" json:"max_inactive_duration,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
MaxInactiveDuration int64 `protobuf:"varint,12,opt,name=max_inactive_duration,json=maxInactiveDuration,proto3" json:"max_inactive_duration,omitempty"`
|
||||
ChannelMinimumFeeMsat int64 `protobuf:"varint,13,opt,name=channel_minimum_fee_msat,json=channelMinimumFeeMsat,proto3" json:"channel_minimum_fee_msat,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ChannelInformationReply) Reset() { *m = ChannelInformationReply{} }
|
||||
@@ -205,6 +206,13 @@ func (m *ChannelInformationReply) GetMaxInactiveDuration() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ChannelInformationReply) GetChannelMinimumFeeMsat() int64 {
|
||||
if m != nil {
|
||||
return m.ChannelMinimumFeeMsat
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type OpenChannelRequest struct {
|
||||
/// The identity pubkey of the Lightning node
|
||||
Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
@@ -654,62 +662,64 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_c69a0f5a734bca26 = []byte{
|
||||
// 874 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xef, 0x6e, 0xdb, 0x54,
|
||||
0x14, 0x9f, 0x9b, 0xb4, 0x5b, 0x4e, 0x9c, 0xa6, 0xbb, 0xcb, 0x82, 0x67, 0x6d, 0x5a, 0x30, 0x4c,
|
||||
0x8a, 0x50, 0x89, 0xa6, 0x96, 0x0f, 0x88, 0x2f, 0xa8, 0x2d, 0x1b, 0x4c, 0x62, 0x10, 0x3c, 0x01,
|
||||
0xe2, 0x93, 0x75, 0x63, 0x9f, 0x24, 0x26, 0xf6, 0xb5, 0xb1, 0xaf, 0xbb, 0xfa, 0x05, 0x78, 0x1c,
|
||||
0x9e, 0x81, 0x17, 0xe0, 0x2d, 0x78, 0x10, 0x74, 0xff, 0xb8, 0xb5, 0x13, 0x17, 0xe8, 0xb7, 0x7b,
|
||||
0x7f, 0xe7, 0x9c, 0xdf, 0xf9, 0x7b, 0x8f, 0x0d, 0x10, 0xe5, 0x69, 0x30, 0x4b, 0xb3, 0x84, 0x27,
|
||||
0xa4, 0x2b, 0xce, 0xce, 0x29, 0x3c, 0xb9, 0x58, 0x53, 0xc6, 0x30, 0x7a, 0xc3, 0x96, 0x49, 0x16,
|
||||
0x53, 0x1e, 0x26, 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aa,
|
||||
0x62, 0xaa, 0x43, 0xe4, 0x25, 0x8c, 0x42, 0xe6, 0x27, 0x71, 0xc8, 0x56, 0x1e, 0x8d, 0x93, 0x82,
|
||||
0x71, 0xd5, 0x7c, 0x35, 0xb3, 0xa4, 0x92, 0x9d, 0x49, 0xd1, 0x5b, 0x31, 0x01, 0x2f, 0x61, 0x94,
|
||||
0x14, 0x7c, 0x95, 0x6c, 0x5b, 0xec, 0x2b, 0x8b, 0x4a, 0x76, 0x63, 0xe1, 0x3c, 0x87, 0xde, 0x2b,
|
||||
0xe6, 0x67, 0x65, 0xca, 0x31, 0x10, 0xf5, 0x09, 0x28, 0xa7, 0x3a, 0x29, 0x79, 0x76, 0x5c, 0x38,
|
||||
0x78, 0x17, 0xae, 0x58, 0xbb, 0x74, 0xeb, 0xf9, 0x99, 0xd7, 0xcf, 0xef, 0x29, 0xf4, 0xf2, 0x70,
|
||||
0xc5, 0x28, 0x2f, 0x32, 0xd4, 0xa9, 0xdd, 0x00, 0xce, 0xef, 0x1d, 0x18, 0x5d, 0xac, 0xd1, 0xdf,
|
||||
0xe8, 0xae, 0xe7, 0x55, 0x83, 0x5e, 0xc0, 0x21, 0xaa, 0x68, 0xbc, 0xda, 0xb0, 0x98, 0xee, 0x40,
|
||||
0xa3, 0x7a, 0x2a, 0x7f, 0x80, 0xc1, 0x92, 0x6e, 0xd0, 0xd3, 0x03, 0x9d, 0x5b, 0x7b, 0x93, 0xce,
|
||||
0xb4, 0x7f, 0x72, 0x3c, 0x93, 0x3b, 0xa8, 0x8d, 0x79, 0xf6, 0x9a, 0x6e, 0xb0, 0xc2, 0x5e, 0x31,
|
||||
0x9e, 0x95, 0xae, 0xb9, 0xac, 0x41, 0xe4, 0x57, 0x18, 0xbf, 0xa7, 0x21, 0x17, 0x85, 0xf3, 0xa3,
|
||||
0x24, 0xaf, 0x71, 0x77, 0x24, 0xf7, 0x67, 0xff, 0xc2, 0xfd, 0xb3, 0x32, 0xbc, 0x10, 0x76, 0x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0x77, 0x2a, 0x52,
|
||||
0xaf, 0x35, 0x8f, 0x0c, 0x95, 0xfa, 0xf5, 0x7a, 0xb1, 0xb7, 0x01, 0xe7, 0xde, 0xf9, 0x47, 0x30,
|
||||
0x0a, 0x93, 0xd9, 0x2a, 0x4b, 0x7d, 0x25, 0xcb, 0x31, 0xbb, 0x0c, 0x7d, 0x3c, 0xef, 0x7d, 0x9b,
|
||||
0xa7, 0xc1, 0x5c, 0xfc, 0x4c, 0xcc, 0x8d, 0xc5, 0x81, 0xfc, 0xab, 0x38, 0xfd, 0x27, 0x00, 0x00,
|
||||
0xff, 0xff, 0x2a, 0xcb, 0x82, 0x79, 0x63, 0x08, 0x00, 0x00,
|
||||
// 899 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xef, 0x6e, 0xe3, 0x44,
|
||||
0x10, 0x3f, 0x37, 0x69, 0xef, 0x32, 0x71, 0x9a, 0xde, 0x5e, 0x2e, 0xf8, 0xa2, 0x3b, 0x5d, 0x30,
|
||||
0x9c, 0x14, 0xa1, 0x12, 0xa1, 0x16, 0x09, 0xc4, 0x17, 0xd4, 0x96, 0x2b, 0x9c, 0x44, 0x21, 0xf8,
|
||||
0x04, 0x88, 0x4f, 0xd6, 0xc6, 0x9e, 0x24, 0x4b, 0xec, 0xb5, 0xb1, 0xd7, 0xbd, 0xe6, 0x05, 0x78,
|
||||
0x1c, 0xde, 0x84, 0xb7, 0xe0, 0x25, 0xf8, 0x86, 0xf6, 0x8f, 0x1b, 0x27, 0x71, 0x81, 0x7e, 0x5b,
|
||||
0xff, 0x66, 0xe6, 0x37, 0xb3, 0xbf, 0x99, 0x9d, 0x04, 0x20, 0xca, 0xd3, 0x70, 0x9c, 0x66, 0x89,
|
||||
0x48, 0x48, 0x53, 0x9e, 0xdd, 0x53, 0x78, 0x76, 0xb1, 0xa0, 0x9c, 0x63, 0xf4, 0x86, 0xcf, 0x92,
|
||||
0x2c, 0xa6, 0x82, 0x25, 0xdc, 0xc3, 0xdf, 0x0a, 0xcc, 0x05, 0xe9, 0xc3, 0x41, 0x5a, 0x4c, 0x97,
|
||||
0xb8, 0x72, 0xac, 0xa1, 0x35, 0x6a, 0x79, 0xe6, 0xcb, 0xfd, 0xbb, 0x01, 0xef, 0xd5, 0x45, 0xa5,
|
||||
0xd1, 0x8a, 0x10, 0x68, 0x72, 0x1a, 0xa3, 0x89, 0x50, 0xe7, 0x0a, 0xcf, 0x5e, 0x95, 0x47, 0xfa,
|
||||
0x2e, 0x92, 0x5c, 0x38, 0x0d, 0xed, 0x2b, 0xcf, 0xe4, 0x23, 0x38, 0x0a, 0x34, 0xb5, 0x1f, 0xd0,
|
||||
0x94, 0x06, 0x4c, 0xac, 0x9c, 0xe6, 0xd0, 0x1a, 0x35, 0xbc, 0x1d, 0x9c, 0x0c, 0xa1, 0x2d, 0x68,
|
||||
0x36, 0x47, 0xe1, 0x07, 0x09, 0x9f, 0x39, 0xfb, 0x43, 0x6b, 0xb4, 0xef, 0x55, 0x21, 0xf2, 0x21,
|
||||
0x74, 0xa6, 0x34, 0x47, 0x7f, 0x86, 0xe8, 0xc7, 0x39, 0x15, 0xce, 0x81, 0xa2, 0xda, 0x04, 0xc9,
|
||||
0x00, 0x1e, 0xc9, 0x73, 0x46, 0x05, 0x3a, 0x0f, 0x87, 0xd6, 0xc8, 0xf2, 0x6e, 0xbf, 0xc9, 0x08,
|
||||
0xba, 0x82, 0xc5, 0xe8, 0x47, 0x49, 0xb0, 0xf4, 0x43, 0x8c, 0x04, 0x75, 0x1e, 0x0d, 0xad, 0x51,
|
||||
0xc7, 0xdb, 0x86, 0x65, 0xae, 0x98, 0x71, 0x7f, 0x21, 0xa2, 0x40, 0xe7, 0x6a, 0xe9, 0x5c, 0x1b,
|
||||
0x20, 0x39, 0x81, 0xa7, 0xe5, 0x3d, 0x64, 0x8e, 0x14, 0xb3, 0x78, 0x95, 0x31, 0x1a, 0x3a, 0xa0,
|
||||
0xbc, 0x9f, 0x18, 0xe3, 0x25, 0xe2, 0xa4, 0x34, 0x91, 0x17, 0xaa, 0x71, 0xbe, 0xd1, 0xb0, 0x3d,
|
||||
0xb4, 0x46, 0xb6, 0xd7, 0x8a, 0xf2, 0x74, 0xa2, 0x65, 0x3c, 0x81, 0xa7, 0x31, 0xbd, 0xf1, 0x19,
|
||||
0xa7, 0x81, 0x60, 0xd7, 0xe8, 0x87, 0x45, 0xa6, 0x1a, 0xe2, 0xd8, 0x9a, 0x32, 0xa6, 0x37, 0x6f,
|
||||
0x8c, 0xed, 0x2b, 0x63, 0x22, 0x9f, 0x81, 0x53, 0x96, 0x11, 0x33, 0xce, 0xe2, 0x22, 0x5e, 0x6b,
|
||||
0xd4, 0x51, 0x61, 0x65, 0x99, 0x57, 0xda, 0x7c, 0x89, 0x78, 0x95, 0x53, 0xe1, 0x1e, 0x03, 0xf9,
|
||||
0x3e, 0x45, 0x6e, 0xda, 0xff, 0x5f, 0x93, 0x32, 0x81, 0xa3, 0x0d, 0x6f, 0x39, 0x21, 0x0e, 0x3c,
|
||||
0x14, 0x37, 0xfe, 0x82, 0xe6, 0x0b, 0xe3, 0x5c, 0x7e, 0x12, 0x17, 0xec, 0xa4, 0x10, 0x69, 0x21,
|
||||
0x7c, 0xc6, 0x43, 0xbc, 0x51, 0xd3, 0xd2, 0xf1, 0x36, 0x30, 0xf7, 0x18, 0xfa, 0x1e, 0xce, 0x59,
|
||||
0x2e, 0x30, 0x9b, 0xd0, 0x55, 0x8c, 0x5c, 0x94, 0x35, 0x10, 0x68, 0x4e, 0xa3, 0x64, 0xaa, 0xa6,
|
||||
0xc9, 0xf6, 0xd4, 0xd9, 0xed, 0x43, 0x6f, 0xc7, 0x3b, 0x8d, 0x56, 0xee, 0x5f, 0x16, 0x10, 0x03,
|
||||
0x54, 0x26, 0x98, 0xbc, 0x0f, 0x76, 0xaa, 0xd1, 0x75, 0x7d, 0xb6, 0xd7, 0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x5d, 0x59, 0x9b, 0xc4, 0xd1, 0xfe, 0xbb, 0x7b, 0x77,
|
||||
0xd0, 0xaf, 0xb1, 0x68, 0x8a, 0x2b, 0xe8, 0x6e, 0x6d, 0x3e, 0xf2, 0x5c, 0x3b, 0xd7, 0xaf, 0xcf,
|
||||
0xc1, 0xe0, 0x0e, 0xab, 0xa6, 0x3b, 0x95, 0x57, 0xaf, 0x34, 0x8f, 0x74, 0xb5, 0xfb, 0xed, 0x7a,
|
||||
0x19, 0x6c, 0x03, 0xee, 0x83, 0xf3, 0x0f, 0xa0, 0xc7, 0x92, 0xf1, 0x3c, 0x4b, 0x03, 0x6d, 0xcb,
|
||||
0x31, 0xbb, 0x66, 0x01, 0x9e, 0xb7, 0xbe, 0xcd, 0xd3, 0x70, 0x22, 0xff, 0x85, 0x4c, 0xac, 0xe9,
|
||||
0x81, 0xfa, 0x3b, 0x72, 0xfa, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x2c, 0x67, 0xf7, 0x9c,
|
||||
0x08, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
@@ -52,6 +52,8 @@ message ChannelInformationReply {
|
||||
|
||||
// The channel can be closed if not used this duration in seconds.
|
||||
int64 max_inactive_duration = 12;
|
||||
|
||||
int64 channel_minimum_fee_msat = 13;
|
||||
}
|
||||
|
||||
message OpenChannelRequest {
|
||||
|
||||
26
server.go
26
server.go
@@ -38,6 +38,7 @@ const (
|
||||
feeRate = 0.000001
|
||||
timeLockDelta = 144
|
||||
channelFeePermyriad = 10
|
||||
channelMinimumFeeMsat = 0_000_000
|
||||
additionalChannelCapacity = 100_000
|
||||
maxInactiveDuration = 45 * 24 * 3600
|
||||
)
|
||||
@@ -57,18 +58,19 @@ var (
|
||||
|
||||
func (s *server) ChannelInformation(ctx context.Context, in *lspdrpc.ChannelInformationRequest) (*lspdrpc.ChannelInformationReply, error) {
|
||||
return &lspdrpc.ChannelInformationReply{
|
||||
Name: nodeName,
|
||||
Pubkey: nodePubkey,
|
||||
Host: os.Getenv("NODE_HOST"),
|
||||
ChannelCapacity: publicChannelAmount,
|
||||
TargetConf: targetConf,
|
||||
MinHtlcMsat: minHtlcMsat,
|
||||
BaseFeeMsat: baseFeeMsat,
|
||||
FeeRate: feeRate,
|
||||
TimeLockDelta: timeLockDelta,
|
||||
ChannelFeePermyriad: channelFeePermyriad,
|
||||
LspPubkey: publicKey.SerializeCompressed(),
|
||||
MaxInactiveDuration: maxInactiveDuration,
|
||||
Name: nodeName,
|
||||
Pubkey: nodePubkey,
|
||||
Host: os.Getenv("NODE_HOST"),
|
||||
ChannelCapacity: publicChannelAmount,
|
||||
TargetConf: targetConf,
|
||||
MinHtlcMsat: minHtlcMsat,
|
||||
BaseFeeMsat: baseFeeMsat,
|
||||
FeeRate: feeRate,
|
||||
TimeLockDelta: timeLockDelta,
|
||||
ChannelFeePermyriad: channelFeePermyriad,
|
||||
ChannelMinimumFeeMsat: channelMinimumFeeMsat,
|
||||
LspPubkey: publicKey.SerializeCompressed(),
|
||||
MaxInactiveDuration: maxInactiveDuration,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user