Skip to content

Commit

Permalink
Merge pull request ElementsProject#1273 from ElementsProject/master-c…
Browse files Browse the repository at this point in the history
…i-fixes

CI fixes from elements-23.x
  • Loading branch information
psgreco authored Oct 10, 2023
2 parents 3d2f1c6 + eed08df commit c92a8f2
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 28 deletions.
8 changes: 4 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ task:
task:
name: 'ARM [unit tests, no functional tests] [bullseye]'
<< : *GLOBAL_TASK_TEMPLATE
arm_container:
container:
image: debian:bullseye
cpu: 2
memory: 8G
docker_arguments:
CI_IMAGE_NAME_TAG: debian:bullseye
<< : *CREDITS_TEMPLATE
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
QEMU_USER_CMD: "" # Disable qemu and run the test natively

task:
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
Expand Down
2 changes: 1 addition & 1 deletion build_msvc/common.init.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<AdditionalOptions>/utf-8 /Zc:__cplusplus /std:c++17 %(AdditionalOptions)</AdditionalOptions>
<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>
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;_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\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
Expand Down
9 changes: 9 additions & 0 deletions build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\src\pegins.cpp" />
<ClCompile Include="..\..\src\psbt.cpp" />
<ClCompile Include="..\..\src\primitives\bitcoin\transaction.cpp" />
<ClCompile Include="..\..\src\primitives\transaction.cpp" />
@SOURCE_FILES@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libsecp256k1\libsecp256k1.vcxproj">
<Project>{bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="..\common.vcxproj" />
Expand Down
7 changes: 7 additions & 0 deletions build_msvc/libbitcoin_node/libbitcoin_node.vcxproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\src\primitives\transaction.cpp" />
<ClCompile Include="..\..\src\primitives\bitcoin\transaction.cpp" />
@SOURCE_FILES@
<ClCompile Include="..\..\src\wallet\init.cpp">
<ObjectFileName>$(IntDir)wallet_init.obj</ObjectFileName>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libsecp256k1\libsecp256k1.vcxproj">
<Project>{bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="..\common.vcxproj" />
Expand Down
24 changes: 24 additions & 0 deletions build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,35 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\src\asset.cpp" />
<ClCompile Include="..\..\src\chain.cpp" />
<ClCompile Include="..\..\src\confidential_validation.cpp" />
<ClCompile Include="..\..\src\deploymentstatus.cpp" />
<ClCompile Include="..\..\src\dynafed.cpp" />
<ClCompile Include="..\..\src\mainchainrpc.cpp" />
<ClCompile Include="..\..\src\node\interfaces.cpp" />
<ClCompile Include="..\..\src\node\ui_interface.cpp" />
<ClCompile Include="..\..\src\pegins.cpp" />
<ClCompile Include="..\..\src\pow.cpp" />
<ClCompile Include="..\..\src\primitives\bitcoin\transaction.cpp" />
<ClCompile Include="..\..\src\primitives\pak.cpp" />
<ClCompile Include="..\..\src\rpc\server.cpp" />
<ClCompile Include="..\..\src\script\sigcache.cpp" />
<ClCompile Include="..\..\src\shutdown.cpp" />
<ClCompile Include="..\..\src\sync.cpp" />
<ClCompile Include="..\..\src\validation.cpp" />
<ClCompile Include="..\..\src\versionbits.cpp" />
<ClCompile Include="..\..\src\wallet\bdb.cpp" />
<ClCompile Include="..\..\src\wallet\rpc\elements.cpp" />
<ClCompile Include="..\..\src\wallet\salvage.cpp" />
<ClCompile Include="..\..\src\wallet\sqlite.cpp" />
@SOURCE_FILES@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libsecp256k1\libsecp256k1.vcxproj">
<Project>{bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="..\common.vcxproj" />
Expand Down
3 changes: 3 additions & 0 deletions build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\src\arith_uint256.cpp" />
<ClCompile Include="..\..\src\asset.cpp" />
<ClCompile Include="..\..\src\consensus\merkle.cpp" />
<ClCompile Include="..\..\src\consensus\tx_check.cpp" />
<ClCompile Include="..\..\src\crypto\aes.cpp" />
Expand All @@ -22,7 +23,9 @@
<ClCompile Include="..\..\src\crypto\sha512.cpp" />
<ClCompile Include="..\..\src\hash.cpp" />
<ClCompile Include="..\..\src\primitives\block.cpp" />
<ClCompile Include="..\..\src\primitives\confidential.cpp" />
<ClCompile Include="..\..\src\primitives\transaction.cpp" />
<ClCompile Include="..\..\src\primitives\txwitness.cpp" />
<ClCompile Include="..\..\src\pubkey.cpp" />
<ClCompile Include="..\..\src\script\bitcoinconsensus.cpp" />
<ClCompile Include="..\..\src\script\interpreter.cpp" />
Expand Down
13 changes: 8 additions & 5 deletions build_msvc/libsecp256k1/libsecp256k1.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\src\secp256k1\src\precomputed_ecmult.c" />
<ClCompile Include="..\..\src\secp256k1\src\precomputed_ecmult_gen.c" />
<ClCompile Include="..\..\src\secp256k1\src\secp256k1.c" />
</ItemGroup>
<ItemDefinitionGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\secp256k1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<PreprocessorDefinitions>ENABLE_MODULE_GENERATOR;ENABLE_MODULE_RANGEPROOF;ENABLE_MODULE_SURJECTIONPROOF;ECMULT_WINDOW_SIZE=15;ECMULT_GEN_PREC_BITS=8;ENABLE_MODULE_WHITELIST;ENABLE_MODULE_ECDH;ENABLE_MODULE_ECDSA_ADAPTOR;ENABLE_MODULE_ECDSA_S2C;ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\secp256k1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4005;4146;4244;4267;4334</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="..\common.vcxproj" />
</Project>
</Project>
1 change: 1 addition & 0 deletions build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_rpcnestedtests.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_uritests.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_wallettests.cpp" />
<ClCompile Include="..\..\src\primitives\bitcoin\transaction.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
Expand Down
1 change: 1 addition & 0 deletions build_msvc/test_bitcoin/test_bitcoin.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<ClCompile Include="..\..\src\wallet\test\*_fixture.cpp" />
<ClCompile Include="..\..\src\wallet\test\*_tests.cpp" />
<ClCompile Include="..\..\src\wallet\test\util.cpp" />
<ClCompile Include="..\..\src\primitives\bitcoin\transaction.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libminisketch\libminisketch.vcxproj">
Expand Down
2 changes: 1 addition & 1 deletion src/mainchainrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ bool IsConfirmedBitcoinBlock(const uint256& hash, const int nMinConfirmationDept
return false;
}
}
} catch (CConnectionFailed& e) {
} catch (CConnectionFailed&) {
LogPrintf("WARNING: Lost connection to mainchain daemon RPC; will retry.\n");
return false;
} catch (...) {
Expand Down
4 changes: 2 additions & 2 deletions src/pegins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static bool CheckPeginTx(const std::vector<unsigned char>& tx_data, T& pegtx, co
if (!pegtx_stream.empty()) {
return false;
}
} catch (std::exception& e) {
} catch (std::exception&) {
// Invalid encoding of transaction
return false;
}
Expand Down Expand Up @@ -214,7 +214,7 @@ static bool GetBlockAndTxFromMerkleBlock(uint256& block_hash, uint256& tx_hash,
}
tx_hash = tx_hashes[0];
tx_index = tx_indices[0];
} catch (std::exception& e) {
} catch (std::exception&) {
// Invalid encoding of merkle block
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion src/wallet/test/psbt_wallet_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ BOOST_AUTO_TEST_CASE(psbt_updater_test)
BOOST_CHECK_EQUAL(final_hex, "70736274ff01009a020000000258e87a21b56daf0c23be8e7070456c336f7cbaa5c8757924f545887bb2abdd750000000000ffffffff838d0427d0ec650a68aa46bb0b098aea4422c071b2ca78352a077959d07cea1d0100000000ffffffff0270aaf00800000000160014d85c2b71d0060b09c9886aeb815e50991dda124d00e1f5050000000016001400aea9a2e5f0f876a588df5546e8742d1d87008f00000000000100bb0200000001aad73931018bd25f84ae400b68848be09db706eac2ac18298babee71ab656f8b0000000048473044022058f6fc7c6a33e1b31548d481c826c015bd30135aad42cd67790dab66d2ad243b02204a1ced2604c6735b6393e5b41691dd78b00f0c5942fb9f751856faa938157dba01feffffff0280f0fa020000000017a9140fb9463421696b82c833af241c78c17ddbde493487d0f20a270100000017a91429ca74f8a08f81999428185c97b5d852e4063f6187650000000104475221029583bf39ae0a609747ad199addd634fa6108559d6c5cd39b4c2183f1ab96e07f2102dab61ff49a14db6a7d02b0cd1fbb78fc4b18312b5b4e54dae4dba2fbfef536d752ae2206029583bf39ae0a609747ad199addd634fa6108559d6c5cd39b4c2183f1ab96e07f10d90c6a4f000000800000008000000080220602dab61ff49a14db6a7d02b0cd1fbb78fc4b18312b5b4e54dae4dba2fbfef536d710d90c6a4f00000080000000800100008001090880f0fa02000000000001012000c2eb0b0000000017a914b7f5faf40e3d40a5a459b1db3535f2b72fa921e88701042200208c2353173743b595dfb4a07b72ba8e42e3797da74e87fe7d9d7497e3b2028903010547522103089dc10c7ac6db54f91329af617333db388cead0c231f723379d1b99030b02dc21023add904f3d6dcf59ddb906b0dee23529b7ffb9ed50e5e86151926860221f0e7352ae2206023add904f3d6dcf59ddb906b0dee23529b7ffb9ed50e5e86151926860221f0e7310d90c6a4f000000800000008003000080220603089dc10c7ac6db54f91329af617333db388cead0c231f723379d1b99030b02dc10d90c6a4f00000080000000800200008001090800c2eb0b0000000000220203a9a4c37f5996d3aa25dbac6b570af0650394492942460b354753ed9eeca5877110d90c6a4f000000800000008004000080010521010000000000000000000000000000000000000000000000000000000000000000002202027f6399757d2eff55a136ad02c684b1838b6556e5f1b6b34282a94b6b5005109610d90c6a4f00000080000000800500008001052101000000000000000000000000000000000000000000000000000000000000000000");

// Mutate the transaction so that one of the inputs is invalid
psbtx.inputs[0].prevout.n = 2;
// psbtx.inputs[0].prevout.n = 2; // ELEMENTS: FIXME

// Try to sign the mutated input
SignatureData sigdata;
bool complete = true;
BOOST_CHECK(m_wallet.FillPSBT(psbtx, complete, SIGHASH_ALL, true, true) != TransactionError::OK);
//BOOST_CHECK(spk_man->FillPSBT(psbtx, PrecomputePSBTData(psbtx), SIGHASH_ALL, true, true) != TransactionError::OK);
}
Expand Down
28 changes: 14 additions & 14 deletions test/functional/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,28 @@
BASE_SCRIPTS = [
# Scripts that are run by default.
# vv First elements tests vv
'feature_fedpeg.py',
'feature_fedpeg.py --pre_transition',
'feature_fedpeg.py --post_transition',
'feature_fedpeg.py --legacy-wallet',
'feature_fedpeg.py --pre_transition --legacy-wallet',
'feature_fedpeg.py --post_transition --legacy-wallet',
'feature_mandatory_coinbase.py',
'feature_dynafed.py',
'feature_sighash_rangeproof.py',
'feature_dynafed.py --legacy-wallet',
'feature_sighash_rangeproof.py --legacy-wallet',
'feature_block_subsidy.py',
'feature_connect_genesis_outputs.py',
'feature_connect_genesis_outputs.py --legacy-wallet',
'feature_block_v4.py',
'feature_pak.py',
'feature_blocksign.py',
'feature_pak.py --legacy-wallet',
'feature_blocksign.py --legacy-wallet',
'rpc_calcfastmerkleroot.py',
'feature_txwitness.py',
'rpc_tweakfedpeg.py',
'feature_issuance.py',
'feature_confidential_transactions.py',
'feature_default_asset_name.py',
'rpc_tweakfedpeg.py --legacy-wallet',
'feature_issuance.py --legacy-wallet',
'feature_confidential_transactions.py --legacy-wallet',
'feature_default_asset_name.py --legacy-wallet',
'feature_assetsdir.py',
'feature_initial_reissuance_token.py',
'feature_initial_reissuance_token.py --legacy-wallet',
'feature_progress.py',
'rpc_getnewblockhex.py',
'wallet_elements_regression_1172.py',
'wallet_elements_regression_1172.py --legacy-wallet',
# Longest test should go first, to favor running tests in parallel
'wallet_hd.py --legacy-wallet',
'wallet_hd.py --descriptors',
Expand Down

0 comments on commit c92a8f2

Please sign in to comment.