Leakage of information about selfish mining - what message is responsible?


A few weeks back I had asked a question about how honest nodes could detect a Selfish Mine Attack and if there were mechanisms that would disclose selfish mining.

In a very first step: I've slightly changed the Bitcoin source code in a way that a selfish node (built from that modified code) run on regtest shouldn't shouldn't report its secret blocks. Now, this doesn't ALWAYS work out because a honest node connected to the selfish node somehow, in a certain scenario, gets to know about hidden blocks and updates its blockchain. I would like to know through what kind of messages/mechanisms a selfish node could blabber out about its headers and eventually blocks, if not through headers and block messages? Or do I miss something?

For a better understanding of my question, I'll sketch it here (h=honest node; s=selfish node):

  1. SCENARIO (failing selfish mine): first generate secret block, then connect to honest node:
    • h: start bitcoin server.
    • s: start bitcoin server.
    • s: create block #1 (child of genesis block)
    • h: addnode "s" add
      ---version, verack, getaddr and ping messages exchanged (no pong messages!?)---
      ---wireshark strangely doesn't show any getheaders, headers, getdata or block messages---
      BUT ...
    • h: updatetip: best= block#1!!!

How is this possible without having sent even headers messages, in first place?


  1. SCENARIO (successfull selfish mine): first connect to honest node, then generate secret block
    • h: start bitcoin server.
    • s: start bitcoin server.
      ---version, verack, getaddr and ping messages exchanged (no pong messages!?)---
    • s: create block #1 (child of genesis block)
      ---honest node doesn't react and wireshark verifies this by showing no packet exchange---

I looked up hash of block#1 (in reversed byte order) in EVERY message's hexdump but it wasn't there - still honest node was able to update to hidden chain in 1. Scenario!?

Aliakbar Ahmadi

Posted 2015-06-18T17:19:01.450

Reputation: 1 415

That's very strange. You should get, at minimum, an inv, a getdata, and a block message. – Nick ODell – 2015-06-18T18:03:59.530

@NickODell: With 2. Scenario everythings going as planned.. but 1. Scenario is strange but true. – Aliakbar Ahmadi – 2015-06-18T18:05:25.253

Hmmm. Could you post a wireshark log of scenario #1 to a filehosting site, and link it here? – Nick ODell – 2015-06-18T18:07:28.960

@NickODell: This is a wireshark-specific pcapng-file: http://www.filedropper.com/selfishnessfailedpackets can you open it? If not I'll upload hexdumps one by one and upload them. And this is a screenshot: http://www.filedropper.com/selfishminingtest

– Aliakbar Ahmadi – 2015-06-18T18:25:17.093

I can open it. I don't see the same thing - I see pong, getheaders, headers. Want a screenshot, or do you see it too? – Nick ODell – 2015-06-19T02:19:18.063

Ok weird. I didn't see any of those, yes please can you send a screenshot? – Aliakbar Ahmadi – 2015-06-19T09:47:10.243

Let us continue this discussion in chat.

– Aliakbar Ahmadi – 2015-06-19T09:47:40.177

No answers