MetacoSA / NBitcoin

Comprehensive Bitcoin library for the .NET framework.
MIT License
1.88k stars 847 forks source link

LibConsensus tests failing on 0.17 #556

Open NicolasDorier opened 6 years ago

NicolasDorier commented 6 years ago

I checked. Bitcoin core 0.17.0 is saving the library in a different file and add several symlink. @lontivero the code to ensure the dll is here was taking a symlink instead of the real library.

I attempted to fix it by using the library instead of symlinks on https://github.com/MetacoSA/NBitcoin/commit/c10e8c380eec3207ed3b804e7f8589ded5d7d9b5 but the tests keep failing.

Might it be because of caching on the build machine?

Error Message:
 System.DllNotFoundException : Unable to load shared library 'libbitcoinconsensus.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibbitcoinconsensus.dll: cannot open shared object file: No such file or directory
Stack Trace:
   at NBitcoin.Script.VerifyScriptConsensus(Byte[] scriptPubKey, UInt32 scriptPubKeyLen, Byte[] txTo, UInt32 txToLen, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err)
   at NBitcoin.Script.VerifyScriptConsensus(Script scriptPubKey, Transaction tx, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin/Script.cs:line 927
   at NBitcoin.Tests.script_tests.AssertValidScript(Script scriptPubKey, Transaction tx, Int32 n, ScriptVerify verify) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 776
   at NBitcoin.Tests.script_tests.script_CHECKMULTISIG23() in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 731
[xUnit.net 00:00:39.1808997]     NBitcoin.Tests.script_tests.script_json_tests [FAIL]
[xUnit.net 00:00:39.1882006]     NBitcoin.Tests.script_tests.script_CHECKMULTISIG12 [FAIL]
Failed   NBitcoin.Tests.script_tests.script_json_tests
Error Message:
 System.DllNotFoundException : Unable to load shared library 'libbitcoinconsensus.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibbitcoinconsensus.dll: cannot open shared object file: No such file or directory
Stack Trace:
   at NBitcoin.Script.VerifyScriptConsensusWithAmount(Byte[] scriptPubKey, UInt32 scriptPubKeyLen, Int64 amount, Byte[] txTo, UInt32 txToLen, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err)
   at NBitcoin.Script.VerifyScriptConsensus(Script scriptPubKey, Transaction tx, UInt32 nIn, Money amount, ScriptVerify flags, BitcoinConsensusError& err) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin/Script.cs:line 936
   at NBitcoin.Tests.script_tests.AssertVerifyScript(WitScript wit, Money amount, Script scriptSig, Script scriptPubKey, ScriptVerify flags, Int32 testIndex, String comment, ScriptError expectedError) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 379
   at NBitcoin.Tests.script_tests.script_json_tests() in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 361
Failed   NBitcoin.Tests.script_tests.script_CHECKMULTISIG12
Error Message:
 System.DllNotFoundException : Unable to load shared library 'libbitcoinconsensus.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibbitcoinconsensus.dll: cannot open shared object file: No such file or directory
Stack Trace:
   at NBitcoin.Script.VerifyScriptConsensus(Byte[] scriptPubKey, UInt32 scriptPubKeyLen, Byte[] txTo, UInt32 txToLen, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err)
   at NBitcoin.Script.VerifyScriptConsensus(Script scriptPubKey, Transaction tx, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin/Script.cs:line 927
   at NBitcoin.Tests.script_tests.AssertValidScript(Script scriptPubKey, Transaction tx, Int32 n, ScriptVerify verify) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 776
   at NBitcoin.Tests.script_tests.script_CHECKMULTISIG12() in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 685
2018-10-12T01:31:32Z Bitcoin Core version v0.17.0 (release build)
lontivero commented 6 years ago

I am on it

NicolasDorier commented 6 years ago

https://github.com/MetacoSA/NBitcoin/pull/557

NicolasDorier commented 6 years ago

@lontivero still broken, should we disable the tests?

lontivero commented 6 years ago

Tomorrow I will disable them first and start working on that.