keep-starknet-strange / shinigami

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

[bug] [bitcoin-core test] '-4294967295 0x05 0xFFFFFFFF80 EQUAL' #171

Closed b-j-roberts closed 1 month ago

b-j-roberts commented 1 month ago

Issue

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

ScriptSig: '-4294967295' -- ScriptPubKey: '0x05 0xFFFFFFFF80 EQUAL'

This code should be passing, but is failing at the EQUAL operation when comparing -4294967295 and 0xFFFFFFFF80.

Replicate

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

scarb cairo-run '[[],54648151398953683858372917,11,[],4642454408269420813098407607158452215490494213563695436,23]'
b-j-roberts commented 1 month ago

@petersdt would you be interested in taking this issue?

NueloSE commented 1 month ago

Can I work on this @b-j-roberts

PavitraAgarwal21 commented 1 month ago

@b-j-roberts Can I take this issue

onlydustapp[bot] commented 1 month ago

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

ooochoche commented 1 month ago

Please @b-j-roberts can I be assigned this 🙏🏻

onlydustapp[bot] commented 1 month ago

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

petersdt commented 1 month ago

@petersdt would you be interested in taking this issue?

yes pls @b-j-roberts

b-j-roberts commented 1 month ago

Awesome @petersdt , welcome to the project. Let me know if you have any questions!

b-j-roberts commented 1 month ago

Here are the links I sent in our discussion:

b-j-roberts commented 1 month ago

Hey @petersdt , any update on debugging this test case?

adrianvrj commented 1 month ago

hi @b-j-roberts if the assigned person does not reports back I could tackle this one!

petersdt commented 1 month ago

Hey @petersdt , any update on debugging this test case?

Thanks to the resource you shared i have an understanding of how it works now. currently trying to log and locate the reason for failure.

I would revert on this soon. Am making some progress.

b-j-roberts commented 1 month ago

@petersdt Any updates on this? What are the 2 values in the stack on the equal operation?

b-j-roberts commented 1 month ago

This issue has been resolved from a bug fix in the ScriptNum wrap function. https://github.com/keep-starknet-strange/shinigami/commit/57c2fa4fa81ae68ad35ed4e6d31dffe37b3db7fa

Thank you.