Bitcoin Forum
October 06, 2024, 11:49:37 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 »
221  Bitcoin / Development & Technical Discussion / Re: Shy client patch on: January 22, 2011, 08:36:20 PM
Meant to add, seems to work ok with other clients, I've got 30+ connections. It did turn my dot red on the bitcoin world map, I guess that scanner relies on noisy nodes.
222  Bitcoin / Development & Technical Discussion / Shy client patch on: January 22, 2011, 08:26:13 PM
I made a patch to make the client "shy". On incoming connections, it won't send a version message until it receives one. This can help make port scanning identification harder.

Code:
diff --git a/main.cpp b/main.cpp
index b7dfd9f..cb4fad6 100644
--- a/main.cpp
+++ b/main.cpp
@@ -2290,6 +2290,10 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
             return true;
         }
 
+        // Be shy and don't send version until we hear
+        if (pfrom->fInbound)
+            pfrom->PushVersion();
+
         pfrom->fClient = !(pfrom->nServices & NODE_NETWORK);
 
         AddTimeData(pfrom->addr.ip, nTime);
diff --git a/net.h b/net.h
index f070816..12e415b 100644
--- a/net.h
+++ b/net.h
@@ -571,14 +571,9 @@ public:
         fGetAddr = false;
         vfSubscribe.assign(256, false);
 
-        // Push a version message
-        /// when NTP implemented, change to just nTime = GetAdjustedTime()
-        int64 nTime = (fInbound ? GetAdjustedTime() : GetTime());
-        CAddress addrYou = (fUseProxy ? CAddress("0.0.0.0") : addr);
-        CAddress addrMe = (fUseProxy ? CAddress("0.0.0.0") : addrLocalHost);
-        RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
-        PushMessage("version", VERSION, nLocalServices, nTime, addrYou, addrMe,
-                    nLocalHostNonce, string(pszSubVer), nBestHeight);
+        // Be shy and don't send version until we hear
+        if (!fInbound)
+            PushVersion();
     }
 
     ~CNode()
@@ -735,6 +730,19 @@ public:
 
 
 
+    void PushVersion()
+    {
+        /// when NTP implemented, change to just nTime = GetAdjustedTime()
+        int64 nTime = (fInbound ? GetAdjustedTime() : GetTime());
+        CAddress addrYou = (fUseProxy ? CAddress("0.0.0.0") : addr);
+        CAddress addrMe = (fUseProxy ? CAddress("0.0.0.0") : addrLocalHost);
+        RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
+        PushMessage("version", VERSION, nLocalServices, nTime, addrYou, addrMe,
+                nLocalHostNonce, string(pszSubVer), nBestHeight);
+    }
+
+
+
 
     void PushMessage(const char* pszCommand)
     {

I noticed that the variable nLocalHostNonce is being used to detect connecting to ourself. But I'm not sure it is working, because we will (re-)randomize nLocalHostNonce on incoming connection before we compare with incoming version message. So even if we are connecting to ourself, nLocalHostNonce won't match. The shy patch should fix this.
223  Bitcoin / Bitcoin Technical Support / Re: bitcoin addresses on: January 21, 2011, 10:10:15 PM
Satoshi once suggested that people could hack their client to generate and discard a bunch of random addresses until you got one that started with your initials or even your name if it was short. Well, I guess it would have to skip the forbidden letters like 'l'.

Signed, Ha.
224  Bitcoin / Bitcoin Discussion / Re: PROTON-like payments / Smart card for Bitcoins on: January 21, 2011, 09:13:52 PM
Oh I see, the terminal would just look back at the most recent payment to this address, which would usually be the "change" from the previous payment, and use that as the source transaction. Ye, that should work I think.
225  Bitcoin / Bitcoin Discussion / Re: Improve my article on: January 21, 2011, 08:06:12 PM
I really like the style. The intro is funny and ironic, as though you have to explain this thing called money and why you might want some. The reader is in on the joke, and this invites him in and makes him receptive. I wouldn't change the informal tone.

I can't judge the second part because I know Bitcoin too well. You need feedback from people who've never heard of it.
226  Economy / Economics / Efficient Market Hypothesis on: January 21, 2011, 12:57:00 AM
The EMH says that market prices are approximately "correct" and you can't expect large gains. Yet many Bitcoiners expect large increases in the price of bitcoins. Is the EMH failing in the Bitcoin market, giving us a true free lunch? Or are Bitcoin investors deluding themselves by not recognizing the likelihood of loss?
227  Bitcoin / Bitcoin Discussion / Re: PROTON-like payments / Smart card for Bitcoins on: January 20, 2011, 11:53:11 PM
I think it will work to give change to the paying Bitcoin address. The client avoids this for privacy reasons - it tries to hide which output is payment and which is change. But it should work.

Oh, wait, you want to feed the change back into the card, don't you? That's trickier, because Bitcoin payments must reference the hash of the source transaction. What you need to do is store on the card the original source transaction hash (that funded the address on the card). Then when you make a payment, the terminal uses this for the txin, and creates a tx that gives change back to your address. It computes the hash of this new transaction and writes it back to the card. This will then be used as the txin for the next payment.

Does anyone know a smart card that supports ECDSA signatures?
228  Bitcoin / Bitcoin Discussion / Re: Getting massive acceptance of Bitcoin on: January 20, 2011, 07:00:36 PM
It's possible to do purely P2P poker using cryptography to shuffle the cards. The problem is that either all n players have to cooperate to decrypt a card, in which case if any player leaves the hand can't be completed; or t < n players suffice to decrypt a card, in which case any t players could collude to learn other players' cards. But it could work for a friendly game.
229  Economy / Economics / Re: Emergent art from the free market cypher-sphere on: January 19, 2011, 06:27:34 PM
A sign of getting old: Even though it's been almost ten years now, I still can't hear the phrase "Homeland Security" without feeling that I am reading a dystopian science fiction novel.
230  Bitcoin / Bitcoin Discussion / Re: Storing messages in the Bitcoin network - a steganographic scheme on: January 18, 2011, 06:47:31 PM
Your name (in the paper) is Nakamoto? Are you any relation to Satoshi?
231  Bitcoin / Bitcoin Discussion / Re: Quantum money using knots on: January 17, 2011, 09:54:20 PM
This would be a centralized system anyway. It's basically equivalent to a bank issuing digital money in the form of PK signatures, but because it's quantum it's theoretically more secure. You'd still be trusting the bank/mint not to cheat or inflate.
232  Bitcoin / Bitcoin Discussion / Re: Let's send Satoshi to Financial Cryptography on: January 17, 2011, 07:30:21 PM
No, I didn't have anything to do with that story, I've been assuming the author was Eliezer Yudkowsky, founder of LW. I've been reading it too, very entertaining. Kiba, I'll bet you'd enjoy it.
233  Bitcoin / Bitcoin Discussion / Re: Let's send Satoshi to Financial Cryptography on: January 17, 2011, 06:20:10 PM
http://lesswrong.com/lw/1ab/dying_outside/

That's my story. Travel is very difficult for me now.
234  Other / Off-topic / Re: Less Wrong on: January 16, 2011, 11:43:41 PM
I read it off and on, and I've met several of the people involved. Yet another way to Change the World. Wei Dai is active there sometimes, one of the godfathers of Bitcoin.
235  Bitcoin / Bitcoin Discussion / Re: The Bitcoin Report on: January 16, 2011, 10:33:32 PM
No, it seems I spent it in November, too bad. Of course the client doesn't let us pick which coins to pay with.  I didn't know it was the first transaction until today.
236  Bitcoin / Bitcoin Discussion / Re: The Bitcoin Report on: January 16, 2011, 07:04:21 PM
Thank you for satisfying my curiosity. I think it's almost certain that such an early block would have been generated by Satoshi. Of course, "spent" is quite a strong term. The coins might just have been sent to a different wallet.
This was actually a test payment Satoshi sent to me during debugging. I see in my email logs I offered to send it back but it seems I didn't.  Huh  It was an IP-address based payment.
237  Bitcoin / Bitcoin Discussion / Re: Ostracism of certain bitcoins. on: January 16, 2011, 06:14:53 PM
By the time an accusation of fraud could be credibly verified, likely there would have been plenty of time for the funds to be thoroughly laundered. Criminals would be well aware of the need to clean hot bitcoins quickly.
238  Bitcoin / Bitcoin Discussion / Re: The Bitcoin Report on: January 16, 2011, 03:17:48 AM
That's interesting, I was just wondering about that the other day, what is the highest balance for a Bitcoin address? 90,000 bitcoins, that's amazing.
239  Bitcoin / Bitcoin Discussion / Let's send Satoshi to Financial Cryptography on: January 15, 2011, 10:48:22 PM
Since we're all rich with bitcoins, or we will be once they're worth a million dollars like everyone expects, we ought to put some of this unearned wealth to good use. What better than to send our benefactor Satoshi to the Financial Cryptography conference.

http://ifca.ai/fc11/

FC is traditionally held at luxurious island resorts, and this year is no exception. Satoshi could meet the movers and shakers of the financial and cryptographic worlds while enjoying the beautiful beaches of St. Lucia. Unfortunately it is too late for him to speak, but given Bitcoin's enormous growth and potential, no doubt he would make many valuable connections. Indeed it may well turn out that Bitcoin becomes the single most successful example of Financial Cryptography.

FC does tend to be expensive. We appear to have missed the cutoff for cheap rooms. We probably need to budget $300 a night or about $1500. Add ~$500 for registration, maybe $2000 for travel, and we're talking about $4K or so. If 40 people chipped in $100 we'd be golden.

This is our chance to give something back to the creator of this fantastic new form of money, or currency, or payment system, or whatever. All we need is Satoshi's agreement and we can get started.
240  Bitcoin / Development & Technical Discussion / Sound effects on: January 15, 2011, 08:26:20 PM
I finally got around to building my own client from source (on Ubuntu) and the first thing I did was to add sound effects. I now hear a little pop whenever there's a transaction, and a chime when there's a new block.

It was easy, here's the diff for main.cpp, just 3 lines:

Code:
diff --git a/main.cpp b/main.cpp
index b7dfd9f..1196520 100644
--- a/main.cpp
+++ b/main.cpp
@@ -4,6 +4,7 @@
 
 #include "headers.h"
 #include "cryptopp/sha.h"
+#include "wx/sound.h"
 
 
 
@@ -2575,6 +2576,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
 
     else if (strCommand == "tx")
     {
+wxSound::Play("snd_tx.wav");
         vector<uint256> vWorkQueue;
         CDataStream vMsg(vRecv);
         CTransaction tx;
@@ -2628,6 +2630,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
 
     else if (strCommand == "block")
     {
+wxSound::Play("snd_blk.wav");
         CBlock block;
         vRecv >> block;

For snd_tx.wav I used http://www.series-of-articles.com/sfx/snd/pop.wav; for snd_blk.wav I used http://www.series-of-articles.com/sfx/snd/bell.wav.

A quick hack, but entertaining and informative.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!