pyquarkchain icon indicating copy to clipboard operation
pyquarkchain copied to clipboard

ShardState.__validate_tx should not depend on shard state non-constant variable

Open qizhou opened this issue 5 years ago • 2 comments

https://github.com/QuarkChain/pyquarkchain/blob/7fb8b7cbeeb40dbef13ac29fc1c0eb40885a9ada/quarkchain/cluster/shard_state.py#L436-L448

As referenced by the above code, __validate_tx() uses root_tip to determine whether the neighbor exists or not, which is wrong for run_block() case, where the root block observed by the minor block may have much lower height than root_tip

qizhou avatar Apr 22 '19 18:04 qizhou

@jyouyj can you help look into this?

ninjaahhh avatar Jun 12 '19 20:06 ninjaahhh

If we want to dynamically add a new shard chain, I think the function __validate_tx() will depend on the height of root_tip. Besides, root_tip observed by minor block is updated timely. When will it have a much lower height than root_tip?

jyouyj avatar Jun 14 '19 21:06 jyouyj