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 \
|
2021-09-21 09:23:07 +02:00
|
|
|
common/autodata.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 \
|
2020-11-24 23:06:54 +01:00
|
|
|
common/billboard.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/bip32.c \
|
2021-01-13 09:58:38 +01:00
|
|
|
common/blindedpath.c \
|
2022-10-17 02:44:39 +02:00
|
|
|
common/blindedpay.c \
|
2022-01-08 14:23:29 +01:00
|
|
|
common/blinding.c \
|
2021-07-23 08:44:14 +02:00
|
|
|
common/blockheight_states.c \
|
2017-11-22 01:25:39 +01:00
|
|
|
common/bolt11.c \
|
2021-01-07 19:47:47 +01:00
|
|
|
common/bolt11_json.c \
|
2020-12-09 04:56:16 +01:00
|
|
|
common/bolt12.c \
|
2021-01-13 04:00:24 +01:00
|
|
|
common/bolt12_merkle.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 \
|
2021-09-09 04:50:52 +02:00
|
|
|
common/channel_type.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/close_tx.c \
|
2023-07-31 01:33:33 +02:00
|
|
|
common/codex32.c \
|
2022-01-08 14:23:29 +01:00
|
|
|
common/coin_mvt.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/configdir.c \
|
2023-06-01 08:42:32 +02:00
|
|
|
common/configvar.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
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 \
|
2020-10-30 12:27:22 +01:00
|
|
|
common/descriptor_checksum.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 \
|
2021-02-01 03:59:18 +01:00
|
|
|
common/fp16.c \
|
2019-05-04 07:53:13 +02:00
|
|
|
common/gossip_store.c \
|
2022-01-08 14:23:29 +01:00
|
|
|
common/gossmap.c \
|
2017-10-26 05:00:19 +02:00
|
|
|
common/hash_u5.c \
|
2020-03-20 01:53:21 +01:00
|
|
|
common/hmac.c \
|
2021-01-03 12:32:43 +01:00
|
|
|
common/hsm_encryption.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 \
|
2022-05-24 22:40:08 +02:00
|
|
|
common/interactivetx.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/initial_channel.c \
|
|
|
|
common/initial_commit_tx.c \
|
2022-11-09 03:27:04 +01:00
|
|
|
common/invoice_path_id.c \
|
2021-03-03 02:31:02 +01:00
|
|
|
common/iso4217.c \
|
2022-11-02 00:32:22 +01:00
|
|
|
common/json_filter.c \
|
2022-07-04 05:49:38 +02:00
|
|
|
common/json_param.c \
|
|
|
|
common/json_parse.c \
|
|
|
|
common/json_parse_simple.c \
|
2020-01-20 10:23:55 +01:00
|
|
|
common/json_stream.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/key_derive.c \
|
|
|
|
common/keyset.c \
|
2021-06-10 22:30:19 +02:00
|
|
|
common/lease_rates.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 \
|
2022-11-09 02:30:10 +01:00
|
|
|
common/onion_decode.c \
|
|
|
|
common/onion_encode.c \
|
2020-01-22 07:28:25 +01:00
|
|
|
common/onionreply.c \
|
2022-10-17 02:44:39 +02:00
|
|
|
common/onion_message_parse.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 \
|
2022-01-08 14:23:29 +01:00
|
|
|
common/peer_io.c \
|
|
|
|
common/penalty_base.c \
|
|
|
|
common/per_peer_state.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/permute_tx.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/ping.c \
|
2022-01-08 14:23:29 +01:00
|
|
|
common/private_channel_announcement.c \
|
2021-03-12 01:19:40 +01:00
|
|
|
common/psbt_internal.c \
|
2021-12-23 20:57:33 +01:00
|
|
|
common/psbt_keypath.c \
|
2020-10-08 23:40:25 +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 \
|
2021-02-19 05:22:01 +01:00
|
|
|
common/shutdown_scriptpubkey.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/sphinx.c \
|
|
|
|
common/status.c \
|
2020-10-25 13:34:54 +01:00
|
|
|
common/status_levels.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 \
|
2023-07-27 07:13:53 +02:00
|
|
|
common/trace.c \
|
2023-01-10 21:57:17 +01:00
|
|
|
common/tx_roles.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-09-09 12:10:29 +02:00
|
|
|
|
2022-06-24 02:34:32 +02:00
|
|
|
COMMON_SRC_GEN := common/status_wiregen.c common/peer_status_wiregen.c common/scb_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 \
|
2022-01-08 14:24:29 +01:00
|
|
|
common/crypto_state.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 \
|
2022-10-17 02:34:08 +02:00
|
|
|
common/hsm_version.h \
|
2020-01-26 13:52:29 +01:00
|
|
|
common/htlc.h \
|
|
|
|
common/json_command.h \
|
|
|
|
common/jsonrpc_errors.h \
|
2023-01-10 21:57:17 +01:00
|
|
|
common/overflows.h
|
2020-10-12 07:33:36 +02:00
|
|
|
|
2022-06-24 02:34:32 +02:00
|
|
|
COMMON_HEADERS_GEN := common/htlc_state_names_gen.h common/status_wiregen.h common/peer_status_wiregen.h common/scb_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)
|
|
|
|
|
2022-06-24 02:34:32 +02:00
|
|
|
common/scb_wiregen.h_args := -s
|
|
|
|
common/scb_wiregen.c_args := -s
|
|
|
|
|
2021-07-23 08:44:14 +02:00
|
|
|
# Check that all h and c files are in the Makefile!
|
|
|
|
check-common-files:
|
|
|
|
@$(call VERBOSE, "MISSING-SRC common", [ "$(filter-out $(COMMON_SRC), $(wildcard common/*.c))" = "" ])
|
|
|
|
@$(call VERBOSE, "MISSING-HEADERS common", [ "$(filter-out $(COMMON_HEADERS) $(COMMON_SRC:.c=.h), $(wildcard common/*.h))" = "" ])
|
|
|
|
|
|
|
|
check-source: check-common-files
|
|
|
|
|
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.
|
2020-10-22 01:51:08 +02:00
|
|
|
common/version.o: version_gen.h
|
2020-08-05 16:26:16 +02:00
|
|
|
|
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
|
|
|
|
2020-10-22 01:51:08 +02:00
|
|
|
common/htlc_state_names_gen.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-enumstr
|
2017-08-28 18:04:01 +02:00
|
|
|
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
|
|
|
|
|
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
|
|
|
|
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
|