Skip to content

Commit d60ac91

Browse files
committed
habemus secp256k1
1 parent e2b85d7 commit d60ac91

File tree

453 files changed

+82370
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

453 files changed

+82370
-4
lines changed

Makefile

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ HEADERS := $(wildcard $(shell find bitcoin -type f -name '*.h')) targets/bech32
33
SOURCES := $(wildcard $(shell find bitcoin -type f -name '*.cpp')) targets/bech32.cpp targets/tx_des.cpp targets/miniscript_string.cpp targets/block_des.cpp targets/prefilledtransaction.cpp
44
OBJS := $(patsubst %.cpp, build/%.o, $(SOURCES))
55
UNAME_S := $(shell uname -s)
6-
CXXFLAGS := -O3 -g0 -Wall -fsanitize=fuzzer -DHAVE_GMTIME_R=1 -std=c++20 -march=native -Ibitcoin
7-
LDFLAGS := -L rust_bitcoin_lib/target/debug -L btcd_lib -lbtcd_wrapper -lrust_bitcoin_lib -lpthread -ldl
6+
INCLUDE_DIR = bitcoin/secp256k1/include
7+
LIB_DIR = bitcoin/secp256k1/.libs
8+
CXXFLAGS := -O3 -g0 -Wall -fsanitize=fuzzer -DHAVE_GMTIME_R=1 -std=c++20 -march=native -Ibitcoin -I$(INCLUDE_DIR)
9+
LDFLAGS := -L rust_bitcoin_lib/target/debug -L btcd_lib -lbtcd_wrapper -lrust_bitcoin_lib -lpthread -ldl -L$(LIB_DIR) -lsecp256k1
810

911
ifeq ($(UNAME_S),Darwin)
1012
LDFLAGS += -framework CoreFoundation -Wl,-ld_classic
1113
endif
1214

13-
bitcoinfuzz: set $(OBJS) cargo go
15+
bitcoinfuzz: set $(OBJS) libsecp256 cargo go
1416
$(CXX) fuzzer.cpp -o $@ $(OBJS) $(CXXFLAGS) $(LDFLAGS)
1517

1618
$(OBJS) : build/%.o: %.cpp
@@ -24,6 +26,9 @@ cargo:
2426
-C llvm-args='-sanitizer-coverage-pc-table' \
2527
-C llvm-args='-sanitizer-coverage-level=3'
2628

29+
libsecp256:
30+
cd bitcoin/secp256k1 && cmake -S . -B . && make
31+
2732
go:
2833
cd dependencies/btcd/wire && go build -tags=libfuzzer -gcflags=all=-d=libfuzzer .
2934
cd btcd_lib && go build -o libbtcd_wrapper.a -buildmode=c-archive -tags=libfuzzer -gcflags=all=-d=libfuzzer wrapper.go

bitcoin/config/bitcoin-config.h

+334
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
/* src/config/bitcoin-config.h. Generated from bitcoin-config.h.in by configure. */
2+
/* src/config/bitcoin-config.h.in. Generated from configure.ac by autoheader. */
3+
4+
#ifndef BITCOIN_CONFIG_H
5+
6+
#define BITCOIN_CONFIG_H
7+
8+
/* Define if building universal (internal helper macro) */
9+
/* #undef AC_APPLE_UNIVERSAL_BUILD */
10+
11+
/* Version Build */
12+
#define CLIENT_VERSION_BUILD 0
13+
14+
/* Version is release */
15+
#define CLIENT_VERSION_IS_RELEASE false
16+
17+
/* Major version */
18+
#define CLIENT_VERSION_MAJOR 27
19+
20+
/* Minor version */
21+
#define CLIENT_VERSION_MINOR 99
22+
23+
/* Copyright holder(s) before %s replacement */
24+
#define COPYRIGHT_HOLDERS "The %s developers"
25+
26+
/* Copyright holder(s) */
27+
#define COPYRIGHT_HOLDERS_FINAL "The Bitcoin Core developers"
28+
29+
/* Replacement for %s in copyright holders string */
30+
#define COPYRIGHT_HOLDERS_SUBSTITUTION "Bitcoin Core"
31+
32+
/* Copyright year */
33+
#define COPYRIGHT_YEAR 2024
34+
35+
/* Define this symbol to build code that uses ARMv8 SHA-NI intrinsics */
36+
#define ENABLE_ARM_SHANI 1
37+
38+
/* Define this symbol to build code that uses AVX2 intrinsics */
39+
/* #undef ENABLE_AVX2 */
40+
41+
/* Define if external signer support is enabled */
42+
#define ENABLE_EXTERNAL_SIGNER 1
43+
44+
/* Define this symbol to build code that uses SSE4.1 intrinsics */
45+
/* #undef ENABLE_SSE41 */
46+
47+
/* Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing
48+
*/
49+
/* #undef ENABLE_TRACING */
50+
51+
/* Define to 1 to enable wallet functions */
52+
#define ENABLE_WALLET 1
53+
54+
/* Define this symbol to build code that uses x86 SHA-NI intrinsics */
55+
/* #undef ENABLE_X86_SHANI */
56+
57+
/* Define this symbol to enable ZMQ functions */
58+
#define ENABLE_ZMQ 1
59+
60+
/* define if the Boost library is available */
61+
#define HAVE_BOOST /**/
62+
63+
/* Define this symbol if clmul instructions can be used */
64+
/* #undef HAVE_CLMUL */
65+
66+
/* define if the compiler supports basic C++20 syntax */
67+
#define HAVE_CXX20 1
68+
69+
/* Define to 1 if you have the declaration of `fork', and to 0 if you don't.
70+
*/
71+
#define HAVE_DECL_FORK 1
72+
73+
/* Define to 1 if you have the declaration of `freeifaddrs', and to 0 if you
74+
don't. */
75+
#define HAVE_DECL_FREEIFADDRS 1
76+
77+
/* Define to 1 if you have the declaration of `getifaddrs', and to 0 if you
78+
don't. */
79+
#define HAVE_DECL_GETIFADDRS 1
80+
81+
/* Define to 1 if you have the declaration of `pipe2', and to 0 if you don't.
82+
*/
83+
#define HAVE_DECL_PIPE2 0
84+
85+
/* Define to 1 if you have the declaration of `setsid', and to 0 if you don't.
86+
*/
87+
#define HAVE_DECL_SETSID 1
88+
89+
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
90+
don't. */
91+
#define HAVE_DECL_STRERROR_R 1
92+
93+
/* Define if the visibility attribute is supported. */
94+
#define HAVE_DEFAULT_VISIBILITY_ATTRIBUTE 1
95+
96+
/* Define to 1 if you have the <dlfcn.h> header file. */
97+
#define HAVE_DLFCN_H 1
98+
99+
/* Define if the dllexport attribute is supported. */
100+
/* #undef HAVE_DLLEXPORT_ATTRIBUTE */
101+
102+
/* Define this symbol if evhttp_connection_get_peer expects const char** */
103+
/* #undef HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR */
104+
105+
/* Define to 1 if fdatasync is available. */
106+
#define HAVE_FDATASYNC 0
107+
108+
/* Define this symbol if the BSD getentropy system call is available with
109+
sys/random.h */
110+
#define HAVE_GETENTROPY_RAND 1
111+
112+
/* Define this symbol if the Linux getrandom function call is available */
113+
/* #undef HAVE_GETRANDOM */
114+
115+
/* Define to 1 if you have the <inttypes.h> header file. */
116+
#define HAVE_INTTYPES_H 1
117+
118+
/* Define to 1 if you have the `advapi32' library (-ladvapi32). */
119+
/* #undef HAVE_LIBADVAPI32 */
120+
121+
/* Define to 1 if you have the `comctl32' library (-lcomctl32). */
122+
/* #undef HAVE_LIBCOMCTL32 */
123+
124+
/* Define to 1 if you have the `comdlg32' library (-lcomdlg32). */
125+
/* #undef HAVE_LIBCOMDLG32 */
126+
127+
/* Define to 1 if you have the `gdi32' library (-lgdi32). */
128+
/* #undef HAVE_LIBGDI32 */
129+
130+
/* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */
131+
/* #undef HAVE_LIBIPHLPAPI */
132+
133+
/* Define to 1 if you have the `kernel32' library (-lkernel32). */
134+
/* #undef HAVE_LIBKERNEL32 */
135+
136+
/* Define to 1 if you have the `ole32' library (-lole32). */
137+
/* #undef HAVE_LIBOLE32 */
138+
139+
/* Define to 1 if you have the `oleaut32' library (-loleaut32). */
140+
/* #undef HAVE_LIBOLEAUT32 */
141+
142+
/* Define to 1 if you have the `shell32' library (-lshell32). */
143+
/* #undef HAVE_LIBSHELL32 */
144+
145+
/* Define to 1 if you have the `shlwapi' library (-lshlwapi). */
146+
/* #undef HAVE_LIBSHLWAPI */
147+
148+
/* Define to 1 if you have the `user32' library (-luser32). */
149+
/* #undef HAVE_LIBUSER32 */
150+
151+
/* Define to 1 if you have the `uuid' library (-luuid). */
152+
/* #undef HAVE_LIBUUID */
153+
154+
/* Define to 1 if you have the `winmm' library (-lwinmm). */
155+
/* #undef HAVE_LIBWINMM */
156+
157+
/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
158+
/* #undef HAVE_LIBWS2_32 */
159+
160+
/* Define this symbol if you have malloc_info */
161+
/* #undef HAVE_MALLOC_INFO */
162+
163+
/* Define this symbol if you have mallopt with M_ARENA_MAX */
164+
/* #undef HAVE_MALLOPT_ARENA_MAX */
165+
166+
/* Define to 1 if you have the <miniupnpc/miniupnpc.h> header file. */
167+
#define HAVE_MINIUPNPC_MINIUPNPC_H 1
168+
169+
/* Define to 1 if you have the <miniupnpc/upnpcommands.h> header file. */
170+
#define HAVE_MINIUPNPC_UPNPCOMMANDS_H 1
171+
172+
/* Define to 1 if you have the <miniupnpc/upnperrors.h> header file. */
173+
#define HAVE_MINIUPNPC_UPNPERRORS_H 1
174+
175+
/* Define to 1 if you have the <natpmp.h> header file. */
176+
/* #undef HAVE_NATPMP_H */
177+
178+
/* Define to 1 if O_CLOEXEC flag is available. */
179+
#define HAVE_O_CLOEXEC 1
180+
181+
/* Define this symbol if you have posix_fallocate */
182+
/* #undef HAVE_POSIX_FALLOCATE */
183+
184+
/* Define if you have POSIX threads libraries and header files. */
185+
#define HAVE_PTHREAD 1
186+
187+
/* Have PTHREAD_PRIO_INHERIT. */
188+
#define HAVE_PTHREAD_PRIO_INHERIT 1
189+
190+
/* Define this symbol if platform supports unix domain sockets */
191+
#define HAVE_SOCKADDR_UN 1
192+
193+
/* Define to 1 if you have the <stdint.h> header file. */
194+
#define HAVE_STDINT_H 1
195+
196+
/* Define to 1 if you have the <stdio.h> header file. */
197+
#define HAVE_STDIO_H 1
198+
199+
/* Define to 1 if you have the <stdlib.h> header file. */
200+
#define HAVE_STDLIB_H 1
201+
202+
/* Define if you have `strerror_r'. */
203+
#define HAVE_STRERROR_R 1
204+
205+
/* Define to 1 if you have the <strings.h> header file. */
206+
#define HAVE_STRINGS_H 1
207+
208+
/* Define to 1 if you have the <string.h> header file. */
209+
#define HAVE_STRING_H 1
210+
211+
/* Define this symbol to build code that uses getauxval */
212+
/* #undef HAVE_STRONG_GETAUXVAL */
213+
214+
/* Define this symbol if the BSD sysctl() is available */
215+
#define HAVE_SYSCTL 0
216+
217+
/* Define this symbol if the BSD sysctl(KERN_ARND) is available */
218+
/* #undef HAVE_SYSCTL_ARND */
219+
220+
/* Define to 1 if std::system or ::wsystem is available. */
221+
#define HAVE_SYSTEM 1
222+
223+
/* Define to 1 if you have the <sys/prctl.h> header file. */
224+
/* #undef HAVE_SYS_PRCTL_H */
225+
226+
/* Define to 1 if you have the <sys/resources.h> header file. */
227+
/* #undef HAVE_SYS_RESOURCES_H */
228+
229+
/* Define to 1 if you have the <sys/select.h> header file. */
230+
#define HAVE_SYS_SELECT_H 1
231+
232+
/* Define to 1 if you have the <sys/stat.h> header file. */
233+
#define HAVE_SYS_STAT_H 1
234+
235+
/* Define to 1 if you have the <sys/sysctl.h> header file. */
236+
#define HAVE_SYS_SYSCTL_H 1
237+
238+
/* Define to 1 if you have the <sys/types.h> header file. */
239+
#define HAVE_SYS_TYPES_H 1
240+
241+
/* Define to 1 if you have the <sys/vmmeter.h> header file. */
242+
#define HAVE_SYS_VMMETER_H 1
243+
244+
/* Define to 1 if you have the <unistd.h> header file. */
245+
#define HAVE_UNISTD_H 1
246+
247+
/* Define to 1 if you have the <vm/vm_param.h> header file. */
248+
/* #undef HAVE_VM_VM_PARAM_H */
249+
250+
/* Define to the sub-directory where libtool stores uninstalled libraries. */
251+
#define LT_OBJDIR ".libs/"
252+
253+
/* Define to the address where bug reports for this package should be sent. */
254+
#define PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues"
255+
256+
/* Define to the full name of this package. */
257+
#define PACKAGE_NAME "Bitcoin Core"
258+
259+
/* Define to the full name and version of this package. */
260+
#define PACKAGE_STRING "Bitcoin Core 27.99.0"
261+
262+
/* Define to the one symbol short name of this package. */
263+
#define PACKAGE_TARNAME "bitcoin"
264+
265+
/* Define to the home page for this package. */
266+
#define PACKAGE_URL "https://bitcoincore.org/"
267+
268+
/* Define to the version of this package. */
269+
#define PACKAGE_VERSION "27.99.0"
270+
271+
/* Define to necessary symbol if this constant uses a non-standard name on
272+
your system. */
273+
/* #undef PTHREAD_CREATE_JOINABLE */
274+
275+
/* Define this symbol if the qt platform is cocoa */
276+
/* #undef QT_QPA_PLATFORM_COCOA */
277+
278+
/* Define this symbol if the minimal qt platform exists */
279+
/* #undef QT_QPA_PLATFORM_MINIMAL */
280+
281+
/* Define this symbol if the qt platform is windows */
282+
/* #undef QT_QPA_PLATFORM_WINDOWS */
283+
284+
/* Define this symbol if the qt platform is xcb */
285+
/* #undef QT_QPA_PLATFORM_XCB */
286+
287+
/* Define this symbol if qt plugins are static */
288+
/* #undef QT_STATICPLUGIN */
289+
290+
/* Define to 1 if all of the C90 standard headers exist (not just the ones
291+
required in a freestanding environment). This macro is provided for
292+
backward compatibility; new code need not use it. */
293+
#define STDC_HEADERS 1
294+
295+
/* Define to 1 if strerror_r returns char *. */
296+
/* #undef STRERROR_R_CHAR_P */
297+
298+
/* Define if BDB support should be compiled in */
299+
#define USE_BDB 1
300+
301+
/* Define if dbus support should be compiled in */
302+
/* #undef USE_DBUS */
303+
304+
/* Define to 1 if UPnP support should be compiled in. */
305+
/* #undef USE_NATPMP */
306+
307+
/* Define if QR support should be compiled in */
308+
/* #undef USE_QRCODE */
309+
310+
/* Define if sqlite support should be compiled in */
311+
#define USE_SQLITE 1
312+
313+
/* Define to 1 if UPnP support should be compiled in. */
314+
#define USE_UPNP 1
315+
316+
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
317+
significant byte first (like Motorola and SPARC, unlike Intel). */
318+
#if defined AC_APPLE_UNIVERSAL_BUILD
319+
# if defined __BIG_ENDIAN__
320+
# define WORDS_BIGENDIAN 1
321+
# endif
322+
#else
323+
# ifndef WORDS_BIGENDIAN
324+
/* # undef WORDS_BIGENDIAN */
325+
# endif
326+
#endif
327+
328+
/* Number of bits in a file offset, on hosts where this is settable. */
329+
/* #undef _FILE_OFFSET_BITS */
330+
331+
/* Define for large files, on AIX-style hosts. */
332+
/* #undef _LARGE_FILES */
333+
334+
#endif //BITCOIN_CONFIG_H

0 commit comments

Comments
 (0)