Closed yashasvi-ranawat closed 1 year ago
the pythonic implementation is 2 orders magnitude slower. Will only use it as fallback, in the next commit
In the present application of the function, where it is only used to generate P2PKH locking script (and cashaddress), I think this is okay.
However, if in the future BitCash implements P2SH wallets, then the wallet can leak what underlying implementation it uses when asked to verify a script. Here, of course, switching to P2SH32 would be a solution, which also follows the general recommendation against using ripemd160.
Here, of course, switching to P2SH32 would be a solution, which also follows the general recommendation against using ripemd160.
Sorry, I am not familiar with P2SH32
and the upcoming network upgrade. Is P2SH32
meant to replace P2SH
or work along it? And does that meant ripemd160 will no longer be necessary?
Here, of course, switching to P2SH32 would be a solution, which also follows the general recommendation against using ripemd160.
Sorry, I am not familiar with
P2SH32
and the upcoming network upgrade. IsP2SH32
meant to replaceP2SH
or work along it? And does that meant ripemd160 will no longer be necessary?
It is meant to go along with P2SH (since a lot of contracts have used it, and a lot of wallets have it implemented). The primary idea is to limit hash collision of complex scripts, which is a possibility with P2SH.
Although, ripemd160 will still be relevant with P2PKH and P2SH. I haven't completely followed the discussion either, but it is heavily recommended for the P2SH scripts to switch to P2SH32.
Could you please add unit tests to all individual functions as well as for
ripemd160_sha256
?
I monkeypatched tests for pythonic ripemd160_sha256. It should test it on any environment.
will need further testing.
Could you please add unit tests to all individual functions as well as for ripemd160_sha256?
Correct monkeypatching implemented to test pythonic ripemd160. should test it regardless of environment.
Is this ready for final review @yashasvi-ranawat?
Closes #118