Bitcoin Forum
May 10, 2024, 08:54:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: [5 btc bounty] http error from json-rpc in php on: March 06, 2013, 08:06:28 AM
Try setting stream_context timeout to longer time, might help.

Or try cURL!

And try taking the http:// outta there.

And if it helps, here's an example on how to do it:
http://pastebin.com/YCYb0nPv

Let me know if any of these works.

curl solved all of my problems!  got the code I needed here: http://pastebin.com/vREuHVr5
where would you like the 5 btc sent?
2  Bitcoin / Development & Technical Discussion / Re: [5 btc bounty] http error from json-rpc in php on: March 06, 2013, 12:16:55 AM
Try setting stream_context timeout to longer time, might help.

Or try cURL!

And try taking the http:// outta there.

And if it helps, here's an example on how to do it:
http://pastebin.com/YCYb0nPv

Let me know if any of these works.

Great ideas.  I'll play around with this and get back to you.
3  Bitcoin / Development & Technical Discussion / [solved] http error from json-rpc in php on: March 05, 2013, 09:56:25 PM
I am using the json-rpc php library from the bitcoin wiki (http://jsonrpcphp.org/) to send commands to my bitcoind instance.  For the most part, it works as expected, but occasionally, when I use the sendtoaddress command, it will return one of the following errors:
Code:
fopen(http://...@localhost:8334/): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
or
Code:
fopen(http://...@localhost:8334/): failed to open stream: HTTP request failed!
I noticed that the first one seems to happen only when there are insufficient funds in the wallet.  The second seems to happen at random.  When the first occurs, no coins are sent.  When the second occurs, the coins are almost always sent just as if there was no error even though it seems, based on the error, that the command never made it to bitcoind.  Occasionally though, the second error will be returned and the coins aren't sent.

This ambiguity is a problem for me.  What I would really like is for the jsonrpc client to return a meaningful error when it cannot process the request (such as insufficient funds) and to return the usual output (txid) when sendtoaddress is successfully executed.  I'm most comfortable in php, but am willing to learn other languages to achieve the same ends.  Ultimately I need to take addresses/amounts from a mysql database and construct transactions in my bitcoind server.

So, if anyone knows how to make this work in php or another language, perhaps perl or ruby or python and can walk me though it, and it works as described, 5 btc will be yours.
4  Bitcoin / Bitcoin Technical Support / Re: [10 btc reward] protocol, wallet and client version mismatch errors on: January 27, 2013, 02:43:34 AM
that part of the solution was actually on these forums:

https://bitcointalk.org/index.php?topic=43496.msg1065765#msg1065765
5  Bitcoin / Bitcoin Technical Support / Re: [10 btc reward] protocol, wallet and client version mismatch errors on: January 26, 2013, 02:03:39 AM
found and confirmed a hack that takes the import time down to 6 seconds per key.

psy please provide an address for your 10 btc reward for helping me find pywallet.
6  Bitcoin / Bitcoin Technical Support / Re: [10 btc reward] protocol, wallet and client version mismatch errors on: January 26, 2013, 01:10:24 AM
ok, pywallet works well to get the privkeys from wallet a, but unfortunately it is not designed to work with wallets with versions later than 32500, so when I try to import into a new wallet, the wallet gets corrupted.

So, I am very close, and I like this bulk import/export method because I can prune this giant wallet I have, but I am at a loss how to import the addresses.  The new client has the importprivkey function, but it takes 1-2 minutes per address to import.

Does anyone know a way to import privkeys into a wallet quickly?
7  Bitcoin / Bitcoin Technical Support / Re: [10 btc reward] protocol, wallet and client version mismatch errors on: January 25, 2013, 01:31:44 AM
I think pywallet plus some scripting will do the trick.  I'll check back in here when/if I get it to work and hit you guys up for payment addresses for the bounty.
8  Bitcoin / Bitcoin Technical Support / Re: [10 btc reward] protocol, wallet and client version mismatch errors on: January 25, 2013, 12:25:22 AM
ok, im looking into pywallet.
9  Bitcoin / Bitcoin Technical Support / Re: [10 btc reward] protocol, wallet and client version mismatch errors on: January 24, 2013, 11:28:05 PM
Start bitcoind with
Code:
bitcoind -detachdb=1
and after shut it down as usual.


Let me make sure I have this straight.  I start wallet a with bitcoind -detachdb=1, then stop it with bitcoind stop, then take the wallet.dat for wallet a and try to run the latest client with it?
10  Bitcoin / Bitcoin Technical Support / Re: [10 btc reward] protocol, wallet and client version mismatch errors on: January 24, 2013, 11:15:55 PM
On the options window there is a checkbox with that text. Check it. Close the client. It will take a few minutes to completely close while it detaches the DB's.

I'm using the headless client on a server, so there must be a flag or something.  I usually shutdown by doing
Code:
bitcoind stop
11  Bitcoin / Bitcoin Technical Support / Re: [10 btc reward] protocol, wallet and client version mismatch errors on: January 24, 2013, 11:06:57 PM
Try to detach databases on shutdown and then replace the wallet.
You have to do that when upgrading from 0.6.x to 0.7.x

Not sure if you should also copy the blockchain data, to make it think you are upgrading.

BTW, this is a wild guess Grin

a wild guess is better than none.  how do I "detach databases on shutdown"?
12  Bitcoin / Bitcoin Technical Support / [10 btc reward] protocol, wallet and client version mismatch errors on: January 24, 2013, 10:55:31 PM
I am running 2 bitcoind instances on ubuntu 12.04.1 LTS server, wallet a and wallet b.  The version info from getinfo() for wallet a is
Code:
    "version" : 60300,
    "protocolversion" : 60001,
    "walletversion" : 60000,

The version info from getinfo() for wallet b is
Code:
    "version" : 70200,
    "protocolversion" : 60002,
    "walletversion" : 60000,

If I try to export wallet.dat from wallet a, put it in an empty .bitcoin directory and run it with the latest client version (7.0.2) I get the following error
Code:
Bitcoin: wallet.dat corrupt, salvage failed

Obviously wallet b will run with the latest client as seen in the version output.  This leads me to believe that the issue is the protocol version.  For some reason 60001 is incompatible with the latest client, and 60002 is.

So, here is the 10 btc question:
How can I get wallet a to run on the latest client?  It doesn't work for me to just transfer the balance to a new wallet, because I need the addresses in wallet a.  Also, wallet a has a bunch of addys.  It's around 1 gb in size.

First person to post a solution that I can get to work wins the 10 btc.  Thanks in advance!
13  Other / Beginners & Help / Re: can't restore wallet with over 40k btc in it. Please HELP! on: August 19, 2012, 11:07:53 PM
Do you also own the other addresses that end in .031337 BTC?

what addresses are those?
14  Other / Beginners & Help / Re: can't restore wallet with over 40k btc in it. Please HELP! on: August 19, 2012, 10:56:56 PM
success!  where would you like your coins sent fcmatt?
15  Other / Beginners & Help / Re: can't restore wallet with over 40k btc in it. Please HELP! on: August 19, 2012, 10:52:09 PM
sorry it's a bit over my head.  I did:
Code:
bitcoind help
, but didn't see a command for rescanning.  can you please be more specific about what I should type in exactly?
16  Other / Beginners & Help / Re: can't restore wallet with over 40k btc in it. Please HELP! on: August 19, 2012, 10:45:12 PM
that means I should stop the wallet, delete everything but wallet.dat and bitcoin.conf, and then start it up again, right?
17  Other / Beginners & Help / can't restore wallet with over 40k btc in it. Please HELP! on: August 19, 2012, 10:41:23 PM
I own this address:

1MR6pXDZ6gpBVN8n61SqCNF61vU8ZzRu8Y

If you look it up in the blockchain, you can see that currently it contains 44,914.031337 BTC

When I try to restore the wallet containing this address in bitcoind on ubuntu, it tells me the balance is zero.  Here are some outputs:

Code:
$ bitcoind getinfo
{
    "version" : 60300,
    "protocolversion" : 60001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 194708,
    "connections" : 6,
    "proxy" : "127.0.0.1:9050",
    "difficulty" : 2190865.97010286,
    "testnet" : false,
    "keypoololdest" : 1336772999,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}
Code:
$ bitcoind validateaddress 1MR6pXDZ6gpBVN8n61SqCNF61vU8ZzRu8Y
{
    "isvalid" : true,
    "address" : "1MR6pXDZ6gpBVN8n61SqCNF61vU8ZzRu8Y",
    "ismine" : true,
    "pubkey" : "02701400207b34aa2b8579625e6a9a3bfd6dc6e55cbe000dc693f46615a18d13a4",
    "iscompressed" : true,
    "account" : ""
}

As you can see, the address is present in the wallet, and the blockchain is up to date, yet the balance reads zero.  If anyone with the correct privileges feels it is appropriate, I would very much appreciate a repost of this in the main tech support section.  100 btc to anyone who can help me solve this problem.  Thanks!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!