Bitcoin Forum
May 14, 2024, 01:54:15 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 »
141  Bitcoin / Bitcoin Technical Support / Re: 2 btc for debugging short python script with json-rpc and bitcoin on: August 27, 2011, 06:19:07 PM
OK, techwtf's solution worked!  Thank you.  Would you please send your bitcoin address, techwtf?

I still wish I knew what was going wrong with the jsonrpc library in Python 2.7.  People are going to start having more and more problems with this and Bitcoin payment solutions in Python.

Also, my concern is that I won't be able to use this script in a production environment unless it can be adapted to SSL.  I can't be sending my json-rpc password unencrypted over the network, even if it is just within an AWS region and not the general internet.  I'll add on another 2 if you can show me how to set it up with SSL authentication. The wiki has info on how to set this up in PHP. but nothing on Python:

https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon

Thanks again for your help, techwtf and ruski.
142  Bitcoin / Bitcoin Technical Support / Re: 2 btc for debugging short python script with json-rpc and bitcoin on: August 27, 2011, 02:40:54 PM
Ruski,

Thanks for your input.  I tried assigning the float type and passing it to another variable instead of doing it all at once -- didn't work.  

Your idea about transaction fees isn't a bad one.  I would not have thought that this could be a problem.  Unfortunately, my bitcoin.conf on the testnet was already set at transaction fees=0.00, so that didn't work either

I'm trying it out in a realnet env.-- no difference.

It's becoming clear to me that this problem has something to do with the new Python version I'm running: Python 2.7. I actually found an old version of this same kind of script for python at http://bitcointalk.org/?topic=1431.0  This script won't work on either of my systems running Python 2.7, either.  It would appear that there were several changes made to the way Python handles floats in 2.7, which appear to have made the Bitcoin JSON-RPC library not work with certain calls.

Thank you in advance for your help!

PS -- techwtf: I'm not understanding what you're suggesting.  Can you please write out the basic structure in Python?
143  Bitcoin / Bitcoin Technical Support / Re: 2 btc for debugging short python script with json-rpc and bitcoin on: August 27, 2011, 02:40:43 AM
Still haven't figured this out, but if I multiply the balance variable by 0.9, it lets me transfer half of the balance.  If that helps anyone debug it.  I'm hoping to transfer the entire balance.
144  Bitcoin / Bitcoin Technical Support / Re: 2 btc for debugging short python script with json-rpc and bitcoin on: August 27, 2011, 01:50:04 AM
To make it clear, the btcservice module maintains the serviceproxy.  To repeat, the connection is not the issue, it's the code and something about the type.

For example, if I write this:

Code:
OFFLINEWALLET_ADDRESS = 'mfo84Lum3gmk6v2cLhJMdtntS5DnTqkHYi' # CAUTION--DO NOT RUN THIS SCRIPT WITHOUT SETTING THIS FIRST.

balance = (float(access.getbalance() / 1e8))
if OFFLINEWALLET_ADDRESS != '':
    access.sendtoaddress(OFFLINEWALLET_ADDRESS,float(balance))

It subtracts a fraction of the balance, but only a fraction.  If I multiple by 1e8 (which seems more logical to me), then it doesn't work at all (same Json exception as shown in my first post).

So the wallet is full, and the connection is just fine.  The answer to this question will be something to do with types, floats, conversions, etc.  Not JSON-RPC connections or the service proxy -- those are fine.

Thank you.
145  Bitcoin / Bitcoin Technical Support / Re: 2 btc for debugging short python script with json-rpc and bitcoin on: August 27, 2011, 01:36:04 AM
OK, I'm running on testnet, and I have plenty of funds in the wallet.  So that's not the problem.

Also, I'm quite sure the service proxy is running fine, I've been using access.getaddress() and access.getinfo() for a week now with no issues.  Also, if I insert an actual decimal amount into my function instead of use the balance variable, it works fine.  So the  JSON-RPC connection is not in question.

I'm running Python 2.7, and I think I found the answer to my question -- apparently Python 2.7 makes all the difference.  But I'll post the link that I'm looking at and see if someone beats me to posting an answer to my own question, if so you'll still get the 2 btc.  See the entry from mikez302 on this page: http://stackoverflow.com/questions/1960516/python-json-serialize-a-decimal-object

And yes, I should have posted on pastebin but I thought the code was so short it would still be readable.

Thanks again.
146  Bitcoin / Bitcoin Technical Support / 2 btc for debugging short python script with json-rpc and bitcoin on: August 27, 2011, 01:00:20 AM
I've tried and tried to get this script to work.  I want to run this as a cron job every hour or so to dump my online wallet's contents to an offline wallet).  I'm trying to interact with the bitcoin json-rpc lib for python and I'm stuck in python type hell.  Another individual (who is an actual programmer, unlike me --I'm just a web dev with some python skills) tried to get it done to no avail.  I'll send 2 btc to the first person who posts a working solution to the boards.  Currently, the script gets a "JSONRPCException(resp['error'])".  Most of my alternate solutions tell me that my decimal types are serializable as json objects.

If it's not obvious, the access function is the serviceproxy to the bitcoin client running as bitcoind,

Thank you.

****

Code:
#!/usr/bin/env python
# coding: utf8

import urllib
from gluon import *
from btcservice import access

OFFLINEWALLET_ADDRESS = 'mfo84Lum3gmk6v2cLhJMdtntS5DnTqkHYi' # CAUTION--DO NOT RUN THIS SCRIPT WITHOUT SETTING THIS FIRST.

balance = access.getbalance()
if OFFLINEWALLET_ADDRESS != '':
    access.sendtoaddress(OFFLINEWALLET_ADDRESS,float(balance))
147  Bitcoin / Development & Technical Discussion / Re: Testnet coins on: August 25, 2011, 02:48:24 PM
Thanks so much!  I didn't know testnet had been reset.  I'm glad -- they were getting hard to obtain.

Also, you're right, I was in a hurry and accidentally forgot to set the '-testnet' switch before I generated my address.  But I think it would have worked anyway.  In any case, I'm all set now.

Thanks again.
148  Bitcoin / Development & Technical Discussion / Testnet coins on: August 24, 2011, 11:24:40 PM
Could anyone please spare some testnet coins?  I would greatly appreciate it.  Testing out new self-hosted Bitcoin payment system on a site I've developed.

1HeE61ce27RTUandVqSAgQKP1i7Q3qZELY

Thank you.
149  Economy / Services / Re: Web Development and Programming for Cheap! on: August 24, 2011, 02:09:58 AM
Yes, he can code extremely well.  I'm paying him to help me develop a web2py-based website and his python and javascript skills are very good. He's a fast coder. We'll be beta testing the site this weekend and hopefully announce on the forums next week.  I'm also thinking about releasing an open-source web2py Bitcoin payment plugin based on the work we've done once we've got the site up and running well.

On a related note, if anyone is good at really CSS, including designing with media queries, has a good eye for layout, has availability this week, and is interested in doing contract work for me, please send me a PM.  I would need to see a prior site you've done that integrated CSS and media queries for mobile devices, or at least CSS and some sort of media queries.  I need someone who is happy working with a CSS framework (it looks like we're doing with lessframework).

Please PM me with a brief description of your CSS background and your hourly rate.
150  Bitcoin / Development & Technical Discussion / Re: Using Bitcoin as a LIBRARY (in C++) on: August 16, 2011, 01:53:29 AM
Check out genjix's libbitcoin: https://gitorious.org/libbitcoin

It's not complete yet, but I believe he's making quick progress.  It may actually have everything you need now.

I've been watching open transactions with interest -- very interesting work and very complementary to Bitcoin.   Thank you.
151  Bitcoin / Wallet software / Re: libbitcoin on: August 15, 2011, 02:08:57 PM
This is great work.  I'm looking forward to trying out the python API.  Thank you.
152  Bitcoin / Bitcoin Discussion / Re: TradeHill - Why we no longer accept Dwolla and an open letter to Ben Milne on: July 27, 2011, 09:01:47 PM
As someone who has done a lot of business with Dwolla, and some with Tradehill, I will say categorically that if BitcoinEXpress's attitude represents the established, "VC" way of doing business, and if Dwolla is adhering to that model, I will have no hesitation about taking my custom with Dwolla elsewhere.  I'm also saying this as someone who has seriously considering using Dwolla's API in a business product.  BitcoinEXpress is spouting off about Business 101, but as Michael Dell can tell you from bitter experience, Rule No. 1 is to communicate with your customers.  TradeHill is communicating clearly with their customers. Dwolla seems more interested in hiding and/or communicating via what appears to be a sock puppet.  I know Dwolla is reading this thread, why not explain your side?  Hundreds, perhaps thousands of your customers are interested and listening.  

I suspect that I know at least partially the answer to my question, which is that Dwolla is loath to associate themselves in public with the very instrument that played a major role in putting them over that million USD per day transaction mark: Bitcoin.  That and the fact that they clearly do chargebacks in spite of what they told their merchants.  And that they want to stick Trade Hill with the bill for the fraud committed against Dwolla.
153  Bitcoin / Bitcoin Discussion / Re: Bitcoin Unit Colour Chart on: July 11, 2011, 03:02:16 PM
I like this idea.  It allows designers the means to give users two signals when they're entering bitcoin amounts.  If it's accepted widely, it reduces the chances of data entry errors.

You know, there is a guy starting up a Bitcoin standards organization.  You should get in contact with him (can't remember the name but search the forums and you'll find him).
154  Bitcoin / Project Development / Re: Should we buy bitcoin.com ? on: July 11, 2011, 01:42:02 PM

Well, we may have a sale on our hands, unless they just happened to feel like re-hosting an unused site.

What do you want to bet that asshole lawyer bought it?
155  Bitcoin / Bitcoin Discussion / Re: What programming language to learn? on: July 10, 2011, 01:00:17 PM
Python is an excellent all-around language.  You can really do almost anything with it: very serious web design (Django, Plone -- extremely well-regarded frameworks/CMS), easy scripting (including a very cool runtime interpreter that can give immediate feedback), GUI design, Windows desktop executables.  If you need higher performance, you can use Python bindings to fast C/C++ libraries, but still use Python to tie it all together.  You can even use Python to do GPU programming (the last two are things I've done yet done with Python personally, but others do them all the time).  So you can basically take advantage of a lot that C/C++ has to offer without having to learn the languages themselves.

Python also has great documentation and friendly support boards.  You can find an excellent intro to computer programming that uses Python here:  http://greenteapress.com/thinkpython/  This is a guide that will teach you the basics of "computer programming" as a science/art and not just another language.

Google also offers some good Python tutorials.

I only wish I had invested all the time I did learning and using PHP on Python instead.  Unfortunately, when I started with PHP back in the 1990s, only really serious programming geeks new about Python, and its use had not yet been expanded to web programming to a significant extent.

Also, that (very funny) picture someone put up of different programming perceptions of other languages is totally true.  The language(s) you learn will have a big impact on how you are perceived by other programmers.  And even the most serious programmers usually take Python seriously, even if they don't use it themselves.  This is not the case with PHP.

PS -- If you do serious web programming, you'll also need to learn about databases.  Do yourself a favor and learn about basic database normalization.  Some many web apps end up totally screwed up because they ignore the principles of database normalization (and yes, I know that too much normalization can cause performance issues).  If you really understand object-oriented programming, normalization will make a lot of sense and will make your web app a much sounder application.
156  Bitcoin / Bitcoin Discussion / Re: A Cautionary Tale: What the poker community can give to the bitcoin community on: July 09, 2011, 11:31:22 PM
This is a very powerful post and is making carefully think about whether or not to release my Bitcoin-related product anonymously when it's ready.  My gut reaction is to scoff at anonymous Bitcoin-related business -- how can I trust you if I don't know who you are? -- but at the same time I'm understanding the motivation behind the anonymity more and more.  Perhaps we should just start judging Bitcoin businesses on how trustworthy they behave, and not what their name or location happens to be.
157  Bitcoin / Bitcoin Discussion / Re: U.S Lawyer making subversive grab for 'bitcoin' globally! on: July 09, 2011, 08:33:45 PM
Probably just a troll that registered with the guy's name.

That's what I thought might be the case at first.  But when you look into this guy's past, it definitely fits his pattern of scheming and publicity seeking.  Look at his web site.  No, this is really Michael Pascazi.
158  Bitcoin / Bitcoin Discussion / Re: Someone Random Trademarked "bitcoin" : Now we can't use the term? on: July 09, 2011, 02:02:03 AM
Youd think a lawyer involved with trademarks would be smart enough to get his own  name michaelspascazi.com before someone buys it using privacyshark with an anonymous currency and redirects it to 4chan....

 Cool

Yeah, I don't think this guy is as tech savvy as he fancies himself.  This may all be a good learning experience for him.
159  Bitcoin / Bitcoin Discussion / Re: mt gox yubikey on: July 08, 2011, 01:35:43 PM
Yubikeys are awesome -- glad to see Mt. Gox is using them.  I might move back there now, but I'll first want to see the results of a (bona fide) independant pentest.

160  Bitcoin / Bitcoin Discussion / Re: Bitcoin is actually slower than my bank? on: July 08, 2011, 03:42:10 AM
Nick, I understand your frustration.  We supporters of Bitcoin should make it known that it's a good idea to download the blockchain before you start your client the first time.  There are actually multiple places you can download it at, most notably at the Bitcoin sourceforge site: http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/

However, I wouldn't try to download and use the blockchain from a site at this point, since you've already used your client to do a transaction.  Let me repeat: don't use a downloaded blockchain if you've already processed a transaction on your client, unless you know what you're doing.  You'd have to run a rescan and possibly other things.

But don't worry, your transaction will go through.  And once the full blockchain is on your client, transactions are processed much faster.

BTW, cool website.  And thanks for your support of Bitcoin.

PS -- It would be nice if you would change the title to better reflect the situation, but obviously that's your call.
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!