2019-01-15 05:14:27 +01:00
|
|
|
PLUGIN_PAY_SRC := plugins/pay.c
|
|
|
|
PLUGIN_PAY_OBJS := $(PLUGIN_PAY_SRC:.c=.o)
|
|
|
|
|
2019-05-21 09:32:39 +02:00
|
|
|
PLUGIN_AUTOCLEAN_SRC := plugins/autoclean.c
|
|
|
|
PLUGIN_AUTOCLEAN_OBJS := $(PLUGIN_AUTOCLEAN_SRC:.c=.o)
|
|
|
|
|
2020-08-28 04:31:57 +02:00
|
|
|
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 16:01:20 +02:00
|
|
|
PLUGIN_LIB_SRC := plugins/libplugin.c
|
|
|
|
PLUGIN_LIB_HEADER := plugins/libplugin.h
|
2019-01-15 05:13:27 +01:00
|
|
|
PLUGIN_LIB_OBJS := $(PLUGIN_LIB_SRC:.c=.o)
|
|
|
|
|
2020-08-05 16:01:20 +02: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)
|
|
|
|
|
2020-09-09 12:25:20 +02:00
|
|
|
PLUGIN_SPENDER_SRC := \
|
2020-08-21 11:58:20 +02:00
|
|
|
plugins/spender/fundchannel.c \
|
2020-09-09 12:26:14 +02:00
|
|
|
plugins/spender/main.c \
|
2020-08-21 11:31:33 +02:00
|
|
|
plugins/spender/multifundchannel.c \
|
2020-10-21 03:18:19 +02:00
|
|
|
plugins/spender/multiwithdraw.c \
|
|
|
|
plugins/spender/openchannel.c
|
2020-09-09 12:26:14 +02:00
|
|
|
PLUGIN_SPENDER_HEADER := \
|
2020-08-21 11:31:33 +02:00
|
|
|
plugins/spender/multifundchannel.h \
|
2020-08-21 11:58:20 +02:00
|
|
|
plugins/spender/multiwithdraw.h \
|
|
|
|
plugins/spender/fundchannel.h \
|
2020-10-21 03:18:19 +02:00
|
|
|
plugins/spender/multifundchannel.h \
|
|
|
|
plugins/spender/openchannel.h
|
2020-09-09 12:25:20 +02:00
|
|
|
PLUGIN_SPENDER_OBJS := $(PLUGIN_SPENDER_SRC:.c=.o)
|
|
|
|
|
2020-06-19 08:22:25 +02:00
|
|
|
PLUGIN_ALL_SRC := \
|
|
|
|
$(PLUGIN_AUTOCLEAN_SRC) \
|
|
|
|
$(PLUGIN_BCLI_SRC) \
|
|
|
|
$(PLUGIN_KEYSEND_SRC) \
|
2020-08-28 04:31:57 +02:00
|
|
|
$(PLUGIN_TXPREPARE_SRC) \
|
2020-06-19 08:22:25 +02:00
|
|
|
$(PLUGIN_LIB_SRC) \
|
2020-08-05 16:01:20 +02:00
|
|
|
$(PLUGIN_PAY_LIB_SRC) \
|
2020-09-09 12:25:20 +02:00
|
|
|
$(PLUGIN_PAY_SRC) \
|
|
|
|
$(PLUGIN_SPENDER_SRC)
|
2020-06-19 08:22:25 +02:00
|
|
|
PLUGIN_ALL_HEADER := \
|
2020-08-05 16:01:20 +02:00
|
|
|
$(PLUGIN_LIB_HEADER) \
|
2020-09-09 12:25:20 +02:00
|
|
|
$(PLUGIN_PAY_LIB_HEADER) \
|
|
|
|
$(PLUGIN_SPENDER_HEADER)
|
2020-06-19 08:22:25 +02:00
|
|
|
PLUGIN_ALL_OBJS := $(PLUGIN_ALL_SRC:.c=.o)
|
|
|
|
|
|
|
|
PLUGINS := \
|
|
|
|
plugins/autoclean \
|
|
|
|
plugins/bcli \
|
|
|
|
plugins/keysend \
|
2020-08-28 04:31:57 +02:00
|
|
|
plugins/pay \
|
2020-09-09 12:25:20 +02:00
|
|
|
plugins/txprepare \
|
|
|
|
plugins/spenderp
|
2020-06-19 08:22:25 +02:00
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
# Make sure these depend on everything.
|
|
|
|
ALL_C_SOURCES += $(PLUGIN_ALL_SRC)
|
2020-10-22 02:57:07 +02:00
|
|
|
ALL_C_HEADERS += $(PLUGIN_ALL_HEADER)
|
2020-08-31 03:13:25 +02:00
|
|
|
ALL_PROGRAMS += $(PLUGINS)
|
|
|
|
|
2019-01-15 05:13:27 +01:00
|
|
|
PLUGIN_COMMON_OBJS := \
|
2019-10-29 18:00:18 +01:00
|
|
|
bitcoin/base58.o \
|
2020-07-07 22:50:21 +02:00
|
|
|
bitcoin/feerate.o \
|
2020-05-16 03:29:05 +02:00
|
|
|
bitcoin/privkey.o \
|
2020-05-21 03:57:00 +02:00
|
|
|
bitcoin/psbt.o \
|
2019-01-15 05:13:27 +01:00
|
|
|
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 01:45:57 +01:00
|
|
|
common/amount.o \
|
2020-01-26 13:07:50 +01:00
|
|
|
common/base32.o \
|
2019-01-15 05:13:27 +01:00
|
|
|
common/bech32.o \
|
|
|
|
common/bech32_util.o \
|
2019-07-30 07:25:12 +02:00
|
|
|
common/bigsize.o \
|
2019-01-15 05:13:27 +01:00
|
|
|
common/bolt11.o \
|
|
|
|
common/daemon.o \
|
2019-09-05 03:07:16 +02:00
|
|
|
common/features.o \
|
2019-01-15 05:13:27 +01:00
|
|
|
common/hash_u5.o \
|
|
|
|
common/json.o \
|
2019-01-15 05:20:27 +01:00
|
|
|
common/json_helpers.o \
|
2020-01-26 13:07:50 +01:00
|
|
|
common/json_stream.o \
|
2019-01-15 05:13:27 +01:00
|
|
|
common/json_tok.o \
|
|
|
|
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 08:34:06 +02:00
|
|
|
common/node_id.o \
|
2019-01-15 05:13:27 +01:00
|
|
|
common/param.o \
|
2019-01-15 11:04:07 +01:00
|
|
|
common/pseudorand.o \
|
2020-08-11 07:05:56 +02:00
|
|
|
common/random_select.o \
|
2020-05-16 00:13:22 +02:00
|
|
|
common/setup.o \
|
2020-10-12 07:33:50 +02:00
|
|
|
common/status_levels.o \
|
2019-01-15 05:13:27 +01:00
|
|
|
common/type_to_string.o \
|
|
|
|
common/utils.o \
|
|
|
|
common/version.o \
|
2020-01-26 13:07:50 +01:00
|
|
|
common/wireaddr.o \
|
2019-01-15 05:13:27 +01:00
|
|
|
wire/fromwire.o \
|
2020-09-07 23:06:50 +02:00
|
|
|
wire/onion$(EXP)_wiregen.o \
|
2020-05-20 13:58:39 +02:00
|
|
|
wire/tlvstream.o \
|
2019-01-15 05:13:27 +01:00
|
|
|
wire/towire.o
|
|
|
|
|
2020-10-20 06:02:00 +02:00
|
|
|
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/route.o common/dijkstra.o
|
2020-08-05 16:01:20 +02:00
|
|
|
$(PLUGIN_PAY_OBJS): $(PLUGIN_PAY_LIB_HEADER)
|
2019-01-15 05:14:27 +01:00
|
|
|
|
2019-09-06 23:30:46 +02:00
|
|
|
plugins/autoclean: bitcoin/chainparams.o $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
2019-05-21 09:32:39 +02:00
|
|
|
|
2020-08-28 04:31:57 +02:00
|
|
|
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)
|
|
|
|
|
2020-10-20 06:02:00 +02:00
|
|
|
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/route.o common/dijkstra.o
|
2020-08-05 16:01:20 +02:00
|
|
|
$(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER)
|
2020-03-27 14:31:00 +01:00
|
|
|
|
2020-10-21 03:18:19 +02:00
|
|
|
plugins/spenderp: bitcoin/chainparams.o bitcoin/psbt.o common/psbt_open.o $(PLUGIN_SPENDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
2020-09-09 12:25:20 +02:00
|
|
|
|
2020-06-19 08:22:25 +02:00
|
|
|
$(PLUGIN_ALL_OBJS): $(PLUGIN_LIB_HEADER)
|
2020-09-24 03:32:54 +02:00
|
|
|
|
|
|
|
# Generated from PLUGINS definition in plugins/Makefile
|
2020-10-22 01:51:08 +02:00
|
|
|
ALL_C_HEADERS += plugins/list_of_builtin_plugins_gen.h
|
|
|
|
plugins/list_of_builtin_plugins_gen.h: plugins/Makefile Makefile
|
2020-09-24 03:32:54 +02:00
|
|
|
@$(call VERBOSE,GEN $@,echo "static const char *list_of_builtin_plugins[] = { $(foreach d,$(notdir $(PLUGINS)),\"$d\",) NULL };" > $@)
|