2018-02-08 02:25:12 +01:00
|
|
|
COMMON_SRC_NOGEN := \
|
2019-05-22 23:20:14 +02:00
|
|
|
common/addr.c \
|
2019-02-20 12:31:48 +01:00
|
|
|
common/amount.c \
|
2018-05-10 01:18:19 +02:00
|
|
|
common/base32.c \
|
2019-11-15 09:44:22 +01:00
|
|
|
common/base64.c \
|
2017-11-22 01:25:01 +01:00
|
|
|
common/bech32.c \
|
2018-04-23 16:20:55 +02:00
|
|
|
common/bech32_util.c \
|
2019-07-30 07:25:03 +02:00
|
|
|
common/bigsize.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/bip32.c \
|
2020-04-03 05:16:56 +02:00
|
|
|
common/blinding.c \
|
2017-11-22 01:25:39 +01:00
|
|
|
common/bolt11.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/channel_config.c \
|
2020-05-15 12:29:53 +02:00
|
|
|
common/channel_id.c \
|
2020-03-19 00:32:33 +01:00
|
|
|
common/coin_mvt.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/close_tx.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/configdir.c \
|
2017-10-11 11:56:50 +02:00
|
|
|
common/crypto_state.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/crypto_sync.c \
|
|
|
|
common/cryptomsg.c \
|
2018-03-29 04:06:45 +02:00
|
|
|
common/daemon.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/daemon_conn.c \
|
2019-09-27 02:02:34 +02:00
|
|
|
common/decode_array.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/derive_basepoints.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/dev_disconnect.c \
|
2020-08-26 02:40:47 +02:00
|
|
|
common/dijkstra.c \
|
2020-04-03 05:21:22 +02:00
|
|
|
common/ecdh_hsmd.c \
|
2018-01-12 14:35:52 +01:00
|
|
|
common/features.c \
|
2019-12-12 15:04:53 +01:00
|
|
|
common/fee_states.c \
|
2019-09-06 06:44:05 +02:00
|
|
|
common/gossip_rcvd_filter.c \
|
2019-05-04 07:53:13 +02:00
|
|
|
common/gossip_store.c \
|
2017-10-26 05:00:19 +02:00
|
|
|
common/hash_u5.c \
|
2020-03-20 01:53:21 +01:00
|
|
|
common/hmac.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/htlc_state.c \
|
2019-05-31 09:30:32 +02:00
|
|
|
common/htlc_trim.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/htlc_tx.c \
|
|
|
|
common/htlc_wire.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/initial_channel.c \
|
|
|
|
common/initial_commit_tx.c \
|
2018-09-26 20:33:28 +02:00
|
|
|
common/io_lock.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/json.c \
|
2019-01-15 04:54:27 +01:00
|
|
|
common/json_helpers.c \
|
2020-01-20 10:23:55 +01:00
|
|
|
common/json_stream.c \
|
2018-12-08 01:39:28 +01:00
|
|
|
common/json_tok.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/key_derive.c \
|
|
|
|
common/keyset.c \
|
2020-08-11 08:24:23 +02:00
|
|
|
common/gossmap.c \
|
2017-12-15 11:17:54 +01:00
|
|
|
common/memleak.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/msg_queue.c \
|
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.c \
|
2019-12-05 11:06:28 +01:00
|
|
|
common/onion.c \
|
2020-01-22 07:28:25 +01:00
|
|
|
common/onionreply.c \
|
2018-12-08 01:39:28 +01:00
|
|
|
common/param.c \
|
2020-05-07 02:41:35 +02:00
|
|
|
common/penalty_base.c \
|
2019-06-03 20:11:25 +02:00
|
|
|
common/per_peer_state.c \
|
2018-02-23 06:53:47 +01:00
|
|
|
common/peer_billboard.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/peer_failed.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/permute_tx.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/ping.c \
|
2020-07-23 04:15:38 +02:00
|
|
|
common/psbt_open.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/pseudorand.c \
|
2020-08-11 07:05:56 +02:00
|
|
|
common/random_select.c \
|
2018-01-31 03:53:35 +01:00
|
|
|
common/read_peer_msg.c \
|
2020-08-26 02:40:48 +02:00
|
|
|
common/route.c \
|
2020-05-16 00:13:22 +02:00
|
|
|
common/setup.c \
|
2018-05-05 06:57:58 +02:00
|
|
|
common/socket_close.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/sphinx.c \
|
|
|
|
common/status.c \
|
2018-02-08 02:25:12 +01:00
|
|
|
common/status_wire.c \
|
2018-01-08 11:01:09 +01:00
|
|
|
common/subdaemon.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/timeout.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/type_to_string.c \
|
|
|
|
common/utils.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/utxo.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/version.c \
|
2019-06-07 11:38:20 +02:00
|
|
|
common/wallet.c \
|
2017-10-23 06:17:38 +02:00
|
|
|
common/wireaddr.c \
|
2020-08-28 05:56:32 +02:00
|
|
|
common/wire_error.c
|
2017-08-28 18:02:01 +02:00
|
|
|
|
2020-08-25 04:19:38 +02:00
|
|
|
COMMON_SRC_GEN := common/status_wiregen.c common/peer_status_wiregen.c
|
2018-02-08 02:25:12 +01:00
|
|
|
|
2020-01-26 13:52:29 +01:00
|
|
|
COMMON_HEADERS_NOGEN := $(COMMON_SRC_NOGEN:.c=.h) \
|
2020-01-03 14:08:29 +01:00
|
|
|
common/closing_fee.h \
|
2020-04-03 05:21:22 +02:00
|
|
|
common/ecdh.h \
|
2020-01-26 13:52:29 +01:00
|
|
|
common/errcode.h \
|
|
|
|
common/gossip_constants.h \
|
|
|
|
common/htlc.h \
|
|
|
|
common/json_command.h \
|
|
|
|
common/jsonrpc_errors.h \
|
|
|
|
common/overflows.h \
|
|
|
|
common/status_levels.h
|
2020-08-25 04:19:38 +02:00
|
|
|
COMMON_HEADERS_GEN := common/gen_htlc_state_names.h common/status_wiregen.h common/peer_status_wiregen.h
|
2017-08-28 18:04:01 +02:00
|
|
|
|
|
|
|
COMMON_HEADERS := $(COMMON_HEADERS_GEN) $(COMMON_HEADERS_NOGEN)
|
2018-02-08 02:25:12 +01:00
|
|
|
COMMON_SRC := $(COMMON_SRC_NOGEN) $(COMMON_SRC_GEN)
|
|
|
|
|
2017-08-28 18:02:01 +02:00
|
|
|
COMMON_OBJS := $(COMMON_SRC:.c=.o)
|
|
|
|
|
2017-08-28 18:13:01 +02:00
|
|
|
# Common objects depends on bitcoin/ external/ and ccan
|
|
|
|
$(COMMON_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(EXTERNAL_HEADERS) $(COMMON_HEADERS_GEN)
|
|
|
|
|
2020-08-05 16:26:16 +02:00
|
|
|
# Only common/version.c can include this header.
|
|
|
|
common/version.o: gen_version.h
|
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
ALL_C_HEADERS += $(COMMON_HEADERS)
|
2020-09-01 23:22:38 +02:00
|
|
|
ALL_C_SOURCES += $(COMMON_SRC)
|
2017-08-29 06:12:04 +02:00
|
|
|
|
2017-08-28 18:04:01 +02:00
|
|
|
common/gen_htlc_state_names.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-enumstr
|
|
|
|
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@
|
|
|
|
|
2020-08-11 08:24:23 +02:00
|
|
|
common/gossip_store.o: gossipd/gossip_store_wiregen.h
|
|
|
|
|
2017-08-28 18:02:01 +02:00
|
|
|
check-makefile: check-common-makefile
|
|
|
|
|
|
|
|
check-common-makefile:
|
2020-08-25 04:19:38 +02:00
|
|
|
if [ x"`LC_ALL=C ls common/*.h | grep -v ^common/gen_ | grep -v '^common/.*wiregen'`" != x"`echo $(COMMON_HEADERS_NOGEN) | tr ' ' '\n' | LC_ALL=C sort`" ]; then echo COMMON_HEADERS_NOGEN incorrect; exit 1; fi
|
2017-08-28 18:02:01 +02:00
|
|
|
|
2018-02-08 02:25:12 +01:00
|
|
|
check-source-bolt: $(COMMON_SRC_NOGEN:%=bolt-check/%) $(COMMON_HEADERS:%=bolt-check/%)
|
|
|
|
check-whitespace: $(COMMON_SRC_NOGEN:%=check-whitespace/%) $(COMMON_HEADERS:%=check-whitespace/%)
|
2017-08-28 18:02:01 +02:00
|
|
|
|
2018-02-08 02:25:12 +01:00
|
|
|
check-source: $(COMMON_SRC_NOGEN:%=check-src-include-order/%) \
|
2017-08-28 18:04:01 +02:00
|
|
|
$(COMMON_HEADERS_NOGEN:%=check-hdr-include-order/%)
|
2017-08-28 18:13:01 +02:00
|
|
|
|
2017-11-23 04:03:07 +01:00
|
|
|
clean: common-clean
|
|
|
|
|
|
|
|
common-clean:
|
|
|
|
$(RM) common/gen*
|
|
|
|
|
2017-08-28 18:13:01 +02:00
|
|
|
include common/test/Makefile
|