Skip to content

Commit

Permalink
Add c-kzg-4844 lib
Browse files Browse the repository at this point in the history
  • Loading branch information
timemarkovqtum committed Sep 20, 2024
1 parent e72afad commit 1cd6898
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 8 deletions.
33 changes: 31 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
print-%: FORCE
@echo '$*'='$($*)'

DIST_SUBDIRS = secp256k1
DIST_SUBDIRS = secp256k1 evmone/c-kzg-4844

AM_LDFLAGS = $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS) $(CORE_LDFLAGS)
AM_CXXFLAGS = $(CORE_CXXFLAGS) $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS) -DETH_FATDB=1
Expand All @@ -30,6 +30,8 @@ BITCOIN_INCLUDES += -I$(srcdir)/libff/libff
BITCOIN_INCLUDES += -I$(srcdir)/libff
BITCOIN_INCLUDES += -I$(srcdir)/evmone/evmc/include
BITCOIN_INCLUDES += -I$(srcdir)/evmone/include
BITCOIN_INCLUDES += -I$(srcdir)/evmone/c-kzg-4844/blst/bindings
BITCOIN_INCLUDES += -I$(srcdir)/evmone/c-kzg-4844/src
BITCOIN_INCLUDES += -I$(srcdir)/eth_client
BITCOIN_INCLUDES += -I$(srcdir)/eth_client/utils
BITCOIN_INCLUDES += -I$(srcdir)/eth_client/utils/ethash/include
Expand All @@ -45,6 +47,7 @@ LIBBITCOINQT=qt/libbitcoinqt.a
LIBSECP256K1=secp256k1/libsecp256k1.la
LIBCRYPTOPP=cryptopp/libcryptopp.a
LIBFF=libff/libff.a
LIBBLST=evmone/c-kzg-4844/lib/libblst.a

if ENABLE_ZMQ
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
Expand Down Expand Up @@ -82,6 +85,9 @@ noinst_LTLIBRARIES += $(LIBBITCOIN_CRYPTO)
$(LIBSECP256K1): $(wildcard secp256k1/src/*.h) $(wildcard secp256k1/src/*.c) $(wildcard secp256k1/include/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)

$(LIBBLST):
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C evmone/c-kzg-4844/src

# Make is not made aware of per-object dependencies to avoid limiting building parallelization
# But to build the less dependent modules first, we manually select their order here:
EXTRA_LIBRARIES += \
Expand Down Expand Up @@ -798,6 +804,26 @@ libbitcoin_common_a_SOURCES = \
evmone/lib/evmone/tracing.hpp \
evmone/lib/evmone/vm.cpp \
evmone/lib/evmone/vm.hpp \
evmone/c-kzg-4844/blst/bindings/blst_aux.h \
evmone/c-kzg-4844/blst/bindings/blst.h \
evmone/c-kzg-4844/src/eip4844/blob.c \
evmone/c-kzg-4844/src/eip4844/blob.h \
evmone/c-kzg-4844/src/eip4844/eip4844.c \
evmone/c-kzg-4844/src/eip4844/eip4844.h \
evmone/c-kzg-4844/src/common/alloc.c \
evmone/c-kzg-4844/src/common/alloc.h \
evmone/c-kzg-4844/src/common/bytes.c \
evmone/c-kzg-4844/src/common/bytes.h \
evmone/c-kzg-4844/src/common/ec.c \
evmone/c-kzg-4844/src/common/ec.h \
evmone/c-kzg-4844/src/common/fr.c \
evmone/c-kzg-4844/src/common/fr.h \
evmone/c-kzg-4844/src/common/lincomb.c \
evmone/c-kzg-4844/src/common/lincomb.h \
evmone/c-kzg-4844/src/common/ret.h \
evmone/c-kzg-4844/src/common/utils.c \
evmone/c-kzg-4844/src/common/utils.h \
evmone/c-kzg-4844/src/setup/settings.h \
eth_client/libdevcore/Address.cpp \
eth_client/libdevcore/Address.h \
eth_client/libdevcore/Assertions.h \
Expand Down Expand Up @@ -1032,7 +1058,8 @@ qtum_bin_ldadd = \
$(LIBMEMENV) \
$(LIBCRYPTOPP) \
$(LIBFF) \
$(LIBSECP256K1)
$(LIBSECP256K1) \
$(LIBBLST)

qtum_bin_ldadd += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS) $(SQLITE_LIBS) $(GMP_LIBS) $(GMPXX_LIBS)

Expand Down Expand Up @@ -1320,6 +1347,8 @@ clean-local:
-rm -f cryptopp/*.o libff/*.o
-rm -f config.h
-rm -rf test/__pycache__
-$(MAKE) -C evmone/c-kzg-4844/src clean
-rm -f evmone/c-kzg-4844/lib/*.a evmone/c-kzg-4844/blst/*.a

.rc.o:
@test -f $(WINDRES) || (echo "windres $(WINDRES) not found, but is required to compile windows resource files"; exit 1)
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile.bench.include
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ bench_bench_qtum_LDADD = \
$(CRYPTO_LIBS) \
$(LIBFF) \
$(GMP_LIBS) \
$(GMPXX_LIBS)
$(GMPXX_LIBS) \
$(LIBBLST)

if ENABLE_ZMQ
bench_bench_qtum_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ qtum_qt_ldadd += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
endif
qtum_qt_ldadd += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
$(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(LIBSECP256K1) $(LIBCRYPTOPP) \
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS) $(LIBFF) $(GMP_LIBS) $(GMPXX_LIBS)
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS) $(LIBFF) $(LIBBLST) $(GMP_LIBS) $(GMPXX_LIBS)
qtum_qt_ldflags = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
qtum_qt_libtoolflags = $(AM_LIBTOOLFLAGS) --tag CXX

Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.qttest.include
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ endif
qt_test_test_qtum_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \
$(LIBMEMENV) $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) \
$(QR_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(LIBSECP256K1) $(LIBCRYPTOPP)\
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS) $(LIBFF) $(GMP_LIBS) $(GMPXX_LIBS)
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS) $(LIBFF) $(LIBBLST) $(GMP_LIBS) $(GMPXX_LIBS)
qt_test_test_qtum_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
qt_test_test_qtum_qt_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)

Expand Down
4 changes: 2 additions & 2 deletions src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ test_test_qtum_LDADD += $(LIBBITCOIN_NODE) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON
$(LIBLEVELDB) $(LIBMEMENV) $(BOOST_LIBS) $(LIBSECP256K1) $(EVENT_LIBS) $(EVENT_PTHREADS_LIBS) $(MINISKETCH_LIBS) $(LIBCRYPTOPP) $(LIBSECP256K1)
test_test_qtum_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)

test_test_qtum_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(SQLITE_LIBS) $(LIBFF) $(GMP_LIBS) $(GMPXX_LIBS)
test_test_qtum_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(SQLITE_LIBS) $(LIBFF) $(LIBBLST) $(GMP_LIBS) $(GMPXX_LIBS)
test_test_qtum_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) -static

if ENABLE_ZMQ
Expand All @@ -304,7 +304,7 @@ endif
if ENABLE_FUZZ_BINARY
test_fuzz_fuzz_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
test_fuzz_fuzz_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
test_fuzz_fuzz_LDADD = $(FUZZ_SUITE_LD_COMMON) $(LIBCRYPTOPP) $(LIBFF) $(GMP_LIBS) $(GMPXX_LIBS)
test_fuzz_fuzz_LDADD = $(FUZZ_SUITE_LD_COMMON) $(LIBCRYPTOPP) $(LIBFF) $(LIBBLST) $(GMP_LIBS) $(GMPXX_LIBS)
test_fuzz_fuzz_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
test_fuzz_fuzz_SOURCES = \
$(FUZZ_WALLET_SRC) \
Expand Down
2 changes: 1 addition & 1 deletion src/evmone
Submodule evmone updated 2 files
+3 −0 .gitmodules
+1 −0 c-kzg-4844

0 comments on commit 1cd6898

Please sign in to comment.