--- Log opened Tue Nov 11 00:00:34 2025 07:41 < hebasto> TheCharlatan: perhaps it would make sense to use the "dev-mode" preset, where `BUILD_SHARED_LIBS` is set to "ON", more consistently? Testing the shared library in the CI seems more valuable, as this setup is more prone to issues related to symbol visibility, runpaths etc. 14:02 -!- stevenroose [~steven@irc.roose.io] has joined #bitcoin-kernel 14:03 < stevenroose> yo all :) was trying to add some new tests using kernel but first migrated some existing bitcoinconsensus tests, but I can't get them to work. I have a few questions: 14:03 < stevenroose> the verify function takes a scriptpubkey and amount as first two arguments, but also all input txouts and input index, can't it take it from there? 14:03 < stevenroose> Can it be that the first argument (scriptPubkey) is actually the "spent script" and not the scriptpubkey? 14:04 < stevenroose> TheCharlatan forwarded me here :) 14:06 < TheCharlatan> stevenroose if you look at the test code here, does that make sense to you then https://github.com/TheCharlatan/rust-bitcoinkernel/blob/master/tests/test.rs#L562-L581 ? 14:08 < stevenroose> The first example the scriptPubkey is OP_DUP OP_HASH160 OP_PUSHBYTES_20 4bfbaf6afb76cc5771bc6404810d1cc041a69339 OP_EQUALVERIFY OP_CHECKSIG% 14:08 < stevenroose> that looks like a spentScript not a scriptPubkey? 14:08 < stevenroose> I mean it can be one, but it'd be nonstandard? 14:09 < stevenroose> ah no, after that they are segwit scriptpubkeys 14:10 < stevenroose> Weird that in the example you sent, all the txouts are empty. That that should not be possible, right? Maybe in pre-taproot context, the other inputs are not checked or so? 14:11 < TheCharlatan> yes, if the taproot verification flag is not set, you don't need to verify all the outputs. 14:11 < TheCharlatan> The tests are lifted from rust-bitcoinconsensus btw https://github.com/rust-bitcoin/rust-bitcoinconsensus/blob/master/src/lib.rs#L302 14:12 < stevenroose> nice 14:13 < stevenroose> then maybe my txs are actually wrong. though we have integration tests where these txs pass the mempool, I might be constructing them incorrectly for the unit test. I suspect that my bitcoinconsensus-based tests never did anything because the latest version of bitcoinconsensus doesn't support taproot .. 14:18 < stevenroose> I get the same error (Invalid) whether I serialize the scriptPubkey with or without length prefix, is that normal? 14:19 < TheCharlatan> mmh, not sure. Can you paste it here? 14:20 < stevenroose> Ah nice that was the error. I was bitcoin-serializing the spk for the txouts, which was putting the length prefix. Would be nice to have a "invalid scriptpubkey" or "invalid txout" or so :) 14:23 < TheCharlatan> that's good feedback. Can you submit the test case as an issue? Would be good to surface better encoding-related errors. 14:33 < stevenroose> https://gitlab.com/ark-bitcoin/bark/-/merge_requests/1308 :) --- Log closed Wed Nov 12 00:00:36 2025