Michał Sieczkowski

Results 8 comments of Michał Sieczkowski

Some examples to better understand this issue: ## 1. It is impossible to dispute a transfer _from_ a nonexistent state leaf In order to do so, you would provide the...

Another possible fix could be changing the representation of a vacant state leaf to a hash of `abi.encodePacked(0, 0, 0, 0)` (current encoding of a zero `UserState`). This would however...

So to summarise, I think we considered 3 solutions so far: ## 0. Encode empty user state as `abi.encode(0)` (initial proposal) Pros: - no change in zero hash used for...

I feel that this issue should be resolved together with #664 and we would come up with a better solution then.

Following @alcuadrado advice, I run the wrapped MPT v4 (version from this PR) against [v3.0.0](https://github.com/ethereumjs/merkle-patricia-tree/releases/tag/v3.0.0) tests. This helped discover a bug in `getRaw` and `putRaw` wrapper implementation. These methods should...

The remaining failing tests that @alcuadrado mentioned are in fact [2 tests](https://github.com/nomiclabs/buidler/blob/5baf34e7357a2b964917ed7ae60465ad98b4e097/packages/buidler-core/test/internal/buidler-evm/provider/modules/eth.ts#L204-L270) that fail for the same reason. They both test a simple behaviour and fail at step 3: 1....

Ok, I found another deviation in the wrappers which caused these 2 last tests to fail. It turns out that `SecureTrie.copy` disregards changes introduced during checkpoint whereas `CheckpointTrie.copy` by default...

@ryanio I didn't identify any bug in MPT v4 itself other than this one inconsistency which would cause problems during my integration attempts. I'd say that [`SecureTrie.copy`](https://github.com/ethereumjs/merkle-patricia-tree/blob/57a55949024b4520dca7ed3896d0ba4c64b35706/src/secure.ts#L27) should behave in...