Skip to content

Commit e897ddf

Browse files
authored
Merge pull request #133 from BitgesellOfficial/branchsync
branch sync
2 parents 800092f + 879a9b7 commit e897ddf

27 files changed

+210
-151
lines changed

build_msvc/BGL_config.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
#define CLIENT_VERSION_MAJOR 1
1616

1717
/* Minor version */
18-
#define CLIENT_VERSION_MINOR 8
18+
#define CLIENT_VERSION_MINOR 11
1919

2020
/* Copyright holder(s) before %s replacement */
2121
#define COPYRIGHT_HOLDERS "The %s developers"
2222

2323
/* Copyright holder(s) */
24-
#define COPYRIGHT_HOLDERS_FINAL "The Bitcoin Core developers / Bitcoin Core developers"
24+
#define COPYRIGHT_HOLDERS_FINAL "The Bitgesell Core developers / Bitgesell Core developers"
2525

2626
/* Replacement for %s in copyright holders string */
27-
#define COPYRIGHT_HOLDERS_SUBSTITUTION "Bitcoin Core"
27+
#define COPYRIGHT_HOLDERS_SUBSTITUTION "Bitgesell Core"
2828

2929
/* Copyright year */
30-
#define COPYRIGHT_YEAR 2022
30+
#define COPYRIGHT_YEAR 2024
3131

3232
/* Define to 1 to enable wallet functions */
3333
#define ENABLE_WALLET 1
@@ -174,19 +174,19 @@
174174
#define HAVE_SYS_TYPES_H 1
175175

176176
/* Define to the address where bug reports for this package should be sent. */
177-
#define PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues"
177+
#define PACKAGE_BUGREPORT "https://github.com/BitgesellOfficial/bitgesell/issues"
178178

179179
/* Define to the full name of this package. */
180180
#define PACKAGE_NAME "Bitgesell Core"
181181

182182
/* Define to the full name and version of this package. */
183-
#define PACKAGE_STRING "Bitgesell Core 22.99.0"
183+
#define PACKAGE_STRING "Bitgesell Core 0.1.11"
184184

185185
/* Define to the home page for this package. */
186186
#define PACKAGE_URL "https://bitgesell.ca/"
187187

188188
/* Define to the version of this package. */
189-
#define PACKAGE_VERSION "0.1.8"
189+
#define PACKAGE_VERSION "0.1.11"
190190

191191
/* Define this symbol if the minimal qt platform exists */
192192
#define QT_QPA_PLATFORM_MINIMAL 1

build_msvc/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Introduction
55
---------------------
66
Visual Studio 2022 is minimum required to build BGL Core.
77

8-
Building with Visual Studio is an alternative to the Linux based [cross-compiler build](https://github.com/BitgesellOfficial/bitgesell/blob/master/doc/build-windows.md).
8+
Solution and project files to build with `msbuild` or Visual Studio can be found in the `build_msvc` directory.
99

1010
To build BGL Core from the command-line, it is sufficient to only install the [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/) component.
1111

configure.ac

+11-6
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,12 @@ AC_ARG_ENABLE([werror],
331331
AC_ARG_ENABLE([external-signer],
332332
[AS_HELP_STRING([--enable-external-signer],[compile external signer support (default is auto, requires Boost::Process)])],
333333
[use_external_signer=$enableval],
334-
[use_external_signer=yes])
334+
[use_external_signer=auto])
335+
336+
AC_ARG_ENABLE([lto],
337+
[AS_HELP_STRING([--enable-lto],[build using LTO (default is no)])],
338+
[enable_lto=$enableval],
339+
[enable_lto=no])
335340

336341
AC_LANG_PUSH([C++])
337342

@@ -456,11 +461,11 @@ if test "$CXXFLAGS_overridden" = "no"; then
456461
dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
457462
dnl unknown options if any other warning is produced. Test the -Wfoo case, and
458463
dnl set the -Wno-foo case if it works.
459-
AX_CHECK_COMPILE_FLAG([-Wunused-parameter],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-parameter"],,[[$CXXFLAG_WERROR]])
460-
AX_CHECK_COMPILE_FLAG([-Wself-assign],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-self-assign"],,[[$CXXFLAG_WERROR]])
461-
AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]])
462-
AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-implicit-fallthrough"],,[[$CXXFLAG_WERROR]])
463-
AX_CHECK_COMPILE_FLAG([-Wdeprecated-copy],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-deprecated-copy"],,[[$CXXFLAG_WERROR]])
464+
AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-parameter"], [], [$CXXFLAG_WERROR])
465+
AX_CHECK_COMPILE_FLAG([-Wself-assign], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-self-assign"], [], [$CXXFLAG_WERROR])
466+
if test "$suppress_external_warnings" != "yes" ; then
467+
AX_CHECK_COMPILE_FLAG([-Wdeprecated-copy], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-deprecated-copy"], [], [$CXXFLAG_WERROR])
468+
fi
464469
fi
465470

466471
dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.

contrib/linearize/linearize-data.py

+1-30
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@
1616
import hashlib
1717
import datetime
1818
import time
19-
import glob
2019
from collections import namedtuple
2120

22-
23-
2421
settings = {}
2522

2623
def calc_hash_str(blk_hdr):
@@ -56,30 +53,6 @@ def mkblockmap(blkindex):
5653
blkmap[hash] = height
5754
return blkmap
5855

59-
# This gets the first block file ID that exists from the input block
60-
# file directory.
61-
def getFirstBlockFileId(block_dir_path):
62-
# First, this sets up a pattern to search for block files, for
63-
# example 'blkNNNNN.dat'.
64-
blkFilePattern = os.path.join(block_dir_path, "blk[0-9][0-9][0-9][0-9][0-9].dat")
65-
66-
# This search is done with glob
67-
blkFnList = glob.glob(blkFilePattern)
68-
69-
if len(blkFnList) == 0:
70-
print("blocks not pruned - starting at 0")
71-
return 0
72-
# We then get the lexicographic minimum, which should be the first
73-
# block file name.
74-
firstBlkFilePath = min(blkFnList)
75-
firstBlkFn = os.path.basename(firstBlkFilePath)
76-
77-
# now, the string should be ['b','l','k','N','N','N','N','N','.','d','a','t']
78-
# So get the ID by choosing: 3 4 5 6 7
79-
# The ID is not necessarily 0 if this is a pruned node.
80-
blkId = int(firstBlkFn[3:8])
81-
return blkId
82-
8356
# Block header and extent on disk
8457
BlockExtent = namedtuple('BlockExtent', ['fn', 'offset', 'inhdr', 'blkhdr', 'size'])
8558

@@ -89,9 +62,7 @@ def __init__(self, settings, blkindex, blkmap):
8962
self.blkindex = blkindex
9063
self.blkmap = blkmap
9164

92-
# Get first occurring block file id - for pruned nodes this
93-
# will not necessarily be 0
94-
self.inFn = getFirstBlockFileId(self.settings['input'])
65+
self.inFn = 0
9566
self.inF = None
9667
self.outFn = 0
9768
self.outsz = 0

contrib/seeds/generate-seeds.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
These should be pasted into `src/chainparamsseeds.h`.
2222
'''
23-
23+
from __future__ import print_function, division
2424
from base64 import b32decode
2525
from enum import Enum
2626
import struct
@@ -52,7 +52,7 @@ def name_to_bip155(addr):
5252
if len(vchAddr) == 32:
5353
return (BIP155Network.I2P, vchAddr)
5454
else:
55-
raise ValueError(f"Invalid I2P {vchAddr}")
55+
raise ValueError(f'Invalid I2P {vchAddr}')
5656
elif '.' in addr: # IPv4
5757
return (BIP155Network.IPV4, bytes((int(x) for x in addr.split('.'))))
5858
elif ':' in addr: # IPv6 or CJDNS
@@ -150,13 +150,13 @@ def process_nodes(g, f, structname):
150150
def main():
151151
if len(sys.argv)<2:
152152
print(('Usage: %s <path_to_nodes_txt>' % sys.argv[0]), file=sys.stderr)
153-
sys.exit(1)
153+
exit(1)
154154
g = sys.stdout
155155
indir = sys.argv[1]
156156
g.write('#ifndef BGL_CHAINPARAMSSEEDS_H\n')
157157
g.write('#define BGL_CHAINPARAMSSEEDS_H\n')
158158
g.write('/**\n')
159-
g.write(' * List of fixed seed nodes for the bitgesell network\n')
159+
g.write(' * List of fixed seed nodes for the falco network\n')
160160
g.write(' * AUTOGENERATED by contrib/seeds/generate-seeds.py\n')
161161
g.write(' *\n')
162162
g.write(' * Each line contains a BIP155 serialized (networkID, addr, port) tuple.\n')

contrib/seeds/makeseeds.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def main():
216216
print(f'{ip_stats(ips):s} Require a known and recent user agent', file=sys.stderr)
217217
# Sort by availability (and use last success as tie breaker)
218218
ips.sort(key=lambda x: (x['uptime'], x['lastsuccess'], x['ip']), reverse=True)
219-
# Filter out hosts with multiple bitcoin ports, these are likely abusive
219+
# Filter out hosts with multiple ports, these are likely abusive
220220
ips = filtermultiport(ips)
221221
print(f'{ip_stats(ips):s} Filter out hosts with multiple BGL ports', file=sys.stderr)
222222
# Look up ASNs and limit results, both per ASN and globally.

depends/Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,13 @@ NO_UPNP ?=
4444
NO_USDT ?=
4545
NO_NATPMP ?=
4646
MULTIPROCESS ?=
47+
LTO ?=
48+
NO_HARDEN ?=
4749
FALLBACK_DOWNLOAD_PATH ?= https://bitgesell.ca/depends-sources
4850

51+
C_STANDARD ?= c11
52+
CXX_STANDARD ?= c++17
53+
4954
BUILD = $(shell ./config.guess)
5055
HOST ?= $(BUILD)
5156
PATCHES_PATH = $(BASEDIR)/patches

depends/README.md

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
### Usage
2+
3+
To build dependencies for the current arch+OS:
4+
5+
make
6+
7+
To build for another arch/OS:
8+
9+
make HOST=host-platform-triplet
10+
11+
For example:
12+
13+
make HOST=x86_64-w64-mingw32 -j4
14+
15+
**BGL Core's `configure` script by default will ignore the depends output.** In
16+
order for it to pick up libraries, tools, and settings from the depends build,
17+
you must set the `CONFIG_SITE` environment variable to point to a `config.site` settings file.
18+
Make sure that `CONFIG_SITE` is an absolute path.
19+
In the above example, a file named `depends/x86_64-w64-mingw32/share/config.site` will be
20+
created. To use it during compilation:
21+
22+
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure
23+
24+
The default install prefix when using `config.site` is `--prefix=depends/<host-platform-triplet>`,
25+
so depends build outputs will be installed in that location.
26+
27+
Common `host-platform-triplet`s for cross compilation are:
28+
29+
- `i686-pc-linux-gnu` for Linux 32 bit
30+
- `x86_64-pc-linux-gnu` for x86 Linux
31+
- `x86_64-w64-mingw32` for Win64
32+
- `x86_64-apple-darwin` for macOS
33+
- `arm64-apple-darwin` for ARM macOS
34+
- `arm-linux-gnueabihf` for Linux ARM 32 bit
35+
- `aarch64-linux-gnu` for Linux ARM 64 bit
36+
- `powerpc64-linux-gnu` for Linux POWER 64-bit (big endian)
37+
- `powerpc64le-linux-gnu` for Linux POWER 64-bit (little endian)
38+
- `riscv32-linux-gnu` for Linux RISC-V 32 bit
39+
- `riscv64-linux-gnu` for Linux RISC-V 64 bit
40+
- `s390x-linux-gnu` for Linux S390X
41+
- `armv7a-linux-android` for Android ARM 32 bit
42+
- `aarch64-linux-android` for Android ARM 64 bit
43+
- `x86_64-linux-android` for Android x86 64 bit
44+
45+
The paths are automatically configured and no other options are needed unless targeting [Android](../doc/build-android.md).
46+
47+
### Install the required dependencies: Ubuntu & Debian
48+
49+
#### For macOS cross compilation
50+
51+
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools xorriso
52+
53+
Note: You must obtain the macOS SDK before proceeding with a cross-compile.
54+
Under the depends directory, create a subdirectory named `SDKs`.
55+
Then, place the extracted SDK under this new directory.
56+
For more information, see [SDK Extraction](../contrib/macdeploy/README.md#sdk-extraction).
57+
58+
#### For Win64 cross compilation
59+
60+
- see [build-windows.md](../doc/build-windows.md#cross-compilation-for-ubuntu-and-windows-subsystem-for-linux)
61+
62+
#### For linux (including i386, ARM) cross compilation
63+
64+
Common linux dependencies:
65+
66+
sudo apt-get install make automake cmake curl g++-multilib libtool binutils bsdmainutils pkg-config python3 patch bison
67+
68+
For linux ARM cross compilation:
69+
70+
sudo apt-get install g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
71+
72+
For linux AARCH64 cross compilation:
73+
74+
sudo apt-get install g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
75+
76+
For linux POWER 64-bit cross compilation (there are no packages for 32-bit):
77+
78+
sudo apt-get install g++-powerpc64-linux-gnu binutils-powerpc64-linux-gnu g++-powerpc64le-linux-gnu binutils-powerpc64le-linux-gnu
79+
80+
For linux RISC-V 64-bit cross compilation (there are no packages for 32-bit):
81+
82+
sudo apt-get install g++-riscv64-linux-gnu binutils-riscv64-linux-gnu
83+
84+
For linux S390X cross compilation:
85+
86+
sudo apt-get install g++-s390x-linux-gnu binutils-s390x-linux-gnu
87+
88+
### Install the required dependencies: OpenBSD
89+
90+
pkg_add bash gtar
91+
92+
### Dependency Options
93+
94+
The following can be set when running make: `make FOO=bar`
95+
96+
- `SOURCES_PATH`: Downloaded sources will be placed here
97+
- `BASE_CACHE`: Built packages will be placed here
98+
- `SDK_PATH`: Path where SDKs can be found (used by macOS)
99+
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
100+
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
101+
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++17`.
102+
- `NO_BOOST`: Don't download/build/cache Boost
103+
- `NO_LIBEVENT`: Don't download/build/cache Libevent
104+
- `NO_QT`: Don't download/build/cache Qt and its dependencies
105+
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
106+
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
107+
- `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet
108+
- `NO_BDB`: Don't download/build/cache BerkeleyDB
109+
- `NO_SQLITE`: Don't download/build/cache SQLite
110+
- `NO_UPNP`: Don't download/build/cache packages needed for enabling UPnP
111+
- `NO_NATPMP`: Don't download/build/cache packages needed for enabling NAT-PMP
112+
- `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints
113+
- `ALLOW_HOST_PACKAGES`: Packages that are missed in dependencies (due to `NO_*` option or
114+
build script logic) are searched for among the host system packages using
115+
`pkg-config`. It allows building with packages of other (newer) versions
116+
- `MULTIPROCESS`: Build libmultiprocess (experimental, requires CMake)
117+
- `DEBUG`: Disable some optimizations and enable more runtime checking
118+
- `HOST_ID_SALT`: Optional salt to use when generating host package ids
119+
- `BUILD_ID_SALT`: Optional salt to use when generating build package ids
120+
- `FORCE_USE_SYSTEM_CLANG`: (EXPERTS ONLY) When cross-compiling for macOS, use Clang found in the
121+
system's `$PATH` rather than the default prebuilt release of Clang
122+
from llvm.org. Clang 8 or later is required
123+
- `LOG`: Use file-based logging for individual packages. During a package build its log file
124+
resides in the `depends` directory, and the log file is printed out automatically in case
125+
of build error. After successful build log files are moved along with package archives
126+
- `LTO`: Use LTO when building packages.
127+
- `NO_HARDEN=1`: Don't use hardening options when building packages
128+
129+
If some packages are not built, for example `make NO_WALLET=1`, the appropriate
130+
options will be passed to BGL's configure. In this case, `--disable-wallet`.
131+
132+
### Additional targets
133+
134+
download: run 'make download' to fetch all sources without building them
135+
download-osx: run 'make download-osx' to fetch all sources needed for macOS builds
136+
download-win: run 'make download-win' to fetch all sources needed for win builds
137+
download-linux: run 'make download-linux' to fetch all sources needed for linux builds
138+
139+
140+
### Other documentation
141+
142+
- [description.md](description.md): General description of the depends system
143+
- [packages.md](packages.md): Steps for adding packages

doc/release-process.md

-3
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ Install Guix using one of the installation methods detailed in
8787
Check out the source code in the following directory hierarchy.
8888

8989
cd /path/to/your/toplevel/build
90-
git clone https://github.com/BGL-core/gitian.sigs.git
91-
git clone https://github.com/BGL-core/BGL-detached-sigs.git
92-
git clone https://github.com/devrandom/gitian-builder.git
9390
git clone https://github.com/BitgesellOfficial/bitgesell.git
9491

9592
### Write the release notes

src/mapport.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
#include <net.h>
1515
#include <netaddress.h>
1616
#include <netbase.h>
17-
#include <threadinterrupt.h>
18-
#include <util/syscall_sandbox.h>
19-
#include <util/system.h>
2017
#include <util/thread.h>
18+
#include <util/threadinterrupt.h>
2119

2220
#ifdef USE_NATPMP
2321
#include <compat/compat.h>

src/secp256k1/configure.ac

-8
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,6 @@ SECP_CFLAGS="$SECP_CFLAGS $WERROR_CFLAGS"
387387
### Handle module options
388388
###
389389

390-
###
391-
### Handle module options
392-
###
393-
394390
if test x"$enable_module_ecdh" = x"yes"; then
395391
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ECDH=1"
396392
fi
@@ -422,10 +418,6 @@ fi
422418
### Check for --enable-experimental if necessary
423419
###
424420

425-
###
426-
### Check for --enable-experimental if necessary
427-
###
428-
429421
if test x"$enable_experimental" = x"yes"; then
430422
AC_MSG_NOTICE([******])
431423
AC_MSG_NOTICE([WARNING: experimental build])

0 commit comments

Comments
 (0)