-
Notifications
You must be signed in to change notification settings - Fork 13
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
core, light, trie: polish code #303
core, light, trie: polish code #303
Conversation
c632a29
to
93e7504
Compare
93e7504
to
037a03d
Compare
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.
Thanks for doing all of that. I would like to keep the structure and especially the code locations/function names closer to the original names because there is a lot more stuff to merge and some functions' new names are misleading in my opinion. I agree on the GetStem
/ InsertStem
issue that I described below, I will create a PR for that.
trie/verkle/utils.go
Outdated
|
||
// Get returns the cached commitment for the specified address, or computing | ||
// it on the flight. | ||
func (c *Cache) Get(addr []byte) *verkle.Point { |
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.
the initial name was GetTreeKeyHeader
. It gets keys in the account header, and so needs nothing more than the account address. Get
is too generic and gives the impression that this key would return any key for the account, which isn't the case.
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.
Well, I understand it in a different perspective. The cache is for storing the evaluated curve point. The address is the input for computing the curve point and Get is used to retrieve the corresponding point. The benefit for naming it as Get is because the function name is shorter and cleaner.
Please take another look, I know the point that we want to minimize the conflicts and I also hope it, I will change accordingly. |
I wasn't clear: I am fine with |
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.
LGTM
No description provided.