you can try this without any fear. afaik that person lost it's coins by overwriting the wallet-file at some point (simply do a backup first!), not by trying to double-spend coins.
|
|
|
not exactly a complete account system (maybe half of it), but i'd like to share my SAMPLE_JSON.PHP anyway, maybe it's of use for someone. it's using cURL to connect to the API. <?php // IMPORTANT! // This is NOT SECURE by default, restrict access to this script, // password protect it, check the referrer, session, or whatever else you like. // Anyone able to reach this script AS IS is able to send your balance to another address!
// simply call commands like this // ./SAMPLE_JSON.PHP?command=getinfo // or with parameter // ./SAMPLE_JSON.PHP?command=getnewaddress¶meter=username // ./SAMPLE_JSON.PHP?command=getreceivedbylabel¶meter=username
// set the URL to JSON-API $url = 'http://127.0.0.1:8332'; // set a JSON id $jsonid = 'unique';
// which command has been called? if ($_GET['command']) $command = $_GET['command']; // and if what parameter? if ($_GET['parameter']) $para = $_GET['parameter']; if ($para) $parb = array($para); // if none, we create an empty array else $parb = array(); // and encode all of it to JSON $arr = array ( 'id'=>$jsonid, 'method'=>$command, 'params'=>$parb ); $data = json_encode($arr); // run cURL to transfer our data $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $output = curl_exec($ch); // debug - to check the response we can just view our JSON output here echo $output."<br>\n\r"; // if $output looks ok, we decode it here and close our cURL session $obj = json_decode($output); curl_close($ch);
// and that's it, just handle the $obj and show it, add/compare it to DBs, or whatever else is needed.
// below is just some basic samples if ($obj->error != "null") echo $obj->error; if ($obj->id == $jsonid) { if (is_object($obj->result)) $info = get_object_vars($obj->result); if ($command == "getinfo") { if ($info) { echo "Balance: ". $info['balance']."<br>\n\r"; echo "Blocks: ". $info['blocks']."<br>\n\r"; echo "Connections: ". $info['connections']."<br>\n\r"; if ($info['generate']) $gen = "yes"; else $gen = "no"; echo "Generating: ". $gen."<br>\n\r"; echo "Difficulty: ". $info['difficulty']."<br>\n\r"; } } if ($command == "getreceivedbylabel") { echo $obj->result."\n"; } if ($command == "getnewaddress") { echo $obj->result."\n"; } } ?>
be sure to restrict access somehow! I guess there's easier, or simpler ways to do this, maybe you know of one.
|
|
|
My experience with a virtual world and "owned" property is with Alpha World (now called "Active Worlds") where people built mainly buildings and roads (and almost no other interaction). I never have been "into" games like There or 2nd Life, so my experience may be distorted. Still, "owned" content does seem to work. One of the problems that Alpha World encountered was a significant problem of simply paying for the servers that kept everything up and running. I'm hoping to avoid that situation by making this primarily a P2P type game.
Second Life (or let's take OpenSim, to get rid of the company behind it) is actually not a "game" itself, more of a playground. all proberty is owned by its residents (they pay on SL and just run own servers on OpenGrids) and you can pretty much do, whatever you want on your own proberty, create an RPG, build a house to live in, or a shop to sell stuff, whatever. so yes, owned content works already, should work on bitcoins too. i like your idea.
|
|
|
... I know that the bitcoin generation difficulty will stabilize at some point in the future, but at this point it would be useful to me to be able to calculate my ROI quickly and easily.
You're right, it would be useful, you just can't do that (anymore precisely than a weatherforecast for next year). as mentioned, a PIII singlecore mobile-cpu running 150khash/sec may generate 50coins in 2hrs compared to a triple-core 1500khash/sec cruncher running 4 days without generating anything. what would your forecast look like on those 2 machines and what would its users say/think, if the output isnt even close to what it tells them?
|
|
|
Why?
..do banks go bankrupt, if that's true? the point is, that theres actually no big difference in the "banking system", no matter if we use $, €, or coins, there IS a difference in how the currency is produced though. banks lie today about what you have (cuz they dont have all of our money in cash, its just shown on your balance) and bitbanks would just lie in the same way, telling you your bitcoin-balance (not the actual avialable coins).
|
|
|
so any bank that runs outof cash could just run to Feds and gets more cash? i doubt that.
|
|
|
Whilst this is a nice idea, there is basically no benefit to the operator aside from philanthropy.
Also, as Bitcoins become harder to generate the operator ( Bank ) would require an ever increasing percentage of nodes to maintain any viability.
if this would be true, it would also apply to "real banks". you could still invest your members bitcoins (or its value), you just need enough coins to pay the "maximum expected cash-outers" a day/month (and theres ways to limit those), not all of the coins ever invested and you'd still make your profit without even generating any block. that's what banks do today and that's what a bitbank would/will do, bitcoin, or dollar wont make a big difference.
|
|
|
The current problem I'm facing is that there is no way to identify who a transaction came from (and, in fact, there is no way to even get a list of transactions in json at the moment), this makes it very difficult to confirm that a person actually sent the payment - which is of course completely u nacceptable for acommerce application. If I can't find a solution to this I'll have to make some requests to satoshi and wait until he updates the client with some new features.
you could still create a new address for any transaction, if only one person knows that address, it's pretty obvious where bitcoins came from. true that you can't get a list of all transactions from JSON yet, but from received credits by addresses, or labels, no need to know about generated coins on a payment-system, or about sending, when your system is only supposed to accept payments.
|
|
|
it would work through the tor-proxy-link though, if the website would still be online, to install TOR wont help here.
|
|
|
hehe, i just checked my old pIII laptop, that i set up ~12hrs ago, it does ~150khash/sec @1066MHz and already won the race 10hrs ago.
|
|
|
what one could "expect" depends on luck and how much of it you expect to have on our block lottery. i guess that's pretty hard to calculate. the average time to generate a block shown on the calculator website doesnt mean, you'll find a block after X days, it still might happen, that you dont find one for a very long period. people would complain even more than they do already, if the client tells them "you should have generated xy coins so far, but you had no luck".
|
|
|
maybe you should SELL impressions and PAY to show banners, that would offer another way for people (and not only you) to earn bitcoins.
|
|
|
theres no need to "waste energy" to use bitcoin, just dont generate any blocks. bitcoin is not about "being rewarded for running a client", it's about transferring money (or value). IF you help the network by generating new blocks, you'll get rewarded, but new blocks are not generated by folding proteins, or listening to E.T.
the network NEEDS coins, so it's USEFUL to generate them, i personally don't see anything wasted here.
|
|
|
theres no need to "waste energy" to use bitcoin, just dont generate blocks. bitcoin is not about "being rewarded to do something useful", it's about transferring money (or value). IF you help the network by generating new blocks, you'll get rewarded, but new blocks are not generated by folding proteins.
the network NEEDS coins, so it's USEFUL to generate them, i personally don't see anything wasted here.
|
|
|
good question, theres lots of free banner-exchanges that "earn" you impressions by showing a banner, why would we pay for one?
if you run such an exchange and want to SELL impressions for bitcoins, theres no need for buyers to add banners to theyr sites.
|
|
|
And I expect most of us will be running lightweight clients that just keep our wallets, sign transactions, and send and receive transactions to the ultra-fast nodes that ARE looking at every transaction.
Is this possible? What would this look like? From a technical perspective what does a "lightweight client" look like for you? My understanding is that the Bitcoin client needs the entire block chain in order to establish trust. I'm imagining: .... you don't even have to imagine , actually it's already possible to "remote-control" the node, so just create ur own little lightweight-client, that just sends and gets some info to/from your (highspeed-connected, hdd-packed) homeserver. some kind of "managed server-client-version" already exists in MyBitcoin, you could run something like that on your own webhost and connect to it from wherever u are on whatever connection-speed. the "lightweight client" doesnt have to be one, but connect to it and tell it what todo. we can do that with JSON.
|
|
|
blockcount is ok, your connected, seems you're up and running, just give it some more time.
no clue on the ubuntu-prob though, sorry
|
|
|
that's unusual, the connection-limit is set to 8 since version 0.3.0 on non-port-forwarded nodes, it was 15 before, maybe you should try a re-download/-build/-install.
how many blocks did your nodes download so far? you won't be able to create any new blocks until your nodes received them all (67300 as i type).
|
|
|
u can't generate just 1coin, u'll get 50coins for completing 1block, or you dont get them if someone else was quicker.
a few days ago i was able to generate 50coins in less than a day, but the difficulty to create a block tripled since slashdot and so did the time to generate coins.
so yes, its pretty usual to take "forever" to generate a coin, at least expect it to take a few days, to get your first 50coins, depending on how much cpu-power u'v got to spare.
|
|
|
i send my 5 coins back right after i got them, was a great way to check our system and still is a great way for new "potential customers", to test us. regrettably i havent been around back in those early days, but i'll gladly send all incoming 5coin credits back to you.
|
|
|
|