danneu
Newbie
Offline
Activity: 32
Merit: 0
|
|
November 09, 2013, 07:12:28 PM |
|
Huge thanks for sharing.
This is the most intelligible/simple implementation I've found yet, and not just for ECC.
|
|
|
|
deepceleron
Legendary
Offline
Activity: 1512
Merit: 1036
|
|
November 21, 2013, 11:47:19 AM Last edit: December 03, 2013, 02:03:45 AM by deepceleron |
|
You can grab line 573-590 out of here if you want to add a "print paper wallet" def print_wallet(priv) to your code: http://we.lovebitco.in/dice2key.pyOr grab the whole thing to line 483 if you want a pretty version of main.py, but there's still some warnings for python 2.7: Expected type 'Number', got 'str | unicode' instead (at line 429) (edit: this appears to be an invalid warning I can't make go away) Unexpected argument (at line 92) (incorrect call argument) (edit: VB fixed this) 472-475 "Q and Qr" are uppercase redundant parenthesis. 94, 98, 103, 107, 112, 162, 167, 169 along with more PEP8 if: statements on same line, spacings etc.
|
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
November 28, 2013, 07:39:15 PM |
|
Thanks for the commit!
My pleasure. PBT is great.
|
|
|
|
sdp
|
|
December 03, 2013, 01:22:50 PM |
|
Nice, congratulations. Though I would've suggested a different language cause simply Python ain't all that fast when it comes to these expensive operations there.
This reminds me when someone mentioned to me that I shouldn't use iostreams in C++. That it was faster to use C-style printf functions. After some bench marking and some inspection he was right that C++ iostreams are slower. Each << is a function call. I think this argument is similar. In the end it doesn't matter. Computers are fast today.
|
Coinsbank: Left money in their costodial wallet for my signature. Then they kept the money.
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
December 13, 2013, 10:48:39 AM |
|
I assume mktx will put anything not spent explicitly to mining fees?
|
|
|
|
waxwing
|
|
December 17, 2013, 06:37:22 PM |
|
Are there any practical limits in numbers of parties to a multisig transaction? I am thinking of a scenario like 6 of 10 of 8 of 15. Does the size of the script start to break anything at any point? I assume mktx will put anything not spent explicitly to mining fees?
Yes, it works like that here as that's part of the bitcoin protocol.
|
PGP fingerprint 2B6FC204D9BF332D062B 461A141001A1AF77F20B (use email to contact)
|
|
|
justusranvier
Legendary
Offline
Activity: 1400
Merit: 1013
|
|
December 17, 2013, 06:38:33 PM |
|
Are there any practical limits in numbers of parties to a multisig transaction? I am thinking of a scenario like 6 of 10 of 8 of 15. Does the size of the script start to break anything at any point? n=20 is the maximum allowed by protocol. n>3 is currently non-standard, so you have to make a private arrangement with a miner to get those transactions included in a block.
|
|
|
|
waxwing
|
|
December 17, 2013, 07:03:25 PM |
|
Are there any practical limits in numbers of parties to a multisig transaction? I am thinking of a scenario like 6 of 10 of 8 of 15. Does the size of the script start to break anything at any point? n=20 is the maximum allowed by protocol. n>3 is currently non-standard, so you have to make a private arrangement with a miner to get those transactions included in a block. Ah thanks that is a very important point for me ... I did notice the darkwallet guys using a 3 of 5 address, I guess I can ask them about that. I only have one special use for large numbers, maybe I can work around it.
|
PGP fingerprint 2B6FC204D9BF332D062B 461A141001A1AF77F20B (use email to contact)
|
|
|
waxwing
|
|
December 23, 2013, 04:49:30 PM Last edit: December 24, 2013, 06:40:17 PM by waxwing |
|
(On the above posts, Vitalik seems to have added an "eligius_pushtx" method to allow the more exotic multisig txs to go through (eligius processes them apparently) so that's cool ) Question: I want to do verifying messages with addresses from external wallets ..[snipped] Question can be ignored, the code is already there in ecdsa_recover. Thanks
|
PGP fingerprint 2B6FC204D9BF332D062B 461A141001A1AF77F20B (use email to contact)
|
|
|
natb
Newbie
Offline
Activity: 28
Merit: 12
|
|
December 29, 2013, 04:25:22 PM |
|
Vitalik, this is exactly what I was looking for. I'm going to replace my HW wallet test harness with your library (the one I was using before was functional, but I'd say not the cleanest library in the world). Thanks for sharing - I'll let you know if I run across any issues or have any improvement ideas.
|
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
January 23, 2014, 08:37:29 AM |
|
the time part of the two random functions looses entropy:
str(int(time.time())**7) is probably meant to be str(int(time.time()**7)) or str(time.time()**7)
It would be nice to be able to add some base entropy by hammering your tinfoil hat on the keyboard at start.
|
|
|
|
waxwing
|
|
March 02, 2014, 01:18:37 PM Last edit: March 02, 2014, 02:07:27 PM by waxwing |
|
I opened an issue with regard to signature padding here: https://github.com/vbuterin/pybitcointools/issues/9I think fixing it might be a bit above my paygrade (or at least would take me a while), so if anyone can help I'd appreciate it. Edit: Vitalik pushed a fix already, thanks (although it needs testing, which might be tricky).
|
PGP fingerprint 2B6FC204D9BF332D062B 461A141001A1AF77F20B (use email to contact)
|
|
|
Wanesst
|
|
March 03, 2014, 07:24:04 PM |
|
That's cool! But a different language can be better cause this ain't all that fast
|
|
|
|
yakov
Newbie
Offline
Activity: 40
Merit: 0
|
|
March 04, 2014, 01:05:06 AM |
|
What are you coding that needs such breakneck speed?
|
|
|
|
|
hamish.macewan
Newbie
Offline
Activity: 3
Merit: 0
|
|
March 23, 2014, 06:23:18 PM |
|
I deliberately designed the library to be simple and no-nonsense.
Thanks for the effort, and I feel bad having to ask for assistance when so much has already been given. What is required before you reach this point > from pybitcointools import *
The command line examples are fine, but this "> from pybitcointools import *" only caused me grief.
|
|
|
|
instagibbs
Member
Offline
Activity: 114
Merit: 12
|
|
March 23, 2014, 07:00:20 PM |
|
I deliberately designed the library to be simple and no-nonsense.
Thanks for the effort, and I feel bad having to ask for assistance when so much has already been given. What is required before you reach this point > from pybitcointools import *
The command line examples are fine, but this "> from pybitcointools import *" only caused me grief. Same here. I couldn't get it to import, even with adding the correct folders to path(even inside the script using sys.path). I'm no linux expert though so I'm probably doing something wrong.
|
|
|
|
waxwing
|
|
March 25, 2014, 04:07:22 PM |
|
I deliberately designed the library to be simple and no-nonsense.
Thanks for the effort, and I feel bad having to ask for assistance when so much has already been given. What is required before you reach this point > from pybitcointools import *
The command line examples are fine, but this "> from pybitcointools import *" only caused me grief. "from pybitcointools import *" is Python. If you have Python installed, you can just type 'python' (assuming it's in your path) at the command line to start the Python interpreter, and then you will get > from there you can do the above command. Feel free to ask further questions as necessary. People will be happy to help.
|
PGP fingerprint 2B6FC204D9BF332D062B 461A141001A1AF77F20B (use email to contact)
|
|
|
gabridome
|
|
March 28, 2014, 02:40:23 PM |
|
Thank you for all you are doing for us. I have scarse experience in python and programming in general but I like a lot your tutorial on multisig ( http://bitcoinmagazine.com/11113/pybitcointools-multisig-tutorial/). I get the following error when I type the first line of code: >>> from pybitcointools import * Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pybitcointools also using the command line tool I get instead: k1=`pybtctool random_key` Traceback (most recent call last): File "/usr/local/bin/pybtctool", line 8, in <module> cmd = sys.argv[2] IndexError: list index out of range I work on Mac OS. I have installed the tools with: sudo pip install bitcoin Thank you.
|
|
|
|
tongbao
Newbie
Offline
Activity: 9
Merit: 0
|
|
March 30, 2014, 10:01:31 AM |
|
nice work, put a footprint here [feasibility on multiple public keys]
|
|
|
|
|