521
|
Bitcoin / Development & Technical Discussion / Re: fuck you wallet format!!!! (RANT)
|
on: May 05, 2012, 08:11:21 PM
|
That requires the full blockchain (which is something that will get removed further and further from wallets in the future, imho), plus an extra additional index on top of it. Furthermore it misses any ability to store local data (address labels, accounts, comments, ...).
I believe what you are looking for is Electrum or another lightweight client, which keeps all that data and I assume fast rescan ability on a server.
I agree with you that we shouldn't need a lengthy rescan to switch wallets (afaik, we don't, but switching is far from how easy it should be), but the solution is adding multiple wallet support to the client. Using the blockchain as your transaction store may sound fun, but I don't think it's a viable end-user way of working in the future.
|
|
|
522
|
Bitcoin / Development & Technical Discussion / Re: fuck you wallet format!!!! (RANT)
|
on: May 05, 2012, 02:53:40 AM
|
I think you're preaching to the choir. I don't think many people consider bdb for the wallet a good idea. I've already experimented with an own format to function as drop-in replacement for the database file. It doesn't look too hard, but obviously compatibility issues will complicate things.
|
|
|
524
|
Bitcoin / Development & Technical Discussion / Re: fuck you wallet format!!!! (RANT)
|
on: May 04, 2012, 01:35:07 PM
|
I believe the reason for only using one table is the result of the glue layer on top of BDB (which I suppose was designed by Satoshi). This way, only one open database object needs to be kept around per file. It's an ugly system, but it seems reasonable at least. As far as I know, Satoshi didn't really like the idea of alternate clients, so I don't think he designed with ease of interoperability in mind. Once that layer was in place, it was probably all to easy to add fields to (mostly) the wallet for various pieces of data (and I did so as well, later on...).
Regarding the choice for BDB in the first place: it makes sense for the transaction/block index database. These are large, need frequent updates and queries, and need a high degree of transaction atomicity. For wallets and IP addresses, I believe better solutions are possible. Both are only read at startup, and subsequently updated but mostly appended to. I hope we can move to a better format (especially for the wallet) soon. One that isn't prone to corruption under flaky hardware (perhaps by only appending to it, and occassionally rewriting it), isn't linked to a fixed database environment directory, and is backward compatible...
|
|
|
526
|
Bitcoin / Development & Technical Discussion / Re: BitcoinD Feature Request - Common IN/OUT 'listtransactions' Label in API
|
on: May 03, 2012, 09:18:52 PM
|
The question is, where do you want the data that gets added to the label or account of an outgoing transaction to come from? If it comes from another hypothetical RPC call "settransactionlabel" or something, you may as well use the sendfrom RPC.
You say that account is always empty for outgoing transactions. That is not true, it is equal to the account you sent it from (and the default is ""). If you use "sendfrom", you can decide which account it is subtracted from.
Also, yelling doesn't help.
|
|
|
527
|
Bitcoin / Development & Technical Discussion / Re: Question on blockheight behaviour
|
on: April 29, 2012, 10:15:45 AM
|
CBlock::AcceptBlock() is called for each block that gets attached to the block tree on disk, i.e. every valid block that has a history leading back to the genesis block. It is also called for blocks that fail to connect afterwards (those with double spends in them) or stale blocks that just never make it into the best chain.
I think you're better off hooking in ConnectBlock() and maybe DisconnectBlock(). These get called for each block joining and leaving the current best chain.
|
|
|
531
|
Bitcoin / Development & Technical Discussion / Re: Github - bitcoin commit break?
|
on: April 27, 2012, 03:24:39 PM
|
The development process consists of this cycle (in a perfect world, at least): - the "merge window" for a new version opens
- complete and accepted pull requests are merged into the master branch
- the "merge window" closes (it usually remains open for a few weeks)
- a release candidate is built
- the release candidate is tested
- if found necessary, fixes (but no new features) are merged, and a new release candidate is built.
- if the last release candidate survives testing, it is renames and released as final
- repeat
|
|
|
532
|
Bitcoin / Development & Technical Discussion / Re: Reading the block chain with a library?
|
on: April 26, 2012, 12:11:24 PM
|
$ ./bitcoind getblockhash 100000 000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506 $ ./bitcoind getblock 000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506 { "hash" : "000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506", "size" : 957, "height" : 100000, "version" : 1, "merkleroot" : "f3e94742aca4b5ef85488dc37c06c3282295ffec960994b2c0d5ac2a25a95766", "time" : 1293623863, "nonce" : 274148111, "bits" : "1b04864c", "difficulty" : 14484.16236123, "tx" : [ "8c14f0db3df150123e6f3dbbf30f8b955a8249b62ac1d1ff16284aefa3d06d87", "fff2525b8931402dd09222c50775608f75787bd2b87e56995a7bdd30f79702c4", "6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4", "e9a66845e05d5abc0ad04ec80f774a7e585c6e8db975962d069a522137b80c1d" ], "previousblockhash" : "000000000002d01c1fccc21636b607dfd930d31d01c3a62104612a1719011250", "nextblockhash" : "00000000000080b66c911bd5ba14a74260057311eaeb1982802f7010f1a9f090" }
First call getblochash to find the hash of a block at a particular height, then use getblock to query information about the block with that given hash. The "time" field will tell you the block's timestamp (in seconds since epoch).
|
|
|
534
|
Bitcoin / Development & Technical Discussion / Re: Reading the block chain with a library?
|
on: April 25, 2012, 01:55:28 AM
|
If you tell me what you're trying to do with it, I can write more directed code samples for you.
I personally want to get the timestamp of blocks with a certain block height once per day, but didn't get around to looking at either libbitcoin or Armory. Ideally it would be something like "TheBDM.getHeaderByHeight(12345).getTimestamp()"... libbitcoin or armory's library will surely give you a much more flexible interface, but you *can* just do this using bitcoind as well. See the getblockhash and getblock RPC commands.
|
|
|
537
|
Bitcoin / Development & Technical Discussion / Re: CMake integration
|
on: April 20, 2012, 09:50:31 PM
|
The previous post in this thread is 1.5 years old. We've since switched from the wx GUI ("bitcoin") to a Qt GUI ("bitcoin-qt"), and the version requirements for several libraries changed as well. We've also switched from SVN to GIT...
In any case, that cmake file will be severely outdated by now.
|
|
|
538
|
Bitcoin / Development & Technical Discussion / Re: Bug with fee calculation
|
on: April 19, 2012, 06:14:20 PM
|
The calculated fee depends on the actual transaction produced, such as on the size, the number of inputs, their value, and their age. The client uses some heuristic to prevent unnecessary losses, but the algorithm is not deterministic. In some cases, a simpler transaction is produced, or if time passed, the fee requirements decrease.
In short, yes, this is possible.
|
|
|
540
|
Bitcoin / Bitcoin Technical Support / Re: Delete /database/log.xxx files?
|
on: April 16, 2012, 04:57:22 PM
|
You can delete them if you closed the client cleanly. In case of an unclean shutdown, they are necessary.
Version 0.6.0 should already create much less log files (or rather, wipe more frequently), though. If you're not using 0.6.0 yet, it may help.
|
|
|
|