Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: Ukigo on August 25, 2011, 02:42:39 PM



Title: Pywallet fork for SolidCoin and more
Post by: Ukigo on August 25, 2011, 02:42:39 PM
Hi all !
 



Title: Re: Pywallet fork for SolidCoin and more
Post by: jackjack on August 25, 2011, 03:06:24 PM
Did you leave your basement during the last thousand years?

Pywallet already support all existing and future blockchains

Also, you forked the old Joric's pywallet, ie you forked a tool which is already outdated
Well done


Title: Re: Pywallet fork for SolidCoin and more
Post by: jackjack on August 25, 2011, 03:27:46 PM
I don't have to try I know it works
Follow my instructions (https://bitcointalk.org/index.php?topic=34028.0) with Version = 125 instead of 0
It worked for Bitcoin, Namecoin, I0coin, Ixcoin, Devcoin, Groupcoin, and all their testnets

Basically you just:
 - created a useless function
 - reintroduced 2 bugs
Code:
$ diff old_joric_pywallet this_awesome_fork
3c3
< # pywallet_solidcoin.py 1.1
---
> # pywallet.py 1.1
6c6
< # Usage: pywallet_solidcoin.py [options]
---
> # Usage: pywallet.py [options]
30,31c30,31
< max_version = 32500
< addrtype = 125
---
> max_version = 32400
> addrtype = 0
207a208
> return hex_der_key.decode('hex')
229a231,235
> # private keys are 279 bytes long (see crypto/ec/cec_asn1.c)
> # ASN1_SIMPLE(EC_PRIVATEKEY, version, LONG),
> # ASN1_SIMPLE(EC_PRIVATEKEY, privateKey, ASN1_OCTET_STRING),
> # ASN1_EXP_OPT(EC_PRIVATEKEY, parameters, ECPKPARAMETERS, 0),
> # ASN1_EXP_OPT(EC_PRIVATEKEY, publicKey, ASN1_BIT_STRING, 1)
244a251,252
> # public keys are 65 bytes long (520 bits)
> # 0x04 + 32-byte X-coordinate + 32-byte Y-coordinate
271,279d278
< def short_hex(bytes):
< t = bytes.encode('hex_codec')
< if len(t) < 32:
< return t
< return t[0:32]+"..."+t[-32:]
<
365c364
< vchIn = chr(addrtype) + secret
---
> vchIn = chr(addrtype+128) + secret
370c369
< if vch and vch[0] == chr(addrtype):
---
> if vch and vch[0] == chr(addrtype+128):
685a685,689
> elif type == "bestblock":
> vds.write_int32(d['nVersion'])
> vds.write_compact_size(len(d['hashes']))
> for h in d['hashes']:
> vds.write(h)



Title: Re: Pywallet fork for SolidCoin and more
Post by: jackjack on August 25, 2011, 05:52:16 PM
Yes,
Code:
chr(addrtype+128)
instead of
Code:
chr(addrtype)
is a bug, or rather something that goes against the de facto standards

I didn't say it doesn't work
It's just like ix/i0/solidcoin: copy the code, change a value, tada I made a fork
You guys should really help Bitcoin projects instead of parasiting them (mainly when it doesn't add any value...)