keep-starknet-strange / raito

Bitcoin ZK client written in Cairo.
https://raito.wtf
MIT License
40 stars 34 forks source link

[bug] Client fails on block: 757739: Script validation failed on tx_idx: 1, input_idx: 0: Signature DER error #257

Open maciejka opened 3 weeks ago

maciejka commented 3 weeks ago

Description

In packages/client command:

scarb test --forceall --execute_scripts  tests/data/full_757738.json 

fails with:

Script validation failed on tx_idx: 1, input_idx: 0: Signature DER error
akintewe commented 3 weeks ago

Hello can i be assigned this issue

maciejka commented 3 weeks ago

Hello can i be assigned this issue

How are you going to approach it?

akintewe commented 3 weeks ago

What ill do is I will analyze transaction 1, input 0 in block 757739. I'll verify the signature's DER encoding, ensuring compliance with BIP66. I'll add granular logging to the DER decoding process, comparing our output with a reference node. I'll scrutinize our recent commits affecting signature validation, implement necessary fixes, and create a targeted test case replicating this scenario. I'll then validate the fix by re-running the full_757738.json test.

bloomingpeach commented 3 weeks ago

I tried and it seems to work, no more error. @maciejka

akintewe commented 2 weeks ago

@maciejka can i still work on it please

maciejka commented 2 weeks ago

I tried and it seems to work, no more error. @maciejka

The command in the description missed an execute_scripts. Bonus points for being alert.

maciejka commented 2 weeks ago

@maciejka can i still work on it please

Thanks for your readiness to work. We want to consult Shinigami project first.

akintewe commented 2 weeks ago

Thank you so much

bloomingpeach commented 2 weeks ago

@maciejka image

It is most likely because witness checksig(for segwit) has not been implemented in Shinigami yet.