refactor: encode MorphTx version as prefix byte instead of RLP field#284
Merged
FletcherMan merged 1 commit intoref_keyfrom Jan 30, 2026
Merged
refactor: encode MorphTx version as prefix byte instead of RLP field#284FletcherMan merged 1 commit intoref_keyfrom
FletcherMan merged 1 commit intoref_keyfrom
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
chengwenxi
approved these changes
Jan 30, 2026
FletcherMan
added a commit
that referenced
this pull request
Mar 6, 2026
* update morph tx * add reference * update * update * add test * fix sth * add check and test * add test * refactor: encode MorphTx version as prefix byte instead of RLP field (#284) Co-authored-by: fletcher.fan <fletcher.fan@bitget.com> * fix decode morphtx & receipt * fix get transaction hashes by reference * update args * fix args checks * fix version check * some improve * add args check * update * update * update to jade * active after jade fork time * check geth version * fix sth * fix reference validate * fix memo validate * fix tx filter * fix rpc and ref index * fix * fix version * add validate * update returns receipt & result * fix: use hexutil.Uint64 for MorphTx version JSON encoding (#293) txJSON.Version was *uint8 (plain number) while RPCTransaction.Version uses *hexutil.Uint64 (hex string). This caused ethclient.BlockByNumber to fail with "cannot unmarshal string into Go struct field rpcBlock.transactions.version of type uint8" on non-sequencer nodes. Align txJSON.Version with the Ethereum JSON-RPC convention by using *hexutil.Uint64, consistent with all other numeric fields (FeeTokenID, QueueIndex, etc.). * fix hash * add version check and test --------- Co-authored-by: segue <“huoda.china@gmail.com”> Co-authored-by: FletcherMan <fletcherman0709@gmail.com> Co-authored-by: fletcher.fan <fletcher.fan@bitget.com> Co-authored-by: panos <pan107104@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Purpose or design rationale of this PR
Optimizes MorphTx encoding by moving the Version field outside of the RLP structure and encoding it as a prefix byte, similar to how Transaction.Type is handled.
Changes
Encoding Format
Version Detection Logic
Files Changed
2. PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
3. Deployment tag versioning
Has the version in
params/version.gobeen updated?4. Breaking change label
Does this PR have the
breaking-changelabel?