2022-10-17 11:07:05 +10:30
|
|
|
PLUGIN_PAY_SRC := plugins/pay.c
|
2023-04-11 06:57:45 +09:30
|
|
|
PLUGIN_PAY_HEADER :=
|
2019-01-15 14:44:27 +10:30
|
|
|
PLUGIN_PAY_OBJS := $(PLUGIN_PAY_SRC:.c=.o)
|
|
|
|
|
|
2019-05-21 17:02:39 +09:30
|
|
|
PLUGIN_AUTOCLEAN_SRC := plugins/autoclean.c
|
|
|
|
|
PLUGIN_AUTOCLEAN_OBJS := $(PLUGIN_AUTOCLEAN_SRC:.c=.o)
|
|
|
|
|
|
2022-06-24 06:59:36 +05:30
|
|
|
PLUGIN_chanbackup_SRC := plugins/chanbackup.c
|
|
|
|
|
PLUGIN_chanbackup_OBJS := $(PLUGIN_chanbackup_SRC:.c=.o)
|
|
|
|
|
|
2021-06-15 06:37:38 +09:30
|
|
|
PLUGIN_TOPOLOGY_SRC := plugins/topology.c
|
|
|
|
|
PLUGIN_TOPOLOGY_OBJS := $(PLUGIN_TOPOLOGY_SRC:.c=.o)
|
|
|
|
|
|
2020-08-28 12:01:57 +09:30
|
|
|
PLUGIN_TXPREPARE_SRC := plugins/txprepare.c
|
|
|
|
|
PLUGIN_TXPREPARE_OBJS := $(PLUGIN_TXPREPARE_SRC:.c=.o)
|
|
|
|
|
|
2020-01-02 21:04:03 +01:00
|
|
|
PLUGIN_BCLI_SRC := plugins/bcli.c
|
|
|
|
|
PLUGIN_BCLI_OBJS := $(PLUGIN_BCLI_SRC:.c=.o)
|
|
|
|
|
|
2022-07-16 22:48:21 +09:30
|
|
|
PLUGIN_COMMANDO_SRC := plugins/commando.c
|
|
|
|
|
PLUGIN_COMMANDO_OBJS := $(PLUGIN_COMMANDO_SRC:.c=.o)
|
|
|
|
|
|
2020-03-27 14:31:00 +01:00
|
|
|
PLUGIN_KEYSEND_SRC := plugins/keysend.c
|
|
|
|
|
PLUGIN_KEYSEND_OBJS := $(PLUGIN_KEYSEND_SRC:.c=.o)
|
|
|
|
|
|
2024-11-13 14:52:39 +10:30
|
|
|
PLUGIN_LIB_SRC := plugins/libplugin.c common/trace.c
|
|
|
|
|
PLUGIN_LIB_HEADER := plugins/libplugin.h common/trace.h
|
2019-01-15 14:43:27 +10:30
|
|
|
PLUGIN_LIB_OBJS := $(PLUGIN_LIB_SRC:.c=.o)
|
|
|
|
|
|
2024-08-02 18:28:45 +02:00
|
|
|
PLUGIN_PAY_LIB_SRC := \
|
|
|
|
|
plugins/channel_hint.c \
|
|
|
|
|
plugins/libplugin-pay.c
|
|
|
|
|
|
|
|
|
|
PLUGIN_PAY_LIB_HEADER := \
|
|
|
|
|
plugins/channel_hint.h \
|
|
|
|
|
plugins/libplugin-pay.h
|
|
|
|
|
|
2020-08-05 22:01:20 +08:00
|
|
|
PLUGIN_PAY_LIB_OBJS := $(PLUGIN_PAY_LIB_SRC:.c=.o)
|
|
|
|
|
|
2024-07-17 12:53:00 +09:30
|
|
|
PLUGIN_OFFERS_SRC := plugins/offers.c plugins/offers_offer.c plugins/offers_invreq_hook.c plugins/offers_inv_hook.c plugins/establish_onion_path.c plugins/fetchinvoice.c
|
2020-12-16 13:43:23 +10:30
|
|
|
PLUGIN_OFFERS_OBJS := $(PLUGIN_OFFERS_SRC:.c=.o)
|
2021-01-08 05:05:47 +10:30
|
|
|
PLUGIN_OFFERS_HEADER := $(PLUGIN_OFFERS_SRC:.c=.h)
|
2020-12-16 13:43:23 +10:30
|
|
|
|
2023-01-30 16:54:17 +10:30
|
|
|
PLUGIN_SQL_SRC := plugins/sql.c
|
2023-04-11 06:57:45 +09:30
|
|
|
PLUGIN_SQL_HEADER :=
|
2023-01-30 16:54:17 +10:30
|
|
|
PLUGIN_SQL_OBJS := $(PLUGIN_SQL_SRC:.c=.o)
|
|
|
|
|
|
2024-09-06 15:07:57 +09:30
|
|
|
PLUGIN_EXPOSESECRET_SRC := plugins/exposesecret.c
|
|
|
|
|
PLUGIN_EXPOSESECRET_HEADER :=
|
|
|
|
|
PLUGIN_EXPOSESECRET_OBJS := $(PLUGIN_EXPOSESECRET_SRC:.c=.o)
|
|
|
|
|
|
2020-09-09 19:55:20 +09:30
|
|
|
PLUGIN_SPENDER_SRC := \
|
2020-08-21 17:58:20 +08:00
|
|
|
plugins/spender/fundchannel.c \
|
2020-09-09 19:56:14 +09:30
|
|
|
plugins/spender/main.c \
|
2020-08-21 17:31:33 +08:00
|
|
|
plugins/spender/multifundchannel.c \
|
2020-10-20 20:18:19 -05:00
|
|
|
plugins/spender/multiwithdraw.c \
|
2024-11-11 13:19:24 +10:30
|
|
|
plugins/spender/openchannel.c \
|
|
|
|
|
plugins/spender/splice.c
|
2020-09-09 19:56:14 +09:30
|
|
|
PLUGIN_SPENDER_HEADER := \
|
2020-08-21 17:31:33 +08:00
|
|
|
plugins/spender/multifundchannel.h \
|
2020-08-21 17:58:20 +08:00
|
|
|
plugins/spender/multiwithdraw.h \
|
|
|
|
|
plugins/spender/fundchannel.h \
|
2020-10-20 20:18:19 -05:00
|
|
|
plugins/spender/multifundchannel.h \
|
2024-11-11 13:19:24 +10:30
|
|
|
plugins/spender/openchannel.h \
|
|
|
|
|
plugins/spender/splice.h
|
2020-09-09 19:55:20 +09:30
|
|
|
PLUGIN_SPENDER_OBJS := $(PLUGIN_SPENDER_SRC:.c=.o)
|
|
|
|
|
|
2023-12-11 13:34:22 +05:30
|
|
|
PLUGIN_RECOVER_SRC := plugins/recover.c
|
|
|
|
|
PLUGIN_RECOVER_OBJS := $(PLUGIN_RECOVER_SRC:.c=.o)
|
|
|
|
|
|
2021-04-22 17:51:22 -05:00
|
|
|
PLUGIN_FUNDER_SRC := \
|
|
|
|
|
plugins/funder.c \
|
|
|
|
|
plugins/funder_policy.c
|
|
|
|
|
PLUGIN_FUNDER_HEADER := \
|
|
|
|
|
plugins/funder_policy.h
|
|
|
|
|
PLUGIN_FUNDER_OBJS := $(PLUGIN_FUNDER_SRC:.c=.o)
|
|
|
|
|
|
2024-07-08 14:43:07 -05:00
|
|
|
PLUGIN_RECKLESSRPC_SRC := plugins/recklessrpc.c
|
|
|
|
|
PLUGIN_RECKLESSRPC_OBJS := $(PLUGIN_RECKLESSRPC_SRC:.c=.o)
|
|
|
|
|
|
2020-06-19 14:22:25 +08:00
|
|
|
PLUGIN_ALL_SRC := \
|
|
|
|
|
$(PLUGIN_AUTOCLEAN_SRC) \
|
2022-06-24 06:59:36 +05:30
|
|
|
$(PLUGIN_chanbackup_SRC) \
|
2020-06-19 14:22:25 +08:00
|
|
|
$(PLUGIN_BCLI_SRC) \
|
2022-07-16 22:48:21 +09:30
|
|
|
$(PLUGIN_COMMANDO_SRC) \
|
2021-04-22 17:51:22 -05:00
|
|
|
$(PLUGIN_FUNDER_SRC) \
|
2021-06-15 06:37:38 +09:30
|
|
|
$(PLUGIN_TOPOLOGY_SRC) \
|
2024-09-06 15:07:57 +09:30
|
|
|
$(PLUGIN_EXPOSESECRET_SRC) \
|
2020-06-19 14:22:25 +08:00
|
|
|
$(PLUGIN_KEYSEND_SRC) \
|
2020-08-28 12:01:57 +09:30
|
|
|
$(PLUGIN_TXPREPARE_SRC) \
|
2020-06-19 14:22:25 +08:00
|
|
|
$(PLUGIN_LIB_SRC) \
|
2021-01-13 19:28:38 +10:30
|
|
|
$(PLUGIN_OFFERS_SRC) \
|
2020-08-05 22:01:20 +08:00
|
|
|
$(PLUGIN_PAY_LIB_SRC) \
|
2020-09-09 19:55:20 +09:30
|
|
|
$(PLUGIN_PAY_SRC) \
|
2023-12-11 13:34:22 +05:30
|
|
|
$(PLUGIN_SPENDER_SRC) \
|
2024-07-08 14:43:07 -05:00
|
|
|
$(PLUGIN_RECOVER_SRC) \
|
|
|
|
|
$(PLUGIN_RECKLESSRPC_SRC)
|
2020-12-16 13:43:23 +10:30
|
|
|
|
2020-06-19 14:22:25 +08:00
|
|
|
PLUGIN_ALL_HEADER := \
|
2022-10-17 11:07:05 +10:30
|
|
|
$(PLUGIN_PAY_HEADER) \
|
2020-08-05 22:01:20 +08:00
|
|
|
$(PLUGIN_LIB_HEADER) \
|
2021-04-22 17:51:22 -05:00
|
|
|
$(PLUGIN_FUNDER_HEADER) \
|
2020-09-09 19:55:20 +09:30
|
|
|
$(PLUGIN_PAY_LIB_HEADER) \
|
2020-12-16 13:43:28 +10:30
|
|
|
$(PLUGIN_OFFERS_HEADER) \
|
2020-09-09 19:55:20 +09:30
|
|
|
$(PLUGIN_SPENDER_HEADER)
|
2020-06-19 14:22:25 +08:00
|
|
|
|
2022-04-10 20:08:15 +09:30
|
|
|
C_PLUGINS := \
|
2020-06-19 14:22:25 +08:00
|
|
|
plugins/autoclean \
|
2022-06-24 06:59:36 +05:30
|
|
|
plugins/chanbackup \
|
2020-06-19 14:22:25 +08:00
|
|
|
plugins/bcli \
|
2022-07-16 22:48:21 +09:30
|
|
|
plugins/commando \
|
2021-04-22 17:51:22 -05:00
|
|
|
plugins/funder \
|
2021-06-15 06:37:38 +09:30
|
|
|
plugins/topology \
|
2024-09-06 15:07:57 +09:30
|
|
|
plugins/exposesecret \
|
2020-06-19 14:22:25 +08:00
|
|
|
plugins/keysend \
|
2021-01-13 19:28:38 +10:30
|
|
|
plugins/offers \
|
2020-08-28 12:01:57 +09:30
|
|
|
plugins/pay \
|
2024-07-08 14:43:07 -05:00
|
|
|
plugins/recklessrpc \
|
2023-12-11 13:34:22 +05:30
|
|
|
plugins/recover \
|
2020-09-09 19:55:20 +09:30
|
|
|
plugins/txprepare \
|
2023-07-31 11:21:22 +09:30
|
|
|
plugins/cln-renepay \
|
2024-11-17 16:11:06 +10:30
|
|
|
plugins/cln-xpay \
|
2024-08-07 11:19:53 +09:30
|
|
|
plugins/spenderp \
|
|
|
|
|
plugins/cln-askrene
|
2020-06-19 14:22:25 +08:00
|
|
|
|
2024-09-30 16:33:53 +01:00
|
|
|
ifneq ($(NO_PYTHON), 1)
|
2023-07-15 14:12:59 +09:30
|
|
|
PY_PLUGINS := \
|
2024-04-15 15:37:23 -07:00
|
|
|
plugins/clnrest/clnrest \
|
|
|
|
|
plugins/wss-proxy/wss-proxy
|
2024-09-30 16:33:53 +01:00
|
|
|
endif
|
2023-07-15 14:12:59 +09:30
|
|
|
|
2023-02-06 12:21:30 +10:30
|
|
|
ifeq ($(HAVE_SQLITE3),1)
|
|
|
|
|
C_PLUGINS += plugins/sql
|
|
|
|
|
PLUGIN_ALL_SRC += $(PLUGIN_SQL_SRC)
|
|
|
|
|
PLUGIN_ALL_HEADER += $(PLUGIN_SQL_HEADER)
|
|
|
|
|
endif
|
|
|
|
|
|
2023-07-15 14:12:59 +09:30
|
|
|
# This is non-python plugins (PY_PLUGINS need their whole directory!)
|
2022-04-10 20:08:15 +09:30
|
|
|
PLUGINS := $(C_PLUGINS)
|
|
|
|
|
|
|
|
|
|
ifneq ($(RUST),0)
|
|
|
|
|
# Builtin plugins must be in this plugins dir to work when we're executed
|
|
|
|
|
# *without* make install.
|
|
|
|
|
plugins/cln-grpc: target/${RUST_PROFILE}/cln-grpc
|
|
|
|
|
@cp $< $@
|
|
|
|
|
|
|
|
|
|
PLUGINS += plugins/cln-grpc
|
|
|
|
|
endif
|
|
|
|
|
|
2019-01-15 14:43:27 +10:30
|
|
|
PLUGIN_COMMON_OBJS := \
|
2019-10-29 12:00:18 -05:00
|
|
|
bitcoin/base58.o \
|
2021-07-02 16:00:17 -05:00
|
|
|
bitcoin/block.o \
|
2022-07-19 17:04:41 +09:30
|
|
|
bitcoin/chainparams.o \
|
2020-07-08 06:20:21 +09:30
|
|
|
bitcoin/feerate.o \
|
2021-07-02 16:00:17 -05:00
|
|
|
bitcoin/preimage.o \
|
2020-05-16 10:59:05 +09:30
|
|
|
bitcoin/privkey.o \
|
2020-05-21 11:27:00 +09:30
|
|
|
bitcoin/psbt.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
bitcoin/pubkey.o \
|
|
|
|
|
bitcoin/script.o \
|
|
|
|
|
bitcoin/shadouble.o \
|
|
|
|
|
bitcoin/short_channel_id.o \
|
|
|
|
|
bitcoin/signature.o \
|
|
|
|
|
bitcoin/tx.o \
|
|
|
|
|
bitcoin/varint.o \
|
2024-11-11 13:19:24 +10:30
|
|
|
common/addr.o \
|
2019-02-21 11:15:57 +10:30
|
|
|
common/amount.o \
|
2021-09-21 16:53:10 +09:30
|
|
|
common/autodata.o \
|
2022-02-16 15:36:47 -06:00
|
|
|
common/coin_mvt.o \
|
2020-01-26 13:07:50 +01:00
|
|
|
common/base32.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
common/bech32.o \
|
|
|
|
|
common/bech32_util.o \
|
2019-07-30 14:55:12 +09:30
|
|
|
common/bigsize.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
common/bolt11.o \
|
2021-03-16 15:33:07 -05:00
|
|
|
common/channel_id.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
common/daemon.o \
|
2024-01-25 10:58:53 +10:30
|
|
|
common/deprecation.o \
|
2019-09-05 10:37:16 +09:30
|
|
|
common/features.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
common/hash_u5.o \
|
2024-06-24 13:15:50 +09:30
|
|
|
common/json_command.o \
|
2022-07-04 13:19:38 +09:30
|
|
|
common/json_param.o \
|
|
|
|
|
common/json_parse.o \
|
|
|
|
|
common/json_parse_simple.o \
|
2022-11-02 10:02:22 +10:30
|
|
|
common/json_filter.o \
|
2020-01-26 13:07:50 +01:00
|
|
|
common/json_stream.o \
|
2021-05-26 18:13:08 -05:00
|
|
|
common/lease_rates.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
common/memleak.o \
|
common/node_id: new type.
Node ids are pubkeys, but we only use them as pubkeys for routing and checking
gossip messages. So we're packing and unpacking them constantly, and wasting
some space and time.
This introduces a new type, explicitly the SEC1 compressed encoding
(33 bytes). We ensure its validity when we load from the db, or get it
from JSON. We still use 'struct pubkey' for peer messages, which checks
validity.
Results from 5 runs, min-max(mean +/- stddev):
store_load_msec,vsz_kb,store_rewrite_sec,listnodes_sec,listchannels_sec,routing_sec,peer_write_all_sec
39475-39572(39518+/-36),2880732,41.150000-41.390000(41.298+/-0.085),2.260000-2.550000(2.336+/-0.11),44.390000-65.150000(58.648+/-7.5),32.740000-33.020000(32.89+/-0.093),44.130000-45.090000(44.566+/-0.32)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-08 16:04:06 +09:30
|
|
|
common/node_id.o \
|
2024-01-11 16:05:46 +01:00
|
|
|
common/plugin.o \
|
2021-04-22 17:51:22 -05:00
|
|
|
common/psbt_open.o \
|
2019-01-15 20:34:07 +10:30
|
|
|
common/pseudorand.o \
|
2020-08-11 14:35:56 +09:30
|
|
|
common/random_select.o \
|
2024-11-11 13:19:24 +10:30
|
|
|
common/splice_script.o \
|
2020-05-15 17:13:22 -05:00
|
|
|
common/setup.o \
|
2020-10-12 16:03:50 +10:30
|
|
|
common/status_levels.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
common/utils.o \
|
|
|
|
|
common/version.o \
|
2020-01-26 13:07:50 +01:00
|
|
|
common/wireaddr.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
wire/fromwire.o \
|
2023-05-22 10:21:44 +09:30
|
|
|
wire/peer_wiregen.o \
|
2020-05-20 13:58:39 +02:00
|
|
|
wire/tlvstream.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
wire/towire.o
|
|
|
|
|
|
2024-08-07 11:19:53 +09:30
|
|
|
include plugins/askrene/Makefile
|
2022-07-19 14:37:26 +09:30
|
|
|
include plugins/bkpr/Makefile
|
2023-07-31 11:21:22 +09:30
|
|
|
include plugins/renepay/Makefile
|
2024-11-17 16:11:06 +10:30
|
|
|
include plugins/xpay/Makefile
|
2022-07-19 14:37:26 +09:30
|
|
|
|
2022-07-19 15:26:04 +09:30
|
|
|
# Make sure these depend on everything.
|
|
|
|
|
ALL_C_SOURCES += $(PLUGIN_ALL_SRC)
|
|
|
|
|
ALL_C_HEADERS += $(PLUGIN_ALL_HEADER)
|
|
|
|
|
ALL_PROGRAMS += $(C_PLUGINS)
|
|
|
|
|
|
2024-11-06 21:31:36 +10:30
|
|
|
PLUGIN_ALL_OBJS := $(PLUGIN_ALL_SRC:.c=.o)
|
|
|
|
|
|
2021-11-30 13:35:44 +10:30
|
|
|
# Make all plugins depend on all plugin headers, for simplicity.
|
|
|
|
|
$(PLUGIN_ALL_OBJS): $(PLUGIN_ALL_HEADER)
|
|
|
|
|
|
2024-05-09 13:06:20 +09:30
|
|
|
plugins/pay: $(PLUGIN_PAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/gossmap.o common/fp16.o common/route.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o wire/bolt12_wiregen.o bitcoin/block.o common/blindedpay.o common/blindedpath.o common/hmac.o common/blinding.o common/onion_encode.o common/gossmods_listpeerchannels.o common/sciddir_or_pubkey.o wire/onion_wiregen.o
|
2019-01-15 14:44:27 +10:30
|
|
|
|
2022-07-19 17:04:41 +09:30
|
|
|
plugins/autoclean: $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
2019-05-21 17:02:39 +09:30
|
|
|
|
2024-03-20 10:59:28 +10:30
|
|
|
plugins/chanbackup: $(PLUGIN_chanbackup_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/scb_wiregen.o wire/channel_type_wiregen.o
|
2022-06-24 06:59:36 +05:30
|
|
|
|
2023-04-11 06:57:45 +09:30
|
|
|
plugins/commando: $(PLUGIN_COMMANDO_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
2022-07-16 22:48:21 +09:30
|
|
|
|
2021-06-15 06:37:38 +09:30
|
|
|
# Topology wants to decode node_announcement, and peer_wiregen which
|
|
|
|
|
# pulls in some of bitcoin/.
|
2024-07-17 18:35:11 +09:30
|
|
|
plugins/topology: common/route.o common/dijkstra.o common/gossmap.o common/sciddir_or_pubkey.o common/fp16.o wire/peer_wiregen.o wire/channel_type_wiregen.o bitcoin/block.o bitcoin/preimage.o common/gossmods_listpeerchannels.o $(PLUGIN_TOPOLOGY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
2021-06-15 06:37:38 +09:30
|
|
|
|
2022-07-19 17:04:41 +09:30
|
|
|
plugins/txprepare: $(PLUGIN_TXPREPARE_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
2020-08-28 12:01:57 +09:30
|
|
|
|
2024-09-06 15:07:57 +09:30
|
|
|
plugins/exposesecret: $(PLUGIN_EXPOSESECRET_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/hsm_encryption.o common/codex32.o
|
|
|
|
|
|
2022-07-19 17:04:41 +09:30
|
|
|
plugins/bcli: $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
2020-01-02 21:04:03 +01:00
|
|
|
|
2024-09-30 16:33:53 +01:00
|
|
|
plugins/keysend: wire/tlvstream.o wire/onion_wiregen.o $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/gossmap.o common/fp16.o common/route.o common/dijkstra.o common/blindedpay.o common/blindedpath.o common/hmac.o common/blinding.o common/onion_encode.o common/gossmods_listpeerchannels.o common/sciddir_or_pubkey.o
|
2020-08-05 22:01:20 +08:00
|
|
|
$(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER)
|
2020-03-27 14:31:00 +01:00
|
|
|
|
2024-03-20 11:00:28 +10:30
|
|
|
plugins/spenderp: bitcoin/block.o bitcoin/preimage.o bitcoin/psbt.o common/psbt_open.o common/json_channel_type.o common/channel_type.o common/features.o wire/peer_wiregen.o $(PLUGIN_SPENDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
2020-09-09 19:55:20 +09:30
|
|
|
|
2024-12-05 13:07:57 +10:30
|
|
|
plugins/offers: $(PLUGIN_OFFERS_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) common/addr.o common/bolt12.o common/bolt12_merkle.o common/bolt11_json.o common/iso4217.o $(WIRE_OBJS) $(WIRE_BOLT12_OBJS) bitcoin/block.o common/channel_id.o bitcoin/preimage.o common/blindedpath.o common/bolt12_id.o common/blinding.o common/hmac.o common/json_blinded_path.o common/gossmap.o common/fp16.o $(JSMN_OBJS) common/dijkstra.o common/route.o common/gossmods_listpeerchannels.o common/onion_message.o common/sphinx.o common/onionreply.o
|
2020-12-16 13:43:23 +10:30
|
|
|
|
2022-07-19 17:04:41 +09:30
|
|
|
plugins/funder: bitcoin/psbt.o common/psbt_open.o $(PLUGIN_FUNDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
2021-04-22 17:51:22 -05:00
|
|
|
|
2024-07-17 18:35:11 +09:30
|
|
|
plugins/recover: common/gossmap.o common/sciddir_or_pubkey.o common/fp16.o $(PLUGIN_RECOVER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
2023-12-11 13:34:22 +05:30
|
|
|
|
2024-07-08 14:43:07 -05:00
|
|
|
plugins/recklessrpc: $(PLUGIN_RECKLESSRPC_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
|
|
|
|
|
2023-01-30 16:54:17 +10:30
|
|
|
# This covers all the low-level list RPCs which return simple arrays
|
2023-03-20 10:52:24 +10:30
|
|
|
SQL_LISTRPCS := listchannels listforwards listhtlcs listinvoices listnodes listoffers listpeers listpeerchannels listclosedchannels listtransactions listsendpays bkpr-listaccountevents bkpr-listincome
|
2024-03-03 18:29:52 -08:00
|
|
|
SQL_LISTRPCS_SCHEMAS := $(foreach l,$(SQL_LISTRPCS),doc/schemas/lightning-$l.json)
|
2024-09-16 16:53:54 +09:30
|
|
|
SQL_SCHEMA_PARTS := $(foreach l,$(SQL_LISTRPCS), plugins/sql-schema_$l_gen.h)
|
2024-03-03 18:29:52 -08:00
|
|
|
|
|
|
|
|
# RES_JSON is generated by:
|
|
|
|
|
# 1: deleting description array (used for field details) but keeping description keys
|
|
|
|
|
# 2: deleting additionalProperties, required, enum, maxLength, minLength, pre_return_value_notes, post_return_value_notes, anyOf, oneOf, hidden, untyped, default, comment, added, maximum, minimum, pattern, format
|
|
|
|
|
# (We only need [field].type, [field].name, [field].deprecated, [field].allOf, [field].items.allOf and allOf from response.properties)
|
|
|
|
|
# 3: deleting empty objects from .response.properties
|
|
|
|
|
# But these simple removals drop us from 100k to 18k.
|
2024-09-16 16:53:54 +09:30
|
|
|
plugins/sql-schema_%_gen.h: doc/schemas/lightning-%.json
|
|
|
|
|
@jq 'walk(if type == "object" then if has("description") and (.description | type) == "array" then del(.description) else . end else . end ) | walk(if type == "object" then del(.additionalProperties, .required, .enum, .maxLength, .minLength, .pre_return_value_notes, .post_return_value_notes, .anyOf, .oneOf, .hidden, .untyped, .default, .comment, .added, .maximum, .minimum, .pattern, .format) else . end) | walk(if type == "object" then with_entries(select(.value != {})) else . end) | .response.properties' < $< > $@
|
|
|
|
|
|
|
|
|
|
# Regen if these rules change!
|
|
|
|
|
$(SQL_SCHEMA_PARTS): plugins/Makefile
|
|
|
|
|
|
|
|
|
|
plugins/sql-schema_gen.h: $(SQL_SCHEMA_PARTS)
|
|
|
|
|
@$(call VERBOSE,GEN $@, set -e; (\
|
|
|
|
|
SEP=""; \
|
|
|
|
|
echo "\"{"; \
|
|
|
|
|
for l in $(SQL_LISTRPCS); do \
|
|
|
|
|
echo "$$SEP\"$$l\":{\"properties\":$$(cat plugins/sql-schema_$${l}_gen.h)}" | sed s/\"/\\\"/g; \
|
|
|
|
|
SEP=","; \
|
|
|
|
|
done | sed "s/\\\"/\\\\\"/g"; \
|
|
|
|
|
echo "}\"") | tr -d " \n" > $@ \
|
2024-03-03 18:29:52 -08:00
|
|
|
)
|
2023-01-30 16:54:17 +10:30
|
|
|
|
|
|
|
|
plugins/sql.o: plugins/sql-schema_gen.h
|
2023-01-30 16:54:17 +10:30
|
|
|
plugins/sql: $(PLUGIN_SQL_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/gossip_store.o gossipd/gossip_store_wiregen.o
|
2023-01-30 16:54:17 +10:30
|
|
|
|
2020-09-24 11:02:54 +09:30
|
|
|
# Generated from PLUGINS definition in plugins/Makefile
|
2020-10-22 10:21:08 +10:30
|
|
|
ALL_C_HEADERS += plugins/list_of_builtin_plugins_gen.h
|
2023-07-15 14:12:59 +09:30
|
|
|
PLUGIN_BASES := $(PLUGINS:plugins/%=%) $(PY_PLUGINS:plugins/%=%)
|
|
|
|
|
|
2022-09-12 09:35:52 +09:30
|
|
|
plugins/list_of_builtin_plugins_gen.h: plugins/Makefile Makefile config.vars
|
2023-07-15 14:12:59 +09:30
|
|
|
@$(call VERBOSE,GEN $@,echo "static const char *list_of_builtin_plugins[] = { $(PLUGIN_BASES:%=\"%\",) NULL };" > $@)
|
2021-04-22 17:53:28 -05:00
|
|
|
|
2024-02-23 09:29:03 +01:00
|
|
|
target/${RUST_PROFILE}/examples/cln-subscribe-wildcard: ${CLN_PLUGIN_SRC} plugins/examples/cln-subscribe-wildcard.rs
|
|
|
|
|
cargo build ${CARGO_OPTS} --example cln-subscribe-wildcard
|
|
|
|
|
|
2022-12-21 12:26:46 +01:00
|
|
|
CLN_PLUGIN_EXAMPLES := \
|
|
|
|
|
target/${RUST_PROFILE}/examples/cln-plugin-startup \
|
2023-04-11 06:57:45 +09:30
|
|
|
target/${RUST_PROFILE}/examples/cln-plugin-reentrant \
|
2024-02-23 09:29:03 +01:00
|
|
|
target/${RUST_PROFILE}/examples/cln-rpc-getinfo \
|
|
|
|
|
target/${RUST_PROFILE}/examples/cln-subscribe-wildcard
|
2022-01-17 12:59:09 +01:00
|
|
|
|
2022-12-21 12:26:46 +01:00
|
|
|
CLN_PLUGIN_SRC = $(shell find plugins/src -name "*.rs")
|
2024-02-14 15:34:44 +01:00
|
|
|
CLN_GRPC_PLUGIN_SRC = $(shell find plugins/grpc-plugin/src -name "*.rs")
|
2022-01-17 12:59:09 +01:00
|
|
|
|
plugins/Makefile: make cln-grpc depend on ALL THE THINGS.
```
error[E0277]: the trait bound `cln_rpc::model::requests::AskrenereserveRequest: From<pb::AskrenereserveRequest>` is not satisfied
--> cln-grpc/src/server.rs:3994:56
|
3994 | let req: requests::AskrenereserveRequest = req.into();
| ^^^^ the trait `From<pb::AskrenereserveRequest>` is not implemented for `cln_rpc::model::requests::AskrenereserveRequest`, which is required by `pb::AskrenereserveRequest: Into<_>`
|
= note: required for `pb::AskrenereserveRequest` to implement `Into<cln_rpc::model::requests::AskrenereserveRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::AskreneageRequest: From<pb::AskreneageRequest>` is not satisfied
--> cln-grpc/src/server.rs:4026:52
|
4026 | let req: requests::AskreneageRequest = req.into();
| ^^^^ the trait `From<pb::AskreneageRequest>` is not implemented for `cln_rpc::model::requests::AskreneageRequest`, which is required by `pb::AskreneageRequest: Into<_>`
|
= note: required for `pb::AskreneageRequest` to implement `Into<cln_rpc::model::requests::AskreneageRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::GetroutesRequest: From<pb::GetroutesRequest>` is not satisfied
--> cln-grpc/src/server.rs:4058:51
|
4058 | let req: requests::GetroutesRequest = req.into();
| ^^^^ the trait `From<pb::GetroutesRequest>` is not implemented for `cln_rpc::model::requests::GetroutesRequest`, which is required by `pb::GetroutesRequest: Into<_>`
|
= note: required for `pb::GetroutesRequest` to implement `Into<cln_rpc::model::requests::GetroutesRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::AskrenedisablenodeRequest: From<pb::AskrenedisablenodeRequest>` is not satisfied
--> cln-grpc/src/server.rs:4090:60
|
4090 | let req: requests::AskrenedisablenodeRequest = req.into();
| ^^^^ the trait `From<pb::AskrenedisablenodeRequest>` is not implemented for `cln_rpc::model::requests::AskrenedisablenodeRequest`, which is required by `pb::AskrenedisablenodeRequest: Into<_>`
|
= note: required for `pb::AskrenedisablenodeRequest` to implement `Into<cln_rpc::model::requests::AskrenedisablenodeRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::AskreneinformchannelRequest: From<pb::AskreneinformchannelRequest>` is not satisfied
--> cln-grpc/src/server.rs:4122:62
|
4122 | let req: requests::AskreneinformchannelRequest = req.into();
| ^^^^ the trait `From<pb::AskreneinformchannelRequest>` is not implemented for `cln_rpc::model::requests::AskreneinformchannelRequest`, which is required by `pb::AskreneinformchannelRequest: Into<_>`
|
= note: required for `pb::AskreneinformchannelRequest` to implement `Into<cln_rpc::model::requests::AskreneinformchannelRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::AskrenecreatechannelRequest: From<pb::AskrenecreatechannelRequest>` is not satisfied
--> cln-grpc/src/server.rs:4154:62
|
4154 | let req: requests::AskrenecreatechannelRequest = req.into();
| ^^^^ the trait `From<pb::AskrenecreatechannelRequest>` is not implemented for `cln_rpc::model::requests::AskrenecreatechannelRequest`, which is required by `pb::AskrenecreatechannelRequest: Into<_>`
|
= note: required for `pb::AskrenecreatechannelRequest` to implement `Into<cln_rpc::model::requests::AskrenecreatechannelRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::AskreneupdatechannelRequest: From<pb::AskreneupdatechannelRequest>` is not satisfied
--> cln-grpc/src/server.rs:4186:62
|
4186 | let req: requests::AskreneupdatechannelRequest = req.into();
| ^^^^ the trait `From<pb::AskreneupdatechannelRequest>` is not implemented for `cln_rpc::model::requests::AskreneupdatechannelRequest`, which is required by `pb::AskreneupdatechannelRequest: Into<_>`
|
= note: required for `pb::AskreneupdatechannelRequest` to implement `Into<cln_rpc::model::requests::AskreneupdatechannelRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::AskrenebiaschannelRequest: From<pb::AskrenebiaschannelRequest>` is not satisfied
--> cln-grpc/src/server.rs:4218:60
|
4218 | let req: requests::AskrenebiaschannelRequest = req.into();
| ^^^^ the trait `From<pb::AskrenebiaschannelRequest>` is not implemented for `cln_rpc::model::requests::AskrenebiaschannelRequest`, which is required by `pb::AskrenebiaschannelRequest: Into<_>`
|
= note: required for `pb::AskrenebiaschannelRequest` to implement `Into<cln_rpc::model::requests::AskrenebiaschannelRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::AskrenelistreservationsRequest: From<pb::AskrenelistreservationsRequest>` is not satisfied
--> cln-grpc/src/server.rs:4250:65
|
4250 | let req: requests::AskrenelistreservationsRequest = req.into();
| ^^^^ the trait `From<pb::AskrenelistreservationsRequest>` is not implemented for `cln_rpc::model::requests::AskrenelistreservationsRequest`, which is required by `pb::AskrenelistreservationsRequest: Into<_>`
|
= note: required for `pb::AskrenelistreservationsRequest` to implement `Into<cln_rpc::model::requests::AskrenelistreservationsRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::InjectpaymentonionRequest: From<pb::InjectpaymentonionRequest>` is not satisfied
--> cln-grpc/src/server.rs:4282:60
|
4282 | let req: requests::InjectpaymentonionRequest = req.into();
| ^^^^ the trait `From<pb::InjectpaymentonionRequest>` is not implemented for `cln_rpc::model::requests::InjectpaymentonionRequest`, which is required by `pb::InjectpaymentonionRequest: Into<_>`
|
= note: required for `pb::InjectpaymentonionRequest` to implement `Into<cln_rpc::model::requests::InjectpaymentonionRequest>`
error[E0277]: the trait bound `cln_rpc::model::requests::XpayRequest: From<pb::XpayRequest>` is not satisfied
--> cln-grpc/src/server.rs:4314:46
|
4314 | let req: requests::XpayRequest = req.into();
| ^^^^ the trait `From<pb::XpayRequest>` is not implemented for `cln_rpc::model::requests::XpayRequest`, which is required by `pb::XpayRequest: Into<_>`
|
= note: required for `pb::XpayRequest` to implement `Into<cln_rpc::model::requests::XpayRequest>`
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-28 21:29:53 +10:30
|
|
|
target/${RUST_PROFILE}/cln-grpc: ${CLN_PLUGIN_SRC} ${CLN_GRPC_PLUGIN_SRC} $(MSGGEN_GENALL) $(MSGGEN_GEN_ALL)
|
2022-03-22 16:49:12 +01:00
|
|
|
cargo build ${CARGO_OPTS} --bin cln-grpc
|
2022-01-17 16:53:52 +01:00
|
|
|
|
2022-04-12 15:55:55 +09:30
|
|
|
ifneq ($(RUST),0)
|
|
|
|
|
DEFAULT_TARGETS += $(CLN_PLUGIN_EXAMPLES) plugins/cln-grpc
|
|
|
|
|
endif
|
|
|
|
|
|
2023-04-12 11:34:57 +09:30
|
|
|
clean: plugins-clean
|
|
|
|
|
plugins-clean:
|
|
|
|
|
$(RM) $(PLUGINS) $(CLN_PLUGIN_EXAMPLES)
|
|
|
|
|
$(RM) plugins/sql-schema_gen.h
|
|
|
|
|
|
2021-04-22 17:53:28 -05:00
|
|
|
include plugins/test/Makefile
|