-
Notifications
You must be signed in to change notification settings - Fork 146
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
chore(core/types): header JSON and RLP serialization hooks (4) #746
Conversation
- Uses tip of main libevm dependency + cherry picked commit: ava-labs/libevm@d3f6a5e - Precompile legacy gas fix (done in ava-labs/libevm@f906679) - Added `HeaderExtra` not-implemented implementation - Minimal changes shamelessly copied over from #746
- Uses tip of main libevm dependency + cherry picked commit: ava-labs/libevm@d3f6a5e - Precompile legacy gas fix (done in ava-labs/libevm@f906679) - Added `HeaderExtra` not-implemented implementation - Minimal changes shamelessly copied over from #746
- Uses tip of main libevm dependency + cherry picked commit: ava-labs/libevm@d3f6a5e - Precompile legacy gas fix (done in ava-labs/libevm@f906679) - Added `HeaderExtra` not-implemented implementation - Minimal changes shamelessly copied over from #746
f133755
to
ef168bd
Compare
269fb9c
to
d98039c
Compare
7093fc3
to
3e8d4e4
Compare
d98039c
to
d52d44f
Compare
3e8d4e4
to
806817d
Compare
59ef836
to
c6f5f69
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.
Self review
6ac9728
to
e0537f8
Compare
806817d
to
9165b01
Compare
e0537f8
to
22d5be0
Compare
9165b01
to
514bcdb
Compare
22d5be0
to
f743475
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.
The change to the test makes it possibly tautological so it's important to revert it.
…or gen_*.go files Co-authored-by: Darioush Jalali <[email protected]> Signed-off-by: Quentin McGaw <[email protected]>
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.
I can't approve this but LGTM
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.
Self approving 🪃 !
- `ex` -> `headerExtra` - `exportedFieldsDeepCopied` -> `exportedFieldsPointToDifferentMemory` - use intrange when iterating over v.NumField() - `testHeaderEncodings` -> `testHeaderEncodeDecode` - Add comment why returned value of `testHeaderEncodeDecode` is ignored for TestHeaderJSON - Rename `b` to `encoded` (named return) in `testHeaderEncodeDecode`
- gen_header_json.go -> gen_header_serializable_json.go - gen_header_rlp.go -> gen_header_serializable_rlp.go
8ca5efd
to
57a6734
Compare
Co-authored-by: Arran Schlosberg <[email protected]> Signed-off-by: Quentin McGaw <[email protected]>
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.
Noting that force push was a no-op.
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.
Re-approving (given no-op force push)
- Implement `HeaderExtra` RLP and JSON serialization methods - remove `BlockNonce` - remove `EncodeNonce` - new functions `GetHeaderExtra` and `SetHeaderExtra` - Migrate existing custom `Header` to `HeaderSerializable` in block_ext.go with only `Hash` method for RLP code generation - Rename files gen_header_json.go to gen_header_serializable_json.go - Rename files gen_header_rlp.go to gen_header_serializable_rlp.go Signed-off-by: Quentin McGaw <[email protected]> Co-authored-by: Quentin Mc Gaw <[email protected]> Co-authored-by: Arran Schlosberg <[email protected]> Co-authored-by: Ceyhun Onur <[email protected]>
HeaderExtra
RLP and JSON serialization methodsBlockNonce
EncodeNonce
GetHeaderExtra
andSetHeaderExtra
Header
toHeaderSerializable
in block_ext.go with onlyHash
method for RLP code generationPS by qdm12: inappropriate branch name
libevm-upstream-types
for historical reasons