Bitcoin Forum
May 05, 2024, 02:58:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Announcing Pycoin, a (partial) bitcoin protocol implementation in python3  (Read 3543 times)
ptd (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


View Profile
March 03, 2011, 10:46:53 AM
 #1

I been implementing bitcoin in python3. The result can be found on Gitorious. It intended to work in largely the same way as bitcoind, with all frontend programs communicating by IPC.

It is implemented around a select loop and does not use threads at all (this is one thing that makes it unique). Currently it connects to a client at 64.22.103.150, comunicates for a bit and dies when it recieves a block message (usually the one it requests). It can connect to multiple clients at once, but makes not real attempt to do so (trying to connect to a machine that can't possibly exist doesn't count).

Donations welcome at 1FLjoKrqjCMZLLCZz8NJ5u4AsVhDYPYLWR.
1714921086
Hero Member
*
Offline Offline

Posts: 1714921086

View Profile Personal Message (Offline)

Ignore
1714921086
Reply with quote  #2

1714921086
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714921086
Hero Member
*
Offline Offline

Posts: 1714921086

View Profile Personal Message (Offline)

Ignore
1714921086
Reply with quote  #2

1714921086
Report to moderator
1714921086
Hero Member
*
Offline Offline

Posts: 1714921086

View Profile Personal Message (Offline)

Ignore
1714921086
Reply with quote  #2

1714921086
Report to moderator
1714921086
Hero Member
*
Offline Offline

Posts: 1714921086

View Profile Personal Message (Offline)

Ignore
1714921086
Reply with quote  #2

1714921086
Report to moderator
genjix
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1072


View Profile
March 03, 2011, 12:20:18 PM
 #2

yes! great work Grin
kseistrup
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


Unselfish actions pay back better


View Profile WWW
March 03, 2011, 12:22:55 PM
 #3

I been implementing bitcoin in python3.

Python is cool, keep going!  Smiley

Cheers,

Klaus Alexander Seistrup
grondilu
Legendary
*
Offline Offline

Activity: 1288
Merit: 1076


View Profile
March 03, 2011, 12:31:22 PM
 #4


Good.  I'll definitely look into that.

Luke-Jr
Legendary
*
expert
Offline Offline

Activity: 2576
Merit: 1186



View Profile
March 03, 2011, 03:00:56 PM
 #5

Let me know if you want to move it under the bitcoin project to http://gitorious.org/bitcoin/pycoin

Can we get a real license on this? Your LICENSE/UNLICENSE files have no legal relevance in any jurisdictions*, thus this code is still under a default/standard copyright which forbids anyone else from copying it.

* IANAL and TINLA

ribuck
Donator
Hero Member
*
Offline Offline

Activity: 826
Merit: 1039


View Profile
March 03, 2011, 03:26:07 PM
 #6

Your LICENSE/UNLICENSE files have no legal relevance in any jurisdictions*, thus this code is still under a default/standard copyright which forbids anyone else from copying it.

Even if the wording of the UNLICENSE file its legally inadmissable, its presence obviously gives an implied license. The concept of implied license is recognised by courts in the US, the UK, the EU, and most Commonwealth countries, and probably most of the rest of the world too.

So go ahead and copy the unlicensed code.
0x6763
Guest

March 03, 2011, 07:14:42 PM
 #7

What about using http://unlicense.org/ ?
slush
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
March 03, 2011, 07:50:32 PM
Last edit: March 03, 2011, 08:16:17 PM by slush
 #8

Did you considered building pycoin on the top of ArtForz half-node source lying somewhere on the pastebin.com? I see that you duplicated some of his great job. I have also fork of his node running on the Twisted framework (in fact it needed only few tweaks), which is very robust and can be easily integrated with Qt, for example.

I didn't published my fork, because my job with the node isn't done yet, but if you're interested, I can send it to you right now. It would be nice to work on the same core and don't split the power between two very similar projects.

I have wet dreams about full bitcoin client implementation in python, so I appreciate any progress on it.

Edit: I'm talking about this client code written by ArtForz. There is newer version lying around, which solve storing the blockchain to the disk, but I cannot find the link.

ptd (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


View Profile
March 03, 2011, 08:43:21 PM
 #9

Let me know if you want to move it under the bitcoin project to http://gitorious.org/bitcoin/pycoin

Can we get a real license on this? Your LICENSE/UNLICENSE files have no legal relevance in any jurisdictions*, thus this code is still under a default/standard copyright which forbids anyone else from copying it.

* IANAL and TINLA

I'm not the first to do this sort of thing (see this). It's basically the WTFPL, written by someone who was feeling philosophical rather than silly. The file UNLICENSE is not meant to be legally binding, it means "We won't complain, and you're not under any legal obligation, but please..." (it even says "see LICENSE").

Most of those meta-files are just plain silly anyway (particularly "configure").

What about using http://unlicense.org/ ?

Thanks for the pointer, I'l use it.

I'll rearrange those files and push the result.
ptd (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


View Profile
March 03, 2011, 09:05:47 PM
 #10

Did you considered building pycoin on the top of ArtForz half-node source lying somewhere on the pastebin.com? I see that you duplicated some of his great job. I have also fork of his node running on the Twisted framework (in fact it needed only few tweaks), which is very robust and can be easily integrated with Qt, for example.

I didn't published my fork, because my job with the node isn't done yet, but if you're interested, I can send it to you right now. It would be nice to work on the same core and don't split the power between two very similar projects.

I have wet dreams about full bitcoin client implementation in python, so I appreciate any progress on it.

Edit: I'm talking about this client code written by ArtForz. There is newer version lying around, which solve storing the blockchain to the disk, but I cannot find the link.

Sorry, the functionality overlap is too great for it to deliver any benefit. A quick flick through was useful though, I think I should refactor the code to use file-like objects where I'm currently slicing up bytestrings.

I would be nice if someone could find/write some ECDSA signing code for python3 (probably using the c-api). I'm not very interested in or familiar with that area.
slush
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
March 03, 2011, 10:49:18 PM
 #11

the functionality overlap is too great for it to deliver any benefit.

What do you exactly mean? As I understand your project correctly, you're doing (yet another) bitcoin node implementation...

melek
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
March 04, 2011, 02:27:44 AM
 #12

You may consider replacing
Code:
#!/usr/bin/python3
with
Code:
#!/usr/bin/env python3
in the pycoin.py file to work in cases where Python3 is not installed in the default location.


ptd (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


View Profile
March 04, 2011, 05:24:28 PM
 #13

the functionality overlap is too great for it to deliver any benefit.

What do you exactly mean? As I understand your project correctly, you're doing (yet another) bitcoin node implementation...

I should have called it YABNI, damn!

Merging codebases is hard. I would need to write glue code to connect the two codebases and that would exceed any benefits. Linus Torvalds, notably, found himself in a similiar situation, had he known about 386BSD (ancestor of all Intel BSDs) he would never have started Linux.

Lots of node implementations is a good thing in some sense, because they cannot share security bugs and force clarity into standards (this is why the IETF requires "multiple, independent, and interoperable implementations" in it's standards).
slush
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
March 04, 2011, 06:43:24 PM
 #14

Lots of node implementations is a good thing in some sense

This is true when those versions do something. Currently, we have many implementations where each does practically nothing. I preffer to have one alternative implementation which cover original functionality as much as possible than have many implementations where every can just connect to another node, receive a message and die. I call it "split of the effort".

I cannot say anything, because I didn't write any of those implementations, but writing YABNI from the scratch doesn't make sense for me.

jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
March 04, 2011, 06:53:50 PM
 #15

This is true when those versions do something. Currently, we have many implementations where each does practically nothing. [...]  writing YABNI from the scratch doesn't make sense for me.

Indeed.  ArtForz' node implementation was posted over 3 months ago.

I'll be interested once people can store and verify transactions and blocks, and handle a block chain switch.  Until then...  we have achieved 3x message encode/decode engines.  Color me unexcited Smiley

The best task for all these python programmers is a lightweight bitcoin client, one that only needs block headers, its own transactions and associated merkle branches.


Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
mtve
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile WWW
March 04, 2011, 07:10:34 PM
Last edit: March 06, 2011, 05:41:58 PM by mtve
 #16

This is true when those versions do something. Currently, we have many implementations where each does practically nothing. I preffer to have one alternative implementation which cover original functionality as much as possible than have many implementations where every can just connect to another node, receive a message and die. I call it "split of the effort".

I cannot say anything, because I didn't write any of those implementations, but writing YABNI from the scratch doesn't make sense for me.
My perl implementation can download all chain with verifications and ecdsa: http://bitcointalk.org/index.php?topic=231.msg5906#msg5906
I still didn't get the consensus - are alt clients good or bad?

Update: here it is http://frox25.no-ip.org/~mtve/wiki/BitcoinPl.html
slush
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
March 04, 2011, 07:28:23 PM
 #17

I still didn't get the consensus - are alt clients good or bad?

Alternative clients strictly following official rules are wildly welcome (at least from me). Unfortunately, those rules are often badly documented, so it is pretty hard to follow them. When some alternative client with badly implemented rules takes significant part of Bitcoin network, there is a risk of blockchain split and then collapse of whole network.


jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
March 04, 2011, 08:39:32 PM
 #18

Alternative clients strictly following official rules are wildly welcome (at least from me).

+1 agreed here, too

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!