keep-starknet-strange / shinigami

Bitcoin Script VM in Cairo
https://shinigamibtc.dev
MIT License
64 stars 59 forks source link

[bug] [bug] [bitcoin-core test] Script sig incorrect push only error #216

Closed b-j-roberts closed 2 months ago

b-j-roberts commented 2 months ago

Issue

The following bitcoin-core test is failing to give the correct result :

ScriptSig: '0x47 0x304402204e2eb034be7b089534ac9e798cf6a2c79f38bcb34d1b179efd6f2de0841735db022071461beb056b5a7be1819da6a3e3ce3662831ecc298419ca101eb6887b5dd6a401 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac', ScriptPubKey: 'HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL'

This code should run without error, but is failing with a p2sh not pushonly error within the engine. The p2sh pushonly error should only be occurring if the script sig contains non push opcodes.

Replicate

To replicate the issue you can use the latest main branch with the following command:

scarb cairo-run '[[85638276393621973070440747833762038831355549296477212457307688938174429493,90470716678085386252845993366893326476588863133237600043906055005677893433,179158233393561263265507492347277947779387273727683171857941718221646344245,96087551755267682668260791732946600836084713976281856052798961311967044402,101098187588925298844085405309771621512627044833724006802761172381919688992,85638357194903148703655715148292624308875868613455641735334616661500506167],147909701361076337537024831640441733309782596018531,21,[127663847454887939587139309636239821031034502797572027630085140362727469157],705412290810036490065568420166434533209006449177858240241439102012309836,30,[],1345475400,4]'
b-j-roberts commented 2 months ago

@mubarak23 Here is that test we discussed.

mubarak23 commented 2 months ago

@mubarak23 Here is that test we discussed.

Kindly assign

onlydustapp[bot] commented 2 months ago

Hey @mubarak23! Thanks for showing interest. We've created an application for you to contribute to shinigami. Go check it out on OnlyDust!

b-j-roberts commented 2 months ago

Hey @mubarak23 , any progress debugging this script yet?

mubarak23 commented 2 months ago

@b-j-roberts am yet to figure this out,

but i notice @jsandinoDev has open a PR that will fix this issue

jsandinoDev commented 2 months ago

Hi @mubarak23 Yes sorry I fix my issue but when I tried this one, the fix also worked.

mubarak23 commented 2 months ago

Hi @mubarak23 Yes sorry I fix my issue but when I tried this one, the fix also worked.

Thank you @jsandinoDev ,

@b-j-roberts kindly closed this issue