#

if

(9 articles)

Kicking the Hornet's Nest - part 11

# Kicking the Hornet's Nest - third edition - part 11 All links, digital (pdf, txt, docx, md) and book in print, can be found at https://hive.blog/@crrdlx/satoshi Edited by [crrdlx](nostr:nprofile1qyv8wumn8ghj7mn0wdj8y6tkv5hxzurs9aex2mrp0yq3wamnwvaz7tmjv4kxz7fwwpexjmtpdshxuet59uqzqqzmcn0yrn7ttq8hrjkk46ysn2tk26rr8f8k4y7xkl74hlh3rcdzm9d3t8), npub: ``` npub1qpdufhjpel94srm3ett2azgf49m9dp3n5nm2j0rt0l2mlmc3ux3qza082j ``` ---- ### Kicking the Hornet's Nest pages 225 - 250 ---- **BitcoinTalk** Re: Simple to implement feature requests _2010-02-08 16:37:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=46.msg284#msg284) There are command line options: bitcoin -addnode=1.2.3.4 to tell bitcoin about a node to connect to bitcoin -connect=1.2.3.4 connect only to the specified node(s) You can use more than one of these, for instance bitcoin -connect=(first to try) -connect=(next to try) ... You can specify non-routable IPs with -connect like 192.168.x.x, so if you had a server farm and you wanted one server to connect to the world and the rest to connect to the one server, you could do that. In particular, -addnode is needed if you're always going to connect through TOR, since the IRC server blocks all the TOR exit nodes. To connect through TOR, you could use: bitcoin -proxy=127.0.0.1:9050 -addnode=212.159.72.216 **Martii Malmi (AKA Sirius) “COPA trial” email #158** **Date: Thu, 11 Feb 2010 22:58:29 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Translation** **To: mmalmi@cc.hut.fi** I didn't make any changes to Drupal code. The only thing other than installing themes was the .htaccess file (which really is needed, it didn't work in the global config file). It was only SMF where I made some PHP changes. You might find it preferable not to translate it into your own language. Often the standard answer about legalities is that it's only intended for people in other countries. Translating it into your home language weakens that argument. _mmalmi@cc.hut.fi wrote:_ _> I got the translations working correctly, now it should automatically_ _> detect the language from the browser settings. Choosing manually is of_ _> course also possible. I asked the translators to send me their_ _> translations as pm or e-mail. I guess I'll make a Finnish translation_ _> myself at some point. Multiple translations add to the site's credibility._ _>_ _> Drupal is asking to do a security update. Do we have other customized_ _> files we need to backup than those located in the "sites" directory?_ _>_ **BitcoinTalk** Re: DEB Package? _2010-02-12 02:33:02 UTC_ - [-](https://bitcointalk.org/index.php?topic=49.msg315#msg315) Are you just trying to run the program or do you really need to compile it? There's a 32-bit linux binary that can be run on 64-bit ubuntu if you "sudo apt-get ia32-libs". [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-linux.tar.gz/download](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-linux.tar.gz/download) I recently updated the SVN for building on 64-bit Karmic with wxWidgets 2.9.0. This was after the 0.2.0 release. The 0.2.0 release did not build on 64-bit yet. Unfortunately there currently isn't a -dev deb package of either of the versions of wxWidgets that we can use. On Karmic they only have the UTF-16 version. We need either the ANSI (libwxgtk2.8-ansi-dev) version or the UTF-8 (wxWidgets 2.9.0) version. We're moving towards 2.9.0. I know you said you didn't want VM, but as a last resort, last I checked the Windows version runs fine in Wine. **BitcoinTalk** Re: Repost: Request: Make this anonymous? _2010-02-12 17:28:32 UTC_ - [-](https://bitcointalk.org/index.php?topic=7.msg324#msg324) True, sending by IP through Tor trades one problem for another. The Tor exit node can see the text of your message and potentially MITM you. Best to only send to bitcoin addresses then. Payments by bitcoin address are broadcast over the network as part of the normal network traffic. All communications with the network are broadcasts of public information. **Martii Malmi (AKA Sirius) “COPA trial” email #160** **Date: Sat, 13 Feb 2010 01:08:42 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: JSON-RPC status** **To: mmalmi@cc.hut.fi** I uploaded my JSON-RPC and command line implementation to SVN. I'm waiting to post on the forum when I've had more time to think about the commands. At least some method names are going to change. To enable the RPC server, add the switch -server. It's not on by default. Client commands are without any switches, as such: bitcoin getblockcount bitcoin getdifficulty bitcoin getnewaddress somelabel bitcoin sendtoaddress 1DvqsbZ... 1.00 bitcoin getallpayments 0 bitcoin stop Applications would normally use JSON-RPC directly, not command line. I haven't tested my JSON-RPC server with anything else yet. If you do, please tell me how it goes. You're using Python, right? Getting the Linux version to run without the GTK installed will be a separate task. mmalmi@cc.hut.fi wrote: > That's great! I'll start familiarizing myself with Liberty Reserve and > its api. > **BitcoinTalk** Re: DEB Package? _2010-02-13 01:38:37 UTC_ - [-](https://bitcointalk.org/index.php?topic=49.msg326#msg326) I couldn't get wxWidgets 2.8.9 to compile on Karmic 64-bit either. I have been compiling the latest SVN on Karmic 64-bit with wxWidgets 2.9.0, which compiles fine on 64-bit. Read build-unix.txt and use the given ../configure parameters on wxWidgets so you can use the makefile.unix.wx2.9 as supplied. (--enable-debug --disable-shared --enable-monolithic) -- fixed The download link on the homepage is to the sourceforge tar.gz archive which contains the 32-bit binary and the 0.2.0 sources, which were not yet buildable on 64-bit at the time. The SVN was first buildable on 64-bit with wx2.9.0 on 28 January 2010. Hopefully they'll have a wxWidgets 2.9.0 debian package someday. **BitcoinTalk** Re: What's with this odd generation? _2010-02-14 06:28:03 UTC_ - [-](https://bitcointalk.org/index.php?topic=48.msg327#msg327) [_**Quote from: theymos on February 12, 2010, 08:31:52 AM**_](https://bitcointalk.org/index.php?topic=48.msg318#msg318) _Does the sending client send more BitCoins to account for the fee (so the recipient gets what he's expecting)?_ Yes. [_**Quote from: SmokeTooMuch on February 12, 2010, 01:11:09 PM**_](https://bitcointalk.org/index.php?topic=48.msg319#msg319) _why do we even need fees ? i thougt the no-fees-feature was one of the advantages of bitcoin ?!_ Almost all transactions are free. A transaction is over the maximum size limit if it has to add up more than 500 of the largest payments you've received to make up the amount. A transaction over the size limit can still be sent if a small fee is added. The average transaction, and anything up to 500 times bigger than average, is free. It's only when you're sending a really huge transaction that the transaction fee ever comes into play, and even then it only works out to something like 0.002% of the amount. It's not money sucked out of the system, it just goes to other nodes. If you're sad about paying the fee, you could always turn the tables and run a node yourself and maybe someday rake in a 0.44 fee yourself. **BitcoinTalk** Re: What's with this odd generation? _2010-02-14 15:52:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=48.msg329#msg329) Right. Otherwise we couldn't have a finite limit of 21 million coins, because there would always need to be some minimum reward for generating. In a few decades when the reward gets too small, the transaction fee will become the main compensation for nodes. I'm sure that in 20 years there will either be very large transaction volume or no volume. **Martii Malmi (AKA Sirius) “COPA trial” email #163** **Date: Sun, 14 Feb 2010 21:48:31 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: JSON-RPC status** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _>> I haven't tested my JSON-RPC server with anything else yet. If you do,_ _>> please tell me how it goes. You're using Python, right?_ _>>_ _>> Getting the Linux version to run without the GTK installed will be a_ _>> separate task._ _>_ _> Yes, using Python. I didn't test the JSON-RPC yet as I don't have_ _> Bitcoin running on the vps yet. It doesn't work without a window manager_ _> even if GTK libraries are installed. I asked about it at wxWidgets forum_ _> (http://wxforum.shadonet.com/viewtopic.php?t=26954) but they didn't have_ _> much clue. Maybe we'll just need to make two different binaries._ I will probably relent and do that. I can move init and shutdown into init.cpp or start.cpp or something, link only wxbase and not link ui.o and uibase.o. wxWidgets is mostly Windows people, they wouldn't know much about GTK. Don't you have an Ubuntu laptop you can test and compile on so you don't have to toy with the vps? **BitcoinTalk** Re: Proof-of-work difficulty increasing _2010-02-15 06:28:38 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg346#msg346) 14/02/2010 0000000065465700000000000000000000000000000000000000000000000000 2009 1.00 30/12/2009 1.18 +18% 11/01/2010 1.31 +11% 25/01/2010 1.34 +2% 04/02/2010 1.82 +36% 14/02/2010 2.53 +39% Another big jump in difficulty yesterday from 1.82 times to 2.53 times, a 39% increase since 10 days ago. It was 10 days apart not 14 because more nodes joined and generated the 2016 blocks in less time. **Martii Malmi (AKA Sirius) “COPA trial” email #165** **Date: Mon, 15 Feb 2010 18:11:53 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: JSON-RPC status** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _>> Don't you have an Ubuntu laptop you can test and compile on so you_ _>> don't have to toy with the vps?_ _>_ _> Yes. Tested with Python's JSON-RPC, and seems to work fine! Really easy_ _> to use._ Hurray, I got it on the first go. Could you send me the Python code you used? So if I do some testing later I don't have to figure it out myself. **BitcoinTalk** Re: Setting up multiple bitcoin machines behind NAT _2010-02-16 01:34:56 UTC_ - [-](https://bitcointalk.org/index.php?topic=54.msg360#msg360) Right now there isn't a port number setting to do that. It's a feature yet to be implemented. You can only set up your NAT to port-forward to one of the computers. (I said something earlier about NAT port translation, but that wouldn't work, other nodes wouldn't know to connect to that port) If you want, as a small optimization, you could run the rest of your computers as: bitcoin -connect=<the IP of the first computer> so they get all their network communication from the first computer and don't all connect over the net individually for the same information. This saves bandwidth, although it doesn't use much bandwidth to begin with, so it wouldn't really matter unless you had tons of computers. For redundancy in case the first computer goes down, you could have two that connect out and the rest connect to both of them. The first two are run normally, the rest are run like: bitcoin -connect=<IP1> -connect=<IP2> **BitcoinTalk** Re: Proof-of-work difficulty increasing _2010-02-17 17:58:03 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg388#msg388) [_**Quote from: Sabunir on February 16, 2010, 08:51:51 AM**_](https://bitcointalk.org/index.php?topic=43.msg372#msg372) _. Perhaps it has to do with my connection's very high latency (2000ms or more on average)_ 2 seconds of latency in both directions should reduce your generation success by less than 1%. [_**Quote from: Sabunir on February 16, 2010, 08:51:51 AM**_](https://bitcointalk.org/index.php?topic=43.msg372#msg372) _and/or my high packet loss (sometimes up to 10% loss)?_ Probably OK, but I'm not sure. The protocol is designed to resync to the next message, and messages get re-requested from all the other nodes you're connected to until received. If you miss a block, it'll also keep requesting it every time another blocks comes in and it sees there's a gap. Before the original release I did a test dropping 1 out of 4 random messages under heavy load until I could run it overnight without any nodes getting stuck. **BitcoinTalk** Re: Bitcoin client and website translation _2010-02-17 19:19:43 UTC_ - [-](https://bitcointalk.org/index.php?topic=47.msg389#msg389) I updated the SVN with changes to support translation. Translatable strings are all enclosed in _(""), and we're using UTF-8 on all platforms. When the program runs, it looks in the directory of the EXE for the file: locale\<langcode>\LC_MESSAGESitcoin.mo <langcode> is the two letter code of the language your OS is set to, like "de" or "nl". On Linux, it also looks for: /usr/share/locale/<langcode>/LC_MESSAGES/bitcoin.mo /usr/local/share/locale/<langcode>/LC_MESSAGES/bitcoin.mo (are there other standard places it should look on linux?) Here's a quick walkthrough using poedit to make a .po and .mo file: - Download the bitcoin sourcecode from SVN - In the trunk directory, mkdir locale\<lang>\LC_MESSAGES - In poedit, File->New catalog->Paths tab - Click the "New item" dotted rectangle button - Put "../../.." and MAKE SURE TO PRESS ENTER to add the path - Click OK - Save the file as "bitcoin.po" in the LC_MESSAGES directory you made - It should then scan the sourcecode and find about 170 strings - If it didn't find anything, check Catalog->Settings->Path tab, make sure the "../../.." was added When you're done translating, commit both bitcoin.po (the editable catalog file) and bitcoin.mo (compiled data used by the program). **BitcoinTalk** Re: Number of connections _2010-02-21 03:43:48 UTC_ - [-](https://bitcointalk.org/index.php?topic=58.msg413#msg413) Nodes stop trying to initiate connections once they have 15. If you can accept incoming connections, then you can get well above that from nodes connecting to you, otherwise you max out at 15. I don't know if there's any reason to have 15 connections. Maybe it should be 10. Since nodes that can only connect out are probably at or near 15 most of the time now, you should level off to an equilibrium. 45 suggests a ratio of 3 out-only nodes to every 1 in-accepting node. The number of connections won't be a good gauge of the size of the network any more. Someone should periodically IRC to the bitcoin channel on chat.freenode.net and count the number of users. That gives you the total count of network nodes (except TOR nodes). Block generation is again running ahead of pace. We're in for another big step up in difficulty at the next adjustment in about 5 days. **BitcoinTalk** Post your static IP _2010-02-21 04:19:53 UTC_ - [-](https://bitcointalk.org/index.php?topic=59.msg414#msg414) It would be nice to have a list of static IPs for new users to send test donations to so they can see how the software works. If you can accept incoming connections and you have a static IP address, post it here! Anything sent to these IPs should be considered a donation. If you do request a round-trip, be sure to include your return bitcoin address or IP in the comment, but please assume it'll be one-way. They won't necessarily be watching for incoming transactions to send back. **BitcoinTalk** Re: Current Bitcoin economic model is unsustainable _2010-02-21 05:44:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=57.msg415#msg415) Excellent analysis, xc. A rational market price for something that is expected to increase in value will already reflect the present value of the expected future increases. In your head, you do a probability estimate balancing the odds that it keeps increasing. In the absence of a market to establish the price, NewLibertyStandard's estimate based on production cost is a good guess and a helpful service (thanks). The price of any commodity tends to gravitate toward the production cost. If the price is below cost, then production slows down. If the price is above cost, profit can be made by generating and selling more. At the same time, the increased production would increase the difficulty, pushing the cost of generating towards the price. In later years, when new coin generation is a small percentage of the existing supply, market price will dictate the cost of production more than the other way around. At the moment, generation effort is rapidly increasing, suggesting people are estimating the present value to be higher than the current cost of production. **BitcoinTalk** UI improvements _2010-02-21 21:48:01 UTC_ - [-](https://bitcointalk.org/index.php?topic=60.msg426#msg426) Uploaded some UI changes to SVN as version 0.2.5. Instead of View->Show Generated, we now have tabs: - All Transactions - Sent/Received - Sent - Received Makes it a lot easier to flip to received and check for payments. Moved the "Your Addresses" book inside the main address book. It was confusing having two address books. I found the "To:" in "From: unknown, To: (one of your bitcoin addresses)" still confusing, so I changed it to "From: unknown, Received with:". The bitcoin address is abbreviated so you can see the label that you set in the Receiving tab of the address book. Fixed a few UI glitches from the upgrade to wxWidgets 2.9.0. I haven't forgotten about you people who want non-UI, but I had to do some fun stuff before more build bashing. **Martii Malmi (AKA Sirius) “COPA trial” email #168** **Date: Mon, 22 Feb 2010 20:17:42 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Non-GUI option** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _> Just a few clues I've found about running the same binary without a GUI:_ _>_ _> 1) GTK supports running a program without display:_ _> http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check._ _> This doesn't tell if it's possible in wxWidgets though._ I see it calls gtk-init-check in wxApp::Initialize. I can subclass Initialize, call the original one while suppressing the error message and ignore the return value. It seems to be working. Any suggestions what to name the command line switches and how to describe them? Is there any traditional standard? I'm currently using: -daemon (or -d) (Enables RPC and runs in the background) -server (Enables RPC) **BitcoinTalk** Re: generation slowed down dramatically _2010-02-23 00:49:56 UTC_ - [-](https://bitcointalk.org/index.php?topic=61.msg433#msg433) Just a random streak of bad luck. It looks steady to me. Competition doesn't have an effect until the next automatic retarget adjustment, and we haven't reached the next one yet. The adjustments are every 2016 blocks. To calculate our progress towards the next one, divide the block total by 2016. The fractional part is how far we are to the next one. My back-of-the-envelope projection: 42032 blocks/2016 = 20.85 = 85% of the way. About 1.5 days to go until the next one. That'll only be about 10 days since the last one, the target is 14 days, so 14/10 = 1.4 = around 40% difficulty increase. **BitcoinTalk** Re: UI improvements _2010-02-23 01:16:28 UTC_ - [-](https://bitcointalk.org/index.php?topic=60.msg434#msg434) There are now "Sending" and "Receiving" tabs in the Address Book. Your addresses are referred to as "receiving addresses". madhatter was working on building it on Mac. He had errors probably caused by UTF-16 wxWidgets 2.8. Should have better luck now with 2.9.0. wxWidgets 2.9.0 is UTF-8 and wouldn't have that problem. I think he had it working on FreeBSD, but he wanted a non-UI version. I have the command line and JSON-RPC daemon version working now. Will SVN it in a day or two. I disabled gdm on my Ubuntu system so it boots into command line. I hope I will be able to get it enabled again with rcconf. **Martii Malmi (AKA Sirius) “COPA trial” email #169** **Date: Tue, 23 Feb 2010 01:41:01 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Non-GUI option** **To: Martti Malmi <mmalmi@cc.hut.fi>** _>> Just a few clues I've found about running the same binary without a GUI:_ _>>_ _>> 1) GTK supports running a program without display:_ _>> http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check._ _>> This doesn't tell if it's possible in wxWidgets though._ _>_ _> I see it calls gtk-init-check in wxApp::Initialize._ _>_ _> I can subclass Initialize, call the original one while suppressing the_ _> error message and ignore the return value. It seems to be working._ This is working. A few more things and I'll upload it. We'll need to tell people to install the GTK libraries. Do you remember the apt-get command to install GTK, and can you install it without having a GUI installed? **BitcoinTalk** Re: Bitcoin Address Collisions _2010-02-23 16:26:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=62.msg443#msg443) There's a separate public/private keypair for every bitcoin address. You don't have a single private key that unlocks everything. Bitcoin addresses are a 160-bit hash of the public key, everything else in the system is 256-bit. If there was a collision, the collider could spend any money sent to that address. Just money sent to that address, not the whole wallet. If you were to intentionally try to make a collision, it would currently take 2^126 times longer to generate a colliding bitcoin address than to generate a block. You could have got a lot more money by generating blocks. The random seed is very thorough. On Windows, it uses all the performance monitor data that measures every bit of disk performance, network card metrics, cpu time, paging etc. since your computer started. Linux has a built-in entropy collector. Adding to that, every time you move your mouse inside the Bitcoin window you're generating entropy, and entropy is captured from the timing of disk ops. **BitcoinTalk** Re: UI improvements _2010-02-23 16:53:27 UTC_ - [-](https://bitcointalk.org/index.php?topic=60.msg446#msg446) [_**Quote from: Xunie on February 23, 2010, 12:28:27 PM**_](https://bitcointalk.org/index.php?topic=60.msg439#msg439) _/etc/init.d/gdm start_ _and it will start gdm!_ Ah yes, there we go, back to normal again. The ctrl+alt+F[1-8] thing never worked on this computer. The screen just goes haywire. **BitcoinTalk** Command Line and JSON-RPC _2010-02-23 22:15:41 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg452#msg452) Version 0.2.6 on SVN can now run as a daemon and be controlled by command line or JSON-RPC. On Linux it needs libgtk2.0-0 installed, but does not need a GUI running. Hopefully gtk can be installed without having a windowing system installed. The command to start as a daemon is: bitcoin -daemon [switches...] Or, to run the UI normally and also be able to control it from command line or JSON-RPC, use the "-server" switch. bitcoin -server [switches...] With either switch, it runs an HTTP JSON-RPC server that accepts local socket connections on 127.0.0.1:8332. The port is bound to loopback and can only be accessed from the local machine, but from any account, not just the user it's running under. To control it from the command line, the interface is a command name without any switches, followed by parameters if any. bitcoin <command> [params...] For example: bitcoin getinfo bitcoin getdifficulty bitcoin setgenerate true bitcoin stop It's a simple JSON-RPC client and prints the JSON result. Look at rpc.cpp for the list of commands. Web apps or anything automated will normally use JSON-RPC directly, not command line. There are JSON-RPC libraries for all the major languages. In script languages like PHP and Python the syntax is as natural as calling a local function. **BitcoinTalk** Re: Bitcoin Address Collisions _2010-02-23 22:24:00 UTC_ - [-](https://bitcointalk.org/index.php?topic=62.msg453#msg453) [_**Quote from: NewLibertyStandard on February 23, 2010, 07:04:47 PM**_](https://bitcointalk.org/index.php?topic=62.msg450#msg450) _Are generated bitcoins encrypted with whichever address is currently displayed in the main Bitcoin window?_ No, each generated transaction uses a new, single-use address. Nothing uses the address in the main window, it's just there for convenience for you to copy. 0.2.5 has a "New..." button next to it to make it easy to change each time you use it. **BitcoinTalk** Re: URI-scheme for bitcoin _2010-02-24 05:57:43 UTC_ - [-](https://bitcointalk.org/index.php?topic=55.msg481#msg481) That would be nice at point-of-sale. The cash register displays a QR-code encoding a bitcoin address and amount on a screen and you photo it with your mobile. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-24 06:17:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg482#msg482) [_**Quote from: theymos on February 24, 2010, 03:07:37 AM**_](https://bitcointalk.org/index.php?topic=63.msg467#msg467) [_**Quote from: satoshi on February 23, 2010, 10:15:41 PM**_](https://bitcointalk.org/index.php?topic=63.msg452#msg452) _On Linux it needs libgtk2.0-0 installed_ _Will this requirement be removed sometime? I'd rather not have to deal with GTK._ How much "dealing with" does GTK actually require? Is it just a matter of "sudo apt-get install libgtk2.0-0" and having some extra libraries sitting around? GTK doesn't have to do anything, just be there for bitcoin to link to when it loads up, have the gtk-init-check call fail because no GUI present, then it's done. It saves us butchering everything with ifdefs and a separate compile and binary to use wxBase just to try to avoid linking GTK. **Martii Malmi (AKA Sirius) “COPA trial” email #172** **Date: Wed, 24 Feb 2010 06:34:52 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Non-GUI option** **To: mmalmi@cc.hut.fi** _> I'll give Drupal accounts to the bitcoin.org translators, so they can_ _> keep the translations up to date._ Good, that gives them a little sense of ownership and responsibility. I hope we get at least one .mo file for the software translation in time to put into the 0.3 release. **BitcoinTalk** New icon/logo _2010-02-24 21:24:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg504#msg504) New icons, what do you think? Better than the old one? *Note: invalid image links omitted by editor* Full size 530x529 image for scaling down to custom sizes: *Note: invalid image link omitted by editor* The perspective shadow was too thick on the larger sizes. I updated 32, 48 and the full size. I release these images into the public domain (copyright-free). I request that derivative works be made public domain. **BitcoinTalk** Re: Make your "we accept Bitcoin" logo _2010-02-24 21:53:52 UTC_ - [-](https://bitcointalk.org/index.php?topic=45.msg507#msg507) If you GPL stuff, I have to avoid using it. Nothing against GPL per-se, but Bitcoin is an MIT license project. Anything GPL please clearly mark it as such. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-24 22:08:55 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg509#msg509) When and how fast did memory usage increase? Right away, slowly over a long time, or starting at some later event? I have -daemon running on ubuntu 9.10 64-bit and memory usage is steady. It has to be something about the difference on the server besides 64-bit. Maybe some malfunction from the lack of GUI. A memory leak debug tool could give a clue. **BitcoinTalk** Re: Proof-of-work difficulty increasing _2010-02-24 22:42:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg510#msg510) The automatic adjustment happened earlier today. 24/02/2010 0000000043b3e500000000000000000000000000000000000000000000000000 24/02/2010 3.78 +49% I updated the first post. **BitcoinTalk** Re: New icon/logo _2010-02-25 01:56:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg521#msg521) [_**Quote from: Sabunir on February 25, 2010, 01:47:56 AM**_](https://bitcointalk.org/index.php?topic=64.msg519#msg519) _I like them. Do they come in higher resolutions?_ Yes, the original is 546x531 pixels. It looks good at larger size too, but since the small icons are what you mostly always see, I wanted to judge it on those first. I'll post larger sizes and full size a little later. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-25 22:54:17 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg539#msg539) OK, I made a build target bitcoind that only links wxBase and does not link GTK. Version 0.2.7 on SVN. I split out the init and shutdown stuff from ui.cpp into init.cpp, so now ui.cpp is pure UI. ui.h provides inline stubs if wxUSE_GUI=0. We only have four functions that interface from the node to the UI. In the bitcoind build, we don't link ui.o or uibase.o. [_**Quote from: sirius-m on February 25, 2010, 04:32:17 PM**_](https://bitcointalk.org/index.php?topic=63.msg538#msg538) _It started increasing right away. I'll see if valgrind can help me._ Sure feels like it could be something in wxWidgets retrying endlessly because some UI thing failed or something wasn't inited correctly. Our hack to ignore the initialize failure and run anyway means we're in uncharted territory. We're relying on the fact that we hardly use wx in this mode. We do still use a few things like wxGetTranslation and wxMutex. Another way to debug would be to run in gdb, wait until everything is quiet and all threads should be idle, and break it and see which thread is busily doing something and what it's doing. I suspect bitcoind will probably work fine, but I hope you can still debug the problem. ##### BitcoinTalk Re: Proof-of-work difficulty increasing _2010-02-25 23:06:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg540#msg540) The formula is based on the time it takes to generate 2016 blocks. The difficulty is multiplied by 14/(actual days taken). For instance, this time it took 9.4 days, so the calculation was 14/9.4 = 1.49. Previous difficulty 2.53 * 1.49 = 3.78, a 49% increase. I don't know what you're talking about accepting easier difficulties. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-26 16:29:21 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg555#msg555) wx/clipbrd.h isn't used, move it inside the #if wxUSE_GUI. Updated headers.h on SVN. Sorry, I linked to wxbase but I had full wxWidgets on my computer. The db.h:140 class Db no member named "exisits" is stranger. pdb->get, pdb->put, pdb->del compiled before that. Do you have version 4.7.25 of Berkeley DB? Db::exists() [http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/frame_main.html](http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/frame_main.html) [http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/dbexists.html](http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/dbexists.html) I suppose they might have added exists recently, using get before that. **BitcoinTalk** Re: New icon/logo _2010-02-26 23:17:19 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg561#msg561) Good suggestion. I made the B slightly lighter and the background slightly darker. Very slightly. The foreground is now exactly the same colour as the BC in the old one. It's kind of OK if you can't easily read the B in the 16x16. At that size, you just need to see that it's a coin. It doesn't matter so much what's embossed on it, just that there be some detail there because it wouldn't look like a coin if it was a blank smooth circle. It's slightly wider than tall because the dark perspective under it goes more to the right than down. I finished and posted the 32x31 and 48x47 versions in the first message. I like the 48 a lot. How does everyone feel about the B symbol with the two lines through the outside? Can we live with that as our logo? **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-26 23:48:44 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg562#msg562) Are you using wxWidgets 2.9.0? I don't recommend using anything other than 2.9.0. It looks like they've got a reference in the wx headers (arrstr.h) to something outside of wxBase. Removing -D__WXDEBUG__ from bitcoin's makefile would probably solve it. If that doesn't work and you just want to get it working, you could edit wxWidgets include/wx/arrstr.h, line 167 and comment out the wxASSERT_MSG. **BitcoinTalk** Re: New icon/logo _2010-02-27 04:28:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg566#msg566) [_**Quote from: Cdecker on February 27, 2010, 03:24:07 AM**_](https://bitcointalk.org/index.php?topic=64.msg565#msg565) _How about an SVG version? That way we could automatically generate smaller and larger versions as needed._ I don't know how to do SVG, but I did the original very large, over 500 pixels across, so it can be scaled down. I'll give the original when I'm finished. I had to custom tweak each icon size so the vertical lines land square on their pixels, otherwise they're ugly blurry and inconsistent. Such is the challenge of making icons. The original will be good for scaling to custom sizes between 48 and 500 but not smaller. **BitcoinTalk** Re: wxWidgets 2.9.0 _2010-02-27 21:22:53 UTC_ - [-](https://bitcointalk.org/index.php?topic=65.msg571#msg571) [_**Quote from: Cdecker on February 27, 2010, 05:09:59 PM**_](https://bitcointalk.org/index.php?topic=65.msg569#msg569) _Looking through the source of 2.8.10 it appears that_ _unicode_ _is possible with that version too._ In the Windows world, "unicode" means UTF-16 (wchar). 2.8 has two build variations, ANSI and UTF-16 (unicode). The UTF-16 version is the "unicode" version provided in the Debian package. I believe 2.8 and its UTF-16 build labelled simply "unicode" has been the source of build problems described in the forum. We were previously using 2.8 ANSI in anticipation of getting to UTF-8 without going through UTF-16 hell. We cannot compile with UTF-16. 2.9 has only one version, UTF-8. On Windows, we set the codepage to UTF-8, so on all platforms our code is UTF-8 and wxWidgets interfaces with us in UTF-8. On Linux I assume the codepage is already UTF-8. By standardizing on 2.9 we avoid the multi-build confusion of 2.8, and we need 2.9 for UTF-8 internationalization. Make sure you read build-unix.txt and configure wxWidgets using the configure parameters given. Curious, why is it incredibly hard to provide wxWidgets 2.9.0? If you mean for users, that's why we static link it. It's unfortunate that we require so many big dependencies, but we need them all. At least on Debian/Ubuntu, all but wxWidgets are available as packages. Eventually they'll provide a 2.9 package. **Martii Malmi (AKA Sirius) “COPA trial” email #174** **Date: Sun, 28 Feb 2010 14:47:01 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoind** **To: mmalmi@cc.hut.fi** I put it at bitcoin.org/download/linux64-0.2.7.1.tar.gz. You can delete it when you've got it. I thought about what might cause the problem you're having and made a change that this build includes. This might have been unsafe code, although it would probably always get lucky. in util.cpp, old: const char* wxGetTranslation(const char* pszEnglish) { // Wrapper of wxGetTranslation returning the same const char* type as was passed in static CCriticalSection cs; CRITICAL_BLOCK(cs) { // Look in cache static map<string, char*> mapCache; map<string, char*>::iterator mi = mapCache.find(pszEnglish); if (mi != mapCache.end()) return (*mi).second; // wxWidgets translation const char* pszTranslated = wxGetTranslation(wxString(pszEnglish, wxConvUTF8)).utf8_str(); // We don't cache unknown strings because caller might be passing in a // dynamic string and we would keep allocating memory for each variation. if (strcmp(pszEnglish, pszTranslated) == 0) return pszEnglish; // Add to cache, memory doesn't need to be freed. We only cache because // we must pass back a pointer to permanently allocated memory. char* pszCached = new char[strlen(pszTranslated)+1]; strcpy(pszCached, pszTranslated); mapCache[pszEnglish] = pszCached; return pszCached; } return NULL; } new: const char* wxGetTranslation(const char* pszEnglish) { // Wrapper of wxGetTranslation returning the same const char* type as was passed in static CCriticalSection cs; CRITICAL_BLOCK(cs) { // Look in cache static map<string, char*> mapCache; map<string, char*>::iterator mi = mapCache.find(pszEnglish); if (mi != mapCache.end()) return (*mi).second; // wxWidgets translation wxString strTranslated = wxGetTranslation(wxString(pszEnglish, wxConvUTF8)); // We don't cache unknown strings because caller might be passing in a // dynamic string and we would keep allocating memory for each variation. if (strcmp(pszEnglish, strTranslated.utf8_str()) == 0) return pszEnglish; // Add to cache, memory doesn't need to be freed. We only cache because // we must pass back a pointer to permanently allocated memory. char* pszCached = new char[strlen(strTranslated.utf8_str())+1]; strcpy(pszCached, strTranslated.utf8_str()); mapCache[pszEnglish] = pszCached; return pszCached; } return NULL; } If you still suspect this code, for testing you could change it to: const char* wxGetTranslation(const char* pszEnglish) { return pszEnglish; } _mmalmi@cc.hut.fi wrote:_ _> I tried debugging my build of bitcoind with ddd debugger, but didn't_ _> have much success yet. It always ends up taking all the system's memory_ _> and finally crashes. Could you please send me again the latest 64 bit_ _> build of bitcoind, so I can see if the problem is about my build?_ _>_ **Martii Malmi (AKA Sirius) “COPA trial” email #175** **Date: Sun, 28 Feb 2010 20:09:07 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoind** **To: mmalmi@cc.hut.fi** Could you send me the debug.log? _mmalmi@cc.hut.fi wrote:_ _> I tried debugging my build of bitcoind with ddd debugger, but didn't_ _> have much success yet. It always ends up taking all the system's memory_ _> and finally crashes. Could you please send me again the latest 64 bit_ _> build of bitcoind, so I can see if the problem is about my build?_ _>_ **BitcoinTalk** Re: New icon/logo _2010-03-02 02:33:05 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg588#msg588) We have the standard icon sizes, and the full size scales nicely to anything else. I added the full size to the first post. **Martii Malmi (AKA Sirius) “COPA trial” email #178** **Date: Tue, 02 Mar 2010 22:27:22 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoind** **To: mmalmi@cc.hut.fi** Does it still do it if you didn't do getinfo? You could comment out the CreateThreads listed below, then re-enable them one at a time until it does it again. Then we would know which thread the problem is in. net.cpp, under // Start threads CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL) init.cpp: CreateThread(ThreadRPCServer, NULL); _mmalmi@cc.hut.fi wrote:_ _> Here goes. I forgot to mention the crash error message:_ _>_ _> terminate called after throwing an instance of 'std::bad_alloc'_ _> what(): std::bad_alloc_ _>_ ----

Kicking the Hornet's Nest - part 11

# Kicking the Hornet's Nest - third edition - part 11 All links, digital (pdf, txt, docx, md) and book in print, can be found at https://hive.blog/@crrdlx/satoshi Edited by [crrdlx](nostr:nprofile1qyv8wumn8ghj7mn0wdj8y6tkv5hxzurs9aex2mrp0yq3wamnwvaz7tmjv4kxz7fwwpexjmtpdshxuet59uqzqqzmcn0yrn7ttq8hrjkk46ysn2tk26rr8f8k4y7xkl74hlh3rcdzm9d3t8), npub: ``` npub1qpdufhjpel94srm3ett2azgf49m9dp3n5nm2j0rt0l2mlmc3ux3qza082j ``` ---- ### Kicking the Hornet's Nest pages 225 - 250 ---- **BitcoinTalk** Re: Simple to implement feature requests _2010-02-08 16:37:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=46.msg284#msg284) There are command line options: bitcoin -addnode=1.2.3.4 to tell bitcoin about a node to connect to bitcoin -connect=1.2.3.4 connect only to the specified node(s) You can use more than one of these, for instance bitcoin -connect=(first to try) -connect=(next to try) ... You can specify non-routable IPs with -connect like 192.168.x.x, so if you had a server farm and you wanted one server to connect to the world and the rest to connect to the one server, you could do that. In particular, -addnode is needed if you're always going to connect through TOR, since the IRC server blocks all the TOR exit nodes. To connect through TOR, you could use: bitcoin -proxy=127.0.0.1:9050 -addnode=212.159.72.216 **Martii Malmi (AKA Sirius) “COPA trial” email #158** **Date: Thu, 11 Feb 2010 22:58:29 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Translation** **To: mmalmi@cc.hut.fi** I didn't make any changes to Drupal code. The only thing other than installing themes was the .htaccess file (which really is needed, it didn't work in the global config file). It was only SMF where I made some PHP changes. You might find it preferable not to translate it into your own language. Often the standard answer about legalities is that it's only intended for people in other countries. Translating it into your home language weakens that argument. _mmalmi@cc.hut.fi wrote:_ _> I got the translations working correctly, now it should automatically_ _> detect the language from the browser settings. Choosing manually is of_ _> course also possible. I asked the translators to send me their_ _> translations as pm or e-mail. I guess I'll make a Finnish translation_ _> myself at some point. Multiple translations add to the site's credibility._ _>_ _> Drupal is asking to do a security update. Do we have other customized_ _> files we need to backup than those located in the "sites" directory?_ _>_ **BitcoinTalk** Re: DEB Package? _2010-02-12 02:33:02 UTC_ - [-](https://bitcointalk.org/index.php?topic=49.msg315#msg315) Are you just trying to run the program or do you really need to compile it? There's a 32-bit linux binary that can be run on 64-bit ubuntu if you "sudo apt-get ia32-libs". [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-linux.tar.gz/download](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-linux.tar.gz/download) I recently updated the SVN for building on 64-bit Karmic with wxWidgets 2.9.0. This was after the 0.2.0 release. The 0.2.0 release did not build on 64-bit yet. Unfortunately there currently isn't a -dev deb package of either of the versions of wxWidgets that we can use. On Karmic they only have the UTF-16 version. We need either the ANSI (libwxgtk2.8-ansi-dev) version or the UTF-8 (wxWidgets 2.9.0) version. We're moving towards 2.9.0. I know you said you didn't want VM, but as a last resort, last I checked the Windows version runs fine in Wine. **BitcoinTalk** Re: Repost: Request: Make this anonymous? _2010-02-12 17:28:32 UTC_ - [-](https://bitcointalk.org/index.php?topic=7.msg324#msg324) True, sending by IP through Tor trades one problem for another. The Tor exit node can see the text of your message and potentially MITM you. Best to only send to bitcoin addresses then. Payments by bitcoin address are broadcast over the network as part of the normal network traffic. All communications with the network are broadcasts of public information. **Martii Malmi (AKA Sirius) “COPA trial” email #160** **Date: Sat, 13 Feb 2010 01:08:42 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: JSON-RPC status** **To: mmalmi@cc.hut.fi** I uploaded my JSON-RPC and command line implementation to SVN. I'm waiting to post on the forum when I've had more time to think about the commands. At least some method names are going to change. To enable the RPC server, add the switch -server. It's not on by default. Client commands are without any switches, as such: bitcoin getblockcount bitcoin getdifficulty bitcoin getnewaddress somelabel bitcoin sendtoaddress 1DvqsbZ... 1.00 bitcoin getallpayments 0 bitcoin stop Applications would normally use JSON-RPC directly, not command line. I haven't tested my JSON-RPC server with anything else yet. If you do, please tell me how it goes. You're using Python, right? Getting the Linux version to run without the GTK installed will be a separate task. mmalmi@cc.hut.fi wrote: > That's great! I'll start familiarizing myself with Liberty Reserve and > its api. > **BitcoinTalk** Re: DEB Package? _2010-02-13 01:38:37 UTC_ - [-](https://bitcointalk.org/index.php?topic=49.msg326#msg326) I couldn't get wxWidgets 2.8.9 to compile on Karmic 64-bit either. I have been compiling the latest SVN on Karmic 64-bit with wxWidgets 2.9.0, which compiles fine on 64-bit. Read build-unix.txt and use the given ../configure parameters on wxWidgets so you can use the makefile.unix.wx2.9 as supplied. (--enable-debug --disable-shared --enable-monolithic) -- fixed The download link on the homepage is to the sourceforge tar.gz archive which contains the 32-bit binary and the 0.2.0 sources, which were not yet buildable on 64-bit at the time. The SVN was first buildable on 64-bit with wx2.9.0 on 28 January 2010. Hopefully they'll have a wxWidgets 2.9.0 debian package someday. **BitcoinTalk** Re: What's with this odd generation? _2010-02-14 06:28:03 UTC_ - [-](https://bitcointalk.org/index.php?topic=48.msg327#msg327) [_**Quote from: theymos on February 12, 2010, 08:31:52 AM**_](https://bitcointalk.org/index.php?topic=48.msg318#msg318) _Does the sending client send more BitCoins to account for the fee (so the recipient gets what he's expecting)?_ Yes. [_**Quote from: SmokeTooMuch on February 12, 2010, 01:11:09 PM**_](https://bitcointalk.org/index.php?topic=48.msg319#msg319) _why do we even need fees ? i thougt the no-fees-feature was one of the advantages of bitcoin ?!_ Almost all transactions are free. A transaction is over the maximum size limit if it has to add up more than 500 of the largest payments you've received to make up the amount. A transaction over the size limit can still be sent if a small fee is added. The average transaction, and anything up to 500 times bigger than average, is free. It's only when you're sending a really huge transaction that the transaction fee ever comes into play, and even then it only works out to something like 0.002% of the amount. It's not money sucked out of the system, it just goes to other nodes. If you're sad about paying the fee, you could always turn the tables and run a node yourself and maybe someday rake in a 0.44 fee yourself. **BitcoinTalk** Re: What's with this odd generation? _2010-02-14 15:52:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=48.msg329#msg329) Right. Otherwise we couldn't have a finite limit of 21 million coins, because there would always need to be some minimum reward for generating. In a few decades when the reward gets too small, the transaction fee will become the main compensation for nodes. I'm sure that in 20 years there will either be very large transaction volume or no volume. **Martii Malmi (AKA Sirius) “COPA trial” email #163** **Date: Sun, 14 Feb 2010 21:48:31 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: JSON-RPC status** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _>> I haven't tested my JSON-RPC server with anything else yet. If you do,_ _>> please tell me how it goes. You're using Python, right?_ _>>_ _>> Getting the Linux version to run without the GTK installed will be a_ _>> separate task._ _>_ _> Yes, using Python. I didn't test the JSON-RPC yet as I don't have_ _> Bitcoin running on the vps yet. It doesn't work without a window manager_ _> even if GTK libraries are installed. I asked about it at wxWidgets forum_ _> (http://wxforum.shadonet.com/viewtopic.php?t=26954) but they didn't have_ _> much clue. Maybe we'll just need to make two different binaries._ I will probably relent and do that. I can move init and shutdown into init.cpp or start.cpp or something, link only wxbase and not link ui.o and uibase.o. wxWidgets is mostly Windows people, they wouldn't know much about GTK. Don't you have an Ubuntu laptop you can test and compile on so you don't have to toy with the vps? **BitcoinTalk** Re: Proof-of-work difficulty increasing _2010-02-15 06:28:38 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg346#msg346) 14/02/2010 0000000065465700000000000000000000000000000000000000000000000000 2009 1.00 30/12/2009 1.18 +18% 11/01/2010 1.31 +11% 25/01/2010 1.34 +2% 04/02/2010 1.82 +36% 14/02/2010 2.53 +39% Another big jump in difficulty yesterday from 1.82 times to 2.53 times, a 39% increase since 10 days ago. It was 10 days apart not 14 because more nodes joined and generated the 2016 blocks in less time. **Martii Malmi (AKA Sirius) “COPA trial” email #165** **Date: Mon, 15 Feb 2010 18:11:53 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: JSON-RPC status** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _>> Don't you have an Ubuntu laptop you can test and compile on so you_ _>> don't have to toy with the vps?_ _>_ _> Yes. Tested with Python's JSON-RPC, and seems to work fine! Really easy_ _> to use._ Hurray, I got it on the first go. Could you send me the Python code you used? So if I do some testing later I don't have to figure it out myself. **BitcoinTalk** Re: Setting up multiple bitcoin machines behind NAT _2010-02-16 01:34:56 UTC_ - [-](https://bitcointalk.org/index.php?topic=54.msg360#msg360) Right now there isn't a port number setting to do that. It's a feature yet to be implemented. You can only set up your NAT to port-forward to one of the computers. (I said something earlier about NAT port translation, but that wouldn't work, other nodes wouldn't know to connect to that port) If you want, as a small optimization, you could run the rest of your computers as: bitcoin -connect=<the IP of the first computer> so they get all their network communication from the first computer and don't all connect over the net individually for the same information. This saves bandwidth, although it doesn't use much bandwidth to begin with, so it wouldn't really matter unless you had tons of computers. For redundancy in case the first computer goes down, you could have two that connect out and the rest connect to both of them. The first two are run normally, the rest are run like: bitcoin -connect=<IP1> -connect=<IP2> **BitcoinTalk** Re: Proof-of-work difficulty increasing _2010-02-17 17:58:03 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg388#msg388) [_**Quote from: Sabunir on February 16, 2010, 08:51:51 AM**_](https://bitcointalk.org/index.php?topic=43.msg372#msg372) _. Perhaps it has to do with my connection's very high latency (2000ms or more on average)_ 2 seconds of latency in both directions should reduce your generation success by less than 1%. [_**Quote from: Sabunir on February 16, 2010, 08:51:51 AM**_](https://bitcointalk.org/index.php?topic=43.msg372#msg372) _and/or my high packet loss (sometimes up to 10% loss)?_ Probably OK, but I'm not sure. The protocol is designed to resync to the next message, and messages get re-requested from all the other nodes you're connected to until received. If you miss a block, it'll also keep requesting it every time another blocks comes in and it sees there's a gap. Before the original release I did a test dropping 1 out of 4 random messages under heavy load until I could run it overnight without any nodes getting stuck. **BitcoinTalk** Re: Bitcoin client and website translation _2010-02-17 19:19:43 UTC_ - [-](https://bitcointalk.org/index.php?topic=47.msg389#msg389) I updated the SVN with changes to support translation. Translatable strings are all enclosed in _(""), and we're using UTF-8 on all platforms. When the program runs, it looks in the directory of the EXE for the file: locale\<langcode>\LC_MESSAGESitcoin.mo <langcode> is the two letter code of the language your OS is set to, like "de" or "nl". On Linux, it also looks for: /usr/share/locale/<langcode>/LC_MESSAGES/bitcoin.mo /usr/local/share/locale/<langcode>/LC_MESSAGES/bitcoin.mo (are there other standard places it should look on linux?) Here's a quick walkthrough using poedit to make a .po and .mo file: - Download the bitcoin sourcecode from SVN - In the trunk directory, mkdir locale\<lang>\LC_MESSAGES - In poedit, File->New catalog->Paths tab - Click the "New item" dotted rectangle button - Put "../../.." and MAKE SURE TO PRESS ENTER to add the path - Click OK - Save the file as "bitcoin.po" in the LC_MESSAGES directory you made - It should then scan the sourcecode and find about 170 strings - If it didn't find anything, check Catalog->Settings->Path tab, make sure the "../../.." was added When you're done translating, commit both bitcoin.po (the editable catalog file) and bitcoin.mo (compiled data used by the program). **BitcoinTalk** Re: Number of connections _2010-02-21 03:43:48 UTC_ - [-](https://bitcointalk.org/index.php?topic=58.msg413#msg413) Nodes stop trying to initiate connections once they have 15. If you can accept incoming connections, then you can get well above that from nodes connecting to you, otherwise you max out at 15. I don't know if there's any reason to have 15 connections. Maybe it should be 10. Since nodes that can only connect out are probably at or near 15 most of the time now, you should level off to an equilibrium. 45 suggests a ratio of 3 out-only nodes to every 1 in-accepting node. The number of connections won't be a good gauge of the size of the network any more. Someone should periodically IRC to the bitcoin channel on chat.freenode.net and count the number of users. That gives you the total count of network nodes (except TOR nodes). Block generation is again running ahead of pace. We're in for another big step up in difficulty at the next adjustment in about 5 days. **BitcoinTalk** Post your static IP _2010-02-21 04:19:53 UTC_ - [-](https://bitcointalk.org/index.php?topic=59.msg414#msg414) It would be nice to have a list of static IPs for new users to send test donations to so they can see how the software works. If you can accept incoming connections and you have a static IP address, post it here! Anything sent to these IPs should be considered a donation. If you do request a round-trip, be sure to include your return bitcoin address or IP in the comment, but please assume it'll be one-way. They won't necessarily be watching for incoming transactions to send back. **BitcoinTalk** Re: Current Bitcoin economic model is unsustainable _2010-02-21 05:44:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=57.msg415#msg415) Excellent analysis, xc. A rational market price for something that is expected to increase in value will already reflect the present value of the expected future increases. In your head, you do a probability estimate balancing the odds that it keeps increasing. In the absence of a market to establish the price, NewLibertyStandard's estimate based on production cost is a good guess and a helpful service (thanks). The price of any commodity tends to gravitate toward the production cost. If the price is below cost, then production slows down. If the price is above cost, profit can be made by generating and selling more. At the same time, the increased production would increase the difficulty, pushing the cost of generating towards the price. In later years, when new coin generation is a small percentage of the existing supply, market price will dictate the cost of production more than the other way around. At the moment, generation effort is rapidly increasing, suggesting people are estimating the present value to be higher than the current cost of production. **BitcoinTalk** UI improvements _2010-02-21 21:48:01 UTC_ - [-](https://bitcointalk.org/index.php?topic=60.msg426#msg426) Uploaded some UI changes to SVN as version 0.2.5. Instead of View->Show Generated, we now have tabs: - All Transactions - Sent/Received - Sent - Received Makes it a lot easier to flip to received and check for payments. Moved the "Your Addresses" book inside the main address book. It was confusing having two address books. I found the "To:" in "From: unknown, To: (one of your bitcoin addresses)" still confusing, so I changed it to "From: unknown, Received with:". The bitcoin address is abbreviated so you can see the label that you set in the Receiving tab of the address book. Fixed a few UI glitches from the upgrade to wxWidgets 2.9.0. I haven't forgotten about you people who want non-UI, but I had to do some fun stuff before more build bashing. **Martii Malmi (AKA Sirius) “COPA trial” email #168** **Date: Mon, 22 Feb 2010 20:17:42 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Non-GUI option** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _> Just a few clues I've found about running the same binary without a GUI:_ _>_ _> 1) GTK supports running a program without display:_ _> http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check._ _> This doesn't tell if it's possible in wxWidgets though._ I see it calls gtk-init-check in wxApp::Initialize. I can subclass Initialize, call the original one while suppressing the error message and ignore the return value. It seems to be working. Any suggestions what to name the command line switches and how to describe them? Is there any traditional standard? I'm currently using: -daemon (or -d) (Enables RPC and runs in the background) -server (Enables RPC) **BitcoinTalk** Re: generation slowed down dramatically _2010-02-23 00:49:56 UTC_ - [-](https://bitcointalk.org/index.php?topic=61.msg433#msg433) Just a random streak of bad luck. It looks steady to me. Competition doesn't have an effect until the next automatic retarget adjustment, and we haven't reached the next one yet. The adjustments are every 2016 blocks. To calculate our progress towards the next one, divide the block total by 2016. The fractional part is how far we are to the next one. My back-of-the-envelope projection: 42032 blocks/2016 = 20.85 = 85% of the way. About 1.5 days to go until the next one. That'll only be about 10 days since the last one, the target is 14 days, so 14/10 = 1.4 = around 40% difficulty increase. **BitcoinTalk** Re: UI improvements _2010-02-23 01:16:28 UTC_ - [-](https://bitcointalk.org/index.php?topic=60.msg434#msg434) There are now "Sending" and "Receiving" tabs in the Address Book. Your addresses are referred to as "receiving addresses". madhatter was working on building it on Mac. He had errors probably caused by UTF-16 wxWidgets 2.8. Should have better luck now with 2.9.0. wxWidgets 2.9.0 is UTF-8 and wouldn't have that problem. I think he had it working on FreeBSD, but he wanted a non-UI version. I have the command line and JSON-RPC daemon version working now. Will SVN it in a day or two. I disabled gdm on my Ubuntu system so it boots into command line. I hope I will be able to get it enabled again with rcconf. **Martii Malmi (AKA Sirius) “COPA trial” email #169** **Date: Tue, 23 Feb 2010 01:41:01 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Non-GUI option** **To: Martti Malmi <mmalmi@cc.hut.fi>** _>> Just a few clues I've found about running the same binary without a GUI:_ _>>_ _>> 1) GTK supports running a program without display:_ _>> http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check._ _>> This doesn't tell if it's possible in wxWidgets though._ _>_ _> I see it calls gtk-init-check in wxApp::Initialize._ _>_ _> I can subclass Initialize, call the original one while suppressing the_ _> error message and ignore the return value. It seems to be working._ This is working. A few more things and I'll upload it. We'll need to tell people to install the GTK libraries. Do you remember the apt-get command to install GTK, and can you install it without having a GUI installed? **BitcoinTalk** Re: Bitcoin Address Collisions _2010-02-23 16:26:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=62.msg443#msg443) There's a separate public/private keypair for every bitcoin address. You don't have a single private key that unlocks everything. Bitcoin addresses are a 160-bit hash of the public key, everything else in the system is 256-bit. If there was a collision, the collider could spend any money sent to that address. Just money sent to that address, not the whole wallet. If you were to intentionally try to make a collision, it would currently take 2^126 times longer to generate a colliding bitcoin address than to generate a block. You could have got a lot more money by generating blocks. The random seed is very thorough. On Windows, it uses all the performance monitor data that measures every bit of disk performance, network card metrics, cpu time, paging etc. since your computer started. Linux has a built-in entropy collector. Adding to that, every time you move your mouse inside the Bitcoin window you're generating entropy, and entropy is captured from the timing of disk ops. **BitcoinTalk** Re: UI improvements _2010-02-23 16:53:27 UTC_ - [-](https://bitcointalk.org/index.php?topic=60.msg446#msg446) [_**Quote from: Xunie on February 23, 2010, 12:28:27 PM**_](https://bitcointalk.org/index.php?topic=60.msg439#msg439) _/etc/init.d/gdm start_ _and it will start gdm!_ Ah yes, there we go, back to normal again. The ctrl+alt+F[1-8] thing never worked on this computer. The screen just goes haywire. **BitcoinTalk** Command Line and JSON-RPC _2010-02-23 22:15:41 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg452#msg452) Version 0.2.6 on SVN can now run as a daemon and be controlled by command line or JSON-RPC. On Linux it needs libgtk2.0-0 installed, but does not need a GUI running. Hopefully gtk can be installed without having a windowing system installed. The command to start as a daemon is: bitcoin -daemon [switches...] Or, to run the UI normally and also be able to control it from command line or JSON-RPC, use the "-server" switch. bitcoin -server [switches...] With either switch, it runs an HTTP JSON-RPC server that accepts local socket connections on 127.0.0.1:8332. The port is bound to loopback and can only be accessed from the local machine, but from any account, not just the user it's running under. To control it from the command line, the interface is a command name without any switches, followed by parameters if any. bitcoin <command> [params...] For example: bitcoin getinfo bitcoin getdifficulty bitcoin setgenerate true bitcoin stop It's a simple JSON-RPC client and prints the JSON result. Look at rpc.cpp for the list of commands. Web apps or anything automated will normally use JSON-RPC directly, not command line. There are JSON-RPC libraries for all the major languages. In script languages like PHP and Python the syntax is as natural as calling a local function. **BitcoinTalk** Re: Bitcoin Address Collisions _2010-02-23 22:24:00 UTC_ - [-](https://bitcointalk.org/index.php?topic=62.msg453#msg453) [_**Quote from: NewLibertyStandard on February 23, 2010, 07:04:47 PM**_](https://bitcointalk.org/index.php?topic=62.msg450#msg450) _Are generated bitcoins encrypted with whichever address is currently displayed in the main Bitcoin window?_ No, each generated transaction uses a new, single-use address. Nothing uses the address in the main window, it's just there for convenience for you to copy. 0.2.5 has a "New..." button next to it to make it easy to change each time you use it. **BitcoinTalk** Re: URI-scheme for bitcoin _2010-02-24 05:57:43 UTC_ - [-](https://bitcointalk.org/index.php?topic=55.msg481#msg481) That would be nice at point-of-sale. The cash register displays a QR-code encoding a bitcoin address and amount on a screen and you photo it with your mobile. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-24 06:17:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg482#msg482) [_**Quote from: theymos on February 24, 2010, 03:07:37 AM**_](https://bitcointalk.org/index.php?topic=63.msg467#msg467) [_**Quote from: satoshi on February 23, 2010, 10:15:41 PM**_](https://bitcointalk.org/index.php?topic=63.msg452#msg452) _On Linux it needs libgtk2.0-0 installed_ _Will this requirement be removed sometime? I'd rather not have to deal with GTK._ How much "dealing with" does GTK actually require? Is it just a matter of "sudo apt-get install libgtk2.0-0" and having some extra libraries sitting around? GTK doesn't have to do anything, just be there for bitcoin to link to when it loads up, have the gtk-init-check call fail because no GUI present, then it's done. It saves us butchering everything with ifdefs and a separate compile and binary to use wxBase just to try to avoid linking GTK. **Martii Malmi (AKA Sirius) “COPA trial” email #172** **Date: Wed, 24 Feb 2010 06:34:52 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Non-GUI option** **To: mmalmi@cc.hut.fi** _> I'll give Drupal accounts to the bitcoin.org translators, so they can_ _> keep the translations up to date._ Good, that gives them a little sense of ownership and responsibility. I hope we get at least one .mo file for the software translation in time to put into the 0.3 release. **BitcoinTalk** New icon/logo _2010-02-24 21:24:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg504#msg504) New icons, what do you think? Better than the old one? ![](INVALID-LINK) ![](INVALID-LINK) ![](INVALID-LINK) ![](INVALID-LINK) Full size 530x529 image for scaling down to custom sizes: [http://www.bitcoin.org/download/bitcoin530.png](INVALID-LINK) The perspective shadow was too thick on the larger sizes. I updated 32, 48 and the full size. I release these images into the public domain (copyright-free). I request that derivative works be made public domain. **BitcoinTalk** Re: Make your "we accept Bitcoin" logo _2010-02-24 21:53:52 UTC_ - [-](https://bitcointalk.org/index.php?topic=45.msg507#msg507) If you GPL stuff, I have to avoid using it. Nothing against GPL per-se, but Bitcoin is an MIT license project. Anything GPL please clearly mark it as such. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-24 22:08:55 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg509#msg509) When and how fast did memory usage increase? Right away, slowly over a long time, or starting at some later event? I have -daemon running on ubuntu 9.10 64-bit and memory usage is steady. It has to be something about the difference on the server besides 64-bit. Maybe some malfunction from the lack of GUI. A memory leak debug tool could give a clue. **BitcoinTalk** Re: Proof-of-work difficulty increasing _2010-02-24 22:42:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg510#msg510) The automatic adjustment happened earlier today. 24/02/2010 0000000043b3e500000000000000000000000000000000000000000000000000 24/02/2010 3.78 +49% I updated the first post. **BitcoinTalk** Re: New icon/logo _2010-02-25 01:56:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg521#msg521) [_**Quote from: Sabunir on February 25, 2010, 01:47:56 AM**_](https://bitcointalk.org/index.php?topic=64.msg519#msg519) _I like them. Do they come in higher resolutions?_ Yes, the original is 546x531 pixels. It looks good at larger size too, but since the small icons are what you mostly always see, I wanted to judge it on those first. I'll post larger sizes and full size a little later. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-25 22:54:17 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg539#msg539) OK, I made a build target bitcoind that only links wxBase and does not link GTK. Version 0.2.7 on SVN. I split out the init and shutdown stuff from ui.cpp into init.cpp, so now ui.cpp is pure UI. ui.h provides inline stubs if wxUSE_GUI=0. We only have four functions that interface from the node to the UI. In the bitcoind build, we don't link ui.o or uibase.o. [_**Quote from: sirius-m on February 25, 2010, 04:32:17 PM**_](https://bitcointalk.org/index.php?topic=63.msg538#msg538) _It started increasing right away. I'll see if valgrind can help me._ Sure feels like it could be something in wxWidgets retrying endlessly because some UI thing failed or something wasn't inited correctly. Our hack to ignore the initialize failure and run anyway means we're in uncharted territory. We're relying on the fact that we hardly use wx in this mode. We do still use a few things like wxGetTranslation and wxMutex. Another way to debug would be to run in gdb, wait until everything is quiet and all threads should be idle, and break it and see which thread is busily doing something and what it's doing. I suspect bitcoind will probably work fine, but I hope you can still debug the problem. ##### BitcoinTalk Re: Proof-of-work difficulty increasing _2010-02-25 23:06:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg540#msg540) The formula is based on the time it takes to generate 2016 blocks. The difficulty is multiplied by 14/(actual days taken). For instance, this time it took 9.4 days, so the calculation was 14/9.4 = 1.49. Previous difficulty 2.53 * 1.49 = 3.78, a 49% increase. I don't know what you're talking about accepting easier difficulties. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-26 16:29:21 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg555#msg555) wx/clipbrd.h isn't used, move it inside the #if wxUSE_GUI. Updated headers.h on SVN. Sorry, I linked to wxbase but I had full wxWidgets on my computer. The db.h:140 class Db no member named "exisits" is stranger. pdb->get, pdb->put, pdb->del compiled before that. Do you have version 4.7.25 of Berkeley DB? Db::exists() [http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/frame_main.html](http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/frame_main.html) [http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/dbexists.html](http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/dbexists.html) I suppose they might have added exists recently, using get before that. **BitcoinTalk** Re: New icon/logo _2010-02-26 23:17:19 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg561#msg561) Good suggestion. I made the B slightly lighter and the background slightly darker. Very slightly. The foreground is now exactly the same colour as the BC in the old one. It's kind of OK if you can't easily read the B in the 16x16. At that size, you just need to see that it's a coin. It doesn't matter so much what's embossed on it, just that there be some detail there because it wouldn't look like a coin if it was a blank smooth circle. It's slightly wider than tall because the dark perspective under it goes more to the right than down. I finished and posted the 32x31 and 48x47 versions in the first message. I like the 48 a lot. How does everyone feel about the B symbol with the two lines through the outside? Can we live with that as our logo? **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-26 23:48:44 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg562#msg562) Are you using wxWidgets 2.9.0? I don't recommend using anything other than 2.9.0. It looks like they've got a reference in the wx headers (arrstr.h) to something outside of wxBase. Removing -D__WXDEBUG__ from bitcoin's makefile would probably solve it. If that doesn't work and you just want to get it working, you could edit wxWidgets include/wx/arrstr.h, line 167 and comment out the wxASSERT_MSG. **BitcoinTalk** Re: New icon/logo _2010-02-27 04:28:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg566#msg566) [_**Quote from: Cdecker on February 27, 2010, 03:24:07 AM**_](https://bitcointalk.org/index.php?topic=64.msg565#msg565) _How about an SVG version? That way we could automatically generate smaller and larger versions as needed._ I don't know how to do SVG, but I did the original very large, over 500 pixels across, so it can be scaled down. I'll give the original when I'm finished. I had to custom tweak each icon size so the vertical lines land square on their pixels, otherwise they're ugly blurry and inconsistent. Such is the challenge of making icons. The original will be good for scaling to custom sizes between 48 and 500 but not smaller. **BitcoinTalk** Re: wxWidgets 2.9.0 _2010-02-27 21:22:53 UTC_ - [-](https://bitcointalk.org/index.php?topic=65.msg571#msg571) [_**Quote from: Cdecker on February 27, 2010, 05:09:59 PM**_](https://bitcointalk.org/index.php?topic=65.msg569#msg569) _Looking through the source of 2.8.10 it appears that_ _unicode_ _is possible with that version too._ In the Windows world, "unicode" means UTF-16 (wchar). 2.8 has two build variations, ANSI and UTF-16 (unicode). The UTF-16 version is the "unicode" version provided in the Debian package. I believe 2.8 and its UTF-16 build labelled simply "unicode" has been the source of build problems described in the forum. We were previously using 2.8 ANSI in anticipation of getting to UTF-8 without going through UTF-16 hell. We cannot compile with UTF-16. 2.9 has only one version, UTF-8. On Windows, we set the codepage to UTF-8, so on all platforms our code is UTF-8 and wxWidgets interfaces with us in UTF-8. On Linux I assume the codepage is already UTF-8. By standardizing on 2.9 we avoid the multi-build confusion of 2.8, and we need 2.9 for UTF-8 internationalization. Make sure you read build-unix.txt and configure wxWidgets using the configure parameters given. Curious, why is it incredibly hard to provide wxWidgets 2.9.0? If you mean for users, that's why we static link it. It's unfortunate that we require so many big dependencies, but we need them all. At least on Debian/Ubuntu, all but wxWidgets are available as packages. Eventually they'll provide a 2.9 package. **Martii Malmi (AKA Sirius) “COPA trial” email #174** **Date: Sun, 28 Feb 2010 14:47:01 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoind** **To: mmalmi@cc.hut.fi** I put it at bitcoin.org/download/linux64-0.2.7.1.tar.gz. You can delete it when you've got it. I thought about what might cause the problem you're having and made a change that this build includes. This might have been unsafe code, although it would probably always get lucky. in util.cpp, old: const char* wxGetTranslation(const char* pszEnglish) { // Wrapper of wxGetTranslation returning the same const char* type as was passed in static CCriticalSection cs; CRITICAL_BLOCK(cs) { // Look in cache static map<string, char*> mapCache; map<string, char*>::iterator mi = mapCache.find(pszEnglish); if (mi != mapCache.end()) return (*mi).second; // wxWidgets translation const char* pszTranslated = wxGetTranslation(wxString(pszEnglish, wxConvUTF8)).utf8_str(); // We don't cache unknown strings because caller might be passing in a // dynamic string and we would keep allocating memory for each variation. if (strcmp(pszEnglish, pszTranslated) == 0) return pszEnglish; // Add to cache, memory doesn't need to be freed. We only cache because // we must pass back a pointer to permanently allocated memory. char* pszCached = new char[strlen(pszTranslated)+1]; strcpy(pszCached, pszTranslated); mapCache[pszEnglish] = pszCached; return pszCached; } return NULL; } new: const char* wxGetTranslation(const char* pszEnglish) { // Wrapper of wxGetTranslation returning the same const char* type as was passed in static CCriticalSection cs; CRITICAL_BLOCK(cs) { // Look in cache static map<string, char*> mapCache; map<string, char*>::iterator mi = mapCache.find(pszEnglish); if (mi != mapCache.end()) return (*mi).second; // wxWidgets translation wxString strTranslated = wxGetTranslation(wxString(pszEnglish, wxConvUTF8)); // We don't cache unknown strings because caller might be passing in a // dynamic string and we would keep allocating memory for each variation. if (strcmp(pszEnglish, strTranslated.utf8_str()) == 0) return pszEnglish; // Add to cache, memory doesn't need to be freed. We only cache because // we must pass back a pointer to permanently allocated memory. char* pszCached = new char[strlen(strTranslated.utf8_str())+1]; strcpy(pszCached, strTranslated.utf8_str()); mapCache[pszEnglish] = pszCached; return pszCached; } return NULL; } If you still suspect this code, for testing you could change it to: const char* wxGetTranslation(const char* pszEnglish) { return pszEnglish; } _mmalmi@cc.hut.fi wrote:_ _> I tried debugging my build of bitcoind with ddd debugger, but didn't_ _> have much success yet. It always ends up taking all the system's memory_ _> and finally crashes. Could you please send me again the latest 64 bit_ _> build of bitcoind, so I can see if the problem is about my build?_ _>_ **Martii Malmi (AKA Sirius) “COPA trial” email #175** **Date: Sun, 28 Feb 2010 20:09:07 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoind** **To: mmalmi@cc.hut.fi** Could you send me the debug.log? _mmalmi@cc.hut.fi wrote:_ _> I tried debugging my build of bitcoind with ddd debugger, but didn't_ _> have much success yet. It always ends up taking all the system's memory_ _> and finally crashes. Could you please send me again the latest 64 bit_ _> build of bitcoind, so I can see if the problem is about my build?_ _>_ **BitcoinTalk** Re: New icon/logo _2010-03-02 02:33:05 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg588#msg588) We have the standard icon sizes, and the full size scales nicely to anything else. I added the full size to the first post. **Martii Malmi (AKA Sirius) “COPA trial” email #178** **Date: Tue, 02 Mar 2010 22:27:22 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoind** **To: mmalmi@cc.hut.fi** Does it still do it if you didn't do getinfo? You could comment out the CreateThreads listed below, then re-enable them one at a time until it does it again. Then we would know which thread the problem is in. net.cpp, under // Start threads CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL) init.cpp: CreateThread(ThreadRPCServer, NULL); _mmalmi@cc.hut.fi wrote:_ _> Here goes. I forgot to mention the crash error message:_ _>_ _> terminate called after throwing an instance of 'std::bad_alloc'_ _> what(): std::bad_alloc_ _>_ ----

Kicking the Hornet's Nest - part 19

# Kicking the Hornet's Nest - third edition - part 19 All links, digital (pdf, txt, docx, md) and book in print, can be found at https://hive.blog/@crrdlx/satoshi Edited by [crrdlx](nostr:nprofile1qyv8wumn8ghj7mn0wdj8y6tkv5hxzurs9aex2mrp0yq3wamnwvaz7tmjv4kxz7fwwpexjmtpdshxuet59uqzqqzmcn0yrn7ttq8hrjkk46ysn2tk26rr8f8k4y7xkl74hlh3rcdzm9d3t8), npub: ``` npub1qpdufhjpel94srm3ett2azgf49m9dp3n5nm2j0rt0l2mlmc3ux3qza082j ``` ---- ### Kicking the Hornet's Nest pages 425 - 450 ---- ##### BitcoinTalk #### Re: New web service: obtain dump of bitcoin block NNNN ##### _2010-08-27 16:13:16 UTC_ - [-](https://bitcointalk.org/index.php?topic=928.msg11400#msg11400) That's kind of interesting as an upside-down bar chart of how many blocks were produced each day. The target is 144 blocks per day. ##### BitcoinTalk #### Re: Bitcoins are most like shares of common stock ##### _2010-08-27 16:39:26 UTC_ - [-](https://bitcointalk.org/index.php?topic=845.msg11403#msg11403) Bitcoins have no dividend or potential future dividend, therefore not like a stock. More like a collectible or commodity. ##### BitcoinTalk #### Re: Bitcoin does NOT violate Mises' Regression Theorem ##### _2010-08-27 17:32:07 UTC_ - [-](https://bitcointalk.org/index.php?topic=583.msg11405#msg11405) As a thought experiment, imagine there was a base metal as scarce as gold but with the following properties: - boring grey in colour - not a good conductor of electricity - not particularly strong, but not ductile or easily malleable either - not useful for any practical or ornamental purpose and one special, magical property: - can be transported over a communications channel If it somehow acquired any value at all for whatever reason, then anyone wanting to transfer wealth over a long distance could buy some, transmit it, and have the recipient sell it. Maybe it could get an initial value circularly as you've suggested, by people foreseeing its potential usefulness for exchange. (I would definitely want some) Maybe collectors, any random reason could spark it. I think the traditional qualifications for money were written with the assumption that there are so many competing objects in the world that are scarce, an object with the automatic bootstrap of intrinsic value will surely win out over those without intrinsic value. But if there were nothing in the world with intrinsic value that could be used as money, only scarce but no intrinsic value, I think people would still take up something. (I'm using the word scarce here to only mean limited potential supply) ##### BitcoinTalk #### Version 0.3.11 with upgrade alerts ##### _2010-08-27 21:54:12 UTC_ - [-](https://bitcointalk.org/index.php?topic=941.msg11439#msg11439) Version 0.3.11 is now available. Changes: - Some blk*.dat checking on load - Built the -4way code with -march=amdfam10, which makes it a little faster - Warning if your clock is too far off - Warnings/errors/alerts can also be seen in the getinfo command - Alert system The alert system can display notifications on the status bar to alert you if you're running a version that needs to be upgraded for an important security update. In response to an alert, your node may also go into safe mode, which disables the following json-rpc commands (used by automated websites) to protect it from losing money until you get a chance to upgrade: sendtoaddress getbalance getreceivedbyaddress getreceivedbylabel listreceivedbyaddress listreceivedbylabel If you decide it's a false alarm and want to take your chances, you can use the switch -disablesafemode to re-enable them. This is an important safety improvement. For a large segment of possible problems, this can warn everyone immediately once a problem is discovered and prevent them from acting on bad information. Nodes keep operating and do not stop generating in response to an alert, so old versions may still try to make a fork, but the alert system can make sure users are warned not to act on anything in the fork. Download: [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.11/](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.11/) ##### BitcoinTalk #### Re: tcatm's 4-way SSE2 for Linux 32/64-bit is in 0.3.10 ##### _2010-08-28 14:27:15 UTC_ - [-](https://bitcointalk.org/index.php?topic=820.msg11503#msg11503) The simplification is intentional. There will only be more than one thash[7]=0 in one out of 134,217,728 cases. It only makes it 0.0000007% slower. ##### BitcoinTalk #### Re: Version 0.3.11 with upgrade alerts ##### _2010-08-28 14:54:04 UTC_ - [-](https://bitcointalk.org/index.php?topic=941.msg11505#msg11505) [_**Quote from: torservers on August 28, 2010, 01:00:37 PM**_](https://bitcointalk.org/index.php?topic=941.msg11499#msg11499) _The "About" dialog still shows 0.3.10.1 beta._ What OS? I ran the Windows and 64-bit Linux version and checked the about dialog. The Mac version is still 0.3.10.1. [_**Quote from: pavelo on August 28, 2010, 07:36:07 AM**_](https://bitcointalk.org/index.php?topic=941.msg11481#msg11481) _iirc, it is possible to specify -march on a per-function basis using some gcc __attribute__. That way, only the function in question would be optimized, and if the user doesn't specify -4way, everything else should be ok._ I updated the first post to be more specific. Only the -4way code is compiled this way. ##### BitcoinTalk #### Re: Big endian code problems ##### _2010-08-29 22:14:36 UTC_ - [-](https://bitcointalk.org/index.php?topic=816.msg11610#msg11610) The code assumes little-endian throughout and was written with the intention of never being ported to big-endian. Every integer that is sent over the network would have to be byte swapped, in addition to many dozens of other places in code. It would not be worth the extra sourcecode bloat. Big-endian is on its way out anyway. ##### BitcoinTalk #### Re: CryptoPP Assertion Error ##### _2010-09-05 23:25:32 UTC_ - [-](https://bitcointalk.org/index.php?topic=967.msg12062#msg12062) You can probably just comment out the line cryptopp/secblock.h:187 //assert(false); Let me know if it works, and watch if it memory leaks. It looks like a template class to make sure the derived class defines its own version of allocate and deallocate. It would be weird if that was the actual problem and it made it all the way to release. Probably a false alarm. ##### BitcoinTalk #### Re: Warning : Check your system ( Help me ) ##### _2010-09-05 23:36:20 UTC_ - [-](https://bitcointalk.org/index.php?topic=960.msg12063#msg12063) Any suggestions for better text to put for this error message so the next person will be less likely to be confused? It's trying to tell them their clock is wrong and they need to correct it. It's relying on 3 time sources: 1) the system clock 2) the other nodes, if within an hour of the system clock if those disagree, then 3) the user (asking the user to fix the system clock) I've thought about NTP, but this is more secure. ##### BitcoinTalk #### Re: HTTP status codes from the JSON-RPC api ##### _2010-09-06 21:21:21 UTC_ - [-](https://bitcointalk.org/index.php?topic=969.msg12130#msg12130) This is in SVN rev 147. This is more standard, and although json-rpc 1.0 didn't specify the format of error objects, it did specify that they would be _objects_ not strings or other values, so we needed to change this to be correct. The code/message members have become standard in later json-rpc specs. If you have code that checks the error and expects a string, you'll need to change it. When there is an error, the error member is now an object not a string. Also in SVN rev 147: - The command line json-rpc returns the error code as its exit code. Exit codes can only be 0-255 on unix, so it's abs(code)%256. - The "backupwallet <destination>" command that was discussed in another thread. It locks the wallet and copies it, so you can be sure you get a correct copy. ##### BitcoinTalk #### Re: Warning : Check your system ( Help me ) ##### _2010-09-06 21:41:06 UTC_ - [-](https://bitcointalk.org/index.php?topic=960.msg12132#msg12132) [_**Quote from: Insti on September 06, 2010, 12:51:37 PM**_](https://bitcointalk.org/index.php?topic=960.msg12101#msg12101) [_**Quote from: satoshi on September 05, 2010, 11:36:20 PM**_](https://bitcointalk.org/index.php?topic=960.msg12063#msg12063) Any suggestions for better text to put for this error message so the next person will be less likely to be confused? _"Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly."_ Thanks. ##### BitcoinTalk #### Re: auto backing up of wallet.dat ##### _2010-09-06 21:45:10 UTC_ - [-](https://bitcointalk.org/index.php?topic=921.msg12134#msg12134) rpc backupwallet <destination> is in SVN rev 147. ##### BitcoinTalk #### Re: bitcoind as daemon in OSX ##### _2010-09-06 21:52:45 UTC_ - [-](https://bitcointalk.org/index.php?topic=992.msg12135#msg12135) Can you build? Try changing line 78 of init.cpp from: #ifdef __WXGTK__ to: #ifndef __WXMSW__ If that works, I'll change the source. It should work. ##### BitcoinTalk #### Re: Always pay transaction fee? ##### _2010-09-07 16:32:21 UTC_ - [-](https://bitcointalk.org/index.php?topic=994.msg12168#msg12168) Another option is to reduce the number of free transactions allowed per block before transaction fees are required. Nodes only take so many KB of free transactions per block before they start requiring at least 0.01 transaction fee. The threshold should probably be lower than it currently is. I don't think the threshold should ever be 0. We should always allow at least some free transactions. ##### BitcoinTalk #### Version 0.3.12 ##### _2010-09-07 19:17:55 UTC_ - [-](https://bitcointalk.org/index.php?topic=999.msg12181#msg12181) Version 0.3.12 is now available. Features: - json-rpc errors return a more standard error object. (thanks to Gavin Andresen) - json-rpc command line returns exit codes. - json-rpc "backupwallet" command. - Recovers and continues if an exception is caused by a message you received. Other nodes shouldn't be able to cause an exception, and it hasn't happened before, but if a way is found to cause an exception, this would keep it from being used to stop network nodes. If you have json-rpc code that checks the contents of the error string, you need to change it to expect error objects of the form {"code":<number>,"message":<string>}, which is the standard. See this thread: [http://BitcoinTalk.org/index.php?topic=969.0](http://bitcointalk.org/index.php?topic=969.0) Download: [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.12/](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.12/) ##### BitcoinTalk #### Re: Always pay transaction fee? ##### _2010-09-08 17:30:14 UTC_ - [-](https://bitcointalk.org/index.php?topic=994.msg12237#msg12237) Currently, paying a fee is controlled manually with the -paytxfee switch. It would be very easy to make the software automatically check the size of recent blocks to see if it should pay a fee. We're so far from reaching the threshold, we don't need that yet. It's a good idea to see how things go with controlling it manually first anyway. It's not a big deal if we reach the threshold. Free transactions would just take longer to get into a block. I did a rough tally of 4000 blocks from around 74000-78000. This is excluding the block reward transactions: There were average 2 transactions per block, 17 transactions per hour, 400 transactions per day. Average transaction bytes per block was 428 bytes, or 214 bytes per transaction. The current threshold is 200KB per block, or about 1000 transactions per block. I think it should be lowered to 50KB per block. That would still be more than 100 times the average transactions per block. The threshold can easily be changed in the future. We can decide to increase it when the time comes. It's a good idea to keep it lower as a circuit breaker and increase it as needed. If we hit the threshold now, it would almost certainly be some kind of flood and not actual use. Keeping the threshold lower would help limit the amount of wasted disk space in that event. ##### BitcoinTalk #### Re: Version 0.3.12 ##### _2010-09-08 18:06:04 UTC_ - [-](https://bitcointalk.org/index.php?topic=999.msg12240#msg12240) Bitcoin clients currently only create and recognize transactions that match two possible templates. Those are some quick tests that loosely check if transactions fit some general metrics that those standard transactions fit. Nodes will only work on adding those transactions to their block. In the future, if we add more templates to the existing 2 types of transactions, we can change the "rather not work on nonstandard transactions" test to accept them. ##### BitcoinTalk #### Re: Bitcoin Blogger: Is It Better To Buy Or Generate Bitcoins? ##### _2010-09-08 20:27:39 UTC_ - [-](https://bitcointalk.org/index.php?topic=955.msg12248#msg12248) [_**Quote from: BitLex on September 07, 2010, 08:10:54 PM**_](https://bitcointalk.org/index.php?topic=955.msg12189#msg12189) _AMD X3 @2.8ghz ->stock client ~3800khs ~150Watt_ Did you try -4way? _**Quote**_ _How many hashes can I expect with a 24 core machine? I have a quad-core generating 4,300 hashes-per-second, so I am estimating a 24-core machine could mine bitcoins at 25,000 hashes-per-second._ AMD Phenom (I think 4-core) CPUs are doing about 11,000khps with -4way, about 100% speedup. 24 cores should get 66,000khps. AMD is the best choice because it has the best SSE2 implementation. (or maybe because tcatm had an AMD and optimised his code for that) There's been so much else to do that I haven't had time to make -4way automatic. For now you still have to do it manually. [http://BitcoinTalk.org/index.php?topic=820.0](http://bitcointalk.org/index.php?topic=820.0) ##### BitcoinTalk #### Auto-detect for 128-bit 4-way SSE2 ##### _2010-09-09 01:04:05 UTC_ - [-](https://bitcointalk.org/index.php?topic=1007.msg12262#msg12262) SVN rev 150 has some code to try to auto-detect whether to use 4-way SSE2. We need this because it's only faster on certain newer CPUs that have 128-bit SSE2 and not ones with 64-bit SSE2. It uses the CPUID instruction to get the CPU brand, family, model number and stepping. That's the easy part. Knowing what to do with the model number is the hard part. I was not able to find any table of family, model and stepping numbers for CPUs. I had to go by various random reports I saw. Here's what I ended up with: **Code:** // We need Intel Nehalem or AMD K10 or better for 128bit SSE2 // Nehalem = i3/i5/i7 and some Xeon // K10 = Opterons with 4 or more cores, Phenom, Phenom II, Athlon II // Intel Core i5 family 6, model 26 or 30 // Intel Core i7 family 6, model 26 or 30 // Intel Core i3 family 6, model 37 // AMD Phenom family 16, model 10 bool fUseSSE2 = ((fIntel && nFamily * 10000 + nModel >= 60026) || (fAMD && nFamily * 10000 + nModel >= 160010)); I saw some sporadic inconsistent model numbers for AMD CPUs, so I'm not sure if this will catch all capable AMDs. If it's wrong, you can still override it with -4way or -4way=0. It prints what it finds in debug.log. Search on CPUID. This is only enabled if built with GCC. ##### BitcoinTalk #### Re: Won't let me send coins because it requires a transaction fee? ##### _2010-09-10 00:23:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=1013.msg12341#msg12341) What version is the one where this happened? Release build, or built it yourself? Which operating system? Were you sending by IP or by Bitcoin Address? When you sent 49.99, did it prompt you to pay a 0.01 fee? There was a change in GetMinFee, but I can't see how it would cause this. It only starts to apply when a block gets huge. The reason for the difference in block number is the number displayed was reduced by 1 in 0.3.11 because it made more sense that way. ##### BitcoinTalk #### Re: Won't let me send coins because it requires a transaction fee? ##### _2010-09-10 00:46:37 UTC_ - [-](https://bitcointalk.org/index.php?topic=1013.msg12342#msg12342) I think I know what happened. Doubleclick on the generated transaction. It probably has a sub-0.01 transaction fee in it. Someone has been paying a 0.00000010 transaction fee. I don't think you can even set that with -paytxfee, I think you'd have to modify the code to do it. Your generated block is worth 50.00000010, so when you try to send the whole thing you have 0.00000010 left over for the change, which triggers the dust spam 0.01 fee. It would normally be harmless except in this corner case. I should add a special case to CreateTransaction to handle this. ##### BitcoinTalk #### Re: Won't let me send coins because it requires a transaction fee? ##### _2010-09-10 17:12:33 UTC_ - [-](https://bitcointalk.org/index.php?topic=1013.msg12368#msg12368) The fix is in SVN rev 151. You will be able to send your stuck 0.01 (actually 0.01000010) when you next upgrade. ##### BitcoinTalk #### Re: Auto-detect for 128-bit 4-way SSE2 ##### _2010-09-10 18:11:06 UTC_ - [-](https://bitcointalk.org/index.php?topic=1007.msg12372#msg12372) [_**Quote from: teknohog on September 09, 2010, 07:32:05 PM**_](https://bitcointalk.org/index.php?topic=1007.msg12336#msg12336) _Since the function CallCPUID function contains x86 assembler, it breaks the build on other architectures. I've changed line 2770 in main.cpp to #if defined(__GNUC__) && defined(CRYPTOPP_X86_ASM_AVAILABLE) to make it compile again, at least on ARM._ Added in SVN rev 152 ##### BitcoinTalk #### Re: Running on a port other than 8333 ##### _2010-09-12 17:40:20 UTC_ - [-](https://bitcointalk.org/index.php?topic=589.msg12483#msg12483) [**Quote from: lachesis on August 10, 2010, 03:24:55 PM**](https://bitcointalk.org/index.php?topic=589.msg8544#msg8544) It does not -- did my own tests. Is there a way to open BerkeleyDB exclusive? DB_PRIVATE is the worst of both worlds. DB_PRIVATE is not exclusive, but it does make it get screwed up if another process tries to access it at the same time. I've dropped the DB_PRIVATE flag in rev 153. ##### BitcoinTalk #### Re: RFC: remove DB_PRIVATE flag ##### _2010-09-12 18:00:39 UTC_ - [-](https://bitcointalk.org/index.php?topic=920.msg12484#msg12484) Trying it without the DB_PRIVATE flag in rev 153. We need to keep an eye on what's different. On Windows at least, it creates six __db.001 - __db.006 files with sizes from 24K to 4MB. It doesn't delete them on exit, it just leaves them behind. The docs say it uses memory mapped files. I assume they have the same file permissions as the database files, so the same user access restrictions apply. Tests on Windows private LAN download of 78500 blocks: with DB_PRIVATE 20 minutes 51 seconds without DB_PRIVATE 20 minutes 51 seconds I wasn't expecting them to come out exactly the same. ##### BitcoinTalk #### Re: Switch to GPL ##### _2010-09-12 19:24:53 UTC_ - [-](https://bitcointalk.org/index.php?topic=989.msg12494#msg12494) If the only library is closed source, then there's a project to make an open source one. If the only library is GPL, then there's a project to make a non-GPL one. If the best library is MIT, Boost, new-BSD or public domain, then we can stop re-writing it. I don't question that GPL is a good license for operating systems, especially since non-GPL code is allowed to interface with the OS. For smaller projects, I think the fear of a closed-source takeover is overdone. ##### BitcoinTalk #### Re: Memory leak ##### _2010-09-19 17:22:03 UTC_ - [-](https://bitcointalk.org/index.php?topic=1023.msg13201#msg13201) Bouncing between 0 and 2 connections could be if it's connecting to itself. Are you using the "-connect" switch? Did you compile it or is this a release build, and what version? I'm not sure how the 200Kb/sec, since it waits at least a half second between connection attempts. How fast is it flickering between 0 and 2 connections? Faster than twice a second? The wait function on linux is: inline void Sleep(int64 n) { boost::thread::sleep(boost::get_system_time() + boost::posix_time::milliseconds(n)); } If that doesn't work right, then it would be possible for it to spin through the loop as fast as it can. ##### BitcoinTalk #### Re: Issues building bitcoin on Windows 7 ##### _2010-09-19 18:46:46 UTC_ - [-](https://bitcointalk.org/index.php?topic=1034.msg13206#msg13206) The lines it's tripping on: **Code:** ERROR extern map<string, string> mapAddressBook; ERROR extern CCriticalSection cs_mapAddressBook; ERROR extern vector<unsigned char> vchDefaultKey; OK extern bool fClient; OK extern int nBestHeight; OK extern unsigned int nWalletDBUpdated; ERROR extern DbEnv dbenv; So it's acting like nothing is defined, not even map and vector. Yet, db.h is included by headers.h (and only there, nowhere else) which includes vector, map, util.h and everything before db.h. Is VC trying to use precompiled headers and screwing it up? Could there be some leftover precompiled header files in your directory from previously failed attempts that it's finding and using? There's an installer package now that makes it really easy to install MinGW. Don't use the latest version 4.5.0, use a few versions back like 4.4.1 (1.908.0) or 1.812.0. A setup program completely installs everything, it's not hard like it used to be. I think the only thing I had to do was rename make*.exe something to make.exe. [http://tdm-gcc.tdragon.net/](http://tdm-gcc.tdragon.net/) Off topic, but: It would be nice if someone would hack on getting tcatm's 4-way 128-bit SSE2 code working on Windows. There's something with MinGW's optimisation, I'm not sure but maybe a problem with 16-byte alignment on the stack, that makes it segfault. With some fiddling, I was able to get his code to work in a test program, but not in Bitcoin itself for some reason. ##### BitcoinTalk #### Re: Bug? /usr/bin/bitcoind "" ##### _2010-09-19 19:58:11 UTC_ - [-](https://bitcointalk.org/index.php?topic=1063.msg13211#msg13211) I don't know anything about any of the bug trackers. If we were to have one, we would have to make a thoroughly researched choice. We're managing pretty well just using the forum. I'm more likely to see bugs posted in the forum, and I think other users are much more likely to help resolve and ask follow up questions here than if they were in a bug tracker. A key step is other users helping resolve the simple stuff that's not really a bug but some misunderstanding or confusion. I keep a list of all unresolved bugs I've seen on the forum. In some cases, I'm still thinking about the best design for the fix. This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them. ##### BitcoinTalk #### Re: The case for removing IP transactions ##### _2010-09-19 21:49:30 UTC_ - [-](https://bitcointalk.org/index.php?topic=1048.msg13219#msg13219) Probably best to disable receiving by IP unless you specifically intend to use it. This is a lot of surface area that nobody uses that doesn't need to be open by default. In storefront cases, you would typically only want customers to send payments through your automated system that only hands out bitcoin addresses associated with particular orders and accounts. Random unidentified payments volunteered to the server's IP address would be unhelpful. In general, sending by IP has limited useful cases. If connecting directly without a proxy, the man-in-the-middle risk may be tolerable, but no privacy. If you use a privacy proxy, man-in-the-middle risk is unacceptably high. If we went to all the work of implementing SSL, only large storefronts usually go to the trouble of getting a CA cert, but most of those cases would still be better off to use bitcoin addresses. I uploaded this change to SVN rev 156. The switch to enable is "-allowreceivebyip". Senders with this version will get the error "Recipient is not accepting transactions sent by IP address". Older version senders will get "Transfer was not accepted". I used a different name for the switch because "-allowiptransactions" sounds like it includes sending. If there's a better name for the switch, we can change it again. ##### BitcoinTalk #### Re: Message Encryption as a built-in feature? ##### _2010-09-19 22:47:00 UTC_ - [-](https://bitcointalk.org/index.php?topic=1032.msg13221#msg13221) Theymos already said this... ECDSA does not support encrypting messages. Only digital signatures. ##### BitcoinTalk #### Re: Always pay transaction fee? ##### _2010-09-23 16:08:35 UTC_ - [-](https://bitcointalk.org/index.php?topic=994.msg13829#msg13829) [_**Quote from: satoshi on September 08, 2010, 05:30:14 PM**_](https://bitcointalk.org/index.php?topic=994.msg12237#msg12237) The current threshold is 200KB per block, or about 1000 transactions per block. I think it should be lowered to 50KB per block. That would still be more than 100 times the average transactions per block. I implemented this change in SVN rev 157. The reason I previously made it so high was to allow very large transactions without hitting the transaction fee. The threshold was around 26,000 BTC for transactions made of 50 BTC generated coins. Even though it was 100 times easier to generate back then, only a few people ever encountered the fee at that level. The new threshold puts it at around 11,000 BTC for sending generated coins. It would mostly only be reached with generated bitcoins. If you bought your bitcoins, they'll be denominated in larger transactions and won't be anywhere near the fee limit, unless you bought them in several hundred separate transactions. Even if you do reach the fee level, you only have to pay it once to bundle your little transactions together. ##### BitcoinTalk #### Internal version number ##### _2010-09-23 16:19:08 UTC_ - [-](https://bitcointalk.org/index.php?topic=1269.msg13831#msg13831) In the next release (0.3.13), I'm going to change the format of the internal version number integer from 313 to 31300, for instance 31305 = 0.3.13.5. The last number represents changes on the SVN between releases and ought to be properly represented in the version number. Otherwise, it would be a pain if we had a mistake or something in one of the sub versions that needed to be worked around. ##### BitcoinTalk #### Re: How To Make a Distributed BitCoin Escrow Service ##### _2010-09-26 17:34:26 UTC_ - [-](https://bitcointalk.org/index.php?topic=1283.msg14136#msg14136) It's not implemented yet, but the network can support a transaction that requires two signatures. It's described here: [http://BitcoinTalk.org/index.php?topic=750.0](http://bitcointalk.org/index.php?topic=750.0) It's absolutely safer than a straight payment without escrow, but not as good as a human arbitrated escrow, assuming you trust the human enough. In this kind of escrow, a cheater can't win, but it's still possible for you to lose. It at least takes away the profit motive for cheating you. The seller is assured that the money is reserved for him, while the buyer retains the leverage that the seller hasn't been paid yet until completion. ##### BitcoinTalk #### Re: I broke my wallet, sends never confirm now. ##### _2010-09-30 16:38:53 UTC_ - [-](https://bitcointalk.org/index.php?topic=1306.msg14714#msg14714) As you figured out, the root problem is we shouldn't be counting or spending transactions until they have at least 1 confirmation. 0/unconfirmed transactions are very much second class citizens. At most, they are advice that something has been received, but counting them as balance or spending them is premature. I made changes so they show up in lighter print, with the credit amount in square brackets like [+1.23], and the amount not counted towards your balance and not available for spending. This doesn't apply to transactions you sent, which you implicitly trust, since you wrote them. I didn't make it (+1.23) because parenthesis in accounting means negative. I hope square brackets is different enough to be clear what is meant. The JSON-RPC interface can still see 0/unconfirmed if it wants by specifying 0 confirmations. I uploaded the changes to SVN rev 158. I will post a 0.3.13 RC shortly. If you have any of these transactions in your wallet, do not send any payments until you've upgraded to 0.3.13, which will be coming soon. If you've already sent any of these transactions, or you're the creator of them, then use theymos' patch or make the following change and use it to send your clean transactions to a new wallet to clean things up. change: if (pcoin->GetDepthInMainChain() < 1 && pcoin->GetDebit() <= 0) continue; to: if (pcoin->GetDepthInMainChain() < 1) continue; ##### BitcoinTalk #### 0.3.13 RC1 for Windows, please test ##### _2010-09-30 17:04:15 UTC_ - [-](https://bitcointalk.org/index.php?topic=1322.msg14722#msg14722) 0.3.13 release candidate, to be released soon so please test: [http://www.bitcoin.org/download/bitcoin-0.3.13-rc1-win32-setup.exe](http://www.bitcoin.org/download/bitcoin-0.3.13-rc1-win32-setup.exe) - don't count or spend payments until they have 1 confirmation [http://BitcoinTalk.org/index.php?topic=1306.0](http://bitcointalk.org/index.php?topic=1306.0) - internal version number from 312 to 31300 - only accept transactions sent by IP address if -allowreceivebyip is specified - dropped DB_PRIVATE Berkeley DB flag - fix problem sending the last cent with sub-cent fractional change - auto-detect whether to use 128-bit 4-way SSE2 on Linux Gavin Andresen: - option -rpcallowip= to accept json-rpc connections from another machine - clean shutdown on SIGTERM on Linux ##### BitcoinTalk #### Re: BitCoin Wikipedia page DELETED!!! ##### _2010-09-30 17:50:32 UTC_ - [-](https://bitcointalk.org/index.php?topic=652.msg14729#msg14729) If you do, I think it should be a very brief, single paragraph article like 100 words or less that simply identifies what Bitcoin is. I wish rather than deleting the article, they put a length restriction. If something is not famous enough, there could at least be a stub article identifying what it is. I often come across annoying red links of things that Wiki ought to at least have heard of. The article could be as simple as something like: "Bitcoin is a peer-to-peer decentralised /link/electronic currency/link/." The more standard Wiki thing to do is that we should have a paragraph in one of the more general categories that we are an instance of, like Electronic Currency or Electronic Cash. We can probably establish a paragraph there. Again, keep it short. Just identifying what it is. ##### BitcoinTalk #### Re: Prioritized transactions, and tx fees ##### _2010-09-30 18:11:56 UTC_ - [-](https://bitcointalk.org/index.php?topic=1314.msg14732#msg14732) It ramps up the fee requirement as the block fills up: <50KB free 50KB 0.01 250KB 0.02 333KB 0.03 375KB 0.04 etc. It's a typical pricing mechanism. After the first 50KB sells out, the price is raised to 0.01. After 250KB is sold, it goes up to 0.02. At some price, you can pretty much always get in if you're willing to outbid the other customers. Just including the minimum 0.01 goes a long way. ##### BitcoinTalk #### Re: Prioritized transactions, and tx fees ##### _2010-09-30 18:22:22 UTC_ - [-](https://bitcointalk.org/index.php?topic=1314.msg14734#msg14734) True, the switch should be something more dynamic that pays per KB. It's harder to think of how to explain it. ##### BitcoinTalk #### Re: Remote RPC access ##### _2010-09-30 18:27:41 UTC_ - [-](https://bitcointalk.org/index.php?topic=1291.msg14736#msg14736) It can be safe if you're using it over your own LAN, like if you have multiple servers at a location that talk to each other. 0.3.13 RC1 is available for Windows: [http://www.bitcoin.org/download/bitcoin-0.3.13-rc1-win32-setup.exe](http://www.bitcoin.org/download/bitcoin-0.3.13-rc1-win32-setup.exe) ##### BitcoinTalk #### Re: 0.3.13 RC1 for Windows, please test ##### _2010-10-01 00:32:46 UTC_ - [-](https://bitcointalk.org/index.php?topic=1322.msg14787#msg14787) Too late for 0.3.13, but I'll try to find time to add it to the next version. ##### BitcoinTalk #### Version 0.3.13, please upgrade ##### _2010-10-01 00:34:35 UTC_ - [-](https://bitcointalk.org/index.php?topic=1327.msg14788#msg14788) Version 0.3.13 is now available. You should upgrade to prevent potential problems with 0/unconfirmed transactions. Note: 0.3.13 prevents problems if you haven't already spent a 0/unconfirmed transaction, but if that already happened, you need 0.3.13.2. Changes: - Don't count or spend payments until they have 1 confirmation. - Internal version number from 312 to 31300. - Only accept transactions sent by IP address if -allowreceivebyip is specified. - Dropped DB_PRIVATE Berkeley DB flag. - Fix problem sending the last cent with sub-cent fractional change. - Auto-detect whether to use 128-bit 4-way SSE2 on Linux. Gavin Andresen: - Option -rpcallowip= to accept json-rpc connections from another machine. - Clean shutdown on SIGTERM on Linux. Download: [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.13/](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.13/) (Thanks Laszlo for the Mac OSX build!) Note: The SSE2 auto-detect in the Linux 64-bit version doesn't work with AMD in 64-bit mode. Please try this instead and let me know if it gets it right: [http://www.bitcoin.org/download/bitcoin-0.3.13.1-specialbuild-linux64.tar.gz](http://www.bitcoin.org/download/bitcoin-0.3.13.1-specialbuild-linux64.tar.gz) You can still control the SSE2 use manually with -4way and -4way=0. Version 0.3.13.2 (SVN rev 161) has improvements for the case where you already had 0/unconfirmed transactions that you might have already spent. Here's a Windows build of it: [http://www.bitcoin.org/download/bitcoin-0.3.13.2-win32-setup.exe](http://www.bitcoin.org/download/bitcoin-0.3.13.2-win32-setup.exe) ##### BitcoinTalk #### Re: Version 0.3.13 ##### _2010-10-03 18:17:06 UTC_ - [-](https://bitcointalk.org/index.php?topic=1327.msg15102#msg15102) [_**Quote from: ShadowOfHarbringer on October 02, 2010, 01:00:07 PM**_](https://bitcointalk.org/index.php?topic=1327.msg14997#msg14997) _That's nice, however the automatic 4way detection is not working on my Gentoo AMD 64 version client. I still have to add the "-4way" switch._ Forgot to say, I suspected the detect might not work on 64-bit AMD. I found it hard to believe but AMD reports a different model number in 64-bit mode. Could you grep CPUID your debug.log and tell me what it says? (and anyone else with 64-bit AMD) And what AMD chip do you have? Do all AMDs that support 64-bit have the better SSE2 hardware also? ##### BitcoinTalk #### Re: Version 0.3.13, please upgrade ##### _2010-10-03 19:39:06 UTC_ - [-](https://bitcointalk.org/index.php?topic=1327.msg15110#msg15110) Could a few people please run this special build? It'll amnesty the dust spam transactions, which will clear up the 0/unconfirmed problem for now. We really just need one block letting them through to clear up the previous transactions. Post if you generate a block with this. These are binaries only. The linux version is 64-bit only. [http://www.bitcoin.org/download/bitcoin-0.3.13.1-specialbuild-win32.zip](http://www.bitcoin.org/download/bitcoin-0.3.13.1-specialbuild-win32.zip) [http://www.bitcoin.org/download/bitcoin-0.3.13.1-specialbuild-linux64.tar.gz](http://www.bitcoin.org/download/bitcoin-0.3.13.1-specialbuild-linux64.tar.gz) SHA1 fb7c66270281ed058c570627cf7baff0bdc16e5d bitcoin-0.3.13.1-specialbuild-win32.zip SHA1 9fc44ea5f2109618073e2cfd887e2cc266eb31a9 bitcoin-0.3.13.1-specialbuild-linux64.tar.gz The linux 64-bit version includes a change to the cpuid 4-way 128-bit SSE2 autodetect for AMD in 64-bit mode, if you'd like to test that and see if that's better. ##### BitcoinTalk #### Re: Version 0.3.13, please upgrade ##### _2010-10-03 19:49:32 UTC_ - [-](https://bitcointalk.org/index.php?topic=1327.msg15112#msg15112) [_**Quote from: tcatm on October 03, 2010, 07:45:45 PM**_](https://bitcointalk.org/index.php?topic=1327.msg15111#msg15111) _983 Mhash/s box._ Seriously? What hardware is that? ##### BitcoinTalk #### Re: Version 0.3.13, please upgrade ##### _2010-10-03 20:02:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=1327.msg15116#msg15116) **Code:** diff -u old\main.cpp new\main.cpp --- old\main.cpp Sun Oct 03 20:57:20 2010 +++ new\main.cpp Sun Oct 03 20:57:54 2010 @@ -2831,6 +2831,10 @@ bool fUseSSE2 = ((fIntel && nFamily * 10000 + nModel >= 60026) || (fAMD && nFamily * 10000 + nModel >= 160010)); + // AMD reports a lower model number in 64-bit mode + if (fAMD && sizeof(void*) > 4 && nFamily * 10000 + nModel >= 160004) + fUseSSE2 = true; + static bool fPrinted; if (!fPrinted) { @@ -2989,6 +2993,17 @@ // Transaction fee based on block size int64 nMinFee = tx.GetMinFee(nBlockSize); + //////// temporary code + if (nBlockSize < MAX_BLOCK_SIZE_GEN / 10 && GetWarnings("statusbar") == "") + { + if (nBestHeight < 91000) + nMinFee = 0; + if (nBestHeight < 100000 && nTxSize < 2000) + nMinFee = 0; + if (nBestHeight < 110000 && nBestHeight % 10 == 0) + nMinFee = 0; + } + //////// temporary code map<uint256, CTxIndex> mapTestPoolTmp(mapTestPool); if (!tx.ConnectInputs(txdb, mapTestPoolTmp, CDiskTxPos(1,1,1), pindexPrev, nFees, false, true, nMinFee)) diff -u old\serialize.h new\serialize.h --- old\serialize.h Sun Oct 03 20:57:45 2010 +++ new\serialize.h Sun Oct 03 20:57:54 2010 @@ -22,8 +22,8 @@ class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int VERSION = 31300; -static const char* pszSubVer = ""; +static const int VERSION = 31301; +static const char* pszSubVer = " test1"; ##### BitcoinTalk #### Re: Version 0.3.13, please upgrade ##### _2010-10-03 20:54:07 UTC_ - [-](https://bitcointalk.org/index.php?topic=1327.msg15136#msg15136) [_**Quote from: theymos on October 03, 2010, 08:09:51 PM**_](https://bitcointalk.org/index.php?topic=1327.msg15118#msg15118) _ArtForz is already running with no fees, and he has 20-30% of the network's CPU power. The person who originally sent the broken transactions deleted his wallet, though, and the network has forgotten these historical transactions, so any transactions based on this won't confirm._ Transactions aren't accepted or displayed as 0/unconfirmed until your node has a path of transactions back to the block chain. Any transactions in your wallet also have bundled with them all unrecorded transactions required to reach the block chain. If you have a transaction that is displayed as 0/unconfirmed, then you have all the previous unrecorded transactions it depends on and you will also rebroadcast those transactions when you rebroadcast yours. If a no-fee block has already been generated and hasn't helped, then I need to look at what's wrong. It's a part of code that doesn't get much use. They should be recorded in the wallets of everyone who has a transaction depending on them. [_**Quote from: theymos on October 03, 2010, 08:09:51 PM**_](https://bitcointalk.org/index.php?topic=1327.msg15118#msg15118) _The person who originally sent the broken transactions deleted his wallet_ Sigh... why delete a wallet instead of moving it aside and keeping the old copy just in case? You should never delete a wallet. [_**Quote from: tcatm on October 03, 2010, 08:10:47 PM**_](https://bitcointalk.org/index.php?topic=1327.msg15119#msg15119) _It's running. Should find a block within 3 hours._ It may take a while to collect re-broadcast transactions. It'll help if you can accept inbound connections so you'll be listening to more nodes. Even if you find a block in 3 hours, keep it running continuously for a few days at least. ##### BitcoinTalk #### Re: [PATCH] increase block size limit ##### _2010-10-03 21:07:28 UTC_ - [-](https://bitcointalk.org/index.php?topic=1347.msg15139#msg15139) [_**Quote from: theymos on October 03, 2010, 08:28:39 PM**_](https://bitcointalk.org/index.php?topic=1347.msg15126#msg15126) _Applying this patch will make you incompatible with other Bitcoin clients._ _+1 theymos. Don't use this patch, it'll make you incompatible with the network, to your own detriment._ We can phase in a change later if we get closer to needing it. **Martii Malmi (AKA Sirius) “COPA trial” email #235** **Date: Sun, 03 Oct 2010 21:27:29 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: SMF php code** **To: Martti Malmi <mmalmi@cc.hut.fi>** I noticed my custom captcha stuff is gone. I guess it got lost in an upgrade? What are we doing for captcha now? If we only have default captcha, we'd be getting flooded with spam accounts. Do I need to re-integrate the custom captcha stuff or do we have another solution now? ##### BitcoinTalk #### Re: How to overthrow the GPU Oligarchs ##### _2010-10-03 21:30:04 UTC_ - [-](https://bitcointalk.org/index.php?topic=1332.msg15142#msg15142) [_**Quote from: theymos on October 02, 2010, 06:11:11 AM**_](https://bitcointalk.org/index.php?topic=1332.msg14966#msg14966) [_**Quote from: lzsaver on October 02, 2010, 05:49:47 AM**_](https://bitcointalk.org/index.php?topic=1332.msg14960#msg14960) _Can you tell more about it: "they have to do weird things with extraNonce, which increases the size of the block header"._ _When you generate, you calculate hashes of the block header. Hashing more data is slower than hashing less data, so the block header is critically of a fixed size for everyone, with one exception._ This is the point of confusion. extraNonce is not part of the block header, it is part of the first transaction. It does not slow down your hashing. It does not change the size of the header. We need to be vigilant and nip in the bud any misconception that the contents of your block slows down your hash speed. It doesn't. extraNonce never needs to be very big. We could reset it every second whenever the time changes if we wanted. Worst case, if you didn't want to keep track of incrementing it, extraNonce could be 4 random bytes and the chance of wasting time from collision would be negligible. Separate machines are automatically collision proof because they have different generated public keys in the first transaction. That also goes for each thread too. ##### BitcoinTalk #### Re: Version 0.3.13, please upgrade ##### _2010-10-03 21:43:20 UTC_ - [-](https://bitcointalk.org/index.php?topic=1327.msg15147#msg15147) ShadowOfHarbringer, is yours faster with -4way? If it is, then I'm thinking that any AMD that supports 64-bit has 128-bit SSE2. The specialbuild version I posted here looks for model 4 or higher. If yours is faster with -4way, then I should change it to always use SSE2 with any AMD with 64-bit. ----

Kicking the Hornet's Nest - part 17

# Kicking the Hornet's Nest - third edition - part 17 All links, digital (pdf, txt, docx, md) and book in print, can be found at https://hive.blog/@crrdlx/satoshi Edited by [crrdlx](nostr:nprofile1qyv8wumn8ghj7mn0wdj8y6tkv5hxzurs9aex2mrp0yq3wamnwvaz7tmjv4kxz7fwwpexjmtpdshxuet59uqzqqzmcn0yrn7ttq8hrjkk46ysn2tk26rr8f8k4y7xkl74hlh3rcdzm9d3t8), npub: ``` npub1qpdufhjpel94srm3ett2azgf49m9dp3n5nm2j0rt0l2mlmc3ux3qza082j ``` ---- ### Kicking the Hornet's Nest pages 375 - 400 ---- ##### BitcoinTalk #### Re: Bitcoin minting is thermodynamically perverse ##### _2010-08-07 17:46:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=721.msg8114#msg8114) It's the same situation as gold and gold mining. The marginal cost of gold mining tends to stay near the price of gold. Gold mining is a waste, but that waste is far less than the utility of having gold available as a medium of exchange. I think the case will be the same for Bitcoin. The utility of the exchanges made possible by Bitcoin will far exceed the cost of electricity used. Therefore, _not_having Bitcoin would be the net waste. [_**Quote from: gridecon on August 06, 2010, 04:48:00 PM**_](https://bitcointalk.org/index.php?topic=721.msg7889#msg7889) _As an overall point, I also do not agree with the idea that the very high computational burden of coin generation is in fact a necessity of the current system. As I understand it, currency creation is fundamentally metered by TIME - and if that is the fundamental controlling variable, what is the need for everyone to "roll as many dice as posible" within that given time period? The "chain of proof" for coin ownership and transactions doesn't depend on the method for spawning coins._ Each node's influence on the network is proportional to its CPU power. The only way to show the network how much CPU power you have is to actually use it. If there's something else each person has a finite amount of that we could count for one-person-one-vote, I can't think of it. IP addresses... much easier to get lots of them than CPUs. I suppose it might be possible to measure CPU power _at certain times_. For instance, if the CPU power challenge was only run for an average of 1 minute every 10 minutes. You could still prove your total power at given times without running it all the time. I'm not sure how that could be implemented though. There's no way for a node that wasn't present at the time to know that a past chain was actually generated in a duty cycle with 9 minute breaks, not back to back. Proof-of-work has the nice property that it can be relayed through untrusted middlemen. We don't have to worry about a chain of custody of communication. It doesn't matter who tells you a longest chain, the proof-of-work speaks for itself. ##### BitcoinTalk #### Re: A proposal for a semi-automated Escrow mechanism ##### _2010-08-07 20:04:59 UTC_ - [-](https://bitcointalk.org/index.php?topic=645.msg8137#msg8137) [_**Quote from: jgarzik on August 05, 2010, 07:00:30 PM**_](https://bitcointalk.org/index.php?topic=645.msg7723#msg7723) _Due to that recourse, it is unlikely to be used as an escrow mechanism_ ![](file:///tmp/lu30467eu8.tmp/lu30468nv5_tmp_b56eb9f04b2623cd.gif) Really? Do you think people won't be able to understand the benefit? (If your response is an argument that there's no benefit at all, I guess that will reinforce the case that people won't be able to understand it.) ##### BitcoinTalk #### Escrow ##### _2010-08-07 20:13:52 UTC_ - [-](https://bitcointalk.org/index.php?topic=750.msg8140#msg8140) Here's an outline of the kind of escrow transaction that's possible in software. This is not implemented and I probably won't have time to implement it soon, but just to let you know what's possible. The basic escrow: The buyer commits a payment to escrow. The seller receives a transaction with the money in escrow, but he can't spend it until the buyer unlocks it. The buyer can release the payment at any time after that, which could be never. This does not allow the buyer to take the money back, but it does give him the option to burn the money out of spite by never releasing it. The seller has the option to release the money back to the buyer. While this system does not guarantee the parties against loss, it takes the profit out of cheating. If the seller doesn't send the goods, he doesn't get paid. The buyer would still be out the money, but at least the seller has no monetary motivation to stiff him. The buyer can't benefit by failing to pay. He can't get the escrow money back. He can't fail to pay due to lack of funds. The seller can see that the funds are committed to his key and can't be sent to anyone else. Now, an economist would say that a fraudulent seller could start negotiating, such as "release the money and I'll give you half of it back", but at that point, there would be so little trust and so much spite that negotiation is unlikely. Why on earth would the fraudster keep his word and send you half if he's already breaking his word to steal it? I think for modest amounts, almost everyone would refuse on principle alone. ##### BitcoinTalk #### Re: 4 hashes parallel on SSE2 CPUs for 0.3.6 ##### _2010-08-07 21:16:01 UTC_ - [-](https://bitcointalk.org/index.php?topic=648.msg8145#msg8145) [_**Quote from: impossible7 on August 06, 2010, 11:37:20 AM**_](https://bitcointalk.org/index.php?topic=648.msg7838#msg7838) _CRITICAL_BLOCK is a macro that contains a for loop. The assertion failure indicates that break has been called inside the body of the loop. The only break statement in this block is in line 2762. In the original source file, there is no break statement in this critical block. I think you must remove lines 2759-2762. The is nothing like that in the original main.cpp._ Sorry about that. CRITICAL_BLOCK isn't perfect. You have to be careful not to break or continue out of it. There's an assert that catches and warns about break. I can be criticized for using it, but the syntax would be so much more bloated and error prone without it. Is there a chance the SSE2 code is slow on Intel because of some quirk that could be worked around? For instance, if something works but is slow if it's not aligned, or thrashing the cache, or one type of instruction that's really slow? I'm not sure how available it is, but I think Intel used to have a profiler for profiling on a per instruction level. I guess if tcatm doesn't have a system with the slow processor to test with, there's not much hope. But it would be really nice if this was working on most CPUs. ##### BitcoinTalk #### Re: bitcoin generation broken in 0.3.8? ##### _2010-08-09 18:50:41 UTC_ - [-](https://bitcointalk.org/index.php?topic=753.msg8388#msg8388) I found that SSE2 only added a slight 2% speedup, which didn't seem worth the incompatibility. I was trying to take the safer option. It doesn't look to me like Crypto++ could be deciding whether to use SSE2 at runtime. There's one place where it detects SSE2 for deciding some block count parameter, but the SSE2 stuff is all #ifdef at compile time and I can't see how that would switch at runtime. Maybe I'm not looking in the right place. Should we enable SSE2 in all the makefiles? It seems like we must in case someone compiles with 64-bit. I will recompile the 64-bit part of the Linux 0.3.8 release. ##### BitcoinTalk #### Version 0.3.8.1 update for Linux 64-bit ##### _2010-08-09 19:46:58 UTC_ - [-](https://bitcointalk.org/index.php?topic=765.msg8402#msg8402) When we switched to Crypto++ 5.6.0 SHA-256 in version 0.3.6, generation got broken on the Linux 64-bit build. Version 0.3.8.1 is on SourceForge with the 64-bit binary updated. Download: [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.8/bitcoin-0.3.8.1-linux.tar.gz/download](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.8/bitcoin-0.3.8.1-linux.tar.gz/download) Future versions after 0.3.8 will probably require SSE2. Anyone have Pentium 3 or older where this would be a problem? ##### BitcoinTalk #### Re: What could be the transition plan to Y2038 compliant Bitcoin? ##### _2010-08-09 20:13:26 UTC_ - [-](https://bitcointalk.org/index.php?topic=760.msg8413#msg8413) **unsigned** int is good until 2106. Surely the network will have to be totally revamped at least once by then. There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int. ##### BitcoinTalk #### Re: bitcoin generation broken in 0.3.8? (64-bit) ##### _2010-08-09 20:34:06 UTC_ - [-](https://bitcointalk.org/index.php?topic=753.msg8417#msg8417) I uploaded 0.3.8.1 for Linux with re-built 64-bit. I ran a difficulty 1 test with it and it has generated blocks. [http://BitcoinTalk.org/index.php?topic=765.0](http://bitcointalk.org/index.php?topic=765.0) Download: [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.8/bitcoin-0.3.8.1-linux.tar.gz/download](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.8/bitcoin-0.3.8.1-linux.tar.gz/download) ##### BitcoinTalk #### Re: Version 0.3.8.1 update for Linux 64-bit ##### _2010-08-09 20:55:06 UTC_ - [-](https://bitcointalk.org/index.php?topic=765.msg8422#msg8422) That's a good point, I believe you could run with generation off if you don't have SSE2. How about add to the top of cryptopp/config.h: #if !defined(_M_X64) && !defined(__x86_64__) #define CRYPTOPP_DISABLE_SSE2 1 #endif that would disable SSE2 for 32-bit builds. (at least with GCC or MSVC) ##### BitcoinTalk #### Connection limits ##### _2010-08-09 20:58:45 UTC_ - [-](https://bitcointalk.org/index.php?topic=766.msg8424#msg8424) SVN rev 125: - Always make 8 outbound connections even if have 8 inbound - Limit outbound connections to one per a.b.?.? range - Switch -maxconnections=# I added the (currently undocumented) switch -maxconnections=#. You shouldn't use it unless you need to because your router can't maintain a lot of connections, then try -maxconnections=30. I haven't really tested -maxconnections much, could someone test it? ##### BitcoinTalk #### Re: Bitcoin minting is thermodynamically perverse ##### _2010-08-09 21:28:39 UTC_ - [-](https://bitcointalk.org/index.php?topic=721.msg8431#msg8431) The heat from your computer is not wasted if you need to heat your home. If you're using electric heat where you live, then your computer's heat isn't a waste. It's equal cost if you generate the heat with your computer. If you have other cheaper heating than electric, then the waste is only the difference in cost. If it's summer and you're using A/C, then it's twice. Bitcoin generation should end up where it's cheapest. Maybe that will be in cold climates where there's electric heat, where it would be essentially free. ##### BitcoinTalk #### Re: Version 0.3.8.1 update for Linux 64-bit ##### _2010-08-10 23:46:00 UTC_ - [-](https://bitcointalk.org/index.php?topic=765.msg8628#msg8628) SVN rev 128: disable SSE2 on 32-bit. This may only disable it for MSVC and GCC. Other compilers might have different 64-bit defines. ##### BitcoinTalk #### Re: Not a suggestion ##### _2010-08-11 00:14:22 UTC_ - [-](https://bitcointalk.org/index.php?topic=770.msg8637#msg8637) This is a very interesting topic. If a solution was found, a much better, easier, more convenient implementation of Bitcoin would be possible. Originally, a coin can be just a chain of signatures. With a timestamp service, the old ones could be dropped eventually before there's too much backtrace fan-out, or coins could be kept individually or in denominations. It's the need to check for the absence of double-spends that requires global knowledge of all transactions. The challenge is, how do you prove that no other spends exist? It seems a node must know about all transactions to be able to verify that. If it only knows the hash of the in/outpoints, it can't check the signatures to see if an outpoint has been spent before. Do you have any ideas on this? It's hard to think of how to apply zero-knowledge-proofs in this case. We're trying to prove the absence of something, which seems to require knowing about all and checking that the something isn't included. ##### BitcoinTalk #### Re: Escrow ##### _2010-08-11 01:30:02 UTC_ - [-](https://bitcointalk.org/index.php?topic=750.msg8649#msg8649) [_**Quote from: jgarzik on August 10, 2010, 06:53:57 PM**_](https://bitcointalk.org/index.php?topic=750.msg8566#msg8566) _Ask some real-world business owners if they want to tell their customers about the chance of the money being lost forever, unrecoverable by either party._ That makes it sound like it might somehow get lost and the parties can't get it even if they want to cooperate. When you pay for something up front, you can't get it back either. Consumers seem comfortable with that. It's no worse than that. Either party always has the option to release it to the other. [_**Quote from: nelisky on August 10, 2010, 08:20:36 PM**_](https://bitcointalk.org/index.php?topic=750.msg8585#msg8585) _But the money burning solution, while great at preventing economically viable fraud, does nothing to prevent revenge and actually makes everyone loose if one side is dishonest. I would certainly not endorse that._ Then you must also be against the common system of payment up front, where the customer loses. Payment up front: customer loses, and the thief gets the money. Simple escrow: customer loses, but the thief doesn't get the money either. Are you guys saying payment up front is better, because at least the thief gets the money, so at least someone gets it? Imagine someone stole something from you. You can't get it back, but if you could, if it had a kill switch that could be remote triggered, would you do it? Would it be a good thing for thieves to know that everything you own has a kill switch and if they steal it, it'll be useless to them, although you still lose it too? If they give it back, you can re-activate it. Imagine if gold turned to lead when stolen. If the thief gives it back, it turns to gold again. It still seems to me the problem may be one of presenting it the right way. For one thing, not being so blunt about "money burning" for the purposes of game theory discussion. The money is never truly burned. You have the option to release it at any time forever. ##### BitcoinTalk #### Re: Compile error in SVN r127 ##### _2010-08-11 01:42:30 UTC_ - [-](https://bitcointalk.org/index.php?topic=784.msg8651#msg8651) Updated SVN. Thanks. There's little hope of not repeatedly stumbling over that in the future. It doesn't break the compile for me. **Martii Malmi (AKA Sirius) “COPA trial” email #228** **Date: Wed, 11 Aug 2010 02:54:27 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: [Fwd: Forum e-mail notifications and PBL blacklist and wiki registration]** **To: mmalmi@cc.hut.fi** Are PM notifications still disabled? (All we really need is disable the forum's access to the mail server) _> Does it work correctly now? I had made some forum code changes to_ _> disable PM email notification, but just reverted most of them as_ _> unnecessary._ ##### BitcoinTalk #### Re: Not a suggestion ##### _2010-08-11 21:07:59 UTC_ - [-](https://bitcointalk.org/index.php?topic=770.msg8798#msg8798) Still thinking this idea through... The only job the network needs to do is to tell whether a spend of an outpoint is the first or not. If we're willing to have clients keep the history for their own money, then some of the information may not need to be stored by the network, such as: - the value - the association of inpoints and outpoints in one transaction The network would track a bunch of independent outpoints. It doesn't know what transactions or amounts they belong to. A client can find out if an outpoint has been spent, and it can submit a satisfying inpoint to mark it spent. The network keeps the outpoint and the first valid inpoint that proves it spent. The inpoint signs a hash of its associated next outpoint and a salt, so it can privately be shown that the signature signs a particular next outpoint if you know the salt, but publicly the network doesn't know what the next outpoint is. I believe the clients would have to keep the entire history back to the original generated coins. Someone sending a payment would have to send data to the recipient, as well as still communicating with the network to mark outpoints spent and check that the spend is the first spend. Maybe the data transfer could be done as an e-mail attachment. The fact that clients have to keep the entire history reduces the privacy benefit. Someone handling a lot of money still gets to see a lot of transaction history. The way it retrospectively fans out, they might end up seeing a majority of the history. Denominations could be made granular to limit fan-out, but a business handling a lot of money might still end up seeing a lot of the history. **Martii Malmi (AKA Sirius) “COPA trial” email #230** **Date: Wed, 11 Aug 2010 21:00:13 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: [Fwd: Forum e-mail notifications and PBL blacklist and wiki registration]** **To: mmalmi@cc.hut.fi** Right, forgot about that. Hopefully theymos was right that the PBL is the source of the problem. mmalmi@cc.hut.fi wrote: > Yes, they're still disabled. Disabling the access to the mail server > would be easy, but we probably want to keep the password recovery by email. > ##### BitcoinTalk #### Re: Lost large number of bitcoins ##### _2010-08-11 21:46:51 UTC_ - [-](https://bitcointalk.org/index.php?topic=782.msg8803#msg8803) [_**Quote from: sirius-m on August 11, 2010, 02:01:53 AM**_](https://bitcointalk.org/index.php?topic=782.msg8657#msg8657) _I added to the FAQ the warning to back up after each transaction. Is it necessary btw to stop the client before making a backup? That's a bit inconvenient. Automatic backups would be useful indeed._ You can get away with backing up without stopping the client if you don't do anything or receive a payment within a few seconds before the backup. (like 5 seconds) [_**Quote from: gridecon on August 11, 2010, 08:46:08 PM**_](https://bitcointalk.org/index.php?topic=782.msg8795#msg8795) _Wait, I'm confused again. I thought the essence of the surprise was that Bitcoin is programmed to "empty your wallet" for EACH transaction._ No, it doesn't usually empty your wallet with each transaction. It uses the smallest set of coins it can find to add up to near the amount. In this case, unfortunately, his wallet had a single 9000 BTC bill in it, and it had to break it to get 1 BTC and 8999 BTC change. ##### BitcoinTalk #### Re: Where is the separate discussion devoted to possible Bitcoin weaknesses. ##### _2010-08-11 22:40:25 UTC_ - [-](https://bitcointalk.org/index.php?topic=788.msg8804#msg8804) It doesn't have to be such a breaking change. New nodes could accept old transactions for a long time until most nodes have already upgraded before starting to refuse transactions without PoW. Or, they could always accept old transactions, but only a limited number per time period. I've thought about PoW on transactions many times, but usually I end up thinking a 0.01 transaction fee is essentially similar and better. 0.01 is basically a proof of work, but not wasted. But if the problem is validating loads of transactions, then PoW could be checked faster. A more general umbrella partial solution would be to implement the idea where an unlikely dropoff in blocks received is detected. Then an attacker would still need a substantial portion of the network's power to benefit from a DoS attack. [_**Quote from: gavinandresen on August 11, 2010, 04:10:56 PM**_](https://bitcointalk.org/index.php?topic=788.msg8761#msg8761) _Bitcoin's p2p network is subject to various kinds of denial of service attacks. There, I said it._ +1 Any demonstration tests at this point would only show what we already know, and divert dev time from strengthening the system to operational fire fighting. ##### BitcoinTalk #### Re: Flood attack 0.00000001 BC ##### _2010-08-11 23:28:50 UTC_ - [-](https://bitcointalk.org/index.php?topic=287.msg8810#msg8810) It would be nice to keep the blk*.dat files small as long as we can. The eventual solution will be to not care how big it gets. But for now, while it's still small, it's nice to keep it small so new users can get going faster. When I eventually implement client-only mode, that won't matter much anymore. There's more work to do on transaction fees. In the event of a flood, you would still be able to jump the queue and get your transactions into the next block by paying a 0.01 transaction fee. However, I haven't had time yet to add that option to the UI. Scale or not, the test network will react in the same ways, but with much less wasted bandwidth and annoyance. ##### BitcoinTalk #### Re: BSD detection ##### _2010-08-12 00:02:06 UTC_ - [-](https://bitcointalk.org/index.php?topic=790.msg8814#msg8814) [_**Quote from: dkaparis on August 11, 2010, 11:00:16 PM**_](https://bitcointalk.org/index.php?topic=790.msg8807#msg8807) _There is this piece of code in headers.h: __#ifdef __WXMAC_OSX____#define __WXMAC__ 1__#define __WXOSX__ 1__#define __BSD__ 1__#endif__#endif_ That code was a bad idea anyway, I'm deleting it. Any Mac code should only use __WXMAC_OSX__, not __WXMAC__ or __WXOSX__, and we should stop using __BSD__. _**Quote**_ _#if (defined(__unix__) || defined(unix)) && !defined(USG)__#include <sys/param.h>__#endif_ Will that definitely cause BSD to be defined on Mac? ##### BitcoinTalk #### Re: Not a suggestion ##### _2010-08-12 02:46:56 UTC_ - [-](https://bitcointalk.org/index.php?topic=770.msg8836#msg8836) [_**Quote from: Red on August 12, 2010, 01:10:19 AM**_](https://bitcointalk.org/index.php?topic=770.msg8824#msg8824) [**Quote from: satoshi on August 11, 2010, 09:07:59 PM**](https://bitcointalk.org/index.php?topic=770.msg8798#msg8798) I believe the clients would have to keep the entire history back to the original generated coins. The fact that clients have to keep the entire history reduces the privacy benefit. _ I thought this too at first. But then I convinced myself otherwise._ Are you back to talking about the existing Bitcoin system here? I was talking about in the hypothetical system I was describing, if the network doesn't know the values and lineage of the transactions, then it can't verify them and vouch for them, so the clients would have to keep the history all the way back. If a client wasn't present until recently, the two ways to convince it that a transaction has a valid past is: 1) Show it the entire history back to the original generated coin. 2) Show it a history back to a thoroughly deep block, then trust that if so many nodes all said the history up to then was correct then it must be true. But if the network didn't know all the values and lineage of the transactions, it couldn't do 2), I don't think. ##### BitcoinTalk #### Re: BSD detection ##### _2010-08-12 21:14:20 UTC_ - [-](https://bitcointalk.org/index.php?topic=790.msg8919#msg8919) This is in SVN rev 130. Check that it compiles right. **Code:** #if (defined(__unix__) || defined(unix)) && !defined(USG) #include <sys/param.h> // to get BSD define #endif #ifdef __WXMAC_OSX__ #ifndef BSD #define BSD 1 #endif #endif ##### BitcoinTalk #### Bugfixes in SVN rev 130 ##### _2010-08-12 21:20:31 UTC_ - [-](https://bitcointalk.org/index.php?topic=795.msg8920#msg8920) Misc bugfixes in rev 130: fix -datadir with relative path autostart is now off by default except on windows fix occasional "vector iterator not dereferencable" assertion when compiled with msvc fix readlink compile warning on linux build use sys/param.h and BSD define instead of __BSD__ -paytxfee switch, e.g. -paytxfee=0.01 ##### BitcoinTalk #### Re: Bitcoin Watchdog Service ##### _2010-08-12 21:34:44 UTC_ - [-](https://bitcointalk.org/index.php?topic=691.msg8922#msg8922) True, there would probably be someone with a dial-up modem or satellite dish internet. Rarer would be someone who has both that and the wired internet that has the outage, but if it's a big enough segment to matter, out of a million people there's bound to be a multi-home geek. ISP network cuts are just your local area. If you still have communication with the rest of your area, it would probably be something like 1/1000 of the world or less. Block generation in the segment would take several hours per block. I favour the plan to monitor if the frequency of blocks received drops too slow. That covers a large range of possibilities. ##### BitcoinTalk #### Re: Having problems specifing -datadir ##### _2010-08-12 21:43:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=601.msg8924#msg8924) Fixed in SVN rev 130. ##### BitcoinTalk #### Re: 4 hashes parallel on SSE2 CPUs for 0.3.6 ##### _2010-08-12 22:07:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=648.msg8929#msg8929) That big of a difference in speed, by a factor of 4 or 6, feels like it's likely to be some quirky weak spot or instruction that the old chip is slow with. Unless it's a touted feature of the i5 that they made SSE2 six times faster. A quick summary: Xeon Quad 41% slower Core 2 Duo 55% slower Core 2 Duo same (vess) Core 2 Quad 50% slower Core i5 200% faster (nelisky) Core i5 100% faster (vess) AMD Opteron 105% faster aceat64: My system went from ~7100 to ~4200. This particular system has dual Intel Xeon Quad-Core CPUs (E5335) @ 2.00GHz. impossible7: on an Intel Core 2 Duo T7300 running x86_64 linux it was 55% slower compared to the stock version (r121) nelisky: My Core2Quad (Q6600) slowed down 50%, my i5 improved ~200%, impossible7: on an AMD Opteron 2374 HE running x86_64 linux I got a 105% improvement (!) ##### BitcoinTalk #### Re: Bugfixes in SVN rev 130 ##### _2010-08-13 03:15:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=795.msg8960#msg8960) No, that's not what it is. -paytxfee allows you to include a transaction fee with your transactions. If transaction confirmations become slow, you can get priority by using "-paytxfee=0.01". Any transactions you send would cost an extra 0.01. There's no reason to use more than 0.01. It's just there in case we need it. It probably won't be needed, and it can be explained more if we do. ##### BitcoinTalk #### Re: Bitcoin Watchdog Service ##### _2010-08-13 17:09:27 UTC_ - [-](https://bitcointalk.org/index.php?topic=691.msg9041#msg9041) _**Quote**_ _But there will be no irc server to bootstrap from._ Which doesn't matter because you can't access sourceforge to download the software either. If you've ever been connected before, you don't need IRC to bootstrap anymore. Even if you haven't, you can bootstrap from seed nodes. IRC is completely redundant since 0.3.0. ##### BitcoinTalk #### Version 0.3.9 rc1, please test ##### _2010-08-13 17:40:00 UTC_ - [-](https://bitcointalk.org/index.php?topic=806.msg9046#msg9046) Here's a test build if you'd like to help test before 0.3.9 is released. (or if you'd rather get upgrading out of the way now instead of waiting) Downloads: (binaries only) [http://www.bitcoin.org/download/bitcoin-0.3.9.rc1-win32.zip](http://www.bitcoin.org/download/bitcoin-0.3.9.rc1-win32.zip) ([http://www.bitcoin.org/download/bitcoin-0.3.9.rc1-linux.tar.gz](http://www.bitcoin.org/download/bitcoin-0.3.9.rc1-linux.tar.gz)) SHA1 a36ea00cce27b4b083755df73a3d1e5e5729884e bitcoin-0.3.9.rc1-win32.zip SHA1 bbb333b0ea57302740ad1bb9948520d00f884f9d bitcoin-0.3.9.rc1-linux.tar.gz Edit: Linux please test rc2 instead. This adds a -4way switch for tcatm's 4-way SSE2. This will only be for Linux: [http://www.bitcoin.org/download/bitcoin-0.3.9.rc2-linux.tar.gz](http://www.bitcoin.org/download/bitcoin-0.3.9.rc2-linux.tar.gz) SHA1 47d9998f7d15fe81234a5c89a542da9d0664df40 bitcoin-0.3.9.rc2-linux.tar.gz Please report back your results [http://BitcoinTalk.org/index.php?topic=820](http://bitcointalk.org/index.php?topic=820) ##### BitcoinTalk #### Re: Not a suggestion ##### _2010-08-13 19:28:47 UTC_ - [-](https://bitcointalk.org/index.php?topic=770.msg9074#msg9074) I'm not grasping your idea yet. Does it hide any information from the public network? What is the advantage? If at least 50% of nodes validated transactions enough that old transactions can be discarded, then everyone saw everything and could keep a record of it. Can public nodes see the values of transactions? Can they see which previous transaction the value came from? If they can, then they know everything. If they can't, then they couldn't verify that the value came from a valid source, so you couldn't take their generated chain as verification of it. Does it hide the bitcoin addresses? Is that it? OK, maybe now I see, if that's it. Crypto may offer a way to do "key blinding". I did some research and it was obscure, but there may be something there. "group signatures" may be related. There's something here in the general area: [http://www.users.zetnet.co.uk/hopwood/crypto/rh/](http://www.users.zetnet.co.uk/hopwood/crypto/rh/) What we need is a way to generate additional blinded variations of a public key. The blinded variations would have the same properties as the root public key, such that the private key could generate a signature for any one of them. Others could not tell if a blinded key is related to the root key, or other blinded keys from the same root key. These are the properties of blinding. Blinding, in a nutshell, is x = (x * large_random_int) mod m. When paying to a bitcoin address, you would generate a new blinded key for each use. Then you need to be able to sign a signature such that you can't tell that two signatures came from the same private key. I'm not sure if always signing a different blinded public key would already give you this property. If not, I think that's where group signatures comes in. With group signatures, it is possible for something to be signed but not know who signed it. As an example, say some unpopular military attack has to be ordered, but nobody wants to go down in history as the one who ordered it. If 10 leaders have private keys, one of them could sign the order and you wouldn't know who did it. ##### BitcoinTalk #### Re: Proposed change to sendtoaddress API call ##### _2010-08-13 23:39:14 UTC_ - [-](https://bitcointalk.org/index.php?topic=807.msg9134#msg9134) It's too soon to start junking up the API for backward compatibility at all costs. Just return "<txid>". ##### BitcoinTalk #### Re: 4 hashes parallel on SSE2 CPUs for 0.3.6 ##### _2010-08-14 00:49:18 UTC_ - [-](https://bitcointalk.org/index.php?topic=648.msg9145#msg9145) MinGW on Windows has trouble compiling it: g++ -c -mthreads -O2 -w -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -I"/boost" -I"/db/build_unix" -I"/openssl/include" -I"/wxwidgets/lib/gcc_lib/mswud" -I"/wxwidgets/include" -msse2 -O3 -o obj/sha256.o sha256.cpp sha256.cpp: In function `long long int __vector__ Ch(long long int __vector__, long long int __vector__, long long int __vector__)': sha256.cpp:31: internal compiler error: in perform_integral_promotions, at cp/typeck.c:1454 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.mingw.org/bugs.shtml> for instructions. make: *** [obj/sha256.o] Error 1 ##### BitcoinTalk #### Re: 4 hashes parallel on SSE2 CPUs for 0.3.6 ##### _2010-08-14 04:22:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=648.msg9159#msg9159) If you haven't already, try aligning thash. It might matter. Couldn't hurt. [_**Quote from: tcatm on August 14, 2010, 12:53:07 AM**_](https://bitcointalk.org/index.php?topic=648.msg9147#msg9147) _Looks like we're triggering a compiler bug in the tree optimizer. Can you try to compile it -O0?_ No help from -O0, same error. MinGW is GCC 3.4.5. Probably the problem. I'll see if I can get a newer version of MinGW. ##### BitcoinTalk #### Re: 4 hashes parallel on SSE2 CPUs for 0.3.6 ##### _2010-08-14 17:55:37 UTC_ - [-](https://bitcointalk.org/index.php?topic=648.msg9228#msg9228) Got the test working on 32-bit with MinGW GCC 4.5. Exactly 50% slower than stock with Core 2. ##### BitcoinTalk #### Re: 4 hashes parallel on SSE2 CPUs for 0.3.6 ##### _2010-08-14 22:06:13 UTC_ - [-](https://bitcointalk.org/index.php?topic=648.msg9278#msg9278) MinGW GCC 4.5.0: Crypto++ doesn't work, X86_SHA256_HashBlocks() never returns I only got 4-way working with test.cpp but not when called by BitcoinMiner MinGW GCC 4.4.1: Crypto++ works 4-way SIGSEGV GCC is definitely not aligning __m128i. Even if we align our own __m128i variables, the compiler may decide to use a __m128i behind the scenes as a temporary variable. By making our __m128i variables aligned and changing these inlines to defines, I was able to get it to work on 4.4.1 with -O0 only: #define Ch(b, c, d) ((b & c) ^ (~b & d)) #define Maj(b, c, d) ((b & c) ^ (b & d) ^ (c & d)) #define ROTR(x, n) (_mm_srli_epi32(x, n) | _mm_slli_epi32(x, 32 - n)) #define SHR(x, n) _mm_srli_epi32(x, n) But that's with -O0. ##### BitcoinTalk #### Re: 4 hashes parallel on SSE2 CPUs for 0.3.6 ##### _2010-08-15 03:40:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=648.msg9359#msg9359) On both MinGW GCC 4.4.1 and 4.5.0 I have it working with test.cpp but SIGSEGV when called by BitcoinMiner. So now it doesn't look like it's the version of GCC, it's something else, maybe just the luck of how the stack is aligned. I have it working fine on GCC 4.3.3 on Ubuntu 32-bit. I found the problem with Crypto++ on MinGW 4.5.0. Here's the patch for that: **Code:** --- \old\sha.cpp Mon Jul 26 13:31:11 2010 +++ ew\sha.cpp Sat Aug 14 20:21:08 2010 @@ -336,7 +336,7 @@ ROUND(14, 0, eax, ecx, edi, edx) ROUND(15, 0, ecx, eax, edx, edi) - ASL(1) + ASL(label1) // Bitcoin: fix for MinGW GCC 4.5 AS2(add WORD_REG(si), 4*16) ROUND(0, 1, eax, ecx, edi, edx) ROUND(1, 1, ecx, eax, edx, edi) @@ -355,7 +355,7 @@ ROUND(14, 1, eax, ecx, edi, edx) ROUND(15, 1, ecx, eax, edx, edi) AS2( cmp WORD_REG(si), K_END) - ASJ( jne, 1, b) + ASJ( jne, label1, ) // Bitcoin: fix for MinGW GCC 4.5 AS2( mov WORD_REG(dx), DATA_SAVE) AS2( add WORD_REG(dx), 64) ##### BitcoinTalk #### tcatm's 4-way SSE2 for Linux 32/64-bit is in 0.3.10 ##### _2010-08-15 15:52:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=820.msg9452#msg9452) 0.3.10 has tcatm's 4-way SSE2 as an option switch. Use the switch "-4way" to turn it on. Without the switch you get Crypto++ ASM SHA-256. I could only get this working with Linux. Download: Get 0.3.10 from [http://BitcoinTalk.org/index.php?topic=827.0](http://bitcointalk.org/index.php?topic=827.0) Please report back your CPU and results! I think it's pretty clear that Core 2 and lower are slower, i5 faster. I don't think we've heard any i7 results yet. We need to know about the different models of AMD or other less common CPUs. ##### BitcoinTalk #### Re: Potential disaster scenario ##### _2010-08-15 16:37:16 UTC_ - [-](https://bitcointalk.org/index.php?topic=813.msg9454#msg9454) Some places where generation will gravitate to: 1) places where it's cheapest or free 2) people who want to help for idealogical reasons 3) people who want to get some coins without the inconvenience of doing a transaction to buy them There are legitimate places where it's free. Generation is basically free anywhere that has electric heat, since your computer's heat is offsetting your baseboard electric heating. Many small flats have electric heat out of convenience. How expensive is heating oil? With the price of oil so high, if it's actually more expensive than electric, then generating would have negative cost. There's also kids putting it on their parent's power bill, employees their employer, botnets, etc. Case 3 comes into play for small amounts. The overhead of doing an exchange doesn't make sense if you just need a small bit of pocket change for incidental micropayments. I think this is a nice advantage vs fiat currency, instead of all the seigniorage going to one big entity, let it go in convenience amounts to people who need to scrape up a small amount of change. ##### BitcoinTalk #### Re: Version 0.3.9 rc1, please test ##### _2010-08-15 18:11:41 UTC_ - [-](https://bitcointalk.org/index.php?topic=806.msg9475#msg9475) [_**Quote from: jgarzik on August 15, 2010, 05:46:27 PM**_](https://bitcointalk.org/index.php?topic=806.msg9467#msg9467) _the extended-help might have been based on my idea, but the code was somewhat different._ The idea was the main part. When you posted your patch, I realized it should have been done that way instead of "-?". I always had reservations about "-?" because it intrudes on the possible parameter values, and the help response is based on the version of the caller instead of the server. ##### BitcoinTalk #### Re: tcatm's 4-way SSE2 for Linux 32/64-bit 0.3.9 rc2 ##### _2010-08-15 18:23:26 UTC_ - [-](https://bitcointalk.org/index.php?topic=820.msg9478#msg9478) I hope someone can test an i5 or AMD to check that I built it right. I don't have either to test with. I'm also curious if it performs much worse on 32-bit linux vs 64-bit. ##### BitcoinTalk #### Re: tcatm's 4-way SSE2 for Linux 32/64-bit 0.3.9 rc2 ##### _2010-08-15 18:43:27 UTC_ - [-](https://bitcointalk.org/index.php?topic=820.msg9483#msg9483) I just uploaded a quick build so testers can check if I built it right. (I don't have an i5 or AMD) If it checks out, I'll put together the full package and do all the release stuff. **bitcoin-list** [**bitcoin-list**] ALERT - we are investigating a problem _2010-08-15 20:38:33 UTC_ - [-](https://sourceforge.net/p/bitcoin/mailman/message/25954806/) *** WARNING *** We are investigating a problem. DO NOT TRUST ANY TRANSACTIONS THAT HAPPENED AFTER 15.08.2010 17:05 UTC (block 74638) until the issue is resolved. ##### BitcoinTalk #### Re: overflow bug SERIOUS ##### _2010-08-15 20:59:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=823.msg9530#msg9530) Here's the preliminary change. Look right? I have more changes to make, this isn't all of it. Will SVN shortly. **Code:** bool CheckTransaction() const { // Basic checks that don't depend on any context if (vin.empty() || vout.empty()) return error("CTransaction::CheckTransaction() : vin or vout empty"); // Check for negative and overflow values int64 nTotal = 0; foreach(const CTxOut& txout, vout) { if (txout.nValue < 0) return error("CTransaction::CheckTransaction() : txout.nValue negative"); if (txout.nValue > 21000000 * COIN) return error("CTransaction::CheckTransaction() : txout.nValue too high"); nTotal += txout.nValue; if (nTotal > 21000000 * COIN) return error("CTransaction::CheckTransaction() : txout total too high"); } if (IsCoinBase()) { if (vin[0].scriptSig.size() < 2 || vin[0].scriptSig.size() > 100) return error("CTransaction::CheckTransaction() : coinbase script size"); } else { foreach(const CTxIn& txin, vin) if (txin.prevout.IsNull()) return error("CTransaction::CheckTransaction() : prevout is null"); } return true; } Don't sticky the topic, nobody looks up there. There'll be enough posts to bump. ##### BitcoinTalk #### Re: overflow bug SERIOUS ##### _2010-08-15 21:06:45 UTC_ - [-](https://bitcointalk.org/index.php?topic=823.msg9531#msg9531) It would help if people stop generating. We will probably need to re-do a branch around the current one, and the less you generate the faster that will be. A first patch will be in SVN rev 132. It's not uploaded yet. I'm pushing some other misc changes out of the way first, then I'll upload the patch for this. ##### BitcoinTalk #### Re: overflow bug SERIOUS ##### _2010-08-15 21:23:55 UTC_ - [-](https://bitcointalk.org/index.php?topic=823.msg9539#msg9539) Once you have an update, you could download knightmb's block chain. You'll want one that's old enough that it ends _before_ block 74000 so the most recent security lockin will check it. Can someone find the link for that? **Martii Malmi (AKA Sirius) “COPA trial” email #231** **Date: Sun, 15 Aug 2010 21:37:28 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: [bitcoin-list] ALERT - we are investigating a problem** **To: bitcoin-list@lists.sourceforge.net** *** WARNING *** We are investigating a problem. DO NOT TRUST ANY TRANSACTIONS THAT HAPPENED AFTER 15.08.2010 17:05 UTC (block 74638) until the issue is resolved. ##### BitcoinTalk #### Re: overflow bug SERIOUS ##### _2010-08-15 21:40:19 UTC_ - [-](https://bitcointalk.org/index.php?topic=823.msg9548#msg9548) Patch is uploaded to SVN rev 132! For now, recommended steps: 1) Shut down. 2) Download knightmb's blk files. (replace your blk0001.dat and blkindex.dat files) 3) Upgrade. 4) It should start out with less than 74000 blocks. Let it redownload the rest. If you don't want to use knightmb's files, you could just delete your blk*.dat files, but it's going to be a lot of load on the network if everyone is downloading the whole block index at once. I'll build releases shortly. ----

Kicking the Hornet's Nest - part 15

# Kicking the Hornet's Nest - third edition - part 15 All links, digital (pdf, txt, docx, md) and book in print, can be found at https://hive.blog/@crrdlx/satoshi Edited by [crrdlx](nostr:nprofile1qyv8wumn8ghj7mn0wdj8y6tkv5hxzurs9aex2mrp0yq3wamnwvaz7tmjv4kxz7fwwpexjmtpdshxuet59uqzqqzmcn0yrn7ttq8hrjkk46ysn2tk26rr8f8k4y7xkl74hlh3rcdzm9d3t8), npub: ``` npub1qpdufhjpel94srm3ett2azgf49m9dp3n5nm2j0rt0l2mlmc3ux3qza082j ``` ---- ### Kicking the Hornet's Nest pages 325 - 350 ---- ##### BitcoinTalk #### Re: Bitcoin snack machine (fast transaction problem) ##### _2010-07-18 01:59:15 UTC_ - [-](https://bitcointalk.org/index.php?topic=423.msg3867#msg3867) [_**Quote from: llama on July 18, 2010, 12:03:29 AM**_](https://bitcointalk.org/index.php?topic=423.msg3836#msg3836) _This is a good start, but still not impermeable._ I didn't say impermeable, I said good-enough. The loss in practice would be far lower than with credit cards. _**Quote**_ _(for example, by refusing to propogate word of the transaction at the vending machine)_ No, the vending machine talks to a big service provider (aka payment processor) that provides this service to many merchants. Think something like a credit card processor with a new job. They would have many well connected network nodes. ##### BitcoinTalk #### Re: Source code documentation ##### _2010-07-18 15:12:54 UTC_ - [-](https://bitcointalk.org/index.php?topic=393.msg3999#msg3999) They're only intended for intrepid programmers who read the sourcecode. ##### BitcoinTalk #### Re: URI-scheme for bitcoin ##### _2010-07-18 16:06:16 UTC_ - [-](https://bitcointalk.org/index.php?topic=55.msg4008#msg4008) [_**Quote from: lachesis on June 16, 2010, 06:14:05 AM**_](https://bitcointalk.org/index.php?topic=55.msg1597#msg1597) _I think you're misunderstanding the issue. My browser will always be able to go to 127.0.0.1 (barring some strange IE settings or a virus). If I type the address into the URL bar or click a link, it will work fine. However, it isn't possible to use Javascript to complete POST requests between domains (or ports on the same domain)._ That's what I thought too. [_**Quote from: sirius-m on June 16, 2010, 08:26:14 AM**_](https://bitcointalk.org/index.php?topic=55.msg1598#msg1598) _Yeah, I meant to say that cross-domain javascript calls are forbidden, so you can't call 127.0.0.1 from a javascript that doesn't reside in 127.0.0.1. Come to think of it, it would be quite funny if browsers allowed malicious cross-domain javascript to change people's Facebook pages etc._ Now I'm hearing a report that it IS possible for javascript to do a cross-domain POST request to 127.0.0.1. Not other domains, but just specifically to that one. Great... If this is the case, then do not use the -server switch or bitcoind on a system where you do web browsing. I'll get started on adding the password field. **Martii Malmi (AKA Sirius) “COPA trial” email #209** **Date: Sun, 18 Jul 2010 16:23:21 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: wiki** **To: Martti Malmi <mmalmi@cc.hut.fi>** http://www.bitcoin.org/smf/index.php?topic=393.msg3785#msg3785 AndrewBuck: ... EDIT: The wiki doesn't seem to be sending the registration e-mail so I can log in to edit, is there some problem with the server or something? -Buck **Martii Malmi (AKA Sirius) “COPA trial” email #210** **Date: Sun, 18 Jul 2010 16:23:10 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Fwd: bitcoin hosting** **To: mmalmi@cc.hut.fi** Please promise me you won't make a switch now. The last thing we need is switchover hassle on top of the slashdot flood of work we've got now. I'm losing my mind there are so many things that need to be done. Also, it would suck to be on a smaller, less reliable host just to save a measly $20. I will try to think of a polite way to ask the donor if he sent it, but right now there are other higher priority things that are going to bump even that for a few days. Would a donation of bitcoins help in the short term? _mmalmi@cc.hut.fi wrote:_ _> Rackspace has very good support, good backend, good connections and_ _> nicely scaling cloud based virtual servers. I got this offer from Thufir:_ _>_ _> -----_ _> Hi Sirius,_ _>_ _> Check out www.citrusdesignstudio.com. You will see through the portfolio_ _> that_ _> I am a real business with many clients._ _>_ _> That is my business that I provide managed hosting through._ _> I also do unmanaged VPSes._ _>_ _> Normally I would charge $15/mo for 512MB._ _> I will do it for $10/mo for you._ _>_ _> To see my pricing, go to www.linnode.com. I match everything they have_ _> except_ _> their great panel -- you have to email or call my people._ _>_ _> I provide VPS services normally for 3/4ths the posted cost on linnode.com._ _> (Rackspace is even more expensive.)_ _>_ _> I will do it for 1/2 of linnode's price for you._ _>_ _> It scales linerally just like linnodes, so for 2048 MB of memory, I would_ _> charge $40, etc._ _>_ _> Later!_ _> -----_ _>_ _> That would be worth considering, if they have good datacenters and_ _> connections. $10 / month is about $20 less than what Rackspace costs. On_ _> the other hand, Rackspace prices are no problem if the donation is to_ _> arrive._ _>_ ##### BitcoinTalk #### Re: Bitcoin 0.3.2 released ##### _2010-07-18 18:58:21 UTC_ - [-](https://bitcointalk.org/index.php?topic=437.msg4037#msg4037) The change list is basically encompassed by what's listed in the first message. Everyone should upgrade to get the important security improvements. Minimizing to tray had at least 3 different glitches and bugs on Linux, including a crash one, so I disabled it again. You can still re-enable the option with "-minimizetotray" if you want to use it anyway. The bugs/glitches are somewhere in wxWidgets or GTK or Gnome and I don't know how to fix them. Sorry, I just don't know what else to do, it's just too glitchy and buggy to have as a mainline feature. ##### BitcoinTalk #### JSON-RPC password ##### _2010-07-18 20:49:22 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg4059#msg4059) I uploaded to SVN my changes to add a password to JSON-RPC. If you're set up to build, please test it. The -server switch is replaced with -rpcpw=<password>, which is also used with bitcoind. bitcoin -rpcpw=<password> -- runs with JSON-RPC port open bitcoind -rpcpw=<password> -- daemon with password If you have a better idea for the switch name, let me know, but keep in mind there will eventually be a password for encrypting the database too. I'm not sure but I think they may want to use different passwords for the two. It gives a warning if you don't set a password. All commands now require the password as the first parameter. It'll tell you that if you run "bitcoind help". The central code: // Check password if (params.size() < 1 || params[0].type() != str_type) throw runtime_error("First parameter must be the password."); if (params[0].get_str() != strRPCPassword) { if (strRPCPassword.size() < 15) Sleep(50); begin = strRequest.end(); printf("ThreadRPCServer incorrect password attempt "); throw runtime_error("Incorrect password."); } Any comments on these decisions? 1) if (strRPCPassword.size() < 15) Sleep(50); -- this means if it's a short password, it'll wait 50ms after each attempt. This might be used as a DoS attack, but I figured if it's a short password, it's more important to protect against brute force password scan. This may tell outsiders whether the password is less than 15 characters, but less than 15 isn't all that noteworthy, most passwords are less than 15. If you want to close the DoS possibility, just use a password 15 characters or longer. 2) begin = strRequest.end(); -- if it's a single request with multiple invocations, I throw away the rest if one has a bad password. This is so you can't stuff it with millions of password attempts in one packet. What do you think, is this the right thing to do? (multiple invocation is probably almost never used anyway) I also fixed the two duplicated commands listed in the help: getaddressesbylabel <pw> <label> getbalance <pw> getblockcount <pw> getblocknumber <pw> getconnectioncount <pw> getdifficulty <pw> getgenerate <pw> getinfo <pw> getlabel <pw> <bitcoinaddress> getnewaddress <pw> [label] getreceivedbyaddress <pw> <bitcoinaddress> [minconf=1] getreceivedbylabel <pw> <label> [minconf=1] help <pw> listreceivedbyaddress <pw> [minconf=1] [includeempty=false] listreceivedbylabel <pw> [minconf=1] [includeempty=false] sendtoaddress <pw> <bitcoinaddress> <amount> [comment] [comment-to] setgenerate <pw> <generate> [genproclimit] setlabel <pw> <bitcoinaddress> <label> stop <pw> ##### BitcoinTalk #### Re: MSVC build & SHA-256 ##### _2010-07-18 21:24:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=453.msg4068#msg4068) OpenSSL doesn't have any interface for doing just the low level raw block hash part of SHA256. SHA256 begins by wrapping your data in a specially formatted buffer. Setting up the buffer takes an order of magnitude longer than the actual hashing if you're only hashing one or two blocks like we do. It's intended that the time is amortised if you were hashing many KB or MB of data. In BitcoinMiner, we format the buffer once and keep reusing it. If you can find SHA256 code that's faster (with MinGW/GCC) than what we've got, that would be really great! (although, keep licensing in mind) The one we have is the only one I tried, so there's significant chance for improvement. When I wrote it more than 2 years ago, there were screaming hot SHA1 implementations but minimal attention to SHA256. That's a lot of time for them to come up with better stuff. SHA256 was a lot slower than the fastest SHA1 at the time than I thought it should be. Obviously SHA256 should be slower than SHA1 by a certain amount, but not by as much as I saw. (hope you don't mind I renamed your thread, SHA-256 optimisation is something important that I keep forgetting about) ##### BitcoinTalk #### Re: Nenolod, the guy that wants to prove Bitcoin doesn't work. ##### _2010-07-18 21:56:18 UTC_ - [-](https://bitcointalk.org/index.php?topic=431.msg4073#msg4073) Typically, over 25,000 BTC. ##### BitcoinTalk #### Re: Did block generation crawl to a halt? ##### _2010-07-18 23:35:27 UTC_ - [-](https://bitcointalk.org/index.php?topic=441.msg4095#msg4095) Nice graph! A moving average to smooth it out would be nice. [http://nullvoid.org/bitcoin/statistix.php](http://nullvoid.org/bitcoin/statistix.php) says 212 blocks in the last 24 hours, or 8.8 per hour. ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-19 04:43:13 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg4169#msg4169) Right, that is quite a bit better. Can you give me any examples of other stuff that does it that way? (and what the command line looks like) The main change you're talking about here is instead of -rpcpw= when you start bitcoind, you'd use a switch that specifies a text file to go and read it from, right? (any ideas what I should name the switch?) ##### BitcoinTalk #### Warning: don't use -server or bitcoind where you web browse (v0.3.2 and lower) ##### _2010-07-19 16:01:38 UTC_ - [-](https://bitcointalk.org/index.php?topic=479.msg4263#msg4263) Don't use the -server or -daemon switch or run bitcoind on a machine where you use a web browser. It opens port 8332 on 127.0.0.1, the local loopback address, and you wouldn't think that web browsers could cross-site access it, but it is possible. We're working on a release soon that puts a password on the JSON-RPC interface, but until then, avoid using the -server switch, and don't web browse on the same machine where bitcoind is running. Update: The JSON-RPC HTTP authentication feature in 0.3.3 solves this problem. ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-19 16:20:50 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg4268#msg4268) So you drop a settings file in the ~/.bitcoin directory, that sounds better. In the "no password is set" warning, it could tell you where the file is and what to do. What is the most popular and common settings file format? HTTP basic authentication should be considered. In actual practice though, it's more work for web developers to figure out how to specify the password through some extra parameter in the HTTP or JSON-RPC wrapper than to just stick an extra parameter at the beginning of the parameter list. What do you think? Does HTTP basic authentication get us any additional benefits? Moving it off the parameter list but then you still have to specific it in a more esoteric place I'm not sure is a net win. [_**Quote from: gavinandresen on July 19, 2010, 12:02:39 PM**_](https://bitcointalk.org/index.php?topic=461.msg4215#msg4215) _I was confused for a bit because the password is given LAST on the command line, but FIRST in the JSON-RPC params list. I agree that reading the command-line password from a file would be more convenient and more secure._ You're also confusing me, what do you mean? Did I do something unintended? ##### BitcoinTalk #### Re: They want to delete the Wikipedia article ##### _2010-07-20 18:38:28 UTC_ - [-](https://bitcointalk.org/index.php?topic=342.msg4508#msg4508) Bitcoin is an implementation of Wei Dai's b-money proposal [http://weidai.com/bmoney.txt](http://weidai.com/bmoney.txt) on Cypherpunks [http://en.wikipedia.org/wiki/Cypherpunks](http://en.wikipedia.org/wiki/Cypherpunks) in 1998 and Nick Szabo's Bitgold proposal [http://unenumerated.blogspot.com/2005/12/bit-gold.html](http://unenumerated.blogspot.com/2005/12/bit-gold.html)The timing is strange, just as we are getting a rapid increase in 3rd party coverage after getting slashdotted. I hope there's not a big hurry to wrap the discussion and decide. How long does Wikipedia typically leave a question like that open for comment? It would help to condense the article and make it less promotional sounding as soon as possible. Just letting people know what it is, where it fits into the electronic money space, not trying to convince them that it's good. They probably want something that just generally identifies what it is, not tries to explain all about how it works. If you post in [http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Bitcoin](http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Bitcoin)please don't say "yeah, but bitcoin is really important and special so the rules shouldn't apply" or argue that the rule is dumb or unfair. That only makes it worse. Try to address how the rule is satisfied. Search "bitcoin" on google and see if you can find more big references in addition to the infoworld and slashdot ones. There may be very recent stuff being written by reporters who heard about it from the slashdot article. I hope it doesn't get deleted. If it does, it'll be hard to overcome the presumption. Institutional momentum is to stick with the last decision. (edit: or at least I assume so, that's how the world usually works, but maybe Wiki is different) ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-21 00:05:20 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg4577#msg4577) Still need to know what's the most typical settings file format on Linux. Is there a standard file extension? I've never seen a settings file using JSON, and it doesn't look very human friendly with everything required to be in quotes. I think what I usually see is like: # comment setting=value Is there a settings file thing in Boost? When you're using bitcoind to issue commands from the command line as a client, can we have it get the password from the settings file then too? Gavin pointed out I forgot to increment the column of numbers in CommandLineRPC, so the current -rpcpw= implementation doesn't work right from the command line with non-string parameters. (JSON-RPC is fine) Still under construction. ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-21 05:51:34 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg4646#msg4646) I was researching config file formats, here's a comparison. YAML is massive. I'm not sure there's a lightweight easy to build library we can integrate into our project. Seems overkill. JSON is tempting and I'm inclined to like it, but two main sticking points: 1) No comments! How can you have a config file where you can't comment out a line to disable it? 2) Not very user friendly to have to "quote" all the strings, including the keys, and also have to remember the comma at the end of lines. { "key" : "value", } I suppose we could easily preprocess JSON reading the config file one line at a time, truncate the lines at any # character (and/or "//"?), concatenate them into a string and pass it to JSON, so you could go: # comment "key" : "value", # still have to remember the comma "key2" : "value", // comment like this or both Boost has boost::program_options. We could read lines ourselves and feed them into a map<string, string> mapConfig. while (!eof) read line if '#' found, truncate line split line at first ':' -> key, value mapConfig.insert(key, value) If we use the syntax: # comment key : value ...and don't allow whitespace indenting before the keys, I guess we would be a subset of YAML and could switch to YAML someday if we need more complexity. If we go with self parsed, that doesn't mean we can't use JSON on particular parameter values as needed. If an option needs a list or more structured data, it could always parse its value as json: key : ["item1", "item2", "item3"] Although it has to be all on one line then. I guess I'm leaning towards self parsed mapConfig: # comment key : value ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-21 16:07:57 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg4758#msg4758) [_**Quote from: gavinandresen on July 21, 2010, 12:11:10 PM**_](https://bitcointalk.org/index.php?topic=461.msg4709#msg4709) _I just did a quick survey of 20 .conf files in /etc on my debian system, and found: 1 file used "key value" 5 used "key=value"_ Thanks for that survey! I find "key value" a little unnatural. There ought to be a more definite separator between key and value that suggests assignment. The space people may just be getting lazy using their language's split function. key=some full sentence with spaces in it. # seems more clear key some full sentence with spaces in it. # than this Allright then, lets go with self-parsed mapConfig, syntax: # comment key=value file extension .conf. What's the filename, is it ~/.bitcoin/settings.conf or ~/.bitcoin/bitcoin.conf or what? I think we better strip whitespace at the beginning and end of the key and the value. # user who likes column formatted k = value key = value longerkey = this sentence would be this # "this sentence would be this" key = value # guess this is ok too nextkey = value right = justified The normal syntax should be "key=value", but you can't blame people for the occasional "key = value". ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-21 17:31:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg4775#msg4775) boost::program_options has the same "key=value" format. Gavin pointed out we can use it in a simple way as a parser without getting into all the esoteric c++ syntax like typed value extraction. We can use more features if we want later. Lets go ahead with HTTP basic authentication instead of password as a parameter. **Martii Malmi (AKA Sirius) “COPA trial” email #213** **Date: Wed, 21 Jul 2010 23:28:33 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Donation** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _> Good news: I received the donation of $3600. At least the hosting costs_ _> are no problem anymore._ That's great! I'll let him know it was received and thank him. It might be a long time before we get another donation like that, we should save a lot of it. Spend what you need on hosting. Email me a simple accounting when you take out money for expenses, like: -$60 rackspace monthly $2540 balance _> What do you think of the idea to offer rewards of $100-200 to the first_ _> 5-10 established companies that start accepting Bitcoin? We'd also_ _> assign them a dedicated support person to help with integration. I have_ _> companies like prq.se, ipredator.se, relakks.com or perfect-privacy.com_ _> in mind. We could also make the offer public._ $100-200 is chump change if they're a serious company, it would only make us sound small. What they need most is confidence they can convert it to fiat currency. That VOIP company essentially said so in a recent post. The best thing we can do is make sure there's cash available to cash out and support and steady the conversion rate. The money is leveraged better that way too. Theoretically, imagine 10 businesses have their eye on a $100 bill being offered for bitcoins, but don't actually cash out because they know it's there if they need it. That one $100 bill allowed 10 different people to act like their 5000 bitcoins were equivalent to $100. I think we should allocate $1000 at this point to your exchange. ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-22 02:34:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg4928#msg4928) [_**Quote from: gavinandresen on July 22, 2010, 01:11:26 AM**_](https://bitcointalk.org/index.php?topic=461.msg4908#msg4908) _TODO: dialog box or debug.log warning if no rpc.user/rpc.password is set, explaining how to set._ In many of the contexts of this RPC stuff, you can print to the console with fprintf(stdout, like this: #if defined(__WXMSW__) && wxUSE_GUI MyMessageBox("Warning: rpc password is blank, use -rpcpw=<password> ", "Bitcoin", wxOK | wxICON_EXCLAMATION); #else fprintf(stdout, "Warning: rpc password is blank, use -rpcpw=<password> "); #endif **Martii Malmi (AKA Sirius) “COPA trial” email #215** **Date: Fri, 23 Jul 2010 16:59:42 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Donation** **To: mmalmi@cc.hut.fi** _>> I think we should allocate $1000 at this point to your exchange._ _>_ _> Alright, I'll add $1000 dollars to the exchange reserves. That way I can_ _> offer more stable pricing._ _>_ _> A week ago somebody bought coins with 1000 €. That was probably meant as_ _> a donation to some extent, since 1000 € would have bought him a lot more_ _> coins at bitcoinmarket.com than at my service._ Interesting, so how is the balance between purchases of coins and cash going? Btw, are you able to use my builds of bitcoind on your host, or do you have to build it yourself? ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-23 17:07:40 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg5337#msg5337) [_**Quote from: gavinandresen on July 23, 2010, 03:11:45 PM**_](https://bitcointalk.org/index.php?topic=461.msg5296#msg5296) _Question for everybody: should I add a section to the wiki page describing, in detail, how to do HTTP Basic authentication? PHP and Python make is really easy-- just use the_ [_http://user:pass@host:port/_](http://user:pass@host:port/) _URL syntax._ Yes, I think that would be really good so each dev doesn't have to figure it out themselves. We need a simple example for each of Python, PHP and Java importing the json-rpc library and using it to do a getinfo or something, including doing the http authentication part. ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-23 17:14:31 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg5338#msg5338) Gavin's changes look good. I think everything is complete. Here's a test build, please test it! [http://www.bitcoin.org/download/bitcoin-0.3.2.5-win32.zip](http://www.bitcoin.org/download/bitcoin-0.3.2.5-win32.zip) [http://www.bitcoin.org/download/bitcoin-0.3.2.5-linux.tar.gz](http://www.bitcoin.org/download/bitcoin-0.3.2.5-linux.tar.gz) ##### BitcoinTalk #### Re: bitcoind not responding to RPC ##### _2010-07-23 17:23:47 UTC_ - [-](https://bitcointalk.org/index.php?topic=548.msg5339#msg5339) If I recall correctly, 500 is the prescribed status code for JSON-RPC error responses. There is still a JSON response in the body of the reply telling the explanation of the error, which could be something like {"result":"","error":"bitcoin address not found","id":"1"}. ##### BitcoinTalk #### Faster initial block download (5x faster) ##### _2010-07-23 18:24:56 UTC_ - [-](https://bitcointalk.org/index.php?topic=550.msg5349#msg5349) By making some adjustments to the database settings, I was able to make the initial block download about 5 times faster. It downloads in about 30 minutes. The database default had it writing each block to disk synchronously, which is not necessary. I changed the settings to let it cache the changes in memory and write them out in a batch. Blocks are still written transactionally, so either the complete change occurs or none of it does, in either case the data is left in a valid state. I only enabled this change during the initial block download. When you come within 2000 blocks of the latest block, these changes turn off and it slows down to the old way. I built a test build if you'd like to start using it: [http://www.bitcoin.org/download/bitcoin-0.3.2.5-win32.zip](http://www.bitcoin.org/download/bitcoin-0.3.2.5-win32.zip) [http://www.bitcoin.org/download/bitcoin-0.3.2.5-linux.tar.gz](http://www.bitcoin.org/download/bitcoin-0.3.2.5-linux.tar.gz) These binaries also include Gavin Andresen's JSON-RPC HTTP authentication feature and the other important security improvements from 0.3.2. I've been running a test over the last 24 hours that kills and restarts it randomly every 2-60 seconds (poor thing) while it's trying to do an initial block download and it's been fine. There are no changes to the way it handles wallet.dat. This change is only for blk*.dat and the non-critical addr.dat. You can always delete blk*.dat if it gets screwed up and let it re-download. ##### BitcoinTalk #### Re: Faster initial block download ##### _2010-07-23 20:13:27 UTC_ - [-](https://bitcointalk.org/index.php?topic=550.msg5378#msg5378) [_**Quote from: knightmb on July 23, 2010, 07:32:58 PM**_](https://bitcointalk.org/index.php?topic=550.msg5369#msg5369) _Is there a safety reason to stop within the last 2000 blocks or can it be tweaked to stop at remaining 500 blocks for example?_ Not really. I'll change it to 1000 next time. ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-23 20:39:03 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg5383#msg5383) I don't think authentication should be disabled by default if there's no conf file or the config file doesn't contain "rpcpassword", but what if it contains "rpcpassword="? I can see both points. What if the programmer can't figure out how to do HTTP authentication in their language (Fortran or whatever) or it's not even supported by their JSON-RPC library? Should they be able to explicitly disable the password requirement? OTOH, what if there's a template conf file, with rpcpassword= # fill in a password here There are many systems that don't allow you to log in without a password. This forum, for instance. Gavin's point seems stronger. BTW, I haven't tested it, but I hope having rpcpassword= in the conf file is valid. It's only if you use -server or -daemon or bitcoind that it should fail with a warning. If it doesn't need the password, it should be fine. Is that right? ##### BitcoinTalk #### Re: JSON-RPC Multiple Invocations ##### _2010-07-24 00:59:08 UTC_ - [-](https://bitcointalk.org/index.php?topic=528.msg5416#msg5416) Obviously it's a bug that it repeats the header. I was trying to follow the 1.0 spec: [http://json-rpc.org/wiki/specification](http://json-rpc.org/wiki/specification) It called for multiple invocation. I think they mean it's like this, but I'm not sure: Post: {"method": "postMessage", "params": ["Hello all!"], "id": 99} {"method": "postMessage", "params": ["I have a question:"], "id": 101} Reply: {"result": 1, "error": null, "id": 99} {"result": 1, "error": null, "id": 101} I can't remember where I think I saw that it's supposed to send back HTTP status 500 for an error reply. If it contains multiple responses and one is an error, I wonder if that makes the status 500 for the whole thing, I guess so. Maybe it should always return 200. I think someone sounded like the 500 might be causing a problem. This probably gets fixed after 0.3.3. Until then, just use single invocation. I wonder if any JSON-RPC package even supports multiple invocation, probably not. It would be nice if we could pin down better how multiple-invocation is supposed to work, if at all, before trying to fix it, and whether returning HTTP status 500 for error response is right. **Martii Malmi (AKA Sirius) “COPA trial” email #217** **Date: Sat, 24 Jul 2010 15:38:53 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Donation** **To: mmalmi@cc.hut.fi** _> A week ago somebody bought coins with 1000 €. That was probably meant as_ _> a donation to some extent, since 1000 € would have bought him a lot more_ _> coins at bitcoinmarket.com than at my service._ They probably couldn't have gotten that large of a trade on bitcoinmarket.com. ##### BitcoinTalk #### Re: bitcoind not responding to RPC ##### _2010-07-24 01:15:58 UTC_ - [-](https://bitcointalk.org/index.php?topic=548.msg5419#msg5419) Can anyone confirm if JSON-RPC over HTTP is supposed to use status 500 if the reply is an error reply? I can't remember where I picked that up, maybe it's wrong. It seems like 200 would make more sense unless there's something wrong with the mechanics of the HTTP request itself. (and maybe that's what it said and I forgot and spread 500 to all error responses) ##### BitcoinTalk #### Re: Warning: don't use -server or bitcoind on a machine where you web browse ##### _2010-07-24 02:29:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=479.msg5432#msg5432) The JSON-RPC HTTP authentication feature in 0.3.3 solves this problem. ##### BitcoinTalk #### Version 0.3.2.5 -- please test! ##### _2010-07-24 03:32:52 UTC_ - [-](https://bitcointalk.org/index.php?topic=556.msg5443#msg5443) Please test 0.3.2.5 in preparation for the 0.3.3 release! This build is looking good and should be the one that goes into 0.3.3. I encourage you to go ahead and upgrade now if you're on Windows or Linux. New features: - Gavin Andresen's HTTP authentication to secure JSON-RPC - 5x faster initial block download, under 30 minutes Download here: [http://www.bitcoin.org/download/bitcoin-0.3.2.5-win32.zip](http://www.bitcoin.org/download/bitcoin-0.3.2.5-win32.zip) [http://www.bitcoin.org/download/bitcoin-0.3.2.5-linux.tar.gz](http://www.bitcoin.org/download/bitcoin-0.3.2.5-linux.tar.gz) Thanks! ##### BitcoinTalk #### Re: Reading/Writing Blocks and FLATDATA ##### _2010-07-24 04:04:20 UTC_ - [-](https://bitcointalk.org/index.php?topic=555.msg5450#msg5450) FLATDATA was a workaround to serialize a fixed field length array. There was a cleaner way to make it understand how to serialize arrays directly, but MSVC6 couldn't do it and I wanted to keep compatibility with MSVC6 at that time. We don't support MSVC6 anymore because we use something in Boost that doesn't. We lost support for it after 0.2.0. Maybe someday I'll swap in the clean way that just knows how to serialize fixed length arrays without wrapping them in FLATDATA. ##### BitcoinTalk #### Re: a simple traffic load test run ##### _2010-07-25 14:46:33 UTC_ - [-](https://bitcointalk.org/index.php?topic=567.msg5694#msg5694) Was that on the test network? [http://BitcoinTalk.org/index.php?topic=363.0](http://bitcointalk.org/index.php?topic=363.0) ##### BitcoinTalk #### Re: a simple traffic load test run ##### _2010-07-25 15:29:52 UTC_ - [-](https://bitcointalk.org/index.php?topic=567.msg5698#msg5698) Please do these tests on the test network. That's what it's for. Thanks. ##### BitcoinTalk #### Bitcoin 0.3.3 released -- PLEASE UPGRADE ##### _2010-07-25 16:55:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=570.msg5707#msg5707) Please upgrade to 0.3.3! Important security improvements were made in 0.3.2 and 0.3.3. New features: - Gavin Andresen's HTTP authentication to secure JSON-RPC - 5x faster initial block download, under 30 minutes ##### BitcoinTalk #### Re: Stealing Coins ##### _2010-07-25 17:45:22 UTC_ - [-](https://bitcointalk.org/index.php?topic=571.msg5712#msg5712) It's best if you tell it to me privately so it can be fixed first. I just e-mailed you my e-mail address. (or you could PM me here) ##### BitcoinTalk #### Re: Stealing Coins ##### _2010-07-25 19:06:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=571.msg5724#msg5724) Red, thanks for telling me privately first! Please go ahead and post it (and relieve the suspense for everyone!) His point is that transactions paid to a Bitcoin Address are only as secure as the hash function. To make Bitcoin Addresses short, they are a hash of the public key, not the public key itself. An attacker would only have to break the hash function, not ECDSA. ##### BitcoinTalk #### Re: Stealing Coins ##### _2010-07-25 20:01:40 UTC_ - [-](https://bitcointalk.org/index.php?topic=571.msg5740#msg5740) [_**Quote from: knightmb on July 25, 2010, 07:44:02 PM**_](https://bitcointalk.org/index.php?topic=571.msg5736#msg5736) _If I figure out that Public Key 123456 generates Hash ABCD and Public Key 654321 also generates Hash ABCD __I'm still left without the Private Key.__ But from what you are saying, all I need is Public Key 654321 and I can spend coin pretending to be Public Key 123456._ You would still have to sign it with public key 654321. You need to find a collision using a public key for which you know the private key. When you claim a Bitcoin Address transaction, you give your public key that matches the hash, then you must sign it with that key. Red's point is that it's easy to quickly generate insecure public keys which you could break and find the private key after you find a collision. He points out that if the public key was required to be a secure one, one which must have required significant work to find the prime numbers, that would increase the strength above that of the hash function alone. Someone trying to brute force would have to take time generating a key for each attempt. ##### BitcoinTalk #### Re: Stealing Coins ##### _2010-07-25 20:48:01 UTC_ - [-](https://bitcointalk.org/index.php?topic=571.msg5754#msg5754) _**Quote**_ _Here is a paper that claims to find SHA-1 collisions in 2^52 crypto operations. And optimally secure hash would take 2^80 operations. 2^52 time is still large, but it is getting into cluster and botnet range._ 2^80 is if you can use a birthday attack. You can't use a birthday attack for this, so the difficulty is the full 2^160 bits. Although, if you were trying to crack any one of 1 million (2^20) transactions, you could do a partial birthday attack 2^160/2^20 = 2^140. Bitcoin Addresses are the only place where 160-bit hash is used. Everything else is SHA-256. They're calculated as: bitcoinaddress = RIPEMD-160(SHA-256(publickey)) Correct me if I'm wrong (please, and I'll gladly eat crow) but I think it would be hard to use an analytical attack on RIPEMD-160 in this case. An analytical attack prescribes a certain range or pattern of inputs to try that will greatly increase your chance of finding a collision. Here, you don't have that kind of control over RIPEMD-160's input, because the input is the output of SHA-256. If an analytical attack helps you find an input to RIPEMD-160 that produces a collision, what are you going to do with it? You still have to get SHA-256 to output that value, so you would still have to break SHA-256 too. For brute force, RIPEMD-160(SHA-256(x)) is no stronger than RIPEMD-160 alone. But for analytical attack, it seems like you must analytical attack both RIPEMD-160 and SHA-256. If I'm wrong, then the strength is the same as RIPEMD-160 and the SHA-256 only serves as one round of key strengthening. ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-25 21:34:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg5767#msg5767) [_**Quote from: lachesis on July 25, 2010, 07:52:35 PM**_](https://bitcointalk.org/index.php?topic=461.msg5738#msg5738) _I found what appears to be a bug: with a long enough username and password combination, the base64 encoder in bitcoind produces authorization headers that look like this:_ _**Code:**_ _... Authorization: Basic YWJiYWJiYWFiYmE6aGVsbG93b3JsZGhlbGxvd29ybGRoZWxsb3dvcmxkaGVsbG93 b3JsZGhlbGxvd29ybGRoZWxsb3dvcmxk_ _It inserts a newline every 64 characters, which obviously breaks the Authorization header, so commands like "bitcoin getinfo" fail. The server still works fine with properly behaving clients. This can be solved by removing the newlines (and maybe ' 's) from result at the end of the Base64Encode function:_ _**Code:**_ _result.erase(std::remove(result.begin(), result.end(), ' '), result.end()); result.erase(std::remove(result.begin(), result.end(), ' '), result.end());_ +1 to you for having such a long password that you found this bug. Uploaded to SVN as rev 110. ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-25 21:44:16 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg5769#msg5769) [_**Quote from: BitLex on July 25, 2010, 08:45:38 PM**_](https://bitcointalk.org/index.php?topic=461.msg5753#msg5753) _i got some problems here too trying to get this run on PHP. so far i had no luck, neither the wiki-sample (jsonRPCClient trying to fopen(_[_http://username:password@localhost:8332/_](http://username:password@localhost:8332/)_)), nor my curl-sample (using setopt CURLOPT_HTTPAUTH, CURLAUTH_BASIC) seem to work._ That's strange, didn't someone just say that was supposed to work? (what library was he using?) Post if you figure out what wrong. I hope it's not going to put up this much of a fight for all PHP users. Looks like we've got the Fortran scenario already. ##### BitcoinTalk #### Re: JSON-RPC password ##### _2010-07-25 21:51:31 UTC_ - [-](https://bitcointalk.org/index.php?topic=461.msg5771#msg5771) [_**Quote from: gavinandresen on July 25, 2010, 09:38:19 PM**_](https://bitcointalk.org/index.php?topic=461.msg5768#msg5768) _Great catch! Simpler fix is to specify the BIO_FLAGS_BASE64_NO_NL in the rpc.cpp/EncodeBase64 function_ SVN rev 111 ##### BitcoinTalk #### Re: md5? ##### _2010-07-25 22:06:57 UTC_ - [-](https://bitcointalk.org/index.php?topic=458.msg5772#msg5772) For future reference, here's my public key. It's the same one that's been there since the bitcoin.org site first went up in 2008. Grab it now in case you need it later. [http://www.bitcoin.org/Satoshi_Nakamoto.asc](http://www.bitcoin.org/Satoshi_Nakamoto.asc) ##### BitcoinTalk #### Re: Stealing Coins ##### _2010-07-25 22:27:36 UTC_ - [-](https://bitcointalk.org/index.php?topic=571.msg5778#msg5778) Sorry, actually it's ECDSA (Elliptic Curve Digital Signature Algorithm) not RSA. I shouldn't have said "prime numbers". ECDSA doesn't take much time to generate a keypair. ##### BitcoinTalk #### bitcoind without wxWidgets ##### _2010-07-26 17:23:33 UTC_ - [-](https://bitcointalk.org/index.php?topic=576.msg5904#msg5904) I replaced the last of the few wxBase dependencies in bitcoind. bitcoind now compiles without wxWidgets or wxBase in SVN rev 112. main(int argc, char* argv[]) is added to init.cpp. CMyApp and the Startup folder stuff are moved to ui.cpp. ui.cpp and uibase.cpp aren't linked by bitcoind. The makefiles have -DGUI to control whether the GUI is used. I test compiled MinGW, VC and Ubuntu. I don't know if I broke the Mac OSX build, someone will need to check that. ##### BitcoinTalk #### Re: Bitcoin x64 for Windows ##### _2010-07-26 18:41:31 UTC_ - [-](https://bitcointalk.org/index.php?topic=501.msg5920#msg5920) [_**Quote from: Olipro on July 26, 2010, 06:39:17 AM**_](https://bitcointalk.org/index.php?topic=501.msg5815#msg5815) _Credit to tcatm for the caching part of the SHA context - this offers absolutely brilliant performance. Additionally, the Intel compiler really comes into its own here as its parallelisation abilities give a massive performance boost over Visual Studio. Performance: 4700khash/s on 4 cores, I think that speaks for itself. I've included both the VS and Intel build, but there's really no comparison, the Intel build craps all over VS._ Is that still starting from Crypto++? Lets get this into the main sourcecode. **Martii Malmi (AKA Sirius) “COPA trial” email #218** **Date: Mon, 26 Jul 2010 19:22:08 +0100** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11'** **To: mmalmi@cc.hut.fi** _>> Btw, are you able to use my builds of bitcoind on your host, or do you_ _>> have to build it yourself?_ _>_ _> I had to build it myself. It had the same problem that has been reported_ _> on the forums: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found._ Wish I could figure out how to fix that. What version of GLIBCXX does your system have? Make sure you upgrade to Bitcoin 0.3.3 as soon as possible. ----

Kicking the Hornet's Nest - part 11

# Kicking the Hornet's Nest - third edition - part 11 All links, digital (pdf, txt, docx, md) and book in print, can be found at https://hive.blog/@crrdlx/satoshi Edited by [crrdlx](nostr:nprofile1qyv8wumn8ghj7mn0wdj8y6tkv5hxzurs9aex2mrp0yq3wamnwvaz7tmjv4kxz7fwwpexjmtpdshxuet59uqzqqzmcn0yrn7ttq8hrjkk46ysn2tk26rr8f8k4y7xkl74hlh3rcdzm9d3t8), npub: ``` npub1qpdufhjpel94srm3ett2azgf49m9dp3n5nm2j0rt0l2mlmc3ux3qza082j ``` ---- ### Kicking the Hornet's Nest pages 225 - 250 ---- **BitcoinTalk** Re: Simple to implement feature requests _2010-02-08 16:37:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=46.msg284#msg284) There are command line options: bitcoin -addnode=1.2.3.4 to tell bitcoin about a node to connect to bitcoin -connect=1.2.3.4 connect only to the specified node(s) You can use more than one of these, for instance bitcoin -connect=(first to try) -connect=(next to try) ... You can specify non-routable IPs with -connect like 192.168.x.x, so if you had a server farm and you wanted one server to connect to the world and the rest to connect to the one server, you could do that. In particular, -addnode is needed if you're always going to connect through TOR, since the IRC server blocks all the TOR exit nodes. To connect through TOR, you could use: bitcoin -proxy=127.0.0.1:9050 -addnode=212.159.72.216 **Martii Malmi (AKA Sirius) “COPA trial” email #158** **Date: Thu, 11 Feb 2010 22:58:29 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Translation** **To: mmalmi@cc.hut.fi** I didn't make any changes to Drupal code. The only thing other than installing themes was the .htaccess file (which really is needed, it didn't work in the global config file). It was only SMF where I made some PHP changes. You might find it preferable not to translate it into your own language. Often the standard answer about legalities is that it's only intended for people in other countries. Translating it into your home language weakens that argument. _mmalmi@cc.hut.fi wrote:_ _> I got the translations working correctly, now it should automatically_ _> detect the language from the browser settings. Choosing manually is of_ _> course also possible. I asked the translators to send me their_ _> translations as pm or e-mail. I guess I'll make a Finnish translation_ _> myself at some point. Multiple translations add to the site's credibility._ _>_ _> Drupal is asking to do a security update. Do we have other customized_ _> files we need to backup than those located in the "sites" directory?_ _>_ **BitcoinTalk** Re: DEB Package? _2010-02-12 02:33:02 UTC_ - [-](https://bitcointalk.org/index.php?topic=49.msg315#msg315) Are you just trying to run the program or do you really need to compile it? There's a 32-bit linux binary that can be run on 64-bit ubuntu if you "sudo apt-get ia32-libs". [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-linux.tar.gz/download](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-linux.tar.gz/download) I recently updated the SVN for building on 64-bit Karmic with wxWidgets 2.9.0. This was after the 0.2.0 release. The 0.2.0 release did not build on 64-bit yet. Unfortunately there currently isn't a -dev deb package of either of the versions of wxWidgets that we can use. On Karmic they only have the UTF-16 version. We need either the ANSI (libwxgtk2.8-ansi-dev) version or the UTF-8 (wxWidgets 2.9.0) version. We're moving towards 2.9.0. I know you said you didn't want VM, but as a last resort, last I checked the Windows version runs fine in Wine. **BitcoinTalk** Re: Repost: Request: Make this anonymous? _2010-02-12 17:28:32 UTC_ - [-](https://bitcointalk.org/index.php?topic=7.msg324#msg324) True, sending by IP through Tor trades one problem for another. The Tor exit node can see the text of your message and potentially MITM you. Best to only send to bitcoin addresses then. Payments by bitcoin address are broadcast over the network as part of the normal network traffic. All communications with the network are broadcasts of public information. **Martii Malmi (AKA Sirius) “COPA trial” email #160** **Date: Sat, 13 Feb 2010 01:08:42 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: JSON-RPC status** **To: mmalmi@cc.hut.fi** I uploaded my JSON-RPC and command line implementation to SVN. I'm waiting to post on the forum when I've had more time to think about the commands. At least some method names are going to change. To enable the RPC server, add the switch -server. It's not on by default. Client commands are without any switches, as such: bitcoin getblockcount bitcoin getdifficulty bitcoin getnewaddress somelabel bitcoin sendtoaddress 1DvqsbZ... 1.00 bitcoin getallpayments 0 bitcoin stop Applications would normally use JSON-RPC directly, not command line. I haven't tested my JSON-RPC server with anything else yet. If you do, please tell me how it goes. You're using Python, right? Getting the Linux version to run without the GTK installed will be a separate task. mmalmi@cc.hut.fi wrote: > That's great! I'll start familiarizing myself with Liberty Reserve and > its api. > **BitcoinTalk** Re: DEB Package? _2010-02-13 01:38:37 UTC_ - [-](https://bitcointalk.org/index.php?topic=49.msg326#msg326) I couldn't get wxWidgets 2.8.9 to compile on Karmic 64-bit either. I have been compiling the latest SVN on Karmic 64-bit with wxWidgets 2.9.0, which compiles fine on 64-bit. Read build-unix.txt and use the given ../configure parameters on wxWidgets so you can use the makefile.unix.wx2.9 as supplied. (--enable-debug --disable-shared --enable-monolithic) -- fixed The download link on the homepage is to the sourceforge tar.gz archive which contains the 32-bit binary and the 0.2.0 sources, which were not yet buildable on 64-bit at the time. The SVN was first buildable on 64-bit with wx2.9.0 on 28 January 2010. Hopefully they'll have a wxWidgets 2.9.0 debian package someday. **BitcoinTalk** Re: What's with this odd generation? _2010-02-14 06:28:03 UTC_ - [-](https://bitcointalk.org/index.php?topic=48.msg327#msg327) [_**Quote from: theymos on February 12, 2010, 08:31:52 AM**_](https://bitcointalk.org/index.php?topic=48.msg318#msg318) _Does the sending client send more BitCoins to account for the fee (so the recipient gets what he's expecting)?_ Yes. [_**Quote from: SmokeTooMuch on February 12, 2010, 01:11:09 PM**_](https://bitcointalk.org/index.php?topic=48.msg319#msg319) _why do we even need fees ? i thougt the no-fees-feature was one of the advantages of bitcoin ?!_ Almost all transactions are free. A transaction is over the maximum size limit if it has to add up more than 500 of the largest payments you've received to make up the amount. A transaction over the size limit can still be sent if a small fee is added. The average transaction, and anything up to 500 times bigger than average, is free. It's only when you're sending a really huge transaction that the transaction fee ever comes into play, and even then it only works out to something like 0.002% of the amount. It's not money sucked out of the system, it just goes to other nodes. If you're sad about paying the fee, you could always turn the tables and run a node yourself and maybe someday rake in a 0.44 fee yourself. **BitcoinTalk** Re: What's with this odd generation? _2010-02-14 15:52:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=48.msg329#msg329) Right. Otherwise we couldn't have a finite limit of 21 million coins, because there would always need to be some minimum reward for generating. In a few decades when the reward gets too small, the transaction fee will become the main compensation for nodes. I'm sure that in 20 years there will either be very large transaction volume or no volume. **Martii Malmi (AKA Sirius) “COPA trial” email #163** **Date: Sun, 14 Feb 2010 21:48:31 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: JSON-RPC status** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _>> I haven't tested my JSON-RPC server with anything else yet. If you do,_ _>> please tell me how it goes. You're using Python, right?_ _>>_ _>> Getting the Linux version to run without the GTK installed will be a_ _>> separate task._ _>_ _> Yes, using Python. I didn't test the JSON-RPC yet as I don't have_ _> Bitcoin running on the vps yet. It doesn't work without a window manager_ _> even if GTK libraries are installed. I asked about it at wxWidgets forum_ _> (http://wxforum.shadonet.com/viewtopic.php?t=26954) but they didn't have_ _> much clue. Maybe we'll just need to make two different binaries._ I will probably relent and do that. I can move init and shutdown into init.cpp or start.cpp or something, link only wxbase and not link ui.o and uibase.o. wxWidgets is mostly Windows people, they wouldn't know much about GTK. Don't you have an Ubuntu laptop you can test and compile on so you don't have to toy with the vps? **BitcoinTalk** Re: Proof-of-work difficulty increasing _2010-02-15 06:28:38 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg346#msg346) 14/02/2010 0000000065465700000000000000000000000000000000000000000000000000 2009 1.00 30/12/2009 1.18 +18% 11/01/2010 1.31 +11% 25/01/2010 1.34 +2% 04/02/2010 1.82 +36% 14/02/2010 2.53 +39% Another big jump in difficulty yesterday from 1.82 times to 2.53 times, a 39% increase since 10 days ago. It was 10 days apart not 14 because more nodes joined and generated the 2016 blocks in less time. **Martii Malmi (AKA Sirius) “COPA trial” email #165** **Date: Mon, 15 Feb 2010 18:11:53 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: JSON-RPC status** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _>> Don't you have an Ubuntu laptop you can test and compile on so you_ _>> don't have to toy with the vps?_ _>_ _> Yes. Tested with Python's JSON-RPC, and seems to work fine! Really easy_ _> to use._ Hurray, I got it on the first go. Could you send me the Python code you used? So if I do some testing later I don't have to figure it out myself. **BitcoinTalk** Re: Setting up multiple bitcoin machines behind NAT _2010-02-16 01:34:56 UTC_ - [-](https://bitcointalk.org/index.php?topic=54.msg360#msg360) Right now there isn't a port number setting to do that. It's a feature yet to be implemented. You can only set up your NAT to port-forward to one of the computers. (I said something earlier about NAT port translation, but that wouldn't work, other nodes wouldn't know to connect to that port) If you want, as a small optimization, you could run the rest of your computers as: bitcoin -connect=<the IP of the first computer> so they get all their network communication from the first computer and don't all connect over the net individually for the same information. This saves bandwidth, although it doesn't use much bandwidth to begin with, so it wouldn't really matter unless you had tons of computers. For redundancy in case the first computer goes down, you could have two that connect out and the rest connect to both of them. The first two are run normally, the rest are run like: bitcoin -connect=<IP1> -connect=<IP2> **BitcoinTalk** Re: Proof-of-work difficulty increasing _2010-02-17 17:58:03 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg388#msg388) [_**Quote from: Sabunir on February 16, 2010, 08:51:51 AM**_](https://bitcointalk.org/index.php?topic=43.msg372#msg372) _. Perhaps it has to do with my connection's very high latency (2000ms or more on average)_ 2 seconds of latency in both directions should reduce your generation success by less than 1%. [_**Quote from: Sabunir on February 16, 2010, 08:51:51 AM**_](https://bitcointalk.org/index.php?topic=43.msg372#msg372) _and/or my high packet loss (sometimes up to 10% loss)?_ Probably OK, but I'm not sure. The protocol is designed to resync to the next message, and messages get re-requested from all the other nodes you're connected to until received. If you miss a block, it'll also keep requesting it every time another blocks comes in and it sees there's a gap. Before the original release I did a test dropping 1 out of 4 random messages under heavy load until I could run it overnight without any nodes getting stuck. **BitcoinTalk** Re: Bitcoin client and website translation _2010-02-17 19:19:43 UTC_ - [-](https://bitcointalk.org/index.php?topic=47.msg389#msg389) I updated the SVN with changes to support translation. Translatable strings are all enclosed in _(""), and we're using UTF-8 on all platforms. When the program runs, it looks in the directory of the EXE for the file: locale\<langcode>\LC_MESSAGESitcoin.mo <langcode> is the two letter code of the language your OS is set to, like "de" or "nl". On Linux, it also looks for: /usr/share/locale/<langcode>/LC_MESSAGES/bitcoin.mo /usr/local/share/locale/<langcode>/LC_MESSAGES/bitcoin.mo (are there other standard places it should look on linux?) Here's a quick walkthrough using poedit to make a .po and .mo file: - Download the bitcoin sourcecode from SVN - In the trunk directory, mkdir locale\<lang>\LC_MESSAGES - In poedit, File->New catalog->Paths tab - Click the "New item" dotted rectangle button - Put "../../.." and MAKE SURE TO PRESS ENTER to add the path - Click OK - Save the file as "bitcoin.po" in the LC_MESSAGES directory you made - It should then scan the sourcecode and find about 170 strings - If it didn't find anything, check Catalog->Settings->Path tab, make sure the "../../.." was added When you're done translating, commit both bitcoin.po (the editable catalog file) and bitcoin.mo (compiled data used by the program). **BitcoinTalk** Re: Number of connections _2010-02-21 03:43:48 UTC_ - [-](https://bitcointalk.org/index.php?topic=58.msg413#msg413) Nodes stop trying to initiate connections once they have 15. If you can accept incoming connections, then you can get well above that from nodes connecting to you, otherwise you max out at 15. I don't know if there's any reason to have 15 connections. Maybe it should be 10. Since nodes that can only connect out are probably at or near 15 most of the time now, you should level off to an equilibrium. 45 suggests a ratio of 3 out-only nodes to every 1 in-accepting node. The number of connections won't be a good gauge of the size of the network any more. Someone should periodically IRC to the bitcoin channel on chat.freenode.net and count the number of users. That gives you the total count of network nodes (except TOR nodes). Block generation is again running ahead of pace. We're in for another big step up in difficulty at the next adjustment in about 5 days. **BitcoinTalk** Post your static IP _2010-02-21 04:19:53 UTC_ - [-](https://bitcointalk.org/index.php?topic=59.msg414#msg414) It would be nice to have a list of static IPs for new users to send test donations to so they can see how the software works. If you can accept incoming connections and you have a static IP address, post it here! Anything sent to these IPs should be considered a donation. If you do request a round-trip, be sure to include your return bitcoin address or IP in the comment, but please assume it'll be one-way. They won't necessarily be watching for incoming transactions to send back. **BitcoinTalk** Re: Current Bitcoin economic model is unsustainable _2010-02-21 05:44:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=57.msg415#msg415) Excellent analysis, xc. A rational market price for something that is expected to increase in value will already reflect the present value of the expected future increases. In your head, you do a probability estimate balancing the odds that it keeps increasing. In the absence of a market to establish the price, NewLibertyStandard's estimate based on production cost is a good guess and a helpful service (thanks). The price of any commodity tends to gravitate toward the production cost. If the price is below cost, then production slows down. If the price is above cost, profit can be made by generating and selling more. At the same time, the increased production would increase the difficulty, pushing the cost of generating towards the price. In later years, when new coin generation is a small percentage of the existing supply, market price will dictate the cost of production more than the other way around. At the moment, generation effort is rapidly increasing, suggesting people are estimating the present value to be higher than the current cost of production. **BitcoinTalk** UI improvements _2010-02-21 21:48:01 UTC_ - [-](https://bitcointalk.org/index.php?topic=60.msg426#msg426) Uploaded some UI changes to SVN as version 0.2.5. Instead of View->Show Generated, we now have tabs: - All Transactions - Sent/Received - Sent - Received Makes it a lot easier to flip to received and check for payments. Moved the "Your Addresses" book inside the main address book. It was confusing having two address books. I found the "To:" in "From: unknown, To: (one of your bitcoin addresses)" still confusing, so I changed it to "From: unknown, Received with:". The bitcoin address is abbreviated so you can see the label that you set in the Receiving tab of the address book. Fixed a few UI glitches from the upgrade to wxWidgets 2.9.0. I haven't forgotten about you people who want non-UI, but I had to do some fun stuff before more build bashing. **Martii Malmi (AKA Sirius) “COPA trial” email #168** **Date: Mon, 22 Feb 2010 20:17:42 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Non-GUI option** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _> Just a few clues I've found about running the same binary without a GUI:_ _>_ _> 1) GTK supports running a program without display:_ _> http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check._ _> This doesn't tell if it's possible in wxWidgets though._ I see it calls gtk-init-check in wxApp::Initialize. I can subclass Initialize, call the original one while suppressing the error message and ignore the return value. It seems to be working. Any suggestions what to name the command line switches and how to describe them? Is there any traditional standard? I'm currently using: -daemon (or -d) (Enables RPC and runs in the background) -server (Enables RPC) **BitcoinTalk** Re: generation slowed down dramatically _2010-02-23 00:49:56 UTC_ - [-](https://bitcointalk.org/index.php?topic=61.msg433#msg433) Just a random streak of bad luck. It looks steady to me. Competition doesn't have an effect until the next automatic retarget adjustment, and we haven't reached the next one yet. The adjustments are every 2016 blocks. To calculate our progress towards the next one, divide the block total by 2016. The fractional part is how far we are to the next one. My back-of-the-envelope projection: 42032 blocks/2016 = 20.85 = 85% of the way. About 1.5 days to go until the next one. That'll only be about 10 days since the last one, the target is 14 days, so 14/10 = 1.4 = around 40% difficulty increase. **BitcoinTalk** Re: UI improvements _2010-02-23 01:16:28 UTC_ - [-](https://bitcointalk.org/index.php?topic=60.msg434#msg434) There are now "Sending" and "Receiving" tabs in the Address Book. Your addresses are referred to as "receiving addresses". madhatter was working on building it on Mac. He had errors probably caused by UTF-16 wxWidgets 2.8. Should have better luck now with 2.9.0. wxWidgets 2.9.0 is UTF-8 and wouldn't have that problem. I think he had it working on FreeBSD, but he wanted a non-UI version. I have the command line and JSON-RPC daemon version working now. Will SVN it in a day or two. I disabled gdm on my Ubuntu system so it boots into command line. I hope I will be able to get it enabled again with rcconf. **Martii Malmi (AKA Sirius) “COPA trial” email #169** **Date: Tue, 23 Feb 2010 01:41:01 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Non-GUI option** **To: Martti Malmi <mmalmi@cc.hut.fi>** _>> Just a few clues I've found about running the same binary without a GUI:_ _>>_ _>> 1) GTK supports running a program without display:_ _>> http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check._ _>> This doesn't tell if it's possible in wxWidgets though._ _>_ _> I see it calls gtk-init-check in wxApp::Initialize._ _>_ _> I can subclass Initialize, call the original one while suppressing the_ _> error message and ignore the return value. It seems to be working._ This is working. A few more things and I'll upload it. We'll need to tell people to install the GTK libraries. Do you remember the apt-get command to install GTK, and can you install it without having a GUI installed? **BitcoinTalk** Re: Bitcoin Address Collisions _2010-02-23 16:26:09 UTC_ - [-](https://bitcointalk.org/index.php?topic=62.msg443#msg443) There's a separate public/private keypair for every bitcoin address. You don't have a single private key that unlocks everything. Bitcoin addresses are a 160-bit hash of the public key, everything else in the system is 256-bit. If there was a collision, the collider could spend any money sent to that address. Just money sent to that address, not the whole wallet. If you were to intentionally try to make a collision, it would currently take 2^126 times longer to generate a colliding bitcoin address than to generate a block. You could have got a lot more money by generating blocks. The random seed is very thorough. On Windows, it uses all the performance monitor data that measures every bit of disk performance, network card metrics, cpu time, paging etc. since your computer started. Linux has a built-in entropy collector. Adding to that, every time you move your mouse inside the Bitcoin window you're generating entropy, and entropy is captured from the timing of disk ops. **BitcoinTalk** Re: UI improvements _2010-02-23 16:53:27 UTC_ - [-](https://bitcointalk.org/index.php?topic=60.msg446#msg446) [_**Quote from: Xunie on February 23, 2010, 12:28:27 PM**_](https://bitcointalk.org/index.php?topic=60.msg439#msg439) _/etc/init.d/gdm start_ _and it will start gdm!_ Ah yes, there we go, back to normal again. The ctrl+alt+F[1-8] thing never worked on this computer. The screen just goes haywire. **BitcoinTalk** Command Line and JSON-RPC _2010-02-23 22:15:41 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg452#msg452) Version 0.2.6 on SVN can now run as a daemon and be controlled by command line or JSON-RPC. On Linux it needs libgtk2.0-0 installed, but does not need a GUI running. Hopefully gtk can be installed without having a windowing system installed. The command to start as a daemon is: bitcoin -daemon [switches...] Or, to run the UI normally and also be able to control it from command line or JSON-RPC, use the "-server" switch. bitcoin -server [switches...] With either switch, it runs an HTTP JSON-RPC server that accepts local socket connections on 127.0.0.1:8332. The port is bound to loopback and can only be accessed from the local machine, but from any account, not just the user it's running under. To control it from the command line, the interface is a command name without any switches, followed by parameters if any. bitcoin <command> [params...] For example: bitcoin getinfo bitcoin getdifficulty bitcoin setgenerate true bitcoin stop It's a simple JSON-RPC client and prints the JSON result. Look at rpc.cpp for the list of commands. Web apps or anything automated will normally use JSON-RPC directly, not command line. There are JSON-RPC libraries for all the major languages. In script languages like PHP and Python the syntax is as natural as calling a local function. **BitcoinTalk** Re: Bitcoin Address Collisions _2010-02-23 22:24:00 UTC_ - [-](https://bitcointalk.org/index.php?topic=62.msg453#msg453) [_**Quote from: NewLibertyStandard on February 23, 2010, 07:04:47 PM**_](https://bitcointalk.org/index.php?topic=62.msg450#msg450) _Are generated bitcoins encrypted with whichever address is currently displayed in the main Bitcoin window?_ No, each generated transaction uses a new, single-use address. Nothing uses the address in the main window, it's just there for convenience for you to copy. 0.2.5 has a "New..." button next to it to make it easy to change each time you use it. **BitcoinTalk** Re: URI-scheme for bitcoin _2010-02-24 05:57:43 UTC_ - [-](https://bitcointalk.org/index.php?topic=55.msg481#msg481) That would be nice at point-of-sale. The cash register displays a QR-code encoding a bitcoin address and amount on a screen and you photo it with your mobile. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-24 06:17:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg482#msg482) [_**Quote from: theymos on February 24, 2010, 03:07:37 AM**_](https://bitcointalk.org/index.php?topic=63.msg467#msg467) [_**Quote from: satoshi on February 23, 2010, 10:15:41 PM**_](https://bitcointalk.org/index.php?topic=63.msg452#msg452) _On Linux it needs libgtk2.0-0 installed_ _Will this requirement be removed sometime? I'd rather not have to deal with GTK._ How much "dealing with" does GTK actually require? Is it just a matter of "sudo apt-get install libgtk2.0-0" and having some extra libraries sitting around? GTK doesn't have to do anything, just be there for bitcoin to link to when it loads up, have the gtk-init-check call fail because no GUI present, then it's done. It saves us butchering everything with ifdefs and a separate compile and binary to use wxBase just to try to avoid linking GTK. **Martii Malmi (AKA Sirius) “COPA trial” email #172** **Date: Wed, 24 Feb 2010 06:34:52 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Non-GUI option** **To: mmalmi@cc.hut.fi** _> I'll give Drupal accounts to the bitcoin.org translators, so they can_ _> keep the translations up to date._ Good, that gives them a little sense of ownership and responsibility. I hope we get at least one .mo file for the software translation in time to put into the 0.3 release. **BitcoinTalk** New icon/logo _2010-02-24 21:24:23 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg504#msg504) New icons, what do you think? Better than the old one? ![](file:///tmp/lu30467eu8.tmp/lu30468gcb_tmp_853438c0cfafdf02.png) ![](file:///tmp/lu30467eu8.tmp/lu30468gcb_tmp_853438c0cfafdf02.png) ![](file:///tmp/lu30467eu8.tmp/lu30468gcb_tmp_853438c0cfafdf02.png) ![](file:///tmp/lu30467eu8.tmp/lu30468gcb_tmp_853438c0cfafdf02.png) Full size 530x529 image for scaling down to custom sizes: [http://www.bitcoin.org/download/bitcoin530.png](http://www.bitcoin.org/download/bitcoin530.png) The perspective shadow was too thick on the larger sizes. I updated 32, 48 and the full size. I release these images into the public domain (copyright-free). I request that derivative works be made public domain. **BitcoinTalk** Re: Make your "we accept Bitcoin" logo _2010-02-24 21:53:52 UTC_ - [-](https://bitcointalk.org/index.php?topic=45.msg507#msg507) If you GPL stuff, I have to avoid using it. Nothing against GPL per-se, but Bitcoin is an MIT license project. Anything GPL please clearly mark it as such. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-24 22:08:55 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg509#msg509) When and how fast did memory usage increase? Right away, slowly over a long time, or starting at some later event? I have -daemon running on ubuntu 9.10 64-bit and memory usage is steady. It has to be something about the difference on the server besides 64-bit. Maybe some malfunction from the lack of GUI. A memory leak debug tool could give a clue. **BitcoinTalk** Re: Proof-of-work difficulty increasing _2010-02-24 22:42:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg510#msg510) The automatic adjustment happened earlier today. 24/02/2010 0000000043b3e500000000000000000000000000000000000000000000000000 24/02/2010 3.78 +49% I updated the first post. **BitcoinTalk** Re: New icon/logo _2010-02-25 01:56:24 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg521#msg521) [_**Quote from: Sabunir on February 25, 2010, 01:47:56 AM**_](https://bitcointalk.org/index.php?topic=64.msg519#msg519) _I like them. Do they come in higher resolutions?_ Yes, the original is 546x531 pixels. It looks good at larger size too, but since the small icons are what you mostly always see, I wanted to judge it on those first. I'll post larger sizes and full size a little later. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-25 22:54:17 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg539#msg539) OK, I made a build target bitcoind that only links wxBase and does not link GTK. Version 0.2.7 on SVN. I split out the init and shutdown stuff from ui.cpp into init.cpp, so now ui.cpp is pure UI. ui.h provides inline stubs if wxUSE_GUI=0. We only have four functions that interface from the node to the UI. In the bitcoind build, we don't link ui.o or uibase.o. [_**Quote from: sirius-m on February 25, 2010, 04:32:17 PM**_](https://bitcointalk.org/index.php?topic=63.msg538#msg538) _It started increasing right away. I'll see if valgrind can help me._ Sure feels like it could be something in wxWidgets retrying endlessly because some UI thing failed or something wasn't inited correctly. Our hack to ignore the initialize failure and run anyway means we're in uncharted territory. We're relying on the fact that we hardly use wx in this mode. We do still use a few things like wxGetTranslation and wxMutex. Another way to debug would be to run in gdb, wait until everything is quiet and all threads should be idle, and break it and see which thread is busily doing something and what it's doing. I suspect bitcoind will probably work fine, but I hope you can still debug the problem. ##### BitcoinTalk Re: Proof-of-work difficulty increasing _2010-02-25 23:06:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg540#msg540) The formula is based on the time it takes to generate 2016 blocks. The difficulty is multiplied by 14/(actual days taken). For instance, this time it took 9.4 days, so the calculation was 14/9.4 = 1.49. Previous difficulty 2.53 * 1.49 = 3.78, a 49% increase. I don't know what you're talking about accepting easier difficulties. **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-26 16:29:21 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg555#msg555) wx/clipbrd.h isn't used, move it inside the #if wxUSE_GUI. Updated headers.h on SVN. Sorry, I linked to wxbase but I had full wxWidgets on my computer. The db.h:140 class Db no member named "exisits" is stranger. pdb->get, pdb->put, pdb->del compiled before that. Do you have version 4.7.25 of Berkeley DB? Db::exists() [http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/frame_main.html](http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/frame_main.html) [http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/dbexists.html](http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/dbexists.html) I suppose they might have added exists recently, using get before that. **BitcoinTalk** Re: New icon/logo _2010-02-26 23:17:19 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg561#msg561) Good suggestion. I made the B slightly lighter and the background slightly darker. Very slightly. The foreground is now exactly the same colour as the BC in the old one. It's kind of OK if you can't easily read the B in the 16x16. At that size, you just need to see that it's a coin. It doesn't matter so much what's embossed on it, just that there be some detail there because it wouldn't look like a coin if it was a blank smooth circle. It's slightly wider than tall because the dark perspective under it goes more to the right than down. I finished and posted the 32x31 and 48x47 versions in the first message. I like the 48 a lot. How does everyone feel about the B symbol with the two lines through the outside? Can we live with that as our logo? **BitcoinTalk** Re: Command Line and JSON-RPC _2010-02-26 23:48:44 UTC_ - [-](https://bitcointalk.org/index.php?topic=63.msg562#msg562) Are you using wxWidgets 2.9.0? I don't recommend using anything other than 2.9.0. It looks like they've got a reference in the wx headers (arrstr.h) to something outside of wxBase. Removing -D__WXDEBUG__ from bitcoin's makefile would probably solve it. If that doesn't work and you just want to get it working, you could edit wxWidgets include/wx/arrstr.h, line 167 and comment out the wxASSERT_MSG. **BitcoinTalk** Re: New icon/logo _2010-02-27 04:28:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg566#msg566) [_**Quote from: Cdecker on February 27, 2010, 03:24:07 AM**_](https://bitcointalk.org/index.php?topic=64.msg565#msg565) _How about an SVG version? That way we could automatically generate smaller and larger versions as needed._ I don't know how to do SVG, but I did the original very large, over 500 pixels across, so it can be scaled down. I'll give the original when I'm finished. I had to custom tweak each icon size so the vertical lines land square on their pixels, otherwise they're ugly blurry and inconsistent. Such is the challenge of making icons. The original will be good for scaling to custom sizes between 48 and 500 but not smaller. **BitcoinTalk** Re: wxWidgets 2.9.0 _2010-02-27 21:22:53 UTC_ - [-](https://bitcointalk.org/index.php?topic=65.msg571#msg571) [_**Quote from: Cdecker on February 27, 2010, 05:09:59 PM**_](https://bitcointalk.org/index.php?topic=65.msg569#msg569) _Looking through the source of 2.8.10 it appears that_ _unicode_ _is possible with that version too._ In the Windows world, "unicode" means UTF-16 (wchar). 2.8 has two build variations, ANSI and UTF-16 (unicode). The UTF-16 version is the "unicode" version provided in the Debian package. I believe 2.8 and its UTF-16 build labelled simply "unicode" has been the source of build problems described in the forum. We were previously using 2.8 ANSI in anticipation of getting to UTF-8 without going through UTF-16 hell. We cannot compile with UTF-16. 2.9 has only one version, UTF-8. On Windows, we set the codepage to UTF-8, so on all platforms our code is UTF-8 and wxWidgets interfaces with us in UTF-8. On Linux I assume the codepage is already UTF-8. By standardizing on 2.9 we avoid the multi-build confusion of 2.8, and we need 2.9 for UTF-8 internationalization. Make sure you read build-unix.txt and configure wxWidgets using the configure parameters given. Curious, why is it incredibly hard to provide wxWidgets 2.9.0? If you mean for users, that's why we static link it. It's unfortunate that we require so many big dependencies, but we need them all. At least on Debian/Ubuntu, all but wxWidgets are available as packages. Eventually they'll provide a 2.9 package. **Martii Malmi (AKA Sirius) “COPA trial” email #174** **Date: Sun, 28 Feb 2010 14:47:01 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoind** **To: mmalmi@cc.hut.fi** I put it at bitcoin.org/download/linux64-0.2.7.1.tar.gz. You can delete it when you've got it. I thought about what might cause the problem you're having and made a change that this build includes. This might have been unsafe code, although it would probably always get lucky. in util.cpp, old: const char* wxGetTranslation(const char* pszEnglish) { // Wrapper of wxGetTranslation returning the same const char* type as was passed in static CCriticalSection cs; CRITICAL_BLOCK(cs) { // Look in cache static map<string, char*> mapCache; map<string, char*>::iterator mi = mapCache.find(pszEnglish); if (mi != mapCache.end()) return (*mi).second; // wxWidgets translation const char* pszTranslated = wxGetTranslation(wxString(pszEnglish, wxConvUTF8)).utf8_str(); // We don't cache unknown strings because caller might be passing in a // dynamic string and we would keep allocating memory for each variation. if (strcmp(pszEnglish, pszTranslated) == 0) return pszEnglish; // Add to cache, memory doesn't need to be freed. We only cache because // we must pass back a pointer to permanently allocated memory. char* pszCached = new char[strlen(pszTranslated)+1]; strcpy(pszCached, pszTranslated); mapCache[pszEnglish] = pszCached; return pszCached; } return NULL; } new: const char* wxGetTranslation(const char* pszEnglish) { // Wrapper of wxGetTranslation returning the same const char* type as was passed in static CCriticalSection cs; CRITICAL_BLOCK(cs) { // Look in cache static map<string, char*> mapCache; map<string, char*>::iterator mi = mapCache.find(pszEnglish); if (mi != mapCache.end()) return (*mi).second; // wxWidgets translation wxString strTranslated = wxGetTranslation(wxString(pszEnglish, wxConvUTF8)); // We don't cache unknown strings because caller might be passing in a // dynamic string and we would keep allocating memory for each variation. if (strcmp(pszEnglish, strTranslated.utf8_str()) == 0) return pszEnglish; // Add to cache, memory doesn't need to be freed. We only cache because // we must pass back a pointer to permanently allocated memory. char* pszCached = new char[strlen(strTranslated.utf8_str())+1]; strcpy(pszCached, strTranslated.utf8_str()); mapCache[pszEnglish] = pszCached; return pszCached; } return NULL; } If you still suspect this code, for testing you could change it to: const char* wxGetTranslation(const char* pszEnglish) { return pszEnglish; } _mmalmi@cc.hut.fi wrote:_ _> I tried debugging my build of bitcoind with ddd debugger, but didn't_ _> have much success yet. It always ends up taking all the system's memory_ _> and finally crashes. Could you please send me again the latest 64 bit_ _> build of bitcoind, so I can see if the problem is about my build?_ _>_ **Martii Malmi (AKA Sirius) “COPA trial” email #175** **Date: Sun, 28 Feb 2010 20:09:07 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoind** **To: mmalmi@cc.hut.fi** Could you send me the debug.log? _mmalmi@cc.hut.fi wrote:_ _> I tried debugging my build of bitcoind with ddd debugger, but didn't_ _> have much success yet. It always ends up taking all the system's memory_ _> and finally crashes. Could you please send me again the latest 64 bit_ _> build of bitcoind, so I can see if the problem is about my build?_ _>_ **BitcoinTalk** Re: New icon/logo _2010-03-02 02:33:05 UTC_ - [-](https://bitcointalk.org/index.php?topic=64.msg588#msg588) We have the standard icon sizes, and the full size scales nicely to anything else. I added the full size to the first post. **Martii Malmi (AKA Sirius) “COPA trial” email #178** **Date: Tue, 02 Mar 2010 22:27:22 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoind** **To: mmalmi@cc.hut.fi** Does it still do it if you didn't do getinfo? You could comment out the CreateThreads listed below, then re-enable them one at a time until it does it again. Then we would know which thread the problem is in. net.cpp, under // Start threads CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL) init.cpp: CreateThread(ThreadRPCServer, NULL); _mmalmi@cc.hut.fi wrote:_ _> Here goes. I forgot to mention the crash error message:_ _>_ _> terminate called after throwing an instance of 'std::bad_alloc'_ _> what(): std::bad_alloc_ _>_ ----

Kicking the Hornet's Nest - part 10

# Kicking the Hornet's Nest - third edition - part 10 All links, digital (pdf, txt, docx, md) and book in print, can be found at https://hive.blog/@crrdlx/satoshi Edited by [crrdlx](nostr:nprofile1qyv8wumn8ghj7mn0wdj8y6tkv5hxzurs9aex2mrp0yq3wamnwvaz7tmjv4kxz7fwwpexjmtpdshxuet59uqzqqzmcn0yrn7ttq8hrjkk46ysn2tk26rr8f8k4y7xkl74hlh3rcdzm9d3t8), npub: ``` npub1qpdufhjpel94srm3ett2azgf49m9dp3n5nm2j0rt0l2mlmc3ux3qza082j ``` ---- ### Kicking the Hornet's Nest pages 200 - 225 ---- **Martii Malmi (AKA Sirius) “COPA trial” email #131** **Date: Wed, 16 Dec 2009 16:54:46 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Planned release announcement text** **To: Martti Malmi <mmalmi@cc.hut.fi>** Here's the planned release announcement text. Probably releasing shortly. Bitcoin version 0.2 is here! Download links: Windows Setup Program Windows Zip File Linux (tested on Ubuntu) New features Martti Malmi - Minimize to system tray option - Autostart on boot option so you can keep it running in the background automatically - New options dialog layout for future expansion - Setup program for Windows - Linux version Satoshi Nakamoto - Multi-processor support for coin generation - Proxy support for use with TOR - Fixed some slowdowns in the initial block download - Various refinements to keep the network running smoothly We also have a new forum at http://www.bitcoin.org/smf/ if you have any questions. Thanks to Martti Malmi (sirius-m) for his coding work and for hosting the new site and forum, and thanks to New Liberty Standard for testing the Linux version. Satoshi Nakamoto **BitcoinTalk** Bitcoin 0.2 released! _2009-12-16 22:45:36 UTC_ - [-](https://bitcointalk.org/index.php?topic=16.msg73#msg73) Bitcoin version 0.2 is here! Download links: [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-win32-setup.exe/download](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-win32-setup.exe/download) [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-win32.zip/download](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-win32.zip/download) [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-linux.tar.gz/download](http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.2.0-linux.tar.gz/download) New Features Martti Malmi - Minimize to system tray option - Autostart on boot option so you can keep it running in the background automatically - New options dialog layout for future expansion - Setup program for Windows - Linux version (tested on Ubuntu) Satoshi Nakamoto - Multi-processor support for coin generation - Proxy support for use with TOR - Fixed some slowdowns in the initial block download Major thanks to Martti Malmi (sirius-m) for all his coding work and for hosting the new site and this forum, and New Liberty Standard for his help with testing the Linux version. **Martii Malmi (AKA Sirius) “COPA trial” email #132** **Date: Thu, 17 Dec 2009 06:49:02 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: [bitcoin-list] Bitcoin 0.2 released** **To: bitcoin-list@lists.sourceforge.net** Bitcoin 0.2 is here! Download (Windows, and now Linux version available) http://sourceforge.net/projects/bitcoin/files/ New Features Martti Malmi - Minimize to system tray option - Autostart on boot option so you can keep it running in the background automatically - New options dialog layout for future expansion - Setup program for Windows - Linux version (tested on Ubuntu) Satoshi Nakamoto - Multi-processor support for coin generation - Proxy support for use with TOR - Fixed some slowdowns in the initial block download We also have a new forum at http://www.bitcoin.org/smf/ Many thanks to Martti (sirius-m) for all his development work, and to New Liberty Standard for his help with testing the Linux version. Satoshi Nakamoto **bitcoin-list** [**bitcoin-list**] Bitcoin 0.2 released _2009-12-17 06:52:09 UTC_ - [-](https://sourceforge.net/p/bitcoin/mailman/message/24205662/) Bitcoin 0.2 is here! Download (Windows, and now Linux version available) http://sourceforge.net/projects/bitcoin/files/ New Features Martti Malmi - Minimize to system tray option - Autostart on boot option so you can keep it running in the background automatically - New options dialog layout for future expansion - Setup program for Windows - Linux version (tested on Ubuntu) Satoshi Nakamoto - Multi-processor support for coin generation - Proxy support for use with TOR - Fixed some slowdowns in the initial block download We also have a new forum at http://www.bitcoin.org/smf/ Many thanks to Martti (sirius-m) for all his development work, and to New Liberty Standard for his help with testing the Linux version. Satoshi Nakamoto **BitcoinTalk** Re: A few suggestions _2009-12-17 18:38:06 UTC_ - [-](https://bitcointalk.org/index.php?topic=12.msg77#msg77) That's good, is it running fine on FreeBSD? I committed the changes to headers.h.\u00a0 For consistency, I used __BSD__.\u00a0 The complete list of defines is at [http://docs.wxwidgets.org/stable/wx_cppconst.html](http://docs.wxwidgets.org/stable/wx_cppconst.html) #ifdef __BSD__ #include <netinet/in.h> #endif malloc.h is only needed on windows, I'll move that into the __WXMSW__ section before it causes any more trouble. **BitcoinTalk** Re: A few suggestions _2009-12-18 17:37:48 UTC_ - [-](https://bitcointalk.org/index.php?topic=12.msg79#msg79) What you can currently do is set "Minimize to the tray" in options, then run it as "bitcoin -min" so it starts minimized. \u00a0The only visible part will be a small (20x20) icon on the tray, which can be doubleclicked if you want to access the UI. \u00a0Note: there's a bug with tray icons sometimes disappearing on 64-bit Karmic Koala, not sure if it's from 64-bit or Karmic, it was fine on 32-bit Jaunty. We didn't have time to implement the "Start Bitcoin on system startup" feature on Linux in time for 0.2 so it's greyed out. \u00a0I figured Linux people wouldn't mind doing that manually anyway. \u00a0I guess they need to know about the -min switch to do it right. You can locate the data directory where you want with the "-datadir=<directory>" switch. \u00a0I know someone is already doing that to put it on a TrueCrypt USB drive. **Martii Malmi (AKA Sirius) “COPA trial” email #134** **Date: Tue, 22 Dec 2009 19:00:41 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoin stuff** **To: mmalmi@cc.hut.fi** Thanks for creating the maintenance account, it would have been impossible to do all that without it. I'm really always going to need it. OK, I changed the password to a 20 character random password. That's a good domain. People rarely type domain names anymore, they use autocomplete or click links on search engines. I need to make a way for you to programmatically get new generated bitcoin addresses. Either that or you could have them send to your IP address, but then you have to rely on them to put the order number in the comment. When generating the new address, there can be an option to add an entry to the address book associated with the address, so the received transaction will be labelled. I kinda hid the labels after early users found them confusing, but it would be very helpful for this application. You have to widen up the comment column to see them. Are you going to manually review and enter orders, at least to begin with? I sure would. I'm thinking I should move the UI in the direction of having the user ask for their bitcoin address when they want one. "give me a bitcoin to receive a payment with". I suppose next to the send button, there would by a receive button, you press it and it says "here's a new address to use, here's the button to copy it to the clipboard, do you want to label it?" and maybe some explanation about why you shouldn't reuse addresses. Or maybe just a "New Address" button next to the address box that you should hit each time to change it. _mmalmi@cc.hut.fi wrote:_ _> I have registered the domain name bitcoinexchange.com and will start_ _> coding the service sometime soon as a nice leisure activity. I'm_ _> envisioning a simple Google-like interface with no registration and only_ _> two texts fields on the front page, where you insert the amount of money_ _> you wish to trade, and either your PayPal address to buy dollars or_ _> bitcoin address to buy bitcoins. On the next page you'll get a new_ _> bitcoin address for sending the coins or a check code for the PayPal_ _> transaction text._ _>_ _> PayPal is good for the beginning - it's simple and has no startup costs,_ _> but later on I might accept credit cards also._ _>_ _> Do you still need the maintenance account? It's ok if you do, but change_ _> the password to something else._ _>_ **Martii Malmi (AKA Sirius) “COPA trial” email #136** **Date: Wed, 23 Dec 2009 17:53:18 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoin stuff** **To: mmalmi@cc.hut.fi** _mmalmi@cc.hut.fi wrote:_ _> I'd also need at least the command line tools to check if coins have_ _> been received and to send coins. It would require some way to_ _> communicate with the Bitcoin process running in the background. I don't_ _> know how that should be done, maybe with something RPC related._ _>_ _> It would also be great if the background process was non-graphical - the_ _> VPS on the current service level doesn't have enough memory to run the X_ _> Windowing environment, unless I come up with some ways to free memory._ I had been wondering why everyone keeps harping on no-UI, when already you can run it with only a small icon on the tray, which is common for server services on Windows. So I guess this is why. I had chalked it up to unix snobbery if they couldn't abide a tiny little icon on a desktop they never see. Not opening any windows is easy, but it may fail because the gtk libraries aren't there. wxWidgets has __WXBASE__ for "Only wxBase, no GUI features". You could try building for that instead of __WXGTK__ and see what happens. It would be preferable if there's any way to do it as a command line switch on the same executable, rather than yet another build variation to release. How much memory do you have to work with? Bitcoin necessarily takes a fair bit of memory; about 75MB on Windows. Is that a problem? Command line control is one of the next things on the list. I want to design the API carefully. Receiving payments is the part that has a lot of design choices to be made. The caller needs to identify the transactions of interest, that's where the one-bitcoin-address-per-transaction model helps. Searching the comments text for an order number is another possibility. There's polled, asking what has been received to the given bitcoin address, and event driven. I guess in event driven, bitcoin would be told to run a command line when a certain amount is received to a certain bitcoin address. **Martii Malmi (AKA Sirius) “COPA trial” email #138** **Date: Fri, 25 Dec 2009 16:11:14 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoin stuff** **To: mmalmi@cc.hut.fi** You're right, I was looking at a test run with 250,000 blocks... duh. A normal one shows 17MB memory usage and 10MB VM size. _mmalmi@cc.hut.fi wrote:_ _>> How much memory do you have to work with?_ _> The VPS has 320MB RAM, 50MB of which is currently free. There's also_ _> 500MB swap space._ _>_ _>> Bitcoin necessarily takes a_ _>> fair bit of memory; about 75MB on Windows. Is that a problem?_ _>_ _> Sure about that? Windows task manager shows about 13MB memory usage here._ _>_ **BitcoinTalk** Re: Is my second Transaction working correctly? +Transfer Question _2010-01-05 20:00:46 UTC_ - [-](https://bitcointalk.org/index.php?topic=17.msg85#msg85) The transfer is immediate if you send by IP address. If you send by bitcoin address and the recipient isn't online at the time, it might take 30 minutes or more to see it. Also, the recipient needs to be synced up with the block chain before it'll see the received transaction. That means the status bar at the bottom needs to say at least 33000 blocks, like "x connections 33200 blocks x transactions". [_**Quote from: sirius-m on January 05, 2010, 01:20:06 AM**_](https://bitcointalk.org/index.php?topic=17.msg84#msg84) _**Quote**_ _However, once that transaction was complete, a new transaction hasn't started. Or maybe it has. There's only one transaction in the list but I'm up to 131 Blocks under "Status". Is this the way it's supposed to happen? Does it keep processing on the same transaction and generating coins every 120 blocks or so? Or is it supposed to start a new transaction?_ _ The number of blocks of a transaction is the amount of new blocks that have been generated by the whole network after the transaction. Each new block in the chain means new coins to its creator. One "generated" -transaction in your transaction list means that you have generated one block. You're not the first one to find the concept of a "block" a bit confusing on the first sight._ Would it be clearer if the status said "x confirmations", like: 2/unconfirmed 3/unconfirmed 4/unconfirmed 5/unconfirmed 6 confirmations 7 confirmations 8 confirmations Each block essentially means another node has confirmed that it agrees with all transactions up to that point. **BitcoinTalk** Re: 64bit support _2010-01-14 20:17:20 UTC_ - [-](https://bitcointalk.org/index.php?topic=18.msg97#msg97) I haven't tried compiling 64-bit yet. 64-bit wouldn't make it any faster, since it uses 64-bit numbers in only a few places and SHA-256 is a 32-bit algorithm, but it may be convenient for those running a 64-bit OS. If I get a chance I'll try -m64 and see what the problem is. You can run the 32-bit version on 64-bit Linux by installing ia32-libs. (sudo apt-get install ia32-libs) If we made a Debian package, it could automatically pull that in as a dependency. **BitcoinTalk** Re: Number of connections? _2010-01-20 20:07:15 UTC_ - [-](https://bitcointalk.org/index.php?topic=21.msg112#msg112) Coins generate at the same speed with any number of connections >= 1. More connections just add redundancy. If you only had one connection, what if that node is slow or busy, or only connected to you? Having several connections increases the certainty that you're well connected to the network. That hasn't been a problem in practice, the network is very thoroughly connected. If you have 2 or 3 connections, you're fine. **BitcoinTalk** Re: TOR and I2P _2010-01-20 22:05:28 UTC_ - [-](https://bitcointalk.org/index.php?topic=22.msg113#msg113) I've been thinking about that for a while. I want to add the backend support for .onion addresses and connecting to them, then go from there. There aren't many .onion addresses in use for anything because the user has to go through a number of steps to create one. Configure TOR to generate a .onion address, restart TOR, configure it with the generated address. Perhaps this is intentional to keep TOR so it can't be integrated into file sharing programs in any sufficiently automated way. **BitcoinTalk** Re: Bitcoin crash when sending coins _2010-01-27 21:52:27 UTC_ - [-](https://bitcointalk.org/index.php?topic=27.msg156#msg156) That is what happens if you copy wallet files around. If you copy your wallet file to a second computer, then they both think the money in the wallet is theirs. If one spends any of it, the other doesn't know those coins are already spent and would try to spend them again, and that's the error you would hit. Now that it's clear this is a key error message, it ought to be something more like "the money appears to be already spent... this could happen if you used a copy of your wallet file on another computer." You can move or backup your wallet file, but it needs to have only one "lineage" and only used in one place at a time. Any time you transfer money out of it, then you must no longer use any previous copies. This brings up a good point. In the case of restoring a backup that may be from before you spent some coins, we need to add functionality to resync it to discover which coins have already been spent. This would not be hard to do, it just hasn't been implemented yet. I'll add it to the list. This would make it mostly repair the situation instead of giving that error message. **BitcoinTalk** Re: A newb's test - anyone want to buy a picture for $1? _2010-01-28 01:01:48 UTC_ - [-](https://bitcointalk.org/index.php?topic=25.msg159#msg159) Yes, it's a technical limitation. Sending by bitcoin address enters the transaction into the network and the recipient discovers it from the network. You don't connect directly with them and they don't have to be online at the time. I very much wanted to find some way to include a short message, but the problem is, the whole world would be able to see the message. As much as you may keep reminding people that the message is completely non-private, it would be an accident waiting to happen. Unfortunately, ECDSA can only sign signatures, it can't encrypt messages, and we need the small size of ECDSA. RSA can encrypt messages, but it's many times bigger than ECDSA. **BitcoinTalk** Re: 64bit support _2010-01-29 00:42:49 UTC_ - [-](https://bitcointalk.org/index.php?topic=18.msg174#msg174) I committed a fix for 64-bit compile and some fixes to support wxWidgets 2.9.0. There was one compile error in serialize.h with min(sizeof()) that I fixed for 64-bit. The rest of the 64-bit compile errors I was getting were in wxWidgets 2.8.9, so I started working on supporting wxWidgets 2.9.0. wxWidgets 2.9.0 is UTF-8. We've been using the ANSI version of wxWidgets 2.8.9 in anticipation of wxWidgets UTF-8 support. I compiled and ran on 64-bit Ubuntu 9.10 Karmic. I think the only bug left is where the status number is mashed up. I'm not sure why, I have to suspect it's a UTF-8 thing, but no idea how that could happen. Haven't looked into it. build-unix.txt is updated and two makefiles on SVN: makefile.unix.wx2.8 makefile.unix.wx2.9 Unfortunately there's still no debian package for either version of wxWidgets we use. They only have the wchar ("unicode") version of wxWidgets 2.8, which is a disaster because wchar wxString doesn't convert to std::string. We use either ANSI wxWidgets 2.8, or wxWidgets 2.9. So you still have to get it and build it yourself. **Martii Malmi (AKA Sirius) “COPA trial” email #143** _Editor’s note: this email appears timestamped PRIOR to emails #141 and #142, however it was listed AFTER emails #141 and #142 in Martii Malmi’s COPA trial email documents._ **Date: Wed, 03 Feb 2010 20:25:53 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoin API** **To: mmalmi@cc.hut.fi** Is there any way to find out what the missing shared libraries are? It would help to know. It probably needs the gtk libraries, in which case you'll have the same problem with the 64-bit version. I would like to have a single executable that can also run on a UI-less system, but I'm not sure how on linux to link to things but still be able to run and not use them if the library is not present. Maybe we should statically link the GTK. Licensewise, it's LGPL, but since it's only used on unix, that would be OK. (we can't link LGPL stuff on windows because we provide the OpenSSL DLL, but on linux OpenSSL comes with the OS) My 64-bit (debug stripped) executable is attached. It includes untested changes that are not in SVN yet: UI changes and the wallet fSpent flag resync stuff. I've been researching options for interprocess calling. I want something that will be easy for a variety of server side languages to call, particularly PHP. Cross-platform to windows is a plus. I'm not sure if I want it to be something that can be accessed across the network. That would introduce security issues. If it can only be accessed on the local system, then local security authentication covers it, and it is incapable of being hacked remotely. At surface level, not looking into any details yet, the current front runners are: D-Bus: local system only used by qt, gnome and skype bindings: c, python, java, c++, php listed as "in progress" .net listed as unmaintained not sure how ready it is on windows XML-RPC: widely used, built in libraries on PHP it's more for web clients to talk to server, transport is http, so its a security question Is it possible to open a socket that can only be accessed locally? _mmalmi@cc.hut.fi wrote:_ _> Have you decided upon the inter-process calling method of the Bitcoin_ _> API yet? An easy solution would be the socket interface provided by_ _> wxWidgets: http://docs.wxwidgets.org/trunk/overview_ipc.html. The_ _> Bitcoin program running a wxServer could be then accessed by calling the_ _> bitcoin executable from the command line or by coding your own wxClient_ _> app._ _>_ _> Another option would be to just use the plain BSD sockets._ _>_ _> Can you send me a 64-bit Linux binary of Bitcoin if you have one? I_ _> tried compiling on the VPS, but it ran out of memory. Tried the 32-bit_ _> version (with ia32-libs) also, but it didn't find the shared libraries._ _>_ **BitcoinTalk** Re: Bitcoin crash when sending coins _2010-02-03 23:29:57 UTC_ - [-](https://bitcointalk.org/index.php?topic=27.msg219#msg219) I uploaded this fix to the SVN. It watches for spent coins and updates your wallet on load and also continuously as blocks come in. I also put a better error message, but it should never hit it because it always finds spent coins ahead of time, unless you spent the same money at the same time on two computers at once. If you want to try it, PM or e-mail me your e-mail address where I can send it as an attachment and also what OS (win, linux 32-bit, linux 64-bit). **BitcoinTalk** Re: Win32 CPU Cycles vs 'Live Protection' Engines ? _2010-02-03 23:36:54 UTC_ - [-](https://bitcointalk.org/index.php?topic=35.msg220#msg220) Thanks for that. Which version of Windows? **BitcoinTalk** Re: Questions about Addresses _2010-02-04 00:07:07 UTC_ - [-](https://bitcointalk.org/index.php?topic=34.msg222#msg222) Port forwarding forwards a port to one computer. It tells the router which computer handles connections to that port. So that's the computer receiving. If you didn't set up port forwarding, then incoming connections won't go to any computer, and attempts to send to that IP would just say it couldn't connect to the recipient and nothing is sent. When sending by IP, you still send to a bitcoin address, but your computer connects to that IP, gets a new bitcoin address from it, gives the transaction directly to the them and confirms that it was received and accepted. Someone should post their static IP so people can try out sending by IP and also give that user free money. There's a 32-bit checksum in bitcoin addresses so you can't accidentally type an invalid address. If 4) you send to a recipient who has abandoned or lost their wallet.dat, then the money is lost. A subtle point can be made that since there is then less total money in circulation, everyone's remaining money is worth slightly more, aka "natural deflation". **BitcoinTalk** Re: TOR and I2P _2010-02-04 00:30:50 UTC_ - [-](https://bitcointalk.org/index.php?topic=22.msg223#msg223) When using proxy port 9050, it will only make one attempt to connect to IRC, then give up, since it knows it will probably always fail because IRC servers ban all the TOR exit nodes. If you're using another port, it would assume it might be a regular old normal proxy and would keep retrying IRC at longer and longer intervals. You should not use Polipo or Privoxy as those are http filters and caches that would corrupt Bitcoin's messages if they make any changes. Bitcoin might be trying to overcome it by reconnecting. You should use port 9050. As riX says, the "is giving Tor only an IP address. Apps that do DNS..." warnings are nothing to worry about. Bitcoin doesn't use DNS at all in proxy mode. Since Bitcoin can't get through to IRC through Tor, it doesn't know which nodes are currently online, so it has to try all the recently seen nodes. It tries to conserve connection attempts as much as possible, but also people want it to connect quickly when they start it up and reconnect quickly if disconnected. It uses an algorithm where it tries an IP less and less frequently the longer ago it was successful connected. For example, for a node it saw 24 hours ago, it would wait 5 hours between connection attempts. Once it has at least 2 connections, it won't try anything over a week old, and 5 connections it won't try anything over 24 hours old. **Martii Malmi (AKA Sirius) “COPA trial” email #142** _Editor’s note: this email appears timestamped PRIOR to email #141, however it was listed AFTER email #141 in Martii Malmi’s COPA trial email documents._ **Date: Thu, 04 Feb 2010 01:32:50 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Exchange options** **To: Martti Malmi <mmalmi@cc.hut.fi>** Don't rush ahead and get yourself rejected from all the payment options before you've had time to see if there's a better approach. I suggest you wait before contacting any more payment processors. You may get ideas from things other users come up with and try. Just some random incomplete ideas: There may be a way to position it as an intermediate credit for micropayments for some virtual good or something. Or maybe if the payments are only in one direction. If you only buy bitcoins, then you're only sending money out not taking people's money, that would still be useful to peg the currency. That might be payment for computer time. Credit card is only one way. Don't even talk about the idea of returning money to customer's credit cards. Credit card companies hate that. In any case, any payment processor is going to expect you to be selling something real. Do you have electronic transfer or paper cheque in your country? (even if only within Europe) **Martii Malmi (AKA Sirius) “COPA trial” email #141** **Date: Thu, 04 Feb 2010 02:20:10 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Exchange ideas** **To: Martti Malmi <mmalmi@cc.hut.fi>** You could always exchange for Liberty Reserve. It's an online currency similar to e-Bullion, Pecunix or Webmoney that allows exchanges no questions asked and with privacy. LR and the others are hard to buy but easy to cash out. Hard to buy because exchangers are very cautious about getting ripped off by reversed payments, so they require more details and holding time. Cashing out is very easy. LR is non-reversible, so there are oodles of exchanges eager to turn LR into any kind of payment. Bitcoin is the reverse, in that it's easy to get Bitcoins just by generating them. It would be easy for customers to go bitcoin->LR->cash, bitcoin->LR->gold, bitcoin->LR->paypal or maybe they just want to save the money, then just bitcoin->LR. There's also the idea BTC2PSC had to sell paysafecards for bitcoins. Either online delivery by sending the card number by e-mail, or delivery of the unopened physical card in the mails. There are many variations of these cards. In some countries, they're called Gift Cards, and can be used wherever credit cards are accepted. I think they're used more by people who don't have the credit history to get a real credit card, so they buy gift cards themselves to pay for things that require a credit card. **Martii Malmi (AKA Sirius) “COPA trial” email #145** **Date: Thu, 04 Feb 2010 18:50:35 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoin API** **To: mmalmi@cc.hut.fi** I must have accidentally typed j instead of z. It's bz2 format. Rename to .tar.bz2 or just do tar -jxvf _> The package doesn't open, it says "not in gzip format"._ _>_ **Martii Malmi (AKA Sirius) “COPA trial” email #146** **Date: Thu, 04 Feb 2010 19:33:26 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: UTF-8 to ANSI hack in CAboutDialog** **To: Martti Malmi <mmalmi@cc.hut.fi>** What was the reason for this change? #if !wxUSE_UNICODE ... if (str.Find('Â') != wxNOT_FOUND) str.Remove(str.Find('Â'), 1); to: if (str.Find('�') != wxNOT_FOUND) str.Remove(str.Find('�'), 1); wxFormBuilder turns the (c) symbol into UTF-8 automatically. On wxWidgets-2.8.9 ansi, it shows as a copyright symbol with an extra trash character, which this hack fixes up for the non-unicode (ansi) case. **Martii Malmi (AKA Sirius) “COPA trial” email #147** Date: Thu, 04 Feb 2010 19:59:48 +0000 From: Satoshi Nakamoto <satoshin@gmx.com> Subject: Re: Bitcoin API To: mmalmi@cc.hut.fi Good, then no need to consider d-bus. Is there something like IPC sockets on Windows? I guess we could look how wx does it, or maybe the XML-RPC library will already know what to do. Windows has named pipes, maybe that's the best analogue. I don't think I want to invent my own RPC protocol, I want to use an existing standard. PHP, Java, Python or anything will be able to talk to the server directly the same way the command line commands do. I'm going to start reading on XML-RPC. It's coming up in searches as the most widely used protocol and widely supported. PHP includes it in its standard libraries. _>> Is it possible to open a socket that can only be accessed locally?_ _>_ _> Yes, you can use IPC sockets ("Unix domain sockets") which are local_ _> only. That's done in the wx-api by using a filename in place of a port_ _> number. I committed an example of how the wxServer-Client communication_ _> is used, you can revert if you want to. Now there's the -blockamount_ _> command line option which asks the running instance for the block chain_ _> length._ _>_ _> I think this command line method could already be used from PHP, but it_ _> might be lighter if php itself could call the socket server directly._ _> The wx's IPC overview mentions wxSocketEvent, wxSocketBase,_ _> wxSocketClient and wxSocketServer as being "Classes for the low-level_ _> TCP/IP API", which might be easier to use from php than what I used now_ _> (wxServer, wxClient, wxConnection). I'll look more into it._ _>_ **Martii Malmi (AKA Sirius) “COPA trial” email #148** **Date: Fri, 05 Feb 2010 04:08:54 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Bitcoin API research status** **To: Martti Malmi <mmalmi@cc.hut.fi>** I noticed this in the docs for wxSocketServer::Accept(bool wait = true): "If wait is true and there are no pending connections to be accepted, it will wait for the next incoming connection to arrive. **Warning: This will block the GUI." wxWidgets is pathologically single-threaded. Not only single-threaded, but must-be-the-GUI-thread-ed. Even for something as non-UI as wxStandardPaths I got nailed. All this is fine for UI code, since this is the same constraint placed by Windows anyway, but for UI-less server daemon code, wx calls are uncertain. Status of my research currently: For PHP, Python, etc to access the server, we need to use regular sockets. I think we can make it local-only by binding to localhost only, so it can only be accessed through the loopback. They say it's also watertight to simply check the IP of connections received and disconnect anything not 127.0.0.1. May as well do both. XML-RPC is a bit fat. There are 4 libraries for C++ but they're all big and hard to build, dependencies, license issues. Some posters complain all the C++ and PHP XML-RPC libraries are buggy. JSON-RPC is a simpler more elegant standard. It's simple enough I could use a generic JSON parser. PHP, Python and Java all have good implementations of JSON-RPC. I'm currently leaning towards JSON-RPC. **Martii Malmi (AKA Sirius) “COPA trial” email #151** **Date: Fri, 05 Feb 2010 18:29:12 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: Exchange options** **To: mmalmi@cc.hut.fi** Maybe the current difficulty of buying LR is already the limit of how easy it can get in that direction. Every conventional payment method has refutability as their way to cope with their lack of passwords and crypto. The system is wide open to copying plaintext credit card numbers and account numbers, and they deal with it by reversing the transaction after the fact. The system works for physical goods that have to be delivered somewhere, and services which can't be resold. It's a problem when it interfaces with precious metals and currency conversion. The first step of being easy in one direction, bitcoin->LR or anything of established value, goes a long way. Even those who don't use the conversion still benefit from knowing that they could. Trading bitcoin becomes an easier way to trade the ability to claim LR, similar to how paper money was once the right to claim gold. Nobody has to ever actually claim the LR to get the benefit of having the option that they could if they wanted to. A lot of times you just need a minuscule amount of online currency. The hassle of buying the other online currencies is too much for buying a small amount. The ease of getting a small amount of bitcoin may help bootstrap an ecosystem of sellers of micropayment sized online goods selling to that market. If the sellers can get LR for bitcoins, they're happy, and that may be subsidized at first by investors who want to buy bc in large lots. The main thing holding online currencies back is the lack of an easy way to get a small amount of currency. Bitcoin opens that up. It'll be the only online currency that's both easy to cash out and easy to get a small amount. It'll just be the usual harder difficulty to buy a large amount. _mmalmi@cc.hut.fi wrote:_ _> Liberty Reserve sounds good. I could first make a service that only_ _> accepts LR, and add more options later. The weakness is that buying LR_ _> is an extra step of inconvenience when the customer just wants to get_ _> Bitcoins. But maybe I don't have too much choice here._ _>_ _>> Do you have electronic transfer or paper cheque in your country? (even_ _>> if only within Europe)_ _>_ _> Yes, electronic bank transfer is available. During 2010 most European_ _> countries will become a part of SEPA (Single Euro Payments Area), which_ _> means that all payments within Europe are to be considered domestic._ _> Banks will have to apply the same fees and standards to all domestic_ _> transfers, so they'll probably all be free of charge and complete in one_ _> bank day. For international transfers there's the SWIFT/IBAN system,_ _> which usually costs some extra._ _>_ _> A longer term project for my exchange service would be to see what kinds_ _> of integration options the banks have to offer. Bank transfers would_ _> reach nearly as many customers as credit cards do._ _>_ **Martii Malmi (AKA Sirius) “COPA trial” email #152** **Date: Fri, 05 Feb 2010 18:39:18 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Re: UTF-8 to ANSI hack in CAboutDialog** **To: mmalmi@cc.hut.fi** Right, I'll change it to this so it doesn't get broken again: if (str.Find('\xC2') != wxNOT_FOUND) str.Remove(str.Find('\xC2'), 1); _mmalmi@cc.hut.fi wrote:_ _> I didn't change it knowingly, must have been some encoding problem._ _>_ _>> What was the reason for this change?_ _>>_ _>> #if !wxUSE_UNICODE_ _>> ..._ _>> if (str.Find('Â') != wxNOT_FOUND)_ _>> str.Remove(str.Find('Â'), 1);_ _>> to:_ _>> if (str.Find('�') != wxNOT_FOUND)_ _>> str.Remove(str.Find('�'), 1);_ _>>_ _>> wxFormBuilder turns the (c) symbol into UTF-8 automatically. On_ _>> wxWidgets-2.8.9 ansi, it shows as a copyright symbol with an extra_ _>> trash character, which this hack fixes up for the non-unicode (ansi)_ _>> case._ _>_ **BitcoinTalk** Proof-of-work difficulty increasing _2010-02-05 19:19:12 UTC_ - [-](https://bitcointalk.org/index.php?topic=43.msg249#msg249) We had our first automatic adjustment of the proof-of-work difficulty on 30 Dec 2009. The minimum difficulty is 32 zero bits, so even if only one person was running a node, the difficulty doesn't get any easier than that. For most of last year, we were hovering below the minimum. On 30 Dec we broke above it and the algorithm adjusted to more difficulty. It's been getting more difficult at each adjustment since then. The adjustment on 04 Feb took it up from 1.34 times last year's difficulty to 1.82 times more difficult than last year. That means you generate only 55% as many coins for the same amount of work. The difficulty adjusts proportionally to the total effort across the network. If the number of nodes doubles, the difficulty will also double, returning the total generated to the target rate. For those technically inclined, the proof-of-work difficulty can be seen by searching on "target:" in debug.log. It's a 256-bit unsigned hex number, which the SHA-256 value has to be less than to successfully generate a block. It gets adjusted every 2016 blocks, typically two weeks. That's when it prints "GetNextWorkRequired RETARGET" in debug.log. minimum 00000000ffff0000000000000000000000000000000000000000000000000000 30/12/2009 00000000d86a0000000000000000000000000000000000000000000000000000 11/01/2010 00000000c4280000000000000000000000000000000000000000000000000000 25/01/2010 00000000be710000000000000000000000000000000000000000000000000000 04/02/2010 000000008cc30000000000000000000000000000000000000000000000000000 14/02/2010 0000000065465700000000000000000000000000000000000000000000000000 24/02/2010 0000000043b3e500000000000000000000000000000000000000000000000000 08/03/2010 00000000387f6f00000000000000000000000000000000000000000000000000 21/03/2010 0000000038137500000000000000000000000000000000000000000000000000 01/04/2010 000000002a111500000000000000000000000000000000000000000000000000 12/04/2010 0000000020bca700000000000000000000000000000000000000000000000000 21/04/2010 0000000016546f00000000000000000000000000000000000000000000000000 04/05/2010 0000000013ec5300000000000000000000000000000000000000000000000000 19/05/2010 00000000159c2400000000000000000000000000000000000000000000000000 29/05/2010 000000000f675c00000000000000000000000000000000000000000000000000 11/06/2010 000000000eba6400000000000000000000000000000000000000000000000000 24/06/2010 000000000d314200000000000000000000000000000000000000000000000000 06/07/2010 000000000ae49300000000000000000000000000000000000000000000000000 13/07/2010 0000000005a3f400000000000000000000000000000000000000000000000000 16/07/2010 000000000168fd00000000000000000000000000000000000000000000000000 27/07/2010 00000000010c5a00000000000000000000000000000000000000000000000000 05/08/2010 0000000000ba1800000000000000000000000000000000000000000000000000 15/08/2010 0000000000800e00000000000000000000000000000000000000000000000000 26/08/2010 0000000000692000000000000000000000000000000000000000000000000000 date, difficulty factor, % change 2009 1.00 30/12/2009 1.18 +18% 11/01/2010 1.31 +11% 25/01/2010 1.34 +2% 04/02/2010 1.82 +36% 14/02/2010 2.53 +39% 24/02/2010 3.78 +49% 08/03/2010 4.53 +20% 21/03/2010 4.57 +9% 01/04/2010 6.09 +33% 12/04/2010 7.82 +28% 21/04/2010 11.46 +47% 04/05/2010 12.85 +12% 19/05/2010 11.85 -8% 29/05/2010 16.62 +40% 11/06/2010 17.38 +5% 24/06/2010 19.41 +12% 06/07/2010 23.50 +21% 13/07/2010 45.38 +93% 16/07/2010 181.54 +300% 27/07/2010 244.21 +35% 05/08/2010 352.17 +44% 15/08/2010 511.77 +45% 26/08/2010 623.39 +22% **BitcoinTalk** Re: Questions about Addresses _2010-02-05 19:44:46 UTC_ - [-](https://bitcointalk.org/index.php?topic=34.msg250#msg250) [_**Quote from: Sabunir on February 05, 2010, 05:31:30 PM**_](https://bitcointalk.org/index.php?topic=34.msg246#msg246) _Perhaps there should be a feature against this? For instance, if a transaction isn't accepted by the recipient for a long period of time (a month?), the transaction will be canceled and the coins returned to the one who sent them?_ That's not possible. You've handed control of the money over to the recipient's keypair. Only that key can control it. It's similar to if you encrypt a file with AES and a strong password, and you lose the password. The data is lost. **BitcoinTalk** Re: Repost: Request: Make this anonymous? _2010-02-06 21:06:32 UTC_ - [-](https://bitcointalk.org/index.php?topic=7.msg264#msg264) When you send to a bitcoin address, you don't connect to the recipient. You send the transaction to the network the same way you relay transactions. There's no distinction between a transaction you originated and one you received from another node that you're relaying in a broadcast. With a very small network though, someone might still figure it out by process of elimination. It'll be better when the network is larger. If you send by IP, the recipient sees you because you connect to their IP. You could use TOR to mask that. You could use TOR if you don't want anyone to know you're even using Bitcoin. Bitcoin is still very new and has not been independently analysed. If you're serious about privacy, TOR is an advisable precaution. **BitcoinTalk** Re: How divisible are bitcoins and other market/economic questions _2010-02-06 23:25:53 UTC_ - [-](https://bitcointalk.org/index.php?topic=44.msg267#msg267) Eventually at most only 21 million coins for 6.8 billion people in the world if it really gets huge. But don't worry, there are another 6 decimal places that aren't shown, for a total of 8 decimal places internally. It shows 1.00 but internally it's 1.00000000. If there's massive deflation in the future, the software could show more decimal places. If it gets tiresome working with small numbers, we could change where the display shows the decimal point. Same amount of money, just different convention for where the ","'s and "."'s go. e.g. moving the decimal place 3 places would mean if you had 1.00000 before, now it shows it as 1,000.00. **Martii Malmi (AKA Sirius) “COPA trial” email #153** **Date: Sun, 07 Feb 2010 06:12:04 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: JSON-RPC status** **To: Martti Malmi <mmalmi@cc.hut.fi>** The JSON-RPC implementation is going well. I'm using boost::asio for sockets. JSON-RPC can be plain socket or HTTP, but it seems most other implementations are HTTP, so I made my own simple HTTP headers. For JSON parsing I'm using JSON Spirit, which makes full use of STL and has been really nice to use. It's header-only so it's no added build work, and small enough to just add it to our source tree. MIT license. This should all be working in a few more days. The forum sure is taking off. I didn't expect to have so much activity so fast. **BitcoinTalk** Re: Make your "we accept Bitcoin" logo _2010-02-08 01:22:29 UTC_ - [-](https://bitcointalk.org/index.php?topic=45.msg278#msg278) No, sorry. I've been meaning to redo it. The largest icon that still looks good is the 20x20 one which is used for the tray icon in GNOME. Any larger than that looks bad. The 16x16 and 20x20 ones have quite a bit of hand tweaking to get the pixels to work out right. If you just scale down a larger image, the pixels end up blurred and awkward in places where the lines in "BC" don't land square on a pixel. The best 16x16 with full alpha channel is in src/rc/bitcoin.ico. I don't like the 32x32 version. I'm attaching bitcoin20x20.png, the 20x20 version with full transparency. **BitcoinTalk** Bitcoin client and website translation _2010-02-08 01:27:02 UTC_ - [-](https://bitcointalk.org/index.php?topic=47.msg279#msg279) Thank you for the offer to help translate. That is probably the best way you could help. I will need to prepare the code for translation first. wxWidgets has locale support, and most strings are in generated code that is already wrapped, so it shouldn't be too hard. We also must finish upgrading to wxWidgets-2.9.0 to get UTF-8 support. I've done test builds with 2.9.0 and there is one bug left to fix. What operating system are you using? Windows, Linux 32-bit or 64 bit? Split from [another thread](https://www.bitcoin.org/smf/index.php?topic=44). sirius-m **Martii Malmi (AKA Sirius) “COPA trial” email #155** **Date: Mon, 08 Feb 2010 15:28:52 +0000** **From: Satoshi Nakamoto <satoshin@gmx.com>** **Subject: Translation** **To: Martti Malmi <mmalmi@cc.hut.fi>** Does Drupal have any special multi-language support, or do you just create copies of pages by hand? BlueSky offered to do translation on the forum. If you create a www.bitcoin.org/zh/ copy of the site and give him an account with just the ability to create new pages and edit text, he'll probably translate the site into Chinese for you and maybe maintain it. **BitcoinTalk** Bitcoin client and website translation _2010-02-08 16:10:37 UTC_ - [-](https://bitcointalk.org/index.php?topic=47.msg283#msg283) It's much easier to have a single binary and multiple .mo files. It's too much maintenance work to have lots of build variations. Once the software support is implemented, anyone could contribute translations. wxWidgets uses the gettext standard. You use the gettext tools or something like poedit to create a .po file by scanning the sourcefiles for strings and editing the translations into the .po file, then compile it into a .mo file. The program loads the .mo file at runtime and reskins all the strings. Additional languages can be added to an existing program by adding .mo files without recompiling the program. On Windows, the .mo files would go in a lang subdirectory in the directory where the EXE is located. Right now I'm working on JSON-RPC and command line support, but when I'm finished with that I hope to do this next. ----

Kicking the Hornet's Nest - part 5

# Kicking the Hornet's Nest - third edition - part 5 All links, digital (pdf, txt, docx, md) and book in print, can be found at https://hive.blog/@crrdlx/satoshi Edited by [crrdlx](nostr:nprofile1qyv8wumn8ghj7mn0wdj8y6tkv5hxzurs9aex2mrp0yq3wamnwvaz7tmjv4kxz7fwwpexjmtpdshxuet59uqzqqzmcn0yrn7ttq8hrjkk46ysn2tk26rr8f8k4y7xkl74hlh3rcdzm9d3t8), npub: ``` npub1qpdufhjpel94srm3ett2azgf49m9dp3n5nm2j0rt0l2mlmc3ux3qza082j ``` ---- ### Kicking the Hornet's Nest pages 75 - 100 ---- ---------- Forwarded message ---------- From: **Satoshi Nakamoto** <satoshi@vistomail.com> Date: Tue, Jan 13, 2009 at 2:42 PM Subject: Re: disk full To: [hal.finney@gmail.com](mailto:hal.finney@gmail.com) If you build the dependencies, let me know how that goes. Everything is always harder to build on Windows than Linux. I've always hated projects with a lot of big dependencies, but there's no avoiding it, each one is essential. I still haven't figured out how you managed to get a read exception rather than a write exception when your disk filled up. It's unlikely but maybe possible that the incident could have messed up your block data file. In that case, it might manifest as a similar exception again, or if your block count in the status bar stopped going up, that would also indicate a problem. As of this moment it's at 375 blocks. If there is a problem, it could easily be solved by deleting your block files, as follows: (exit Bitcoin and make sure it's stopped) cd /d "%appdata%\bitcoin" (backup this directory first) del blk0001.dat del blkindex.dat It'll then re-download the block chain. Your transactions and generated blocks show as 0/unconfirmed until it's done downloading. The crucial file to backup is wallet.dat. If bitcoin is running then you have to backup the whole %appdata%\bitcoin directory including the database subdirectory, but even if it's not running it certainly feels safer to always backup the whole directory. The database unfortunately names its files "log.0000000001". To the rest of the world, "log" means delete-at-will, but to database people it means delete-and-lose-everything-in-your-other-files. I tried to put them out of harm's way by putting them in the database subdirectory. Later I'll write code to flush the logs after every wallet change so wallet.dat will be standalone safe almost all the time. Satoshi _>Hi Satoshi - Sorry I have not been able to do more today, this looks >like a busy week for me. I started 0.1.3 again under the MSVC debugger >this time so if it crashes tonight I may be able to get some more >information. > >I remember now that last night, my disk filled up. I had downloaded a >bunch of the dependencies (boost, etc) with an eye towards trying to >build it myself, and my disk was already pretty full. I'm pretty sure >this is what caused 0.1.3 to crash. I've attached the debug.log, which >also includes some other runs. The error is about 1/3 of the way down >and says, > >EXCEPTION: NSt8ios_base7failureE >CAutoFile::read : end of file > >Normally this should be a rare occurrence with the large disk sizes >people have today. > >Hal_ ## **From satoshi@vistomail.com Tue Jan 13 07:55:20 2009** From satoshi@vistomail.com Tue Jan 13 07:55:20 2009 Return-Path: <satoshi@vistomail.com> Delivered-To: dustintrammell-dtrammell@dustintrammell.com _> It actually posts the hash blocks to a Google Group called_ _> 'proof-hashes', so similar result as if it were posting to Usenet._ _>_ _> http://groups.google.com/group/proof-hashes_ _>_ _> Since I run that group, and it's sole purpose is to archive_ _> proof-of-work hashes, feel free to join an account to have your system_ _> post there as well if you like._ Sweet, I was looking for a group like that on Usenet at one point to see what I would use if I needed, and nothing really fit. I'm sure Google groups is a lot easier to post to. There are some scenarios where a Usenet or Google group could be used as a supplemental defence. Bitcoin is at its most vulnerable in the beginning when the total network CPU power is small. That's offset by the fact that the incentive to attack it is also low when it's small. Hopefully the easy solution of just growing up and getting past that stage will work. If not, there are ways a Google group could help, if it really came to that. _> Electronic currency and cryptography are two things that I am very_ _> interested in so as you would assume I was drawn to this project_ _> immediately when I saw it posted to the Cryptography email list. Feel_ _> free to ping me for feedback or to test out new features, I'll be happy_ _> to help out._ We definitely have similar interests! You know, I think there were a lot more people interested in the 90's, but after more than a decade of failed Trusted Third Party based systems (Digicash, etc), they see it as a lost cause. I hope they can make the distinction, that this is the first time I know of that we're trying a non-trust based system. _> When the_ _> coins mature, will that generate a new 'credit' transaction, or will the_ _> existing generation transaction line's credit field be updated?_ The existing transaction line will change. _> Upon opening version 0.1.3, all four of my transaction entries still say_ _> 'unconfirmed', but now the Descriptions say 'Generated (not accepted)'._ _> Does this mean that some other node had extended the chain first and my_ _> coins were generated in a dead branch? If so, why did the previous_ _> instance of the software not detect this immediately and begin_ _> generating coins in the winning branch? Bug in 0.1.0?_ You're right, sorry about that. It's the bug that was fixed in 0.1.3. The communications thread would get blocked, so you would make connections, but they would go silent after a while. When you found a block, you couldn't broadcast it to the network, so it didn't get into the chain. You weren't receiving anything either to know that the network had gone on without you, until you restarted it. The bug is also what caused bitcoin.exe to fail to exit. The communications thread was blocked and failed to exit. Bitcoin does a careful shutdown in case it might be in the middle of an important transaction, but actually it's completely safe to kill it. This is all fixed in 0.1.3. If you give me your IP, I'll send you some coins. _> One other question I had... What prevents the single node with the most_ _> CPU power from generating and retaining the majority of the BitCoins?_ _> If every node is working independently of all others, if one is_ _> significantly more powerful than the others, isn't it probable that this_ _> node will reach the proper conclusion before other nodes? An_ _> underpowered node may get lucky once in a while, but if they are at a_ _> significant horsepower advantage I would expect the majority of BitCoins_ _> to be generated by the most powerful node._ It's not like a race where if one car is twice as fast, it'll always win. It's an SHA-256 that takes less than a microsecond, and each guess has an independent chance of success. Each computer's chance of finding a hash collision is linearly proportional to it's CPU power. A computer that's half as fast would get half as many coins. _> I'll watch this instance and see how it goes..._ Let me know how it goes. If you have any trouble with it, send me your debug.log file. I can often figure out what went wrong just from that. Satoshi ## **From satoshi@vistomail.com Thu Jan 15 19:15:23 2009** From satoshi@vistomail.com Thu Jan 15 19:15:23 2009 Return-Path: <satoshi@vistomail.com> Delivered-To: dustintrammell-dtrammell@dustintrammell.com _> I've had that address for a while though so hopefully my dhcp_ _> client is being successful at renewing and not losing my address._ _> It does change from time to time, but that address should be good_ _> for a while._ There's at least one node who's inbound IP keeps changing all the time within the same class B. Maybe every time the program is run. I wasn't expecting that. Do you mind if I CC the rest of this to bitcoin-list or Cryptography? BTW, bitcoin-list is: bitcoin-list@lists.sourceforge.net Subscribe/unsubscribe page: http://lists.sourceforge.net/mailman/listinfo/bitcoin-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-list _> Dustin D. Trammell wrote:_ _> > Satoshi Nakamoto wrote:_ _> > You know, I think there were a lot more people interested in the 90's,_ _> > but after more than a decade of failed Trusted Third Party based systems_ _> > (Digicash, etc), they see it as a lost cause. I hope they can make the_ _> > distinction that this is the first time I know of that we're trying a_ _> > non-trust-based system._ _>_ _> Yea, that was the primary feature that caught my eye. The real trick_ _> will be to get people to actually value the BitCoins so that they become_ _> currency._ Hal sort of alluded to the possibility that it could be seen as a long-odds investment. I would be surprised if 10 years from now we're not using electronic currency in some way, now that we know a way to do it that won't inevitably get dumbed down when the TTP gets cold feet. Even if it doesn't take off straight away, it's now available for use by the next guy who comes up with a plan that needs some kind of token or electronic currency. It could get started in a closed system or narrow niche like reward points, donation tokens, currency for a game or micropayments for adult sites. Once it gets bootstrapped, there are so many applications if you could effortlessly pay a few cents to a website as easily as dropping coins in a vending machine. It can already be used for pay-to-send e-mail. The send dialog is resizeable and you can enter as long of a message as you like. It's sent directly when it connects. The recipient doubleclicks on the transaction to see the full message. If someone famous is getting more e-mail than they can read, but would still like to have a way for fans to contact them, they could set up Bitcoin and give out the IP address on their website. "Send X bitcoins to my priority hotline at this IP and I'll read the message personally." Subscription sites that need some extra proof-of-work for their free trial so it doesn't cannibalize subscriptions could charge bitcoins for the trial. Satoshi ## **From satoshi@vistomail.com Thu Jan 15 19:46:35 2009** From satoshi@vistomail.com Thu Jan 15 19:46:35 2009 Return-Path: <satoshi@vistomail.com> Delivered-To: dustintrammell-dtrammell@dustintrammell.com I group attacks into two classes: 1) Attacks that can only be done by someone actually in the chain of communication 2) Attacks that can be done by anyone on the Internet from anywhere Type 1 exposes you to people in your house or company on your local LAN, admins at ISPs in between, and the LAN on the recipient's side. Type 2 exposes you to a billion people who can self-select to be attackers and get economy of scale when they develop one technique to attack multiple victims. Sending by IP requests a new public key, so yes, it's vulnerable to type 1 man-in-the-middle. If that's a concern, sending to a Bitcoin address doesn't have that vulnerability, although there's a small privacy tradeoff. I have a feeling most of the time people will get Bitcoin addresses off of non-SSL websites and unsigned cleartext e-mail, which is already vulnerable to type 1 and type 2 through DNS poisoning. One solution would be to use both the IP and Bitcoin addresses when sending (maybe 1.2.3.4-1Kn8iojk...), where the recipient uses the public key of the Bitcoin address to sign the new public key to prove that you're sending to who you think you are. If the system starts to be used for real business purposes, I will certainly implement that. Another solution is to use SSL. For now, it's pretty obvious that if you send to an IP, you didn't give any other identifying information about the recipient, so you're blindly sending to whoever answers that IP. Another feature for later is an option to encrypt your wallet. _> If I understand how that is done correctly, you just compute the_ _> transaction into the block chain and let the intended recipient_ _> 'discover' it, correct?_ That's correct. _> An alternative could be to allow the network_ _> nodes to provide a resolution service, where they ask around for the_ _> network address of a BitCoin address, and if that node is online, once a_ _> consensus is agreed upon by the network for that address the sending_ _> BitCoin application connects directly there._ It would be nice to only need the Bitcoin address and have the IP worked out behind the scenes. Might have privacy or denial of service issues. Certainly before another sending method is implemented, there's plenty of time now to fully think through the design and make sure it's the best way. Satoshi **Cryptography Mailing List** Bitcoin v0.1 released _2009-01-16 16:03:14 UTC_ - [-](http://www.metzdowd.com/pipermail/cryptography/2009-January/015014.html) > Dustin D. Trammell wrote: > > Satoshi Nakamoto wrote: > > You know, I think there were a lot more people interested in the 90's, > > but after more than a decade of failed Trusted Third Party based systems > > (Digicash, etc), they see it as a lost cause. I hope they can make the > > distinction that this is the first time I know of that we're trying a > > non-trust-based system. > > Yea, that was the primary feature that caught my eye. The real trick > will be to get people to actually value the BitCoins so that they become > currency. I would be surprised if 10 years from now we're not using electronic currency in some way, now that we know a way to do it that won't inevitably get dumbed down when the trusted third party gets cold feet. It could get started in a narrow niche like reward points, donation tokens, currency for a game or micropayments for adult sites. Initially it can be used in proof-of-work applications for services that could almost be free but not quite. It can already be used for pay-to-send e-mail. The send dialog is resizeable and you can enter as long of a message as you like. It's sent directly when it connects. The recipient doubleclicks on the transaction to see the full message. If someone famous is getting more e-mail than they can read, but would still like to have a way for fans to contact them, they could set up Bitcoin and give out the IP address on their website. "Send X bitcoins to my priority hotline at this IP and I'll read the message personally." Subscription sites that need some extra proof-of-work for their free trial so it doesn't cannibalize subscriptions could charge bitcoins for the trial. It might make sense just to get some in case it catches on. If enough people think the same way, that becomes a self fulfilling prophecy. Once it gets bootstrapped, there are so many applications if you could effortlessly pay a few cents to a website as easily as dropping coins in a vending machine. Satoshi Nakamoto http://www.bitcoin.org ## **From satoshi@vistomail.com Fri Jan 16 18:42:18 2009** From satoshi@vistomail.com Fri Jan 16 18:42:18 2009 Return-Path: <satoshi@vistomail.com> Delivered-To: dustintrammell-dtrammell@dustintrammell.com _> One thing that came to mind on this topic is the potential for BitCoin_ _> loss if you have a system failure. The application doesn't seem to_ _> store any data in the directory that it runs in, so I assume it's stored_ _> in the registry and other places (haven't cracked out ProcessExplorer_ _> yet to check myself), so it may be a good idea to have the application_ _> be able to export everything that it needs for recovery to a file that_ _> could be backed up off of the system._ The files are in "%appdata%\Bitcoin", that's the directory to backup. The data is stored in a transactional database DBM, so it should be safe from loss if there's a crash or power failure. %appdata% is per-user access privilege. Most new programs like Firefox store their settings files there, despite the headwind of Microsoft changing the directory name with every Windows release and being full of spaces and so long it runs off the screen. _> One other thing I noticed today is that if you close the application it_ _> doesn't appear to cleanly close it's network sockets (TCP RST's start_ _> flying). Probably an item for the low-priority todo list (:_ Just now added code to the next release for that. Satoshi ---------- Forwarded message ---------- From: **Satoshi Nakamoto** <satoshi@vistomail.com> Date: Sat, Jan 24, 2009 at 4:47 PM Subject: Re: disk full To: [hal.finney@gmail.com](mailto:hal.finney@gmail.com) I hate duplicating code, but the compiler forces us. Copy the body of the function above it, like this: void insert(iterator it, const_iterator first, const_iterator last) { if (it == vch.begin() + nReadPos && last - first <= nReadPos) { // special case for inserting at the front when there's room nReadPos -= (last - first); memcpy(&vch[nReadPos], &first[0], last - first); } else vch.insert(it, first, last); } #if !defined(_MSC_VER) || _MSC_VER >= 1300 void insert(iterator it, const char* first, const char* last) { if (it == vch.begin() + nReadPos && last - first <= nReadPos) { // special case for inserting at the front when there's room nReadPos -= (last - first); memcpy(&vch[nReadPos], &first[0], last - first); } else vch.insert(it, first, last); } #endif The modified version of serialize.h is attached. BTW, in my tests, VC8 produced an EXE that would only run on systems that had VC8 installed on them. The error it gives is extremely vague. I think they expect you to install a package during setup, but bitcoin doesn't have a setup. My testing has been with MSVC 6.0 SP6 and GCC 3.4.5. GCC is the release build. There's nothing wrong with the MSVC 6.0 build other than its optimization of the SHA routines for generating blocks is slow. Satoshi ## **From satoshi@vistomail.com Sun Jan 18 17:01:09 2009** From satoshi@vistomail.com Sun Jan 18 17:01:09 2009 Return-Path: <satoshi@vistomail.com> Delivered-To: dustintrammell-dtrammell@dustintrammell.com It should be your Bitcoin address at home that you received it with. There's no way for it to know who it's from, so the best it can do is tell which of your addresses it was received on. You can create multiple addresses and give a different address to each person and label them to help figure out who's sending to you. It doesn't know any names other than what you tell it. The name printed there is what's associated in your address book for that address, either under the Address Book button or the "Change..." button to the right of your Bitcoin address. _>Hey Satoshi,_ _>_ _>After that first transfer of 25.00, you didn't send me another 100.00_ _>did you? I sent myself 100.00 from my BitCoin application at work to my_ _>one at home using the BitCoin address rather than by IP. My application_ _>at home has a 100.00 transfer received, however it's transaction details_ _>say "Received with: Satoshi 12higDjoCCNXSA95xZMWUdPvXNmkAduhWv". That_ _>is not my BitCoin address from work, so I assume this means that I_ _>received the payment encoded with a block that was computed by your_ _>client? If so, how did it know your name in addition to the BitCoin_ _>address that generated it? I don't recall there being a place in my_ _>application to even put my name._ _>_ _>--_ _>Dustin D. Trammell_ _>dtrammell@dustintrammell.com_ _>http://www.dustintrammell.com_ _>_ ## **From satoshi@vistomail.com Mon Jan 19 17:02:37 2009** From satoshi@vistomail.com Mon Jan 19 17:02:37 2009 Return-Path: <satoshi@vistomail.com> Delivered-To: dustintrammell-dtrammell@dustintrammell.com _>On Mon, 2009-01-19 at 00:54 +0800, Satoshi Nakamoto wrote:_ _>> It should be your Bitcoin address at home that you received it_ _>> with. There's no way for it to know who it's from, so the best_ _>> it can do is tell which of your addresses it was received on._ _>> You can create multiple addresses and give a different address_ _>> to each person and label them to help figure out who's sending_ _>> to you._ _>_ _>Ah! I didn't even notice it was my address at home, you're right (: I_ _>do have multiple addresses created at home so I didn't make the_ _>connection._ _>_ _>> It doesn't know any names other than what you tell it. The name_ _>> printed there is what's associated in your address book for that_ _>> address, either under the Address Book button or the "Change..."_ _>> button to the right of your Bitcoin address._ _>_ _>Ahh you're right, 'Satoshi' is associated with the address that received_ _>the payment under the Change button's addresses. I don't recall setting_ _>that value though, is that the default or something? (this is the first,_ _>default, address that the application generated itself when I first ran_ _>it)_ The first default one is labelled "Your Address" when it's created. All the places where address book labels are set are where the user manually sets it. The only time it automatically adds a label is a blank one when you send to a new address. I guess you could have entered the label on an address you thought was mine but the software was confusing and you put it in the wrong place. Address book labels for receiving addresses is confusing but I'm not sure what else to do. Anyone using it for more than just simple purposes would need to create different receiving addresses for each payer so they could tell who's paying them. That concept doesn't have much analogy in the real world. Satoshi **Cryptography Mailing List** Bitcoin v0.1 released _2009-01-25 15:47:10 UTC_ - [-](http://www.metzdowd.com/pipermail/cryptography/2009-January/015041.html) Hal Finney wrote: > > * Spammer botnets could burn through pay-per-send email filters > > trivially > If POW tokens do become useful, and especially if they become money, > machines will no longer sit idle. Users will expect their computers to > be earning them money (assuming the reward is greater than the cost to > operate). A computer whose earnings are being stolen by a botnet will > be more noticeable to its owner than is the case today, hence we might > expect that in that world, users will work harder to maintain their > computers and clean them of botnet infestations. Another factor that would mitigate spam if POW tokens have value: there would be a profit motive for people to set up massive quantities of fake e-mail accounts to harvest POW tokens from spam. They'd essentially be reverse-spamming the spammers with automated mailboxes that collect their POW and don't read the message. The ratio of fake mailboxes to real people could become too high for spam to be cost effective. The process has the potential to establish the POW token's value in the first place, since spammers that don't have a botnet could buy tokens from harvesters. While the buying back would temporarily let more spam through, it would only hasten the self-defeating cycle leading to too many harvesters exploiting the spammers. Interestingly, one of the e-gold systems already has a form of spam called "dusting". Spammers send a tiny amount of gold dust in order to put a spam message in the transaction's comment field. If the system let users configure the minimum payment they're willing to receive, or at least the minimum that can have a message with it, users could set how much they're willing to get paid to receive spam. Satoshi Nakamoto **bitcoin-list** Re: [**bitcoin-list**] Problems _2009-01-25 16:45:25 UTC_ - [-](https://sourceforge.net/p/bitcoin/mailman/message/21424626/) From: Nicholas Bohm 2009-01-25 10:17 > I have had a couple of problems running bitcoin: is this an appropriate > list for reporting them (with about 70kb of attachments)? What's the problem you're having? If you send me your debug.log file directly (best not to send attachments to the list), I can take a look at what's happening. Satoshi Nakamoto bitcoin-help at vistomail dot com **bitcoin-list** [**bitcoin-list**] Bitcoin v0.1.5 released _2009-02-04 19:46:04 UTC_ - [-](https://sourceforge.net/p/bitcoin/mailman/message/21500063/) Version 0.1.5 is now available. It includes the fix for the problem Nicholas had, checking for disk full and changes to try to improve things that were confusing. Special thanks to Nicholas and Dustin for all their help and feedback! Download link: http://sourceforge.net/project/showfiles.php?group_id=244765&package_id=298441 Changes: - disk full warning - fixed a bug that could occur if dns lookup failed - prevent entering your own address in the address book, which confusingly changed the label for your own address - moved change address button to menu under options - tweaks to make it get connected faster - close sockets on exit - created minimum fee for transactions less than 1 cent - hid the transaction-type selection box that only had one choice - cleaned up ParseMoney a little - slightly cleaner reformatting of message text - changed the font in transaction details dialog - added some explanation text to transaction details for generated coins - reworded the description for transactions received with bitcoin address Satoshi Nakamoto http://www.bitcoin.org **P2P Foundation** Bitcoin open source implementation of P2P currency _2009-02-11 22:27:00 UTC_ - [-](http://p2pfoundation.ning.com/forum/topics/bitcoin-open-source) I've developed a new open source P2P e-cash system called Bitcoin. It's completely decentralized, with no central server or trusted parties, because everything is based on crypto proof instead of trust. Give it a try, or take a look at the screenshots and design paper: Download Bitcoin v0.1 at [http://www.bitcoin.org](http://www.bitcoin.org/)The root problem with conventional currency is all the trust that's required to make it work. The central bank must be trusted not to debase the currency, but the history of fiat currencies is full of breaches of that trust. Banks must be trusted to hold our money and transfer it electronically, but they lend it out in waves of credit bubbles with barely a fraction in reserve. We have to trust them with our privacy, trust them not to let identity thieves drain our accounts. Their massive overhead costs make micropayments impossible. A generation ago, multi-user time-sharing computer systems had a similar problem. Before strong encryption, users had to rely on password protection to secure their files, placing trust in the system administrator to keep their information private. Privacy could always be overridden by the admin based on his judgment call weighing the principle of privacy against other concerns, or at the behest of his superiors. Then strong encryption became available to the masses, and trust was no longer required. Data could be secured in a way that was physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter what. It's time we had the same thing for money. With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless. One of the fundamental building blocks for such a system is digital signatures. A digital coin contains the public key of its owner. To transfer it, the owner signs the coin together with the public key of the next owner. Anyone can check the signatures to verify the chain of ownership. It works well to secure ownership, but leaves one big problem unsolved: double-spending. Any owner could try to re-spend an already spent coin by signing it again to another owner. The usual solution is for a trusted company with a central database to check for double-spending, but that just gets back to the trust model. In its central position, the company can override the users, and the fees needed to support the company make micropayments impractical. Bitcoin's solution is to use a peer-to-peer network to check for double-spending. In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle. For details on how it works, see the design paper at [http://www.bitcoin.org/bitcoin.pdf](http://www.bitcoin.org/bitcoin.pdf) The result is a distributed system with no single point of failure. Users hold the crypto keys to their own money and transact directly with each other, with the help of the P2P network to check for double-spending. Satoshi Nakamoto [http://www.bitcoin.org](http://www.bitcoin.org/) **P2P Foundation** Bitcoin open source implementation of P2P currency _2009-02-15 16:42:00 UTC_ - [-](http://p2pfoundation.ning.com/xn/detail/2003008:Comment:9493) Could be. They're talking about the old Chaumian central mint stuff, but maybe only because that was the only thing available. Maybe they would be interested in going in a new direction. A lot of people automatically dismiss e-currency as a lost cause because of all the companies that failed since the 1990's. I hope it's obvious it was only the centrally controlled nature of those systems that doomed them. I think this is the first time we're trying a decentralized, non-trust-based system. **P2P Foundation** Bitcoin open source implementation of P2P currency _2009-02-18 20:50:00 UTC_ - [-](http://p2pfoundation.ning.com/xn/detail/2003008:Comment:9562) It is a global distributed database, with additions to the database by consent of the majority, based on a set of rules they follow: - Whenever someone finds proof-of-work to generate a block, they get some new coins - The proof-of-work difficulty is adjusted every two weeks to target an average of 6 blocks per hour (for the whole network) - The coins given per block is cut in half every 4 years You could say coins are issued by the majority. They are issued in a limited, predetermined amount. As an example, if there are 1000 nodes, and 6 get coins each hour, it would likely take a week before you get anything. To Sepp's question, indeed there is nobody to act as central bank or federal reserve to adjust the money supply as the population of users grows. That would have required a trusted party to determine the value, because I don't know a way for software to know the real world value of things. If there was some clever way, or if we wanted to trust someone to actively manage the money supply to peg it to something, the rules could have been programmed for that. In this sense, it's more typical of a precious metal. Instead of the supply changing to keep the value the same, the supply is predetermined and the value changes. As the number of users grows, the value per coin increases. It has the potential for a positive feedback loop; as users increase, the value goes up, which could attract more users to take advantage of the increasing value. **bitcoin-list** Re: [**bitcoin-list**] Bitcoin v0.1.5 released _2009-02-22 17:47:52 UTC_ - [-](https://sourceforge.net/p/bitcoin/mailman/message/21646307/) > What's next? The next thing for v0.1.6 is to take advantage of multiple processors to generate blocks. Currently it only starts one thread. If you have a multi-core processor like a Core Duo or Quad this will double or quadruple your production. Later I want to add interfaces to make it really easy to integrate into websites from any server side language. Satoshi http://www.bitcoin.org **bitcoin-list** Re: [**bitcoin-list**] Bitcoin v0.1.5 released _2009-03-04 16:59:12 UTC_ - [-](https://sourceforge.net/p/bitcoin/mailman/message/21740046/) Hal Finney wrote: > That sounds good. I'd also like to be able to run multiple coin/block > generators on multiple machines, all behind a single NAT address. I > haven't tried this yet so I don't know if it works on the current > software. The current version will work fine. They'll each connect over the Internet, while incoming connections only come to the host that port 8333 is routed to. As an optimisation, I'll make a switch "-connect=1.2.3.4" to make it only connect to a specific address. You could make your extra nodes connect to your primary, and only the primary connects over the Internet. It doesn't really matter for now, since the network would have to get huge before the bandwidth is anything more than trivial. > BTW I don't remember if we talked about this, but the other day some > people were mentioning secure timestamping. You want to be able to > prove that a certain document existed at a certain time in the past. > Seems to me that bitcoin's stack of blocks would be perfect for this. Indeed, Bitcoin is a distributed secure timestamp server for transactions. A few lines of code could create a transaction with an extra hash in it of anything that needs to be timestamped. I should add a command to timestamp a file that way. > > > Later I want to add interfaces to make it really easy to integrate > > > into websites from any server side language. > > Right, and I'd like to see more of a library interface that could be > called from programming or scripting languages, on the client side as > well. Exactly. Satoshi Nakamoto http://www.bitcoin.org **Mike Hearn** <mike@plan99.net> Sun, Apr 12, 2009 at 12:46 PM To: satoshin@gmx.com Hi Satoshi, I read your paper on BitCoin with great interest. I found it a bit confusing though - I believe it may be easier to follow if you provide some examples. Specifically, it's not quite clear to me what blocks contain. If I understand correctly, there is only one (or maybe a few) global chain[s] into which all transactions are hashed. If there is only one chain recording "the story of the economy" so to speak, how does this scale? In an imaginary planet-wide deployment there would be millions of even billions of transactions per hour being hashed into the chain. I realize that each PoW can wrap many transactions in one block, nonetheless, that's a large amount of data to hash. If there are many chains, how are transactions assigned to each chain such that it is still difficult to overpower the network? Eg, if there are 10 global chains, the amount of cpu power you need to beat the system is only 10% of what it was previously. I also wonder if the assumption of 1 core = 1 vote is sound. If the majority of nodes are on standard computers, it seems likely that an attacker could use FPGA or custom ASICs to get significantly better performance. What are your thoughts on using custom hardware to beat the chain? I found the section on incentives hard to follow. In particular, I'm not clear on what triggers the transition from minting new coins as a reason to run a node, to charging transaction fees (isn't the point of BitCoin largely to zero transaction costs anyway?). Presumably there's some human in charge of the system - eg, you decided somehow that 24 million coins was a good number to have, and would distribute some kind of rules file saying "coins minted after this timestamp must have an N+1 zero bits prefix", which honest nodes enforce. How did you decide on the inflation schedule for v1? Where did 24 million coins come from? What denominations are these coins? You mention a way to combine and split value but I'm not clear on how this works. For instance are bitcoins always denominated by an integer or can you have fractional bitcoins? So many questions :) But it's rare that I encounter truly revolutionary ideas. The last time I was this excited about a new monetary scheme was when I discovered Ripple. If you have any thoughts on Ripple, I'd also love to hear them. thanks -mike **Satoshi Nakamoto** <satoshin@gmx.com> Sun, Apr 12, 2009 at 10:44 PM To: Mike Hearn <mike@plan99.net> Hi Mike, I'm glad to answer any questions you have. If I get time, I ought to write a FAQ to supplement the paper. There is only one global chain. The existing Visa credit card network processes about 15 million Internet purchases per day worldwide. Bitcoin can already scale much larger than that with existing hardware for a fraction of the cost. It never really hits a scale ceiling. If you're interested, I can go over the ways it would cope with extreme size. By Moore's Law, we can expect hardware speed to be 10 times faster in 5 years and 100 times faster in 10. Even if Bitcoin grows at crazy adoption rates, I think computer speeds will stay ahead of the number of transactions. I don't anticipate that fees will be needed anytime soon, but if it becomes too burdensome to run a node, it is possible to run a node that only processes transactions that include a transaction fee. The owner of the node would decide the minimum fee they'll accept. Right now, such a node would get nothing, because nobody includes a fee, but if enough nodes did that, then users would get faster acceptance if they include a fee, or slower if they don't. The fee the market would settle on should be minimal. If a node requires a higher fee, that node would be passing up all transactions with lower fees. It could do more volume and probably make more money by processing as many paying transactions as it can. The transition is not controlled by some human in charge of the system though, just individuals reacting on their own to market forces. Eventually, most nodes may be run by specialists with multiple GPU cards. For now, it's nice that anyone with a PC can play without worrying about what video card they have, and hopefully it'll stay that way for a while. More computers are shipping with fairly decent GPUs these days, so maybe later we'll transition to that. A key aspect of Bitcoin is that the security of the network grows as the size of the network and the amount of value that needs to be protected grows. The down side is that it's vulnerable at the beginning when it's small, although the value that could be stolen should always be smaller than the amount of effort required to steal it. If someone has other motives to prove a point, they'll just be proving a point I already concede. My choice for the number of coins and distribution schedule was an educated guess. It was a difficult choice, because once the network is going it's locked in and we're stuck with it. I wanted to pick something that would make prices similar to existing currencies, but without knowing the future, that's very hard. I ended up picking something in the middle. If Bitcoin remains a small niche, it'll be worth less per unit than existing currencies. If you imagine it being used for some fraction of world commerce, then there's only going to be 21 million coins for the whole world, so it would be worth much more per unit. Values are 64-bit integers with 8 decimal places, so 1 coin is represented internally as 100000000. There's plenty of granularity if typical prices become small. For example, if 0.001 is worth 1 Euro, then it might be easier to change where the decimal point is displayed, so if you had 1 Bitcoin it's now displayed as 1000, and 0.001 is displayed as 1. Ripple is interesting in that it's the only other system that does something with trust besides concentrate it into a central server. Satoshi [Quoted text hidden] **Mike Hearn** <mike@plan99.net> Mon, Apr 13, 2009 at 1:39 PM To: Satoshi Nakamoto <satoshin@gmx.com> Thanks Satoshi, I tried the app yesterday. It seems to work pretty well running on Wine (I tried it on MacOS but it should run on Linux too, and will try that next week when I am back at work). In the lower right hand corner it has a block count which increases rapidly and then stops. Is this the length of the global chain? It seems to advance far too fast for that. Or is this the number of genesis blocks that have been tried but did not result in a partial collision? I'm not sure if the way it stops and starts is expected, or some glitch caused by it running under emulation. My best guess - it is the length of the global chain, and the rapid advance at the start is as the software downloads and verifies the preceding blocks in the chain as being valid. With regards to the buyer/seller experience, I understand that the global chain advances at about 6-7 blocks per hour under the current settings. If we assume that 0.1% is a good risk rate, then z=5 thus any transaction must wait a bit less than an hour before being solidified in the chain. As micropayments for things like web content or virtual goods are by definition something that requires low overhead, waiting an hour seems like quite a significant hurdle. I understand that nodes attempt to find a POW to advance the global chain in an uncoordinated fashion. This sentence however: "If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains." is confusing for me, because it appears the only way the honest chain can grow faster than a chain worked on by 1 attacking cpu is if the keyspace to scan looking for a partial collision is sharded evenly amongst the participating honest nodes. That way the speed at which collisions are found would be proportional to the number of nodes. Yet I don't see any discussion of such work sharding, which obviously adds complexity. Likewise: "To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they're generated too fast, the difficulty increases." How is the required difficulty of each block communicated through the network and agreed upon? Thanks once again. I have yet more questions but this is enough for one email :) I will be happy to summarize these discussions into an FAQ-like document at some point. Apologies if the questions seem trivial. -mike [Quoted text hidden] **Mike Hearn** <mike@plan99.net> Mon, Apr 13, 2009 at 10:51 PM To: Satoshi Nakamoto <satoshin@gmx.com> Something else that isn't clear to me - does the global chain only get extended when there is actual work to do? Currently it seems to grow all the time, although there are only a few people in the network. So presumably it gets extended with null blocks. Is this actually required? The timestamping doesn't have to be actually in parallel with real time does it ... it's merely establishing an ordering of events. [Quoted text hidden] **Satoshi Nakamoto** <satoshin@gmx.com> Mon, Apr 13, 2009 at 11:00 PM To: Mike Hearn <mike@plan99.net> Mike Hearn wrote: My best guess - it is the length of the global chain, and the rapid advance at the start is as the software downloads and verifies the preceding blocks in the chain as being valid. Right. I'm trying to think of more clear wording for that, maybe "%d network blocks" or "%d block chain". If we assume that 0.1% is a good risk rate, then z=5 thus any transaction must wait a bit less than an hour before being solidified in the chain. As micropayments for things like web content or virtual goods are by definition something that requires low overhead, waiting an hour seems like quite a significant hurdle. For the actual risk, multiply the 0.1% by the probability that the buyer is an attacker with a huge network of computers. For micropayments, you can safely accept the payment immediately. The size of the payment is too small for the effort to steal it. Micropayments are almost always for intellectual property, where there's no physical loss to the merchant. Anyone trying to steal a micropayment would probably not be a paying customer anyway, and if they want to steal intellectual property they can use the file sharing networks. Currently, businesses accept a certain chargeoff rate. I believe the risk with 1 or even 0 confirming blocks will be much less than the rate of chargebacks on verified credit card transactions. The usual scam against a merchant that doesn't wait for confirming blocks would be to send a payment to a merchant, then quickly try to propagate a double-spend to the network before the merchant's copy. What the merchant can do is broadcast his transaction and then monitor the network for any double-spend copies. The thief would not be able to broadcast during the monitoring period or else the merchant's node would receive a copy. The merchant would only have to monitor for a minute or two until most of the network nodes have his version and it's too late for the thief's version to catch up and reach many nodes. With just a minute or two delay, the chance of getting away without paying could be made much too low to scam. A thief usually needs a high probability of getting an item for free to make it worthwhile. Using a lot of CPU power to do the brute force attack discussed in the paper in addition to the above scam would not increase the thief's chances very much. Anything that grants access to something, like something that takes a while to download, access to a website, web hosting, a subscription or service, can be cancelled a few minutes later if the transaction is rejected. is confusing for me, because it appears the only way the honest chain can grow faster than a chain worked on by 1 attacking cpu is if the keyspace to scan looking for a partial collision is sharded evenly amongst the participating honest nodes. That way the speed at which collisions are found would be proportional to the number of nodes. Yet I don't see any discussion of such work sharding, which obviously adds complexity. The keyspace is huge, 2^256. The thing being hashed includes the node's public key and a random nonce, so the chance of any two nodes duplicating work on the same space is negligible. How is the required difficulty of each block communicated through the network and agreed upon? It's not communicated. The formula is hardcoded in the program and every node does the same calculation to know what difficulty is required for the next block. If someone diverged from the formula, their block would not be accepted by the majority. Thanks once again. I have yet more questions but this is enough for one email :) I will be happy to summarize these discussions into an FAQ-like document at some point. Apologies if the questions seem trivial. No problem, thanks for testing it on Mac Wine. Satoshi [Quoted text hidden] **Satoshi Nakamoto** <satoshin@gmx.com> Mon, Apr 13, 2009 at 11:11 PM To: Mike Hearn <mike@plan99.net> It keeps getting extended all the time. If it stopped, an attacker would have time to catch up. Don't worry, empty blocks aren't very big. As you say, it's the order of events that matters. [Quoted text hidden] **Mike Hearn** <mike@plan99.net> Mon, Apr 13, 2009 at 11:18 PM To: Satoshi Nakamoto <satoshin@gmx.com> Oh yes, of course, that's fundamental. Silly me. Thanks for your answers. I'd recommend being over-explicit for early versions of the software, something like "Global chain is currently %d blocks long". I guess the key problem right now is that once you generate coins, there's nobody to test it with, even for dummy transactions. Is there a plan for a mailing list or some kind of trivial marketplace to give people something to do with their newly minted bitcoins? **Satoshi Nakamoto** <satoshin@gmx.com> Tue, Apr 14, 2009 at 7:41 PM To: Mike Hearn <mike@plan99.net> I started implementing a marketplace feature earlier that facilitates offering things for sale and taking orders, it's only half done though. A bit like e-bay but without auctions, just "buy now". Among other things, it would make it easy for anyone to offer currency exchange. If you send to 1PhUXucRd8FzQved2KGK3g1eKfTHPGjgFu and e-mail me your bitcoin address, or IP if you can accept incoming connections, I'll send back the same amount +50. [Quoted text hidden] **Mike Hearn** <mike@plan99.net> Sat, Apr 18, 2009 at 3:08 PM To: Satoshi Nakamoto <satoshin@gmx.com> Hi Satoshi, I sent you 32.51 coins, my bitcoin address is 1JuEjh9znXwqsy5RrnKqgzqY4Ldg7rnj5n My IP is currently 84.73.233.199, however, it's a laptop so may or may not be online at the time you act on this mail. I suggest using the bitcoin address instead. It'd be convenient if the same comment functionality was available via indirect transfer. Can the comment be encrypted using the public key of the receiver and placed into a block? [Quoted text hidden] ----

Lets write a custom function to doctrine

*Original date 2022-01-27T00:00:00.000Z* Doctrine is well-known ORM for php applications, especially apps which uses #symfony framework. I like to use symfony when i need to write a php application in all scale. Doctrine is fittest ORM for sql operation in #PHP ecosystem in my opinion. I want to talk about writing custom #dql functions for doctrine. Often i have need to use native #postgresql functions in my apps, like `json_equality`function that i created. I use that function like this `json_equality(table.jsoncolumn,'fieldname_injsoncolumn','subfield_injsoncolumn')` and it will generate that sql `table.column -> 'fielname_injsoncolumn' ->> 'subfield_injsoncolumn'` and the postgres will look json column for correct equation. First, let's understand how it works. But, i will not go deep, if you interested you can learn about what is AST. Doctrine have a parser for queries, it will parse what you write as query and then it will convert everything to sql queries. So, its not same what you write in your php code with sql queries. For example; ```php $qb = $em->createQuery('SELECT u FROM App\Entity\User WHERE u.id = 3'); ``` ```sql SELECT u FROM user u WHERE u.id=3 ``` Look at the above. These two thing contains similar terms, `SELECT` , `FROM`,`WHERE`, maybe you are thinking these are same, but NOT. First ones are just like placeholders, they are DQL statements, orm will change everything inside the query to SQL statements. Like this, when you write `SELECT u FROM App\Entity\User WHERE json_equality(u.metadata,'social','allow_to_follow') = 1` query, doctrine will parse it and convert to that `SELECT u FROM user u WHERE CAST (u.metadata -> 'social' ->> 'allow_to_follow' AS INTEGER) = 1` query. i assume you know json operators on postgres, if not, you can read documentation Ok. Let's write some code. We have to create `JsonEquality` class which extends from `Doctrine\ORM\Query\AST\Functions\FunctionNode` class and that class will be placed in `src/Doctrine/ORM/Query/AST/Functions/JsonEquality.php` file. It will have two methods. First method name is `parse` and it will take one argument, its `Doctrine\ORM\Query\Parser`. We will use that argument to parse the part of the query. Second method name is `getSql` and it will take one argument, its `Doctrine\ORM\Query\SqlWalker`. We will use that argument to start parsing to part of query and will return part of the SQL query. Also we need two properties on that class to store parsed values in `parse` method and then use those properties in `getSql` method. It will be private: ``` php private $field; private $json_fields=[]; ``` In the `parse` method, we will parse the part of the DQL query. Variable name is `$parser` for argument of method. And this parser have a method named `match` it will wait for a `token` to match, and it will walk through on the query until next token match or node match (wtf is the node? you can read about AST, seriously!). Also there is a ton of methods to generate predefined tokens, like `StringPrimary` method for string matches, `AritmeticExpression` for more complex expressions and subqueries. There is also another method exists in `Parser` object. We can write first section. ```php public function parse(Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); //its our identifier json_equality $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->field = $parser->StringPrimary(); //we are storing first argument of json_equality function as property. This is not the calue, its node of the first value. We will use that in getSql method. $parser->match(Lexer::T_COMMA); //this is the comma after first argument ... } ``` Let's stop here and think a little. Our function requires how many arguments? We saw three in example `json_equality(table.userdata,'user','firstname')` but it may be less; `json_equality(table.userdata,'username')` or it may be more; `json_equality(table.userdata,'comments','counts','favorite')`, then how we can handle dynamic lenght in arguments? There is no argument spreading feature in DQL. So? Maybe we can try another approach; ```php public function parse(Parser $parser) { //... $this->field = $parser->StringPrimary(); $lexer = $parser->getLexer(); //we will use it to look to the type of the current token while(count($this->json_fields)<1 || $lexer->lookahead['type'] != Lexer::T_CLOSE_PARENTHESIS) { //loop until reach the close paranthesis $parser->match(Lexer::T_COMMA); //walk over comma $this->json_fields[]= $parser->ArithmeticExpression(); //add new node to array property } $parser->match(Lexer::T_CLOSE_PARENTHESIS);//walk over close parenthesis and complete the parsing } ``` Thats it! Our `parse` method is done and also have dynamic sized argument support. We can contunie to generate SQL code. In the `getSql` method, we need just `dispatch` method of nodes. It will take value of the node and we will assign to variables, and we will use to generate SQL code. ```php //lets assume our dql is json_equality(table.userdata,'user','firstname') public function getSql(SqlWalker $sqlWalker) { $field = $this->field->dispatch($sqlWalker); //get value from node, it will be table.userdata $values = []; // it will store json fields for($i = 0; $i<count($this->json_fields); $i++){ $values[]=$this->json_fields[$i]->dispatch($sqlWalker); // we have to dispatch all fields and push values to $values array } $lastValue= array_pop($values); //we are cutting the last element of the values array. We will use that just after ->> oparator, others will be use -> operator. if(count($values)>1){ $json = join(' -> ',$values).' ->> '.$lastValue; }else{ $json = array_pop($values).' ->> '.$lastValue; } //and return generated SQL. In here i create for integer values, you can make it works for your needs. return sprintf( 'CAST (%s -> %s AS INTEGER)', $field, $json ); } ``` Cool, right? But wait! How can use it? It must be registered in `config/packages/doctrine.yaml` file, or you can register via php for non-symfony apps. [Check the documentation](https://www.doctrine-project.org/projects/doctrine-orm/en/2.9/cookbook/dql-user-defined-functions.html#dql-user-defined-functions). ```yaml doctrine: orm: string_functions: json_equality: 'App\Doctrine\ORM\Query\AST\Functions\JsonEquality' ``` Now you can use it in your code. ```php $qb = $this->createQueryBuilder('u'); $qb->andWhere("json_equality(u.metadata,'social','follow_count') = 100"); echo $qb->getQuery()->getSQL(); ``` And the result; ```sql SELECT * FROM user WHERE CAST( u.metadata -> 'social' ->> 'follow_count' AS INTEGER) = 100; ``` Happy coding! #php #symfony #english #web #doctrine