-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merkle foundations with pre-commit hook #96
Conversation
@@ -417,6 +424,8 @@ private void Set(in Key key, in ReadOnlySpan<byte> payload) | |||
map.TrySet(key, payload); | |||
} | |||
|
|||
public IKeyEnumerator GetEnumerator() => throw new NotImplementedException("Not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Block
is responsible for keeping track of the keys used, could we face performance issues?
@@ -391,7 +396,9 @@ public void SetStorage(in Keccak key, in Keccak address, UInt256 value) | |||
Set(Key.StorageCell(path, address), payload); | |||
} | |||
|
|||
private void Set(in Key key, in ReadOnlySpan<byte> payload) | |||
public bool TryGet(in Key key, out ReadOnlySpanOwner<byte> result) => throw new NotImplementedException("Not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a Get
method, why do we need a TryGet
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a subject to debate what to do on the missing one. I assume for now that you'd like to know that it was not there 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interfaces look good, I was thinking something similar to this.
Merge at will @emlautarom1 |
This PR introduces a seam for the place where
Merkle
construct will be created. It is done in a way, so thatVerkle
construct in a future should be also easy to inject into it as a similar, but separate, implementation. The implementation in theblockchain
is not done yet, but it should not prevent users from using the seam.Effectively, this allows to implement the Merkle construct as