diff options
author | fanquake <fanquake@gmail.com> | 2021-11-12 09:25:40 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-11-12 10:00:49 +0800 |
commit | c1fb30633b6dcbf32db7d53c9f538019af80d6c5 (patch) | |
tree | 0fb479ab0aa27218dc34db18cd3a31ac72b1359a /build_msvc | |
parent | bc03823e26d1bf0cca679ce9330f9c6a58b33faf (diff) | |
parent | 29173d6c6ca0cc3be9fa6bf2409a509ffea1a02a (diff) |
Merge bitcoin/bitcoin#23114: Add minisketch subtree and integrate into build/test
29173d6c6ca0cc3be9fa6bf2409a509ffea1a02a ubsan: add minisketch exceptions (Cory Fields)
54b5e1aeab73953c1f12ec2c041572038f6f59da Add thin Minisketch wrapper to pick best implementation (Pieter Wuille)
ee9dc71c1bc16205494f2a0aebe575a3c062ff52 Add basic minisketch tests (Pieter Wuille)
0659f12b131fc5915fe7a493306af197f4fb838b Add minisketch dependency (Gleb Naumenko)
0eb7928ab8d9dcb840e4965bfa81deb752b00dfa Add MSVC build configuration for libminisketch (Pieter Wuille)
8bc166d5b179205fc56855e2b462aa273a6f8661 build: add minisketch build file and include it (Cory Fields)
b2904ceb85b4d440b1f4bbd716fcb601411cc2c9 build: add configure checks for minisketch (Cory Fields)
b6487dc4ef47ec9ea894eceac25f37d0b806f8aa Squashed 'src/minisketch/' content from commit 89629eb2c7 (fanquake)
Pull request description:
This takes over #21859, which has [recently switched](https://github.com/bitcoin/bitcoin/pull/21859#issuecomment-921899200) to my integration branch. A few more build issues came up (and have been fixed) since, and after discussing with sipa it was decided I would open a PR to shepherd any final changes through.
> This adds a `src/minisketch` subtree, taken from the master branch of https://github.com/sipa/minisketch, to prepare for Erlay implementation (see #21515). It gets configured for just supporting 32-bit fields (the only ones we're interested in in the context of Erlay), and some code on top is added:
> * A very basic unit test (just to make sure compilation & running works; actual correctness checking is done through minisketch's own tests).
> * A wrapper in `minisketchwrapper.{cpp,h}` that runs a benchmark to determine which field implementation to use.
Only changes since my last update to the branch in the previous PR have been rebasing on master and fixing an issue with a header in an introduced file.
ACKs for top commit:
naumenkogs:
ACK 29173d6c6ca0cc3be9fa6bf2409a509ffea1a02a
Tree-SHA512: 1217d3228db1dd0de12c2919314e1c3626c18a416cf6291fec99d37e34fb6eec8e28d9e9fb935f8590273b8836cbadac313a15f05b4fd9f9d3024c8ce2c80d02
Diffstat (limited to 'build_msvc')
-rw-r--r-- | build_msvc/bitcoin.sln | 8 | ||||
-rw-r--r-- | build_msvc/common.init.vcxproj | 2 | ||||
-rw-r--r-- | build_msvc/libminisketch/libminisketch.vcxproj | 38 | ||||
-rw-r--r-- | build_msvc/test_bitcoin/test_bitcoin.vcxproj | 3 |
4 files changed, 48 insertions, 3 deletions
diff --git a/build_msvc/bitcoin.sln b/build_msvc/bitcoin.sln index 5095617812..b2ab64a34b 100644 --- a/build_msvc/bitcoin.sln +++ b/build_msvc/bitcoin.sln @@ -48,6 +48,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtest_util", "libtest_uti EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_bitcoin-qt", "test_bitcoin-qt\test_bitcoin-qt.vcxproj", "{51201D5E-D939-4854-AE9D-008F03FF518E}" EndProject +Project("{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}") = "libminisketch", "libminisketch\libminisketch.vcxproj", "{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -146,13 +148,15 @@ Global {51201D5E-D939-4854-AE9D-008F03FF518E}.Debug|x64.Build.0 = Debug|x64 {51201D5E-D939-4854-AE9D-008F03FF518E}.Release|x64.ActiveCfg = Release|x64 {51201D5E-D939-4854-AE9D-008F03FF518E}.Release|x64.Build.0 = Release|x64 + {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Debug|x64.ActiveCfg = Debug|x64 + {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Debug|x64.Build.0 = Debug|x64 + {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Release|x64.ActiveCfg = Release|x64 + {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8AA72EDA-2CD4-4564-B1E4-688B760EEEE9} - SolutionGuid = {8607C0F4-F33D-41B8-8D51-18E366A0F8DF} SolutionGuid = {58AAB032-7274-49BD-845E-5EF4DBB69B70} EndGlobalSection EndGlobal diff --git a/build_msvc/common.init.vcxproj b/build_msvc/common.init.vcxproj index fb4d70cc78..0cbe2effd5 100644 --- a/build_msvc/common.init.vcxproj +++ b/build_msvc/common.init.vcxproj @@ -91,7 +91,7 @@ <DisableSpecificWarnings>4018;4244;4267;4334;4715;4805;4834</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Link> <SubSystem>Console</SubSystem> diff --git a/build_msvc/libminisketch/libminisketch.vcxproj b/build_msvc/libminisketch/libminisketch.vcxproj new file mode 100644 index 0000000000..b34593fe5c --- /dev/null +++ b/build_msvc/libminisketch/libminisketch.vcxproj @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="..\common.init.vcxproj" /> + <PropertyGroup Label="Globals"> + <ProjectGuid>{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}</ProjectGuid> + </PropertyGroup> + <PropertyGroup Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + </PropertyGroup> + <ItemGroup> + <ClCompile Include="..\..\src\minisketch\src\minisketch.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\clmul_1byte.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\clmul_2bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\clmul_3bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\clmul_4bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\clmul_5bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\clmul_6bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\clmul_7bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\clmul_8bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\generic_1byte.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\generic_2bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\generic_3bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\generic_4bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\generic_5bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\generic_6bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\generic_7bytes.cpp" /> + <ClCompile Include="..\..\src\minisketch\src\fields\generic_8bytes.cpp" /> + </ItemGroup> + <ItemDefinitionGroup> + <ClCompile> + <DisableSpecificWarnings>4060;4065;4146;4244;4267;4554</DisableSpecificWarnings> + <PreprocessorDefinitions>HAVE_CLMUL;DISABLE_DEFAULT_FIELDS;ENABLE_FIELD_32;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + </ItemDefinitionGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <Import Project="..\common.vcxproj" /> +</Project> diff --git a/build_msvc/test_bitcoin/test_bitcoin.vcxproj b/build_msvc/test_bitcoin/test_bitcoin.vcxproj index bb1a780bfa..2fc0078b8d 100644 --- a/build_msvc/test_bitcoin/test_bitcoin.vcxproj +++ b/build_msvc/test_bitcoin/test_bitcoin.vcxproj @@ -19,6 +19,9 @@ <ClCompile Include="..\..\src\wallet\test\util.cpp" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\libminisketch\libminisketch.vcxproj"> + <Project>{542007e3-be0d-4b0d-a6b0-aa8813e2558d}</Project> + </ProjectReference> <ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj"> <Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project> </ProjectReference> |