Advertisement
xhiggy

Untitled

May 19th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.48 KB | None | 0 0
  1. csw [2:42 AM]
  2. Not test the model, test the system against the model
  3.  
  4. zbingledack [2:45 AM]
  5. Still thinking. The block race as a Poisson process is very strange to start with. I don't think I have _fully_ wrapped my head around even the basic design, let alone additional issues. We don't even ever really know a miner's hashpower except for statistics over a given time interval.
  6.  
  7. [2:47]
  8. I am one who likes to solidify the basics to ridiculous degree before moving to advanced topics. So I will be slow to get these higher-level arguments.
  9.  
  10. csw [2:50 AM]
  11. Yes.
  12.  
  13. [2:52]
  14. Assuming the uniform distribution as is done in independent events...
  15.  
  16. [2:53]
  17. What is probability of one poisson process occuring after another given that the first occured?
  18.  
  19. [2:55]
  20. What is the probability of the HM discovering 30 seconds after the SM?
  21. What is the probability that the SM will have a block mined given that they have seen the HM release a block?
  22.  
  23. [2:55]
  24. These ARE missing parts of the model.
  25.  
  26. [2:59]
  27. @zbingledack
  28. Let us start now with the FIRST block event.
  29.  
  30. A SM finds a block. They Hide it.
  31. If they release, they have a reward of 1 (close to 100% chance)
  32.  
  33. If they hide it, they have 0 reward but a later possibility.
  34.  
  35. Chances are (and I will go over the distributions after) that the HM will find a block before the SM gets a second (I will cover this later).
  36.  
  37. So, they have 100% getting paid as an HM or a CHANCE to risk it. What is the Probability that the SM will lose when the HM discovers a competing block?
  38.  
  39. [3:00]
  40. P(SS | Not.H) vs P(S|H) = reward.
  41. P(H|S) = they lose....
  42.  
  43. [3:02]
  44. @zbingledack
  45. Without needing to go into the actual distributions....
  46.  
  47. Starting to see why this is a conditional probability calculation...
  48.  
  49. [3:05]
  50. I am not running the SM state system, I am running Bitcoin. Who cares what SMCoin does...
  51. If you miss the conditionals in the probability calculations you have a value greater than the base and an error.
  52.  
  53. mwilcox [3:57 AM]
  54. hmm - surely not 100% as HM if SMs have chance to overtake?
  55.  
  56. csw [4:36 AM]
  57. SM is slower - always under 50% remember
  58.  
  59. [4:40]
  60. It is not the chance of finding a block, it is for the HM a chance to find a block after the SM has found one...
  61.  
  62. joeldalais [4:47 AM]
  63. the sm only has a chance to overtake if they're competing vs another sm
  64.  
  65. csw [4:57 AM]
  66. And did anyone model 2 or more SMs?
  67.  
  68. joeldalais [5:00 AM]
  69. for some reason this popped into my head - https://en.wikipedia.org/wiki/Go_(game) :slightly_smiling_face: (edited)
  70.  
  71. karasako [6:41 AM]
  72. joined selfish-mining by invitation from @klee. Also, @phoenix joined, @linzheming joined.
  73.  
  74.  
  75. ----- Yesterday May 18th, 2017 -----
  76. phoenix [6:28 AM]
  77. thanks man
  78. 4 replies Last reply about 20 hours ago View thread
  79.  
  80. frankross [6:29 AM]
  81. joined selfish-mining by invitation from @zillionaire, along with @xspdr. Also, @dgenr8 joined, @vatten joined, @hostfat joined, @jonald_fyookball joined.
  82.  
  83.  
  84. ----- Today May 19th, 2017 -----
  85. csw [2:29 AM]
  86. Here is a thing to start you thinking.
  87.  
  88. The Selfish Mining paper is not science. It is a theory, a quantifiable testable theory. One that can be validated.
  89.  
  90. Now, here is the secure with experimental tests. This is what we see wrong all the time in the world today. You test the model AGAINST the real world. You DO NOT just run a simulation of the model and confirm the numbers from the untested model.
  91.  
  92. Do we all understand this distinction?
  93.  
  94. [2:29]
  95. So, here is a REAL experiment
  96.  
  97. [2:29]
  98. Run up 100 virtual machines
  99.  
  100. csw [2:38 AM]
  101. Have each of them independent and on a LAN so that there are no delay assumptions (as the paper states)
  102.  
  103. Set two classes of machines:
  104. 1. General miners that represent the HM system. These are unmanaged and not connected as a pool. These just run.
  105. This group is the base test and we can run a control at 100% this way to ensure that the system is correctly configured.
  106.  
  107. 2. Create a mining pool. This is the SM test.
  108. We can start with 30 of the 70 hosts in the pool and work up to 50 of the 100. See how the percentages are nice and simple to calculate. I know few people have done PhD level Maths (as I did do). Set a value such as 40 SM hosts and 60 remaining as the first one tested to get the flavor of whether this is working and you need to model all 20 runs.
  109.  
  110. Do the test with the pool running normally first. This is the control test and it will be a standard mining return if the system is correctly configured.
  111.  
  112. Again, remember to Run the pool system as a control first.
  113.  
  114. [2:38]
  115. Next, configure the pool for SM
  116.  
  117. csw [2:45 AM]
  118. Have the pool act through a single head.
  119. Configure the system to only release when it sees another miner release.
  120.  
  121. The easy way to do this is to have two LAN Sections. VMWare and Xen both allow for the creation of switch and VLAN segments.
  122.  
  123. One of the SM hosts is the "head", this will be a dual homed system. It talks to both SM and honest systems. All SM miners receive the Honest miner block from this "head" server. This server is the only one that needs to be altered. The others are all pool members. You can also run up pool mining software, but this is more difficult and does not change the results.
  124.  
  125. All the VMs need to be spec'd the same.
  126.  
  127. Do not think about the difficulty as this is not part of the live network.
  128.  
  129. I have a configuration in CORE (Common Open Research Emulator) from the US Navy.
  130.  
  131. [2:46]
  132. https://www.nrl.navy.mil/itd/ncs/products/core
  133.  
  134. [2:47]
  135. Just to be a dick, my CORE configuration is constructed with up to 100,000 nodes and 5,000 routers. It has the mappings for the global BGP tables and all the real world link data...
  136.  
  137. But as I said, for the purposes of this exercise, we just need a simple LAN with 100 small VMs
  138.  
  139. [2:48]
  140. Configuring the pool can be achieved in many ways.
  141.  
  142. csw [2:54 AM]
  143. You can change the code and have the code react differently, but there are simpler methods if this is too difficult.
  144.  
  145. Run an IPTables instance.
  146. Run Snort or some other packet sniffing IDS/IPS.
  147.  
  148. Create a rule. We will set two sides to the network. A - Honest, B - Selfish.
  149.  
  150. Setup a rule in the IDS to see and determine a Block. This is easy if you know how to script in Snort. Create a threshold rule. This is where you can specify event thresholds and make the state table response that is listed in the SM paper....
  151.  
  152. If we see a block on the A network, we respond using the IDS rules as we would for the SM paper. There are various thresholds. All need to match the SM paper.
  153.  
  154. After creating these, you need to test them. I like TCPDump, but Wireshark is also good. When we know that the system works as it is purported to do, then and only then can we start the test. Please note, it is important to record the data for this stage as well as we need to have the data to validate the results. (edited)
  155.  
  156. [2:55]
  157. I can help with TCPDump and Snort. I used to teach the use of these products, they are both free
  158.  
  159. new messages
  160. [2:57]
  161. On the B side, all blocks are sent to all systems and the "head" collects and responds. The IDS stops any block getting to the systems at the wrong time or leaving the "head" to the B group at the wrong time.
  162.  
  163. Note: you CAN create threshold rules in Snort that allow you to set conditions as granular as the block height from a Bitcoin block.
  164.  
  165. [2:59]
  166. These thresholds CAN be as granular as to have a rule such as:
  167.  
  168. If (Block-Height-A) >= (Block-Height-B) Do xxx
  169. If (Block-Height-A) < (Block-Height-B) Do xxx
  170.  
  171. [3:00]
  172. If (Block-Height-A) = (Block-Height-B +1) Do xxx
  173. If (Block-Height-A) >= (Block-Height-B +2) Do xxx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement