2018-02-08 11:55:12 +10:30
|
|
|
COMMON_SRC_NOGEN := \
|
2019-05-22 14:20:14 -07:00
|
|
|
common/addr.c \
|
2019-02-20 22:01:48 +10:30
|
|
|
common/amount.c \
|
2021-09-21 16:53:07 +09:30
|
|
|
common/autodata.c \
|
2018-05-10 08:48:19 +09:30
|
|
|
common/base32.c \
|
2019-11-15 09:44:22 +01:00
|
|
|
common/base64.c \
|
2017-11-22 10:55:01 +10:30
|
|
|
common/bech32.c \
|
2018-04-23 16:20:55 +02:00
|
|
|
common/bech32_util.c \
|
2019-07-30 14:55:03 +09:30
|
|
|
common/bigsize.c \
|
2020-11-24 16:06:54 -06:00
|
|
|
common/billboard.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/bip32.c \
|
2021-01-13 19:28:38 +10:30
|
|
|
common/blindedpath.c \
|
2022-01-08 23:53:29 +10:30
|
|
|
common/blinding.c \
|
2021-07-23 16:14:14 +09:30
|
|
|
common/blockheight_states.c \
|
2017-11-22 10:55:39 +10:30
|
|
|
common/bolt11.c \
|
2021-01-08 05:17:47 +10:30
|
|
|
common/bolt11_json.c \
|
2020-12-09 14:26:16 +10:30
|
|
|
common/bolt12.c \
|
2021-01-13 13:30:24 +10:30
|
|
|
common/bolt12_merkle.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/channel_config.c \
|
2020-05-15 19:59:53 +09:30
|
|
|
common/channel_id.c \
|
2021-09-09 12:20:52 +09:30
|
|
|
common/channel_type.c \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/close_tx.c \
|
2022-01-08 23:53:29 +10:30
|
|
|
common/coin_mvt.c \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/configdir.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/cryptomsg.c \
|
2018-03-29 12:36:45 +10:30
|
|
|
common/daemon.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/daemon_conn.c \
|
2019-09-27 09:32:34 +09:30
|
|
|
common/decode_array.c \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/derive_basepoints.c \
|
2020-10-30 12:27:22 +01:00
|
|
|
common/descriptor_checksum.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/dev_disconnect.c \
|
2020-08-26 10:10:47 +09:30
|
|
|
common/dijkstra.c \
|
2020-04-03 13:51:22 +10:30
|
|
|
common/ecdh_hsmd.c \
|
2018-01-12 13:35:52 +00:00
|
|
|
common/features.c \
|
2019-12-13 00:34:53 +10:30
|
|
|
common/fee_states.c \
|
2021-02-01 13:29:18 +10:30
|
|
|
common/fp16.c \
|
2019-09-06 14:14:05 +09:30
|
|
|
common/gossip_rcvd_filter.c \
|
2019-05-04 15:23:13 +09:30
|
|
|
common/gossip_store.c \
|
2022-01-08 23:53:29 +10:30
|
|
|
common/gossmap.c \
|
2017-10-26 13:30:19 +10:30
|
|
|
common/hash_u5.c \
|
2020-03-20 11:23:21 +10:30
|
|
|
common/hmac.c \
|
2021-01-03 12:32:43 +01:00
|
|
|
common/hsm_encryption.c \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/htlc_state.c \
|
2019-05-31 17:00:32 +09:30
|
|
|
common/htlc_trim.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/htlc_tx.c \
|
|
|
|
common/htlc_wire.c \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/initial_channel.c \
|
|
|
|
common/initial_commit_tx.c \
|
2021-03-03 12:01:02 +10:30
|
|
|
common/iso4217.c \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/json.c \
|
2019-01-15 14:24:27 +10:30
|
|
|
common/json_helpers.c \
|
2020-01-20 10:23:55 +01:00
|
|
|
common/json_stream.c \
|
2018-12-08 11:09:28 +10:30
|
|
|
common/json_tok.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/key_derive.c \
|
|
|
|
common/keyset.c \
|
2021-06-10 15:30:19 -05:00
|
|
|
common/lease_rates.c \
|
2017-12-15 20:47:54 +10:30
|
|
|
common/memleak.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
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 16:04:06 +09:30
|
|
|
common/node_id.c \
|
2019-12-05 20:36:28 +10:30
|
|
|
common/onion.c \
|
2020-01-22 16:58:25 +10:30
|
|
|
common/onionreply.c \
|
2018-12-08 11:09:28 +10:30
|
|
|
common/param.c \
|
2018-02-23 16:23:47 +10:30
|
|
|
common/peer_billboard.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/peer_failed.c \
|
2022-01-08 23:53:29 +10:30
|
|
|
common/peer_io.c \
|
|
|
|
common/penalty_base.c \
|
|
|
|
common/per_peer_state.c \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/permute_tx.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/ping.c \
|
2022-01-08 23:53:29 +10:30
|
|
|
common/private_channel_announcement.c \
|
2021-03-11 18:19:40 -06:00
|
|
|
common/psbt_internal.c \
|
2020-10-08 16:40:25 -05:00
|
|
|
common/psbt_open.c \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/pseudorand.c \
|
2020-08-11 14:35:56 +09:30
|
|
|
common/random_select.c \
|
2018-01-31 13:23:35 +10:30
|
|
|
common/read_peer_msg.c \
|
2020-08-26 10:10:48 +09:30
|
|
|
common/route.c \
|
2020-05-15 17:13:22 -05:00
|
|
|
common/setup.c \
|
2021-02-19 14:52:01 +10:30
|
|
|
common/shutdown_scriptpubkey.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/sphinx.c \
|
|
|
|
common/status.c \
|
2020-10-25 21:34:54 +09:00
|
|
|
common/status_levels.c \
|
2018-02-08 11:55:12 +10:30
|
|
|
common/status_wire.c \
|
2018-01-08 20:31:09 +10:30
|
|
|
common/subdaemon.c \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/timeout.c \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/type_to_string.c \
|
|
|
|
common/utils.c \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/utxo.c \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/version.c \
|
2019-06-07 11:38:20 +02:00
|
|
|
common/wallet.c \
|
2017-10-23 14:47:38 +10:30
|
|
|
common/wireaddr.c \
|
2020-08-28 13:26:32 +09:30
|
|
|
common/wire_error.c
|
2017-08-29 01:32:01 +09:30
|
|
|
|
2020-09-09 19:40:29 +09:30
|
|
|
|
2020-08-25 11:49:38 +09:30
|
|
|
COMMON_SRC_GEN := common/status_wiregen.c common/peer_status_wiregen.c
|
2018-02-08 11:55:12 +10:30
|
|
|
|
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 23:54:29 +10:30
|
|
|
common/crypto_state.h \
|
2020-04-03 13:51:22 +10:30
|
|
|
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 \
|
2020-09-16 17:59:18 -05:00
|
|
|
common/tx_roles.h
|
2020-10-12 16:03:36 +10:30
|
|
|
|
2020-10-22 10:21:08 +10:30
|
|
|
COMMON_HEADERS_GEN := common/htlc_state_names_gen.h common/status_wiregen.h common/peer_status_wiregen.h
|
2017-08-29 01:34:01 +09:30
|
|
|
|
|
|
|
COMMON_HEADERS := $(COMMON_HEADERS_GEN) $(COMMON_HEADERS_NOGEN)
|
2018-02-08 11:55:12 +10:30
|
|
|
COMMON_SRC := $(COMMON_SRC_NOGEN) $(COMMON_SRC_GEN)
|
|
|
|
|
2017-08-29 01:32:01 +09:30
|
|
|
COMMON_OBJS := $(COMMON_SRC:.c=.o)
|
|
|
|
|
2021-07-23 16:14:14 +09:30
|
|
|
# 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-29 01:43:01 +09:30
|
|
|
# Common objects depends on bitcoin/ external/ and ccan
|
|
|
|
$(COMMON_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(EXTERNAL_HEADERS) $(COMMON_HEADERS_GEN)
|
|
|
|
|
2020-08-05 22:26:16 +08:00
|
|
|
# Only common/version.c can include this header.
|
2020-10-22 10:21:08 +10:30
|
|
|
common/version.o: version_gen.h
|
2020-08-05 22:26:16 +08:00
|
|
|
|
2020-08-31 10:43:25 +09:30
|
|
|
ALL_C_HEADERS += $(COMMON_HEADERS)
|
2020-09-02 06:52:38 +09:30
|
|
|
ALL_C_SOURCES += $(COMMON_SRC)
|
2017-08-29 13:42:04 +09:30
|
|
|
|
2020-10-22 10:21:08 +10:30
|
|
|
common/htlc_state_names_gen.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-enumstr
|
2017-08-29 01:34:01 +09:30
|
|
|
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@
|
|
|
|
|
2020-08-11 15:54:23 +09:30
|
|
|
common/gossip_store.o: gossipd/gossip_store_wiregen.h
|
|
|
|
|
2018-02-08 11:55:12 +10:30
|
|
|
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-29 01:32:01 +09:30
|
|
|
|
2017-11-23 13:33:07 +10:30
|
|
|
clean: common-clean
|
|
|
|
|
|
|
|
common-clean:
|
|
|
|
$(RM) common/gen*
|
|
|
|
|
2017-08-29 01:43:01 +09:30
|
|
|
include common/test/Makefile
|