Pages:
Author

Topic: Caesure - a Python Bitcoin Client (Read 10724 times)

legendary
Activity: 1316
Merit: 1003
October 26, 2013, 08:35:50 PM
#21
An updated PyQT bitcoin client would be awesome.
I will start on a fork tomorrow.
legendary
Activity: 1134
Merit: 1118
September 29, 2013, 03:53:02 PM
#20
Haha, thanks for the suggestion, but it's a little too late for me.  I already have like 7,000 lines of C++ code, imported into python through SWIG.  However, I do python development in other projects, too, so I may keep your recommendations in mind.

I had never used SWIG before starting this effort, and now that I have battled it and come out victorious, I'm quite impressed with it.  It understands most of the "nominal" C++ programming structures, and usually does a good job of mapping every C++ function and class (with methods) to identical python calls.  There's a few quirks with it, but i got most of it ironed with one afternoon of frustration. 

But no need to pollute Sam's thread with this any longer.  Just throwing it out my positive recommendation for SWIG.  It's been a lifesaver for BTC client development in python.


Hi. Looking for some PyQT bitcoin client I found your project. Seriously dropping Windows support? I guess Windows is here to stay at least for some more years.
Last commit 2 months ago? How's your motivation?

I think the OP left bitcointalk over 2 years ago. His last action was in July of 2011. As for the commits, maybe he is still working on it, but he's not going to reply to your questions here.
sdp
sr. member
Activity: 469
Merit: 281
September 28, 2013, 01:02:22 PM
#19
Many python decoding functions including those for locale support will interpret a number starting with a zero specially : as an octal number.  Take a look at some of my interface changes for Electrum in its d.ddd branch.  You can find my fork at:

github.com/shawnpringle/electrum

Basically it nicely puts the thousand separators in for you when writing and when it displays numbers.  The thousand separators are pulled from the system default.  In the US, this is by default a comma but that can be changed to any character you wish.  It seems anyone who likes separators don't like commas.

full member
Activity: 182
Merit: 100
order in numbers
July 08, 2013, 11:47:18 AM
#18
How's the progress on this? I see the last commit was back in March. Any idea on when a stable release will be available?
newbie
Activity: 43
Merit: 0
June 28, 2013, 10:38:55 PM
#17
I am pleased to see Python being used for a wallet like this, esp. with a nice admin panel in it Cheesy
legendary
Activity: 1862
Merit: 1114
WalletScrutiny.com
May 18, 2013, 12:38:57 AM
#16
Hi. Looking for some PyQT bitcoin client I found your project. Seriously dropping Windows support? I guess Windows is here to stay at least for some more years.
Last commit 2 months ago? How's your motivation?
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
October 24, 2011, 03:50:03 PM
#15
Haha, thanks for the suggestion, but it's a little too late for me.  I already have like 7,000 lines of C++ code, imported into python through SWIG.  However, I do python development in other projects, too, so I may keep your recommendations in mind.

I had never used SWIG before starting this effort, and now that I have battled it and come out victorious, I'm quite impressed with it.  It understands most of the "nominal" C++ programming structures, and usually does a good job of mapping every C++ function and class (with methods) to identical python calls.  There's a few quirks with it, but i got most of it ironed with one afternoon of frustration. 

But no need to pollute Sam's thread with this any longer.  Just throwing it out my positive recommendation for SWIG.  It's been a lifesaver for BTC client development in python.
full member
Activity: 156
Merit: 100
Firstbits: 1dithi
October 24, 2011, 08:20:11 AM
#14
For optimizing python I suggest two alternatives:

PyPy: It's a python JIT compiler written in python. It supports ctypes and a lot of standard libraries natively, and has a wrapper for regular c-python extension modules.

Cython: A python-derived languaje for making python extension modules. I use it a lot, is like writing in python and C/C++ at the same time (but all with python syntax).

There's another one that I didn't know about until recently, Shed Skin: A (restricted subset of) python to c++ compiler. I think is kinda pypy's RPython translator but it seems better for interfacing with C++ code.

By the way, a complete python implementation of bitcoin is an awesome idea! It's the way to go to develop new features, specially if you have tools like those I mentioned. Python code is so much easier to understand and modify!
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
September 14, 2011, 07:04:22 PM
#13
I have my own python library I started building from Sam's code a few months ago.  I have all calculations implemented (including scripting!) but not networking.  Perhaps we should team up.  Though I suspect you (Sam) may not like the fact I replaced all your BTC classes with my own:  I did it for the fun of implementing the stuff myself in my own way, and learned a LOT.  I know from my job that the best way to understand a system is to try implementing it yourself--and holy hell I've learned a lot from this process...

This library does all scripting except for a few OP_codes, but it does do OP_CHECKSIG, meaning that the library can successfully verify and sign transactions (using Lis' raw ECDSA-in-python module).  I wanted to get some networking implemented, and was actually planning to just pull your code in, but maybe you'd be interested in contributing to this library and doing it yourself...? 

I've been caught up the last couple months trying to implement a C++/SWIG backend because python is slow as dirt.   Unfortunately I've been getting nowhere, and finding I need to do some more planning and reorganization before I'll get it right.  So right now, I don't have anyway to scan the blockchain or maintain a wallet.   But I have grand plans for doing so, and am anxious to get this functionality implemented!

If you're interested, the project is here:

https://github.com/etotheipi/PyBtcEngine

The file unittest.py might show you how to use the library as implemented... it tests just about every method in my library, including OP_CHECKSIG.    PM me if you have any interest in teaming up!
newbie
Activity: 10
Merit: 0
July 14, 2011, 07:50:25 PM
#12
please correct:

if hash160 have zero at the start, function is having problems

Thanks, Fremen Lis.  It's on the way in.

-Sam
Lis
sr. member
Activity: 293
Merit: 251
Spice must flow!
July 14, 2011, 02:32:29 AM
#11
please correct:
file bitcoin.py
line 90
s = ('%x' % base58_decode (s[1:])).decode ('hex_codec')  =>  s = ('%048x' % base58_decode (s[1:])).decode ('hex')

if hash160 has zero on the left side then function has problem

===
good job, thanks
full member
Activity: 136
Merit: 100
July 12, 2011, 05:28:15 PM
#10
There was also this effort to create an alternative bitcoin client in python, but it was never completed:

https://github.com/phantomcircuit/bitcoin-alt

I think the hard part was to do the scripting.
sr. member
Activity: 360
Merit: 250
July 12, 2011, 06:34:33 AM
#9
Bump for sheer awesome sauce, and because Sam used to buy beer for me when I was still underage.
newbie
Activity: 10
Merit: 0
July 10, 2011, 06:12:29 PM
#8
To Sam Rushing :

Maybe your https setup is broken ?
I end up with this msg :

sh-4.1# git clone https://github.com/samrushing/caesure
Initialized empty Git repository in /opt/caesure/.git/
error:  while accessing https://github.com/samrushing/caesure/info/refs

"git clone" works well for me with http:// though )

Just try:
   $ git clone git://github.com/samrushing/caesure.git
 
newbie
Activity: 24
Merit: 0
July 09, 2011, 06:19:08 PM
#7
Maybe your https setup is broken ?
I end up with this msg :

sh-4.1# git clone https://github.com/samrushing/caesure
Initialized empty Git repository in /opt/caesure/.git/
error:  while accessing https://github.com/samrushing/caesure/info/refs

"git clone" works well for me with http:// though )
Report to github, not us. We can't do anything with this.
hero member
Activity: 812
Merit: 1022
No Maps for These Territories
July 09, 2011, 03:29:56 AM
#6
So with this in future I can replace bitcoind+JSON or this is just API for bitcoind?
The goal is to replace a full client, there are tons of JSON-API bindings for Python already Smiley
newbie
Activity: 33
Merit: 0
July 08, 2011, 09:21:49 PM
#5
So with this in future I can replace bitcoind+JSON or this is just API for bitcoind?

As far as I can read the code (I am sure that Sam will refactor the code ones he is happy with the functionality, so it is easier to read/maintain/extend for mere mortals  Wink ), this is aimed to be a full implementation of the reference c++ bitcoin implementation.

So in other words, where you used to run the bitcoin client downloaded from bitcoin.org, you can alternatively use his python one instead.

Good to see I am not the only one working on a Python implementation, a little bit of competition is a good thing :-)

Cheers Sam, good work!
newbie
Activity: 24
Merit: 0
July 08, 2011, 08:28:17 PM
#4
So with this in future I can replace bitcoind+JSON or this is just API for bitcoind?
newbie
Activity: 10
Merit: 0
July 08, 2011, 05:10:11 PM
#3
Yup, one of my goals is to cut down on outside dependencies as much as possible - especially packages that require compiling C extensions.  Right now it runs completely standalone, all that's needed is a Python install and a shared openssl library.  The networking is done via the asyncore/asynchat modules, and openssl is accessed via ctypes.
hero member
Activity: 812
Merit: 1022
No Maps for These Territories
July 08, 2011, 04:10:19 PM
#2
Great, I'll certainly be following this. A native Python client is nice, as it means not having to compile the bitcoin c++ client on a VPS, and it will be easier to integrate with Python (web) applications Smiley
Pages:
Jump to: