Commit graph

9 commits

Author SHA1 Message Date
Roman Khimov
216513e14f stateroot: reject validated root if it doesn't match local one
Prevent

2021-03-27T00:05:23.382+0300    WARN    blockQueue: failed adding block into the blockchain     {"error": "error while trying to apply MPT changes: key not found", "blockHeight": 12757, "nextIndex": 12758}

after node restart (node reads "local" root hash that it doesn't have).
2021-03-27 00:33:11 +03:00
Roman Khimov
d143696328 stateroot: try to fix MPT caching/updating
It was completely ruined by bf20db09e0. MPT was
updating bc.dao directly which shouldn't ever happen, it must write into the
same cache and then Persist these KVs as usual.
2021-03-27 00:33:11 +03:00
Roman Khimov
5f7ec6e784 state: fix MPTRoot JSONization
Match C# implementation. It's easier to do this by changing the structure
itself.
2021-03-26 13:45:18 +03:00
Roman Khimov
8c110a6147 state: drop Network from MPTRoot structure
It's only needed to verify/sign.
2021-03-26 13:45:18 +03:00
Roman Khimov
0248e2c0d2 state: add network to MPTRoot, change hashing
Fix RC1 incompatibility.
2021-03-25 22:37:30 +03:00
Evgeniy Stratonikov
2f3abf95a2 stateroot: broadcast state on new blocks 2021-03-09 13:51:11 +03:00
Evgeniy Stratonikov
3c65ed1507 stateroot: allow to sign new roots 2021-03-09 13:51:11 +03:00
Evgeniy Stratonikov
ac227a80fe stateroot: use RoleStateValidator for verification 2021-03-09 13:51:10 +03:00
Evgeniy Stratonikov
bf20db09e0 stateroot: move state-root related logic to core/stateroot 2021-03-09 13:48:29 +03:00