aboutsummaryrefslogtreecommitdiffstats
path: root/tests/init.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2016-01-12 18:54:29 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2016-02-18 17:12:13 +0800
commit5b283663b40dbc06c56cc481ef90f4365ab85724 (patch)
tree9189037efa5823b4c94bfa529f742e9e579b01d8 /tests/init.go
parentb6d88a0e9f9aaeb47d585d79c768d457b545af90 (diff)
downloaddexon-5b283663b40dbc06c56cc481ef90f4365ab85724.tar.gz
dexon-5b283663b40dbc06c56cc481ef90f4365ab85724.tar.zst
dexon-5b283663b40dbc06c56cc481ef90f4365ab85724.zip
core: Added new TD strategy which mitigate the risk for selfish mining
Assuming the following scenario where a miner has 15% of all hashing power and the ability to exert a moderate control over the network to the point where if the attacker sees a message A, it can't stop A from propagating, but what it **can** do is send a message B and ensure that most nodes see B before A. The attacker can then selfish mine and augment selfish mining strategy by giving his own blocks an advantage. This change makes the time at which a block is received less relevant and so the level of control an attacker has over the network no longer makes a difference. This change changes the current td algorithm `B_td > C_td` to the new algorithm `B_td > C_td || B_td == C_td && rnd < 0.5`.
Diffstat (limited to 'tests/init.go')
-rw-r--r--tests/init.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/init.go b/tests/init.go
index a86970499..caa4eca6c 100644
--- a/tests/init.go
+++ b/tests/init.go
@@ -44,6 +44,9 @@ var (
"TRANSCT__RandomByteAtTheEnd",
"BLOCK__ZeroByteAtTheEnd",
"TRANSCT__ZeroByteAtTheEnd",
+
+ "ChainAtoChainB_blockorder2",
+ "ChainAtoChainB_blockorder1",
}
/* Go client does not support transaction (account) nonces above 2^64. This