Skip to content

Commit 95cadbc

Browse files
laanwjComputerCraftr
authored andcommitted
Merge #20669: [0.21] final rc4 backports
b1c0f97483f01f8836e5d83e98c881e44018cde5 [doc] Add permissions to the getpeerinfo help. (Amiti Uttarwar) 1fda7db64f0f30c23724f6db14f8a49d3975c716 rpc: Add missing description of vout in getrawtransaction help text (Ben Carman) ef7a155cf06bf54fff4ff9fda9b28207fcc9adfb qt: Align layout of checkboxes (Hennadii Stepanov) 35a10e4ebc9da916c470d2a9e5b68c3cfc3efd02 Add patch to make codesign_allocate compatible with Apple's (Pieter Wuille) e70ccb0bc4b695cd331aeda6d7aa405fa6d8f2e7 doc: update -externalip documentation in tor.md (Jon Atack) 2c8482d0a279d07a814eaaae231c90d3d2058e55 doc: add tor.md section on how to get tor info via bitcoind (Jon Atack) 0c1fa78af1c413c848359df76f4d55f819b9fad5 doc: update tor.md address examples from onion v2 to v3 (Jon Atack) 84e8d5467fcec3b7c8ce950cd7a3e7e7b24452a3 doc: warn that incoming conns are unlikely when not using default ports (Adam Jonas) e4440eb67b339fdacb2c1476f8f909a009c6a47f doc: Add warnings for http interfaces limitations (Fabian Jahr) 85dabd12494a0d82a8f5883cee1c1ff29fb81b27 Removed redundant git pull from appveyor config. (Aaron Clauson) 249d61a382014c15025fe63025ac5f46d4721262 Adjusted msvc compiler and linker settings to remove optimisations that are causing sporadic ABI issues on Visual Studio updates. (Aaron Clauson) e7b53d47218301790bfec44d50219561502922ad This change to the appveyor CI config for msvc builds reverses a change introduced in #19960. It re-applies a setting to inform vcpkg to only build release vesions of the dependencies rather than the default of debug and release. (Aaron Clauson) 8273ea3b8db1449b65cf369e541a1253c4490f45 Move signet onion seed from v2 to v3 (Sjors Provoost) Pull request description: The remaining backports to get rc4 out. Currently only waiting on the macOS build fix. ACKs for top commit: benthecarman: ACK b1c0f97483f01f8836e5d83e98c881e44018cde5 Sjors: ACK b1c0f97 Tree-SHA512: 53eaecd531ba461678917cb630d67f1e6bb737d64022abe971eaced6eca366c9ed593e44276bd9c7ad7b3aebe3850d2d29282eb310e10b547986d10fe77a8482
2 parents 4301f7a + 5602ea0 commit 95cadbc

File tree

16 files changed

+114
-67
lines changed

16 files changed

+114
-67
lines changed

.appveyor.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
version: '{branch}.{build}'
22
skip_tags: true
3-
image: Previous Visual Studio 2019
3+
image: Visual Studio 2019
44
configuration: Release
55
platform: x64
66
clone_depth: 5
77
environment:
88
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
99
PYTHONUTF8: 1
10-
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
11-
QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
10+
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt598x64_vs2019_v1681/qt598_x64_vs2019_1681.zip'
11+
QT_DOWNLOAD_HASH: '00cf7327818c07d74e0b1a4464ffe987c2728b00d49d4bf333065892af0515c3'
1212
QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
13-
VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
14-
VCPKG_COMMIT_ID: '40230b8e3f6368dcb398d649331be878ca1e9007'
13+
VCPKG_TAG: '2020.11-1'
1514
install:
1615
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
1716
# - cmd: pip install zmq
18-
# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is:
17+
# The powershell block below is to set up vcpkg to install the c++ dependencies. The pseudo code is:
1918
# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary,
20-
# b. Install the missing packages using the vcpkg manifest.
19+
# b. Append a setting to the vcpkg cmake config file to only do release builds of dependencies (skipping deubg builds saves ~5 mins).
20+
# Note originally this block also installed the dependencies using 'vcpkg install'. Dependencies are now installed
21+
# as part of the msbuild command using vcpkg mainfests.
2122
- ps: |
2223
cd c:\tools\vcpkg
2324
$env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
24-
git pull origin master > $null
25-
git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID
25+
git -c advice.detachedHead=false checkout $env:VCPKG_TAG
2626
.\bootstrap-vcpkg.bat > $null
27+
Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
2728
cd "$env:APPVEYOR_BUILD_FOLDER"
2829
before_build:
2930
# Powershell block below is to download and extract the Qt static libraries. The pseudo code is:

build_msvc/common.init.vcxproj

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
<PropertyGroup Label="Globals">
66
<VCProjectVersion>16.0</VCProjectVersion>
7-
<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
8-
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
97
<UseNativeEnvironment>true</UseNativeEnvironment>
108
</PropertyGroup>
119

@@ -16,6 +14,8 @@
1614
<VcpkgUseStatic>true</VcpkgUseStatic>
1715
<VcpkgAutoLink>true</VcpkgAutoLink>
1816
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
17+
<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
18+
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
1919
</PropertyGroup>
2020

2121
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and !Exists('$(WindowsSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.props')">
@@ -45,66 +45,46 @@
4545
</ProjectConfiguration>
4646
</ItemGroup>
4747

48-
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
49-
<LinkIncremental>true</LinkIncremental>
50-
<WholeProgramOptimization>false</WholeProgramOptimization>
51-
<UseDebugLibraries>true</UseDebugLibraries>
48+
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
49+
<LinkIncremental>false</LinkIncremental>
50+
<UseDebugLibraries>false</UseDebugLibraries>
5251
<PlatformToolset>v142</PlatformToolset>
5352
<CharacterSet>Unicode</CharacterSet>
53+
<GenerateManifest>No</GenerateManifest>
5454
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
5555
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
5656
</PropertyGroup>
57-
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
58-
<LinkIncremental>false</LinkIncremental>
59-
<WholeProgramOptimization>true</WholeProgramOptimization>
60-
<UseDebugLibraries>false</UseDebugLibraries>
57+
58+
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
59+
<LinkIncremental>true</LinkIncremental>
60+
<UseDebugLibraries>true</UseDebugLibraries>
6161
<PlatformToolset>v142</PlatformToolset>
6262
<CharacterSet>Unicode</CharacterSet>
6363
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
6464
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
6565
</PropertyGroup>
6666

67-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
68-
<ClCompile>
69-
<Optimization>MaxSpeed</Optimization>
70-
<FunctionLevelLinking>true</FunctionLevelLinking>
71-
<IntrinsicFunctions>true</IntrinsicFunctions>
72-
<SDLCheck>true</SDLCheck>
73-
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
74-
</ClCompile>
75-
<Link>
76-
<EnableCOMDATFolding>true</EnableCOMDATFolding>
77-
<OptimizeReferences>true</OptimizeReferences>
78-
</Link>
79-
</ItemDefinitionGroup>
80-
81-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
8268
<ClCompile>
8369
<Optimization>Disabled</Optimization>
84-
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
85-
<SDLCheck>true</SDLCheck>
86-
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
87-
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
88-
</ClCompile>
89-
</ItemDefinitionGroup>
90-
91-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
92-
<ClCompile>
93-
<Optimization>MaxSpeed</Optimization>
70+
<WholeProgramOptimization>false</WholeProgramOptimization>
9471
<FunctionLevelLinking>true</FunctionLevelLinking>
9572
<IntrinsicFunctions>true</IntrinsicFunctions>
9673
<SDLCheck>true</SDLCheck>
9774
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
75+
<DebugInformationFormat>None</DebugInformationFormat>
9876
</ClCompile>
9977
<Link>
100-
<EnableCOMDATFolding>true</EnableCOMDATFolding>
101-
<OptimizeReferences>true</OptimizeReferences>
78+
<EnableCOMDATFolding>false</EnableCOMDATFolding>
79+
<OptimizeReferences>false</OptimizeReferences>
80+
<AdditionalOptions>/LTCG:OFF</AdditionalOptions>
10281
</Link>
10382
</ItemDefinitionGroup>
10483

105-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
84+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
10685
<ClCompile>
10786
<Optimization>Disabled</Optimization>
87+
<WholeProgramOptimization>false</WholeProgramOptimization>
10888
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
10989
<SDLCheck>true</SDLCheck>
11090
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -124,7 +104,6 @@
124104
</ClCompile>
125105
<Link>
126106
<SubSystem>Console</SubSystem>
127-
<GenerateDebugInformation>true</GenerateDebugInformation>
128107
<AdditionalDependencies>Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
129108
</Link>
130109
<Lib>

build_msvc/common.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Target Name="CopyBuildArtifacts" Condition="'$(ConfigurationType)' != 'StaticLibrary'">
55
<ItemGroup>
66
<BuildArtifacts Include="$(OutDir)$(TargetName)$(TargetExt)"></BuildArtifacts>
7-
<BuildArtifacts Include="$(OutDir)$(TargetName).pdb"></BuildArtifacts>
7+
<BuildArtifacts Include="$(OutDir)$(TargetName).pdb" Condition="Exists('$(OutDir)$(TargetName).pdb')"></BuildArtifacts>
88
</ItemGroup>
99
<Copy SourceFiles="@(BuildArtifacts)" SkipUnchangedFiles="true" DestinationFolder="..\..\src\" Condition="'$(OutDir)' != ''"></Copy>
1010
</Target>

build_msvc/test_xep-qt/test_xep-qt.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</ClCompile>
7474
<Link>
7575
<AdditionalDependencies>$(QtLibraryDir)\Qt5Test.lib;$(QtReleaseLibraries);%(AdditionalDependencies)</AdditionalDependencies>
76-
<AdditionalOptions>/ignore:4206</AdditionalOptions>
76+
<AdditionalOptions>/ignore:4206 /LTCG:OFF</AdditionalOptions>
7777
</Link>
7878
</ItemDefinitionGroup>
7979

@@ -83,7 +83,7 @@
8383
</ClCompile>
8484
<Link>
8585
<AdditionalDependencies>$(QtDebugLibraries);%(AdditionalDependencies)</AdditionalDependencies>
86-
<AdditionalOptions>/ignore:4206</AdditionalOptions>
86+
<AdditionalOptions>/ignore:4206</AdditionalOptions>
8787
</Link>
8888
</ItemDefinitionGroup>
8989
<ItemGroup>

build_msvc/xep-qt/xep-qt.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</ClCompile>
5757
<Link>
5858
<AdditionalDependencies>$(QtReleaseLibraries);%(AdditionalDependencies)</AdditionalDependencies>
59-
<AdditionalOptions>/ignore:4206</AdditionalOptions>
59+
<AdditionalOptions>/ignore:4206 /LTCG:OFF</AdditionalOptions>
6060
</Link>
6161
<ResourceCompile>
6262
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>

depends/packages/native_cctools.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive
44
$(package)_file_name=$($(package)_version).tar.gz
55
$(package)_sha256_hash=e51995a843533a3dac155dd0c71362dd471597a2d23f13dff194c6285362f875
66
$(package)_build_subdir=cctools
7-
$(package)_patches=ld64_disable_threading.patch
7+
$(package)_patches=ld64_disable_threading.patch segalign.patch
88

99
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
1010
$(package)_clang_version=8.0.0
@@ -80,7 +80,8 @@ endef
8080
define $(package)_preprocess_cmds
8181
CC=$($(package)_cc) CXX=$($(package)_cxx) INSTALLPREFIX=$($(package)_extract_dir) ./libtapi/build.sh && \
8282
CC=$($(package)_cc) CXX=$($(package)_cxx) INSTALLPREFIX=$($(package)_extract_dir) ./libtapi/install.sh && \
83-
patch -p1 < $($(package)_patch_dir)/ld64_disable_threading.patch
83+
patch -p1 < $($(package)_patch_dir)/ld64_disable_threading.patch && \
84+
patch -p1 < $($(package)_patch_dir)/segalign.patch
8485
endef
8586

8687
define $(package)_config_cmds
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
commit 7f2eb11ce6ebec7eb9b8e1429535e453054143e5
2+
Author: Pieter Wuille <[email protected]>
3+
Date: Sun Dec 13 11:34:21 2020 -0800
4+
5+
Make cctools_port's codesign_allocate compatible with Apple's
6+
7+
diff --git a/cctools/libstuff/arch.c b/cctools/libstuff/arch.c
8+
index 6f2332f..d85c25c 100644
9+
--- a/cctools/libstuff/arch.c
10+
+++ b/cctools/libstuff/arch.c
11+
@@ -134,7 +134,7 @@ static const struct cpu_entry cpu_entries[] = {
12+
{ CPU_TYPE_ARM, LITTLE_ENDIAN_BYTE_SEX, 0, 0x4000 },
13+
14+
/* desktop */
15+
- { CPU_TYPE_X86_64, LITTLE_ENDIAN_BYTE_SEX, 0x7fff5fc00000LL, 0x1000 },
16+
+ { CPU_TYPE_X86_64, LITTLE_ENDIAN_BYTE_SEX, 0x7fff5fc00000LL, 0x2000 /* Used to be 0x1000; changed to 0x2000 to match Apple's distributed codesign_allocate. */},
17+
{ CPU_TYPE_I386, LITTLE_ENDIAN_BYTE_SEX, 0xc0000000, 0x1000 },
18+
{ CPU_TYPE_POWERPC, BIG_ENDIAN_BYTE_SEX, 0xc0000000, 0x1000 },
19+
{ CPU_TYPE_POWERPC64, BIG_ENDIAN_BYTE_SEX, 0x7ffff00000000LL, 0x1000 },

doc/JSON-RPC-interface.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,14 @@ However, the wallet may not be up-to-date with the current state of the mempool
127127
or the state of the mempool by an RPC that returned before this RPC. For
128128
example, a wallet transaction that was BIP-125-replaced in the mempool prior to
129129
this RPC may not yet be reflected as such in this RPC response.
130+
131+
## Limitations
132+
133+
There is a known issue in the JSON-RPC interface that can cause a node to crash if
134+
too many http connections are being opened at the same time because the system runs
135+
out of available file descriptors. To prevent this from happening you might
136+
want to increase the number of maximum allowed file descriptors in your system
137+
and try to prevent opening too many connections to your JSON-RPC interface at the
138+
same time if this is under your control. It is hard to give general advice
139+
since this depends on your system but if you make several hundred requests at
140+
once you are definitely at risk of encountering this issue.

doc/REST-interface.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ REST Interface consistency guarantees
1212
The [same guarantees as for the RPC Interface](/doc/JSON-RPC-interface.md#rpc-consistency-guarantees)
1313
apply.
1414

15+
Limitations
16+
-----------
17+
18+
There is a known issue in the REST interface that can cause a node to crash if
19+
too many http connections are being opened at the same time because the system runs
20+
out of available file descriptors. To prevent this from happening you might
21+
want to increase the number of maximum allowed file descriptors in your system
22+
and try to prevent opening too many connections to your rest interface at the
23+
same time if this is under your control. It is hard to give general advice
24+
since this depends on your system but if you make several hundred requests at
25+
once you are definitely at risk of encountering this issue.
26+
1527
Supported API
1628
-------------
1729

doc/tor.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ It is possible to run XEP Core as a Tor onion service, and connect to such servi
55
The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on port 9150. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly
66
configure Tor.
77

8+
## How to see information about your Tor configuration via Bitcoin Core
9+
10+
There are several ways to see your local onion address in Bitcoin Core:
11+
- in the debug log (grep for "tor:" or "AddLocal")
12+
- in the output of RPC `getnetworkinfo` in the "localaddresses" section
13+
- in the output of the CLI `-netinfo` peer connections dashboard
14+
15+
You may set the `-debug=tor` config logging option to have additional
16+
information in the debug log about your Tor configuration.
17+
818

919
## 1. Run XEP Core behind a Tor proxy
1020

@@ -52,14 +62,19 @@ The directory can be different of course, but virtual port numbers should be equ
5262
your xepd's P2P listen port (8333 by default), and target addresses and ports
5363
should be equal to binding address and port for inbound Tor connections (127.0.0.1:8334 by default).
5464

55-
-externalip=X You can tell xep about its publicly reachable address using
56-
this option, and this can be a .onion address. Given the above
57-
configuration, you can find your .onion address in
65+
-externalip=X You can tell xep about its publicly reachable addresses using
66+
this option, and this can be an onion address. Given the above
67+
configuration, you can find your onion address in
5868
/var/lib/tor/xep-service/hostname. For connections
5969
coming from unroutable addresses (such as 127.0.0.1, where the
60-
Tor proxy typically runs), .onion addresses are given
70+
Tor proxy typically runs), onion addresses are given
6171
preference for your node to advertise itself with.
6272

73+
You can set multiple local addresses with -externalip. The
74+
one that will be rumoured to a particular peer is the most
75+
compatible one and also using heuristics, e.g. the address
76+
with the most incoming connections, etc.
77+
6378
-listen You'll need to enable listening for incoming connections, as this
6479
is off by default behind a proxy.
6580

@@ -72,7 +87,7 @@ should be equal to binding address and port for inbound Tor connections (127.0.0
7287

7388
In a typical situation, where you're only reachable via Tor, this should suffice:
7489

75-
./xepd -proxy=127.0.0.1:9050 -externalip=57qr3yd1nyntf5k.onion -listen
90+
./xepd -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen
7691

7792
(obviously, replace the .onion address with your own). It should be noted that you still
7893
listen on all devices and another node could establish a clearnet connection, when knowing
@@ -90,7 +105,7 @@ and open port 8333 on your firewall (or use -upnp).
90105
If you only want to use Tor to reach .onion addresses, but not use it as a proxy
91106
for normal IPv4/IPv6 communication, use:
92107

93-
./xepd -onion=127.0.0.1:9050 -externalip=57qr3yd1nyntf5k.onion -discover
108+
./xepd -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover
94109

95110
## 3. Automatically listen on Tor
96111

0 commit comments

Comments
 (0)