LiskArchive / lisk-engine

:bullettrain_front: Lisk blockchain engine
https://lisk.com
Apache License 2.0
0 stars 0 forks source link

Root can be computed with invalid bitmap #113

Closed shuse2 closed 1 year ago

shuse2 commented 1 year ago

Expected behavior

When bitmap is 0, it should use the empty hash instead of using the next query it should follow as this PR

Actual behavior

https://github.com/LiskHQ/lisk-engine/blob/main/pkg/trie/smt/verify.go#L73 In this first condition, bitmap is not considered. Therefore, even when bitmap is 0, it will be ignored and

Steps to reproduce

Change the first bitmap of the jumbo SMT fixture, and check if it passes the test