2019-01-15 14:44:27 +10:30
|
|
|
PLUGIN_PAY_SRC := plugins/pay.c
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
2020-03-27 14:31:00 +01:00
|
|
|
PLUGIN_KEYSEND_SRC := plugins/keysend.c
|
|
|
|
PLUGIN_KEYSEND_OBJS := $(PLUGIN_KEYSEND_SRC:.c=.o)
|
|
|
|
|
2020-08-05 22:01:20 +08:00
|
|
|
PLUGIN_LIB_SRC := plugins/libplugin.c
|
|
|
|
PLUGIN_LIB_HEADER := plugins/libplugin.h
|
2019-01-15 14:43:27 +10:30
|
|
|
PLUGIN_LIB_OBJS := $(PLUGIN_LIB_SRC:.c=.o)
|
|
|
|
|
2020-08-05 22:01:20 +08:00
|
|
|
PLUGIN_PAY_LIB_SRC := plugins/libplugin-pay.c
|
|
|
|
PLUGIN_PAY_LIB_HEADER := plugins/libplugin-pay.h
|
|
|
|
PLUGIN_PAY_LIB_OBJS := $(PLUGIN_PAY_LIB_SRC:.c=.o)
|
|
|
|
|
2021-01-08 05:06:47 +10:30
|
|
|
PLUGIN_OFFERS_SRC := plugins/offers.c plugins/offers_offer.c plugins/offers_invreq_hook.c plugins/offers_inv_hook.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
|
|
|
|
2020-12-16 13:48:00 +10:30
|
|
|
PLUGIN_FETCHINVOICE_SRC := plugins/fetchinvoice.c
|
|
|
|
PLUGIN_FETCHINVOICE_OBJS := $(PLUGIN_FETCHINVOICE_SRC:.c=.o)
|
|
|
|
PLUGIN_FETCHINVOICE_HEADER :=
|
|
|
|
|
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 \
|
|
|
|
plugins/spender/openchannel.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 \
|
|
|
|
plugins/spender/openchannel.h
|
2020-09-09 19:55:20 +09:30
|
|
|
PLUGIN_SPENDER_OBJS := $(PLUGIN_SPENDER_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)
|
|
|
|
|
2020-06-19 14:22:25 +08:00
|
|
|
PLUGIN_ALL_SRC := \
|
|
|
|
$(PLUGIN_AUTOCLEAN_SRC) \
|
|
|
|
$(PLUGIN_BCLI_SRC) \
|
2021-01-13 19:28:38 +10:30
|
|
|
$(PLUGIN_FETCHINVOICE_SRC) \
|
2021-04-22 17:51:22 -05:00
|
|
|
$(PLUGIN_FUNDER_SRC) \
|
2021-06-15 06:37:38 +09:30
|
|
|
$(PLUGIN_TOPOLOGY_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) \
|
|
|
|
$(PLUGIN_SPENDER_SRC)
|
2020-12-16 13:43:23 +10:30
|
|
|
|
2020-06-19 14:22:25 +08:00
|
|
|
PLUGIN_ALL_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
|
|
|
PLUGIN_ALL_OBJS := $(PLUGIN_ALL_SRC:.c=.o)
|
|
|
|
|
|
|
|
PLUGINS := \
|
|
|
|
plugins/autoclean \
|
|
|
|
plugins/bcli \
|
2021-01-13 19:28:38 +10:30
|
|
|
plugins/fetchinvoice \
|
2021-04-22 17:51:22 -05:00
|
|
|
plugins/funder \
|
2021-06-15 06:37:38 +09:30
|
|
|
plugins/topology \
|
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 \
|
2020-09-09 19:55:20 +09:30
|
|
|
plugins/txprepare \
|
|
|
|
plugins/spenderp
|
2020-06-19 14:22:25 +08:00
|
|
|
|
2020-08-31 10:43:25 +09:30
|
|
|
# Make sure these depend on everything.
|
|
|
|
ALL_C_SOURCES += $(PLUGIN_ALL_SRC)
|
2020-10-22 11:27:07 +10:30
|
|
|
ALL_C_HEADERS += $(PLUGIN_ALL_HEADER)
|
2020-08-31 10:43:25 +09:30
|
|
|
ALL_PROGRAMS += $(PLUGINS)
|
|
|
|
|
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 \
|
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 \
|
2019-02-21 11:15:57 +10:30
|
|
|
common/amount.o \
|
2021-09-21 16:53:10 +09:30
|
|
|
common/autodata.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 \
|
2019-09-05 10:37:16 +09:30
|
|
|
common/features.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
common/hash_u5.o \
|
|
|
|
common/json.o \
|
2019-01-15 14:50:27 +10:30
|
|
|
common/json_helpers.o \
|
2020-01-26 13:07:50 +01:00
|
|
|
common/json_stream.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
common/json_tok.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 \
|
2019-01-15 14:43:27 +10:30
|
|
|
common/param.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 \
|
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/type_to_string.o \
|
|
|
|
common/utils.o \
|
|
|
|
common/version.o \
|
2020-01-26 13:07:50 +01:00
|
|
|
common/wireaddr.o \
|
2021-09-09 12:20:52 +09:30
|
|
|
wire/channel_type_wiregen.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
wire/fromwire.o \
|
2020-09-08 06:36:50 +09:30
|
|
|
wire/onion$(EXP)_wiregen.o \
|
2021-07-02 16:00:17 -05:00
|
|
|
wire/peer$(EXP)_wiregen.o \
|
2020-05-20 13:58:39 +02:00
|
|
|
wire/tlvstream.o \
|
2019-01-15 14:43:27 +10:30
|
|
|
wire/towire.o
|
|
|
|
|
2021-02-01 13:29:18 +10:30
|
|
|
plugins/pay: bitcoin/chainparams.o $(PLUGIN_PAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) common/gossmap.o common/fp16.o common/route.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o wire/bolt12$(EXP)_wiregen.o bitcoin/block.o
|
2020-08-05 22:01:20 +08:00
|
|
|
$(PLUGIN_PAY_OBJS): $(PLUGIN_PAY_LIB_HEADER)
|
2019-01-15 14:44:27 +10:30
|
|
|
|
2019-09-06 16:30:46 -05:00
|
|
|
plugins/autoclean: bitcoin/chainparams.o $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
2019-05-21 17:02:39 +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/.
|
2021-09-09 12:20:52 +09:30
|
|
|
plugins/topology: common/route.o common/dijkstra.o common/gossmap.o common/fp16.o bitcoin/chainparams.o wire/peer$(EXP)_wiregen.o wire/channel_type_wiregen.o bitcoin/block.o bitcoin/preimage.o $(PLUGIN_TOPOLOGY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
2021-06-15 06:37:38 +09:30
|
|
|
|
2020-08-28 12:01:57 +09:30
|
|
|
plugins/txprepare: bitcoin/chainparams.o $(PLUGIN_TXPREPARE_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
|
|
|
|
2020-01-02 21:04:03 +01:00
|
|
|
plugins/bcli: bitcoin/chainparams.o $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
|
|
|
|
2021-02-01 13:29:18 +10:30
|
|
|
plugins/keysend: bitcoin/chainparams.o wire/tlvstream.o wire/onion$(EXP)_wiregen.o $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) common/gossmap.o common/fp16.o common/route.o common/dijkstra.o
|
2020-08-05 22:01:20 +08:00
|
|
|
$(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER)
|
2020-03-27 14:31:00 +01:00
|
|
|
|
2021-05-26 18:13:08 -05:00
|
|
|
plugins/spenderp: bitcoin/block.o bitcoin/chainparams.o bitcoin/preimage.o bitcoin/psbt.o common/psbt_open.o wire/peer${EXP}_wiregen.o $(PLUGIN_SPENDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
2020-09-09 19:55:20 +09:30
|
|
|
|
2021-01-13 19:28:38 +10:30
|
|
|
plugins/offers: bitcoin/chainparams.o $(PLUGIN_OFFERS_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) common/bolt12.o common/bolt12_merkle.o common/bolt11_json.o common/iso4217.o $(WIRE_OBJS) bitcoin/block.o common/channel_id.o bitcoin/preimage.o $(JSMN_OBJS) $(CCAN_OBJS)
|
2020-12-16 13:43:23 +10:30
|
|
|
|
2021-02-01 13:29:18 +10:30
|
|
|
plugins/fetchinvoice: bitcoin/chainparams.o $(PLUGIN_FETCHINVOICE_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) common/bolt12.o common/bolt12_merkle.o common/iso4217.o $(WIRE_OBJS) bitcoin/block.o common/channel_id.o bitcoin/preimage.o $(JSMN_OBJS) $(CCAN_OBJS) common/gossmap.o common/fp16.o common/dijkstra.o common/route.o common/blindedpath.o common/hmac.o common/blinding.o
|
2020-12-16 13:48:00 +10:30
|
|
|
|
2021-04-22 17:51:22 -05:00
|
|
|
plugins/funder: bitcoin/chainparams.o bitcoin/psbt.o common/psbt_open.o $(PLUGIN_FUNDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
|
|
|
|
2020-06-19 14:22:25 +08:00
|
|
|
$(PLUGIN_ALL_OBJS): $(PLUGIN_LIB_HEADER)
|
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
|
|
|
|
plugins/list_of_builtin_plugins_gen.h: plugins/Makefile Makefile
|
2020-09-24 11:02:54 +09:30
|
|
|
@$(call VERBOSE,GEN $@,echo "static const char *list_of_builtin_plugins[] = { $(foreach d,$(notdir $(PLUGINS)),\"$d\",) NULL };" > $@)
|
2021-04-22 17:53:28 -05:00
|
|
|
|
|
|
|
include plugins/test/Makefile
|