Commit Graph

16669 Commits

Author SHA1 Message Date
jl777
e6c99a7ab9 Split out no previndex from invalid prevblock 2018-04-21 23:06:56 +03:00
jl777
971f0b0237 Merge branch 'dev' into jl777 2018-04-21 19:53:06 +03:00
jl777
d859438b65 Merge 2018-04-21 19:52:27 +03:00
jl777
710f1a33f1 Merge pull request #608 from ca333/patch-5
update configure
2018-04-21 19:45:28 +03:00
ca333
1c518c38eb update configure
win condition not needed due to boost lib fix
2018-04-21 18:44:20 +02:00
jl777
56b09b29ed Merge pull request #607 from jl777/jl777
Jl777
2018-04-21 19:18:03 +03:00
jl777
e3e263b59d -print 2018-04-21 19:17:16 +03:00
jl777
a695f47ee3 Merge branch 'dev' into jl777 2018-04-21 17:26:35 +03:00
jl777
e77c5b8d07 Merge pull request #606 from KomodoPlatform/dev
fix OSX/WIN port
2018-04-21 17:26:06 +03:00
ca333
a04f539e27 Merge pull request #22 from jl777/dev
update dev
2018-04-21 16:16:11 +02:00
jl777
7d54b77e7d Merge pull request #605 from jl777/jl777
Jl777
2018-04-21 17:10:00 +03:00
jl777
28b18b6127 Test 2018-04-21 16:55:03 +03:00
jl777
985907e4ec Fix too strict 2018-04-21 16:36:54 +03:00
jl777
2c089649f0 Fix 2018-04-21 16:19:16 +03:00
ca333
85eee03623 Merge pull request #21 from jl777/dev
update dev
2018-04-21 15:11:22 +02:00
jl777
b0bf5d0282 -print 2018-04-21 15:55:59 +03:00
jl777
d013a67e45 Merge pull request #604 from jl777/jl777
Jl777
2018-04-21 15:35:07 +03:00
jl777
64b45b7192 Test 2018-04-21 15:16:44 +03:00
jl777
a36c1a705a +print 2018-04-21 14:53:16 +03:00
jl777
41427baa04 Test 2018-04-21 11:36:15 +03:00
jl777
a36fcdf53d Test 2018-04-21 11:28:37 +03:00
jl777
8d7c97d9e8 Merge pull request #603 from jl777/jl777
Jl777
2018-04-21 10:45:47 +03:00
jl777
e3b04fea0c Return error if prevblock != best block 2018-04-21 10:43:41 +03:00
ca333
854de8cb0d fix boost WIN
prev. boost lib fix removes above condition requirement
2018-04-21 06:38:39 +02:00
ca333
c98eca85af fix boost
osx specific
2018-04-21 05:35:27 +02:00
ca333
88558a6fbc fix boost
fix boost 1.66.0 mk
2018-04-21 02:49:10 +02:00
ca333
d3c94f437a Merge pull request #20 from jl777/dev
update dev
2018-04-21 02:35:30 +02:00
ca333
637e61c017 update package deps
darwin specific fix
2018-04-21 02:13:13 +02:00
ca333
a59295a257 update OSX makefile 2018-04-21 02:11:35 +02:00
ca333
7d2e4b3c77 add darwin conds
fix OSX specific datatype error
2018-04-21 01:18:49 +02:00
ca333
73be97e1c4 add darwin cond
fix OSX specific bug by statically casting datatype
2018-04-21 00:52:27 +02:00
ca333
aee282db0f add darwin condition to asyncoperation
OSX specific fix
2018-04-21 00:50:06 +02:00
ca333
7f04652a00 add darwin cond
use stdlib for darwin build
2018-04-20 22:42:22 +02:00
ca333
4790166753 add OSX cond
OSX specific condition
2018-04-20 22:38:24 +02:00
jl777
0d8e3988e9 Immediate submit block from miner 2018-04-20 22:44:01 +03:00
jl777
1fd382079b Merge pull request #602 from jl777/jl777
Jl777
2018-04-20 22:32:41 +03:00
jl777
c685d69264 Test 2018-04-20 22:27:11 +03:00
jl777
bd30f12363 Test 2018-04-20 22:21:13 +03:00
jl777
350d40c747 Test 2018-04-20 22:19:56 +03:00
jl777
45af4c09d8 Test 2018-04-20 22:19:20 +03:00
jl777
ebb59e6038 Test 2018-04-20 22:10:25 +03:00
jl777
476479af36 Merge pull request #601 from jl777/jl777
Jl777
2018-04-20 22:01:57 +03:00
ca333
d6d312f9ee add OSX cond 2018-04-20 21:00:01 +02:00
jl777
42a7467aa6 Revert network size check to ASSETCHAINS_STAKED 2018-04-20 21:59:48 +03:00
jl777
f225a9badd Test 2018-04-20 19:44:18 +03:00
jl777
e76694e44c test 2018-04-20 19:43:35 +03:00
jl777
425ca40a4e Merge pull request #600 from jl777/jl777
Fix polarity of compare
2018-04-20 17:43:44 +03:00
jl777
f4b367397a Fix polarity of compare 2018-04-20 17:42:58 +03:00
jl777
6383313e39 Merge pull request #599 from jl777/jl777
Jl777
2018-04-20 17:18:52 +03:00
jl777
2ac071da47 KOMODO_LIMITED_NETWORKSIZE
Prior commits relate to supporting a limited size network.

It looks like there is an edge case where it is possible for a hash to
be in the mapIndex, without a pindex. If a block with such a hash is
tried to be Accepted, the AcceptBlockHeader returns true but with a
null pindex, and AcceptBlock fails.

The code says that this indicates that the hash was added from a
blockheader without a block, but I didn’t see that happening. In any
case, it happens a lot on a 2 node network. So much so that if one node
is just mining, before too long the other node will not accept the
block and once that happens, no subsequent block would work as the
prior block is missing.

Of course, with more nodes, these blocks will be around a lot more and
likely it won’t be such an issue, but not so sure that it doesn’t
require restarting the node to get it back on track again.

These prior commits implement a KOMODO_LIMITED_NETWORKSIZE logic where
if it sees that a block has come in which is in the mapIndex but has no
pindex, it automatically addtoblockindex.

There is one edge case still left where both the current block being
processed and its previous block are in this limbo state. Since the
pindex is not mapped to the block, it is problematic to retrieve the
CBlock for the pprev and without the valid pprev the pindex will have a
null pprev and no nHeight set. It is possible that all the other code
will properly deal with such a case and automatically fix it, but
rather than rely on that, in such a case the automatic addtoblockindex
is not done.

A node in such a state would need to exit and restart or somehow fill
in the data from other nodes.

From what I can tell, the above is the main reason why the PoS/PoW
networks were having problems staying in sync. Since even with one
mining node, it was just a matter of time before the other node got
stuck, with more than one mining node we end up with independent forks
that won’t reconcile until the node is restarted.
2018-04-20 17:16:06 +03:00