From 7eaf379757dc4b3b8b82e9f677d12e37ec62549c Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Mon, 27 May 2019 15:27:42 -0700 Subject: [PATCH] Do not fail hard on shard state mismatch This is because CalculateNewShardState() has been seen to be nondeterministic (different output with the same input). --- node/node_handler.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/node/node_handler.go b/node/node_handler.go index 8ddb5268c..2242e79a7 100644 --- a/node/node_handler.go +++ b/node/node_handler.go @@ -315,7 +315,12 @@ func (node *Node) validateNewShardState(block *types.Block, stakeInfo *map[commo if types.CompareShardState(expected, proposed) != 0 { // TODO ek – log state proposal differences // TODO ek – this error should trigger view change - return errors.New("shard state proposal is different from expected") + err := errors.New("shard state proposal is different from expected") + // TODO ek/chao – calculated shard state is different even with the + // same input, i.e. it is nondeterministic. + // Don't treat this as a blocker until we fix the nondeterminism. + //return err + ctxerror.Log15(utils.GetLogger().Warn, err) } } else { // Regular validators fetch the local-shard copy on the beacon chain