what do you mean by "account"?
you should not use bitcoin-cores account feature for a site as the result wont be what you think (please search in the tech section for the exact reason).
I mean every time when user wins the wallet transfers money from main account to user's account. User is able to manage the coins related to his account. Here is an example. { "account" : "", "category" : "move", "time" : 1452705552, "amount" : 12345.00000000, "otheraccount" : "user890", "comment" : "" }
|
|
|
There is a web application which creates for each user its own account in wallet. Main problem is the bitcoin daemon with time becomes slow and almost does not load new blocks from network. I reckon the reason is the huge number of "move" RPC command (which transfer coins from main account to user's account). In these conditions Bitcoin daemon uses more than 50% of CPU and 30% of MEM. Main problem is how to force daemon to load new blocks. Any suggestions?
Get better hardware that has a faster cpu, faster/more RAM, and a disk with a high read/write speed (e.g. SSD) since a lot of those operations involve the wallet and constantly reading and writing the wallet to and from the disk. Thanks for reply. Actually I was hoping someone say me that problem has an another origin and how to solve it. Any other suggestion how to force daemon to load blocks?
|
|
|
There is a web application which creates for each user its own account in wallet. Main problem is the bitcoin daemon with time becomes slow and almost does not load new blocks from network. I reckon the reason is the huge number of "move" RPC command (which transfer coins from main account to user's account). In these conditions Bitcoin daemon uses more than 50% of CPU and 30% of MEM. Main problem is how to force daemon to load new blocks. Any suggestions?
|
|
|
I replaced whole .Bitcoin directory. It still gives me " Error: wallet.dat corrupt, salvage failed" after --daemon and then -rescan flag. However according to logs there are new kind of problem. db.log Page 8973: unaligned offset 2085 at page index 21 Page 8973: gap between items at offset 2096 Page 8973: gap between items at offset 2904 Page 8973: overlapping items at offset 3168 Page 8973: gap between items at offset 3184 Page 8973: overlapping items at offset 3207 Page 8973: gap between items at offset 3444 Page 8973: gap between items at offset 3812 Page 8973: gap between items at offset 4036 Page 8973: item order check unsafe: skipping Page 8974: overlapping items at offset 2136 Page 8974: gap between items at offset 2140 Page 8974: overlapping items at offset 2175 Page 8974: gap between items at offset 4044 Page 8974: item order check unsafe: skipping Page 13841: gap between items at offset 1776 Page 13841: gap between items at offset 2132 Page 13841: overlapping items at offset 3028 Page 13841: gap between items at offset 3036 Page 13841: overlapping items at offset 3047 Page 13841: gap between items at offset 3048 Page 13841: overlapping items at offset 3788 Page 13841: gap between items at offset 3812 Page 13841: overlapping items at offset 3819 Page 13841: gap between items at offset 3820 Page 13841: gap between items at offset 4024 Page 13841: item order check unsafe: skipping wallet.dat: DB_VERIFY_BAD: Database verification failed DB_LOGC->get: log record LSN 8153/356327: checksum mismatch DB_LOGC->get: catastrophic recovery may be required PANIC: DB_RUNRECOVERY: Fatal error, run database recovery PANIC: DB_RUNRECOVERY: Fatal error, run database recovery process-private: unable to find environment process-private: unable to find environment file unknown has LSN 321/508796, past end of log at 1/28 Commonly caused by moving a database from one database environment to another without clearing the database LSNs, or by removing all of the log files from a database environment Page 0: metadata page corrupted Page 0: could not check metadata page wallet.dat: DB_VERIFY_BAD: Database verification failed file unknown has LSN 321/508796, past end of log at 1/1076 Commonly caused by moving a database from one database environment to another without clearing the database LSNs, or by removing all of the log files from a database environment wallet.1450305254.bak: DB_VERIFY_BAD: Database verification failed
debug.log 2015-12-16 22:34:12 Default data directory /root/.Bitcoin 2015-12-16 22:34:12 Using data directory /root/.Bitcoin 2015-12-16 22:34:12 Using at most 125 connections (1024 file descriptors available) 2015-12-16 22:34:12 init message: Verifying wallet... 2015-12-16 22:34:12 dbenv.open LogDir=/root/.Bitcoin/database ErrorFile=/root/.Bitcoin/db.log 2015-12-16 22:34:14 ERROR: CDB() : error DB_RUNRECOVERY: Fatal error, run database recovery (-30973) opening database environment 2015-12-16 22:34:14 Moved old /root/.Bitcoin/database to /root/.Bitcoin/database.1450305254.bak. Retrying. 2015-12-16 22:34:14 dbenv.open LogDir=/root/.Bitcoin/database ErrorFile=/root/.Bitcoin/db.log 2015-12-16 22:34:15 Renamed wallet.dat to wallet.1450305254.bak 2015-12-16 22:34:15 Error: Salvage found errors, all data may not be recoverable. 2015-12-16 22:34:15 Salvage(aggressive) found no records in wallet.1450305254.bak. 2015-12-16 22:34:15 Error: wallet.dat corrupt, salvage failed 2015-12-16 22:34:15 Shutdown : In progress... 2015-12-16 22:34:16 StopNode() 2015-12-16 22:34:16 Flushed 0 addresses to peers.dat 3ms 2015-12-16 22:34:16 Shutdown : done
|
|
|
Is this the original wallet file or the backup? It looks like the wallet.dat was corrupted and the private keys are damaged. Odd that it would happen with your live wallet.dat as well as with your backup.
This is backup when I tried to use " -zapwallettxes=2" flag. Do you have any other backups or any idea why the backup could be corrupted as well as the normal wallet.dat? As I said above:" I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash.". This may be a reason. I have older backups. What if I replace whole " .Bitcoin" directory?
|
|
|
Is this the original wallet file or the backup? It looks like the wallet.dat was corrupted and the private keys are damaged. Odd that it would happen with your live wallet.dat as well as with your backup.
This is backup when I tried to use " -zapwallettxes=2" flag.
|
|
|
My wallet was corrupted. Now when I am running the wallet (using "--daemon" flag) it says:"Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect." I have already tried to put "-rescan" flag - gives me the same result. I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash. Anyway I have one week backup. What if I replace current "wallet.dat" by backuped "wallet.dat". Will this fix the wallet?
The backup might fix it or it might have the same issue. Instead of -rescan try -zapwallettxes if the backup does not work. If that does not work either, try -zapwallettxes=2 this will drop all meta data about transactions (labels, etc.) though. Backup of wallet.dat does not help. I am even using your advices ( -zapwallettxes, -zapwallettxes=2). I get new error:" Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in /root/.Bitcoin; if your balance or transactions are incorrect you should restore from a backup. Error: Error loading wallet.dat: Wallet corrupted". Any other suggestions? What if I replace whole ".Bitcoin" folder by one week backup? By the way there are these lines in "debug.log" of wallet: ... 015-12-15 22:30:50 init message: Loading wallet... 2015-12-15 22:30:52 Error reading wallet database: CPubKey corrupt 2015-12-15 22:30:54 Error reading wallet database: CPrivKey corrupt 2015-12-15 22:30:54 Error reading wallet database: CPrivKey corrupt 2015-12-15 22:30:54 Error reading wallet database: CPrivKey pubkey inconsistency 2015-12-15 22:30:54 Error reading wallet database: CPrivKey pubkey inconsistency 2015-12-15 22:30:54 Error reading wallet database: CPrivKey pubkey inconsistency 2015-12-15 22:30:55 Error reading wallet database: CPrivKey pubkey inconsistency 2015-12-15 22:30:57 Error reading wallet database: CPrivKey pubkey inconsistency 2015-12-15 22:30:58 Error reading wallet database: CPrivKey corrupt...
|
|
|
You can always try it. BUT: 1. Make sure you have extra backups of both. 2. Don't actually REPLACE the old wallet.dat, just rename it to something else and use a COPY of the backup. This way you will have the wallet.dat that is given you a problem now and a number of backups.
thanks for advice.
|
|
|
My wallet was corrupted. Now when I am running the wallet (using "--daemon" flag) it says:"Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect." I have already tried to put "-rescan" flag - gives me the same result. I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash. Anyway I have one week backup. What if I replace current "wallet.dat" by backuped "wallet.dat". Will this fix the wallet?
|
|
|
how to run abe without logs in console?
To run as daemon in background: nohup ABE COMMAND TO RUN & Log will be saved to nohup.out. You can create symlink to /dev/null if you do not want to save logs. Or if not in background: ABE COMMAND TO RUN > /dev/null thanks for reply. do you mean running commad may look like nohup python -m Abe.abe --config myconf.conf ?
|
|
|
how to run abe without logs in console?
|
|
|
в RPC есть такая функция mergecoins. для чего она нужна, что делает и как ею пользоватся? p.s. я новичек в новакоина.
 mergecoins <amount> <minvalue> <outputvalue> <amount> is resulting inputs sum <minvalue> is minimum value of inputs which are used in join process <outputvalue> is resulting value of inputs which will be created All values are real and and rounded to the nearest 0.0001 (code -1) Example of usage: mergecoins 10000 1 20 - Select 10000 coins
- Remove outputs with value less than 1 coin from set of selected outputs
- Combine the rest of them into new inputs, use 20 coins as target value
The main purpose of this function is defragmentation, it can be useful for exchange or pool wallet. there is "<minvalue> is minimum value of inputs" inputs. there is "Remove outputs with value less than 1 coin from set of selected outputs" outputs. can you tell why? почему там в описании функции говорится о входах, а в примере о выходах в качестве пояснения значения параметра minvalue?
|
|
|
в RPC есть такая функция mergecoins. для чего она нужна, что делает и как ею пользоватся? p.s. я новичек в новакоинах.
|
|
|
Look at the code below from bitcoinj (core\src\main\java\com\google\bitcoin\params\MainNetParams.java): proofOfWorkLimit = Utils.decodeCompactBits(0x1d00ffffL); And look at the code from bitcoin qt wallet (src\main.cpp): static CBigNum bnProofOfWorkLimit(~uint256(0) >> 32); I assume that in second case bnProofOfWorkLimit consists of 32 "0" and 224 "1" (000000...000000000011111111111111111111....11111111). So I don't have an idea how to get first case "0x1d00ffff" from second case? P.S. I have looked in "uint256.h". It wasn't helpful.
|
|
|
Look at the code below from android bitcoin wallet: proofOfWorkLimit = Utils.decodeCompactBits(0x1d00ffffL); And look at the code from bitcoin qt wallet: static CBigNum bnProofOfWorkLimit(~uint256(0) >> 32); I assume that in second case ProofOfWorkLimit consists of 32 "0" and 224 "1" (000000...000000000011111111111111111111....11111111)? So I don't have an idea how to get first case "0x1d00ffffL" from second case? In binary "0x1d00ffffL" is 11101000000001111111111111111. P.S. I have looked in uint256.h. It wasn't helpful. P.S.S. Can anyone answer for sample what exactly should I put here "Utils.decodeCompactBits(0x1d00ffffL);" in case "~uint256(0) >> 27" ?
|
|
|
Coinbase and Bitpay have nice APIs
thanks. any other ideas? without coinbase or bitpay?
|
|
|
I gonna to create web app. Bitcoins will be game coins. So how to implement sending of won bitcoins from server (wallet on the server) to player's address?
|
|
|
|