|
|
|
COMMON_SRC_NOGEN := \
|
|
|
|
common/addr.c \
|
|
|
|
common/amount.c \
|
|
|
|
common/base32.c \
|
|
|
|
common/base64.c \
|
|
|
|
common/bech32.c \
|
|
|
|
common/bech32_util.c \
|
|
|
|
common/bigsize.c \
|
|
|
|
common/billboard.c \
|
|
|
|
common/bip32.c \
|
|
|
|
common/blinding.c \
|
|
|
|
common/bolt11.c \
|
|
|
|
common/bolt11_json.c \
|
|
|
|
common/bolt12.c \
|
|
|
|
common/bolt12_merkle.c \
|
|
|
|
common/channel_config.c \
|
|
|
|
common/channel_id.c \
|
|
|
|
common/coin_mvt.c \
|
|
|
|
common/close_tx.c \
|
|
|
|
common/configdir.c \
|
|
|
|
common/crypto_state.c \
|
|
|
|
common/crypto_sync.c \
|
|
|
|
common/cryptomsg.c \
|
|
|
|
common/daemon.c \
|
|
|
|
common/daemon_conn.c \
|
|
|
|
common/decode_array.c \
|
|
|
|
common/derive_basepoints.c \
|
|
|
|
common/descriptor_checksum.c \
|
|
|
|
common/dev_disconnect.c \
|
|
|
|
common/dijkstra.c \
|
|
|
|
common/ecdh_hsmd.c \
|
|
|
|
common/features.c \
|
|
|
|
common/fee_states.c \
|
|
|
|
common/gossip_rcvd_filter.c \
|
|
|
|
common/gossip_store.c \
|
|
|
|
common/hash_u5.c \
|
|
|
|
common/hmac.c \
|
|
|
|
common/hsm_encryption.c \
|
|
|
|
common/htlc_state.c \
|
|
|
|
common/htlc_trim.c \
|
|
|
|
common/htlc_tx.c \
|
|
|
|
common/htlc_wire.c \
|
|
|
|
common/initial_channel.c \
|
|
|
|
common/initial_commit_tx.c \
|
|
|
|
common/io_lock.c \
|
|
|
|
common/json.c \
|
|
|
|
common/json_helpers.c \
|
|
|
|
common/json_stream.c \
|
|
|
|
common/json_tok.c \
|
|
|
|
common/key_derive.c \
|
|
|
|
common/keyset.c \
|
|
|
|
common/gossmap.c \
|
|
|
|
common/memleak.c \
|
|
|
|
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>
6 years ago
|
|
|
common/node_id.c \
|
|
|
|
common/onion.c \
|
|
|
|
common/onionreply.c \
|
|
|
|
common/param.c \
|
|
|
|
common/penalty_base.c \
|
|
|
|
common/per_peer_state.c \
|
|
|
|
common/peer_billboard.c \
|
|
|
|
common/peer_failed.c \
|
|
|
|
common/permute_tx.c \
|
|
|
|
common/ping.c \
|
|
|
|
common/psbt_open.c \
|
|
|
|
common/private_channel_announcement.c \
|
|
|
|
common/pseudorand.c \
|
|
|
|
common/random_select.c \
|
|
|
|
common/read_peer_msg.c \
|
|
|
|
common/route.c \
|
|
|
|
common/setup.c \
|
|
|
|
common/socket_close.c \
|
|
|
|
common/sphinx.c \
|
|
|
|
common/status.c \
|
|
|
|
common/status_levels.c \
|
|
|
|
common/status_wire.c \
|
|
|
|
common/subdaemon.c \
|
|
|
|
common/timeout.c \
|
|
|
|
common/type_to_string.c \
|
|
|
|
common/utils.c \
|
|
|
|
common/utxo.c \
|
|
|
|
common/version.c \
|
|
|
|
common/wallet.c \
|
|
|
|
common/wireaddr.c \
|
|
|
|
common/wire_error.c
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(EXPERIMENTAL_FEATURES),1)
|
|
|
|
COMMON_SRC_NOGEN += common/psbt_internal.c
|
|
|
|
COMMON_SRC_NOGEN += common/blindedpath.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
COMMON_SRC_GEN := common/status_wiregen.c common/peer_status_wiregen.c
|
|
|
|
|
|
|
|
COMMON_HEADERS_NOGEN := $(COMMON_SRC_NOGEN:.c=.h) \
|
|
|
|
common/closing_fee.h \
|
|
|
|
common/ecdh.h \
|
|
|
|
common/errcode.h \
|
|
|
|
common/gossip_constants.h \
|
|
|
|
common/htlc.h \
|
|
|
|
common/iso4217.h \
|
|
|
|
common/json_command.h \
|
|
|
|
common/jsonrpc_errors.h \
|
|
|
|
common/overflows.h \
|
|
|
|
common/tx_roles.h
|
|
|
|
|
|
|
|
COMMON_HEADERS_GEN := common/htlc_state_names_gen.h common/status_wiregen.h common/peer_status_wiregen.h
|
|
|
|
|
|
|
|
COMMON_HEADERS := $(COMMON_HEADERS_GEN) $(COMMON_HEADERS_NOGEN)
|
|
|
|
COMMON_SRC := $(COMMON_SRC_NOGEN) $(COMMON_SRC_GEN)
|
|
|
|
|
|
|
|
COMMON_OBJS := $(COMMON_SRC:.c=.o)
|
|
|
|
|
|
|
|
# Common objects depends on bitcoin/ external/ and ccan
|
|
|
|
$(COMMON_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(EXTERNAL_HEADERS) $(COMMON_HEADERS_GEN)
|
|
|
|
|
|
|
|
# Only common/version.c can include this header.
|
|
|
|
common/version.o: version_gen.h
|
|
|
|
|
|
|
|
ALL_C_HEADERS += $(COMMON_HEADERS)
|
|
|
|
ALL_C_SOURCES += $(COMMON_SRC)
|
|
|
|
|
|
|
|
common/htlc_state_names_gen.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-enumstr
|
|
|
|
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@
|
|
|
|
|
|
|
|
common/gossip_store.o: gossipd/gossip_store_wiregen.h
|
|
|
|
|
|
|
|
check-source-bolt: $(COMMON_SRC_NOGEN:%=bolt-check/%) $(COMMON_HEADERS:%=bolt-check/%)
|
|
|
|
check-whitespace: $(COMMON_SRC_NOGEN:%=check-whitespace/%) $(COMMON_HEADERS:%=check-whitespace/%)
|
|
|
|
|
|
|
|
clean: common-clean
|
|
|
|
|
|
|
|
common-clean:
|
|
|
|
$(RM) common/gen*
|
|
|
|
|
|
|
|
include common/test/Makefile
|