-
Notifications
You must be signed in to change notification settings - Fork 239
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
refactor: align accounts/abi/bind with coreth+upstream #1427
base: master
Are you sure you want to change the base?
Conversation
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.
👍 Just a few minor comments
@@ -7,7 +7,6 @@ | |||
// original code from which it is derived. | |||
// | |||
// Much love to the original authors for their work. | |||
// ********** |
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.
Why the removal? The geth files seem to have no copyright at all, so I'm not sure why we would modify this 🤔
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.
to match coreth.
@@ -319,7 +319,7 @@ func (t *tester) generate(parent common.Hash) (common.Hash, *trienode.MergedNode | |||
return root, ctx.nodes, triestate.New(ctx.accountOrigin, ctx.storageOrigin, nil) | |||
} | |||
|
|||
// lastRoot returns the latest root hash, or empty if nothing is cached. | |||
// lastHash returns the latest root hash, or empty if nothing is cached. |
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 typo in geth, I propose we revert this, however, if you want, I can be the typo comment man and accumulate these in a branch on the libevm repository, that we can PR to geth when it gets large enough?
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.
Coreth already contains this typo fix, so I suppose why not then. Ideally we should revert the fix in coreth but that seems like a lot of trouble for just this.
Anyway, I opened ava-labs/libevm#108 feel free to commit to it when you find a geth code typo.
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.
Same as above, here I'm just trying to reduce the difference in our repos.
We should try to take the geth changes as part of geth updates and fix them in upstream PRs.
Co-authored-by: Quentin McGaw <[email protected]> Signed-off-by: Darioush Jalali <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]> Signed-off-by: Darioush Jalali <[email protected]>
Includes changes to the
accounts/abi/bind
package, focusing on renaming types and functions for consistency with upstream and coreth by moving some functionality to a new file.The most important changes include renaming
TmplContract
,TmplMethod
, andTmplStruct
totmplContract
,tmplMethod
, andtmplStruct
, respectively, and moving theBindHook
function and related types to a new filebind_extra.go
.This makes our modifications much clearer.
Some additional cosmetic changes are also reduced.