--- Log opened Sat Oct 03 00:00:36 2020 01:21 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 02:22 -!- shesek [~shesek@unaffiliated/shesek] has quit [Remote host closed the connection] 03:32 -!- b10c [~b10c@2a01:4f8:192:612a:216:3eff:fef3:dc6a] has quit [Quit: leaving] 03:33 -!- b10c [~b10c@2a01:4f8:192:612a:216:3eff:fef3:dc6a] has joined #rust-bitcoin 03:46 < b10c> I have a SIGHASH_ALL signature, a public key, and a transaction. I want to verify the signature. Is there anything pre-baked in the rust-bitcoin world I pass the sig, pk and tx or do I have to transform the tx -> msg (i.e. empty other script_sigs -> ... -> dsha()) myself first to pass it into libsecp's verify()? 05:41 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Quit: jonatack] 05:56 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 06:18 -!- Kamren34Bogisich [~Kamren34B@static.57.1.216.95.clients.your-server.de] has joined #rust-bitcoin 06:38 -!- Kamren34Bogisich [~Kamren34B@static.57.1.216.95.clients.your-server.de] has quit [Ping timeout: 272 seconds] 07:15 -!- fiatjaf [~fiatjaf@2804:7f2:2a85:2fc:ea40:f2ff:fe85:d2dc] has joined #rust-bitcoin 08:18 -!- Leta46Durgan [~Leta46Dur@static.57.1.216.95.clients.your-server.de] has joined #rust-bitcoin 08:43 -!- jkczyz [sid419941@gateway/web/irccloud.com/x-yaznznuikggdvlgi] has quit [Ping timeout: 272 seconds] 08:43 -!- moneyball [sid299869@gateway/web/irccloud.com/x-cxbxyqedlvekpsqc] has quit [Ping timeout: 272 seconds] 08:43 -!- jkczyz [sid419941@gateway/web/irccloud.com/x-hcvvptwtteadyimp] has joined #rust-bitcoin 08:43 -!- moneyball [sid299869@gateway/web/irccloud.com/x-knmkcntuccvblapy] has joined #rust-bitcoin 08:58 < BlueMatt> ariard: I havent looked at core code in a long time, it may be that this was fixed - when lightning was defined it required 253 because the rounding in core required it 08:58 < BlueMatt> ariard: going from what you just posted 253 sounds right? If it rounds up to get the tx size then you'd need 253, not 250 09:12 -!- shesek [~shesek@164.90.217.137] has joined #rust-bitcoin 09:12 -!- shesek [~shesek@164.90.217.137] has quit [Changing host] 09:12 -!- shesek [~shesek@unaffiliated/shesek] has joined #rust-bitcoin 11:36 -!- fiatjaf [~fiatjaf@2804:7f2:2a85:2fc:ea40:f2ff:fe85:d2dc] has quit [Ping timeout: 260 seconds] 11:46 -!- jrawsthorne [~jrawsthor@static.235.41.217.95.clients.your-server.de] has quit [Read error: Connection reset by peer] 11:47 -!- jrawsthorne [~jrawsthor@static.235.41.217.95.clients.your-server.de] has joined #rust-bitcoin 12:28 -!- fiatjaf [~fiatjaf@2804:7f2:2a85:2fc:ea40:f2ff:fe85:d2dc] has joined #rust-bitcoin 13:36 < gwillen> b10c: I don't know enough about rust-bitcoin to be able to answer that, but note that the specific transformation depends on whether it's a segwit or a pre-segwit signature 13:36 < gwillen> and either way the transformation (the "sighash") is pretty messy, although pre-segwit is messier 14:49 < b10c> gwillen: yes, thanks. I found https://en.bitcoin.it/wiki/OP_CHECKSIG and https://en.bitcoin.it/w/images/en/7/70/Bitcoin_OpCheckSig_InDetail.png which explains the transformation for non-segwit I think. I'll have another look around. The transformation has to be implemented somewhere already.. 14:51 < gwillen> the segwit sighash is described here: https://en.bitcoin.it/wiki/BIP_0143 14:53 -!- Leta46Durgan [~Leta46Dur@static.57.1.216.95.clients.your-server.de] has quit [Ping timeout: 272 seconds] 17:00 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 17:05 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 18:41 < ariard> BlueMatt: gotcha, the weight-to-vBytes inflation only occurs for weight not multiple of 4, thus you may have a fee diff of 1, breaking your transaction 18:42 < ariard> BlueMatt: but still 251 as min relay fee sounds to work ? 19:40 < BlueMatt> ariard: hmm? The way I read the above, it rouds up when calculating vbytes, it always rounds up, so 5 weight = 2 vbytes. ie we need to do the +3 that GetVirtualTransactionSize() does, hence the 253 --- Log closed Sun Oct 04 00:00:37 2020