Fix transaction/receipt encoding in eth_getRawTransaction
#245
Closed
opened 2023-06-12 22:13:13 +00:00 by i-norden
·
1 comment
No Branch/Tag Specified
v5
fix/pin-eth-typing
fix/pin-dlv-version
ian/tracing
payments
v5-go-upgrade
v4
release-v4.1.7-alpha
ian_v4
release-v4.1.4-alpha
release-v4.1.2-alpha
sharding
release-v4.1.0-alpha
master
v5.3.0-alpha
v5.2.0-alpha
v5.1.2-alpha
v5.1.1-alpha
v1.11.6-statediff-v5
v4.1.8-alpha
v4.1.7-alpha
v4.1.6-alpha
v4.1.5-alpha
v4.1.4-alpha
v4.1.3-alpha
v4.1.2-alpha
v4.1.1-alpha
v4.1.0-alpha
v4.0.6-alpha
v4.0.5-alpha
v4.0.4-alpha
v4.0.3-alpha
v3.2.2
v4.0.2-alpha
v3.2.1
v3.2.0
v4.0.1-alpha
v4.0.0-alpha
v3.1.0
v3.0.0
v2.0.0
v0.3.9
v0.3.8-alpha
v0.3.7-alpha
v0.3.6-alpha
v0.3.5-alpha
v0.3.4-alpha
v0.3.3-alpha
v0.3.2-alpha
v0.3.1-alpha
v0.3.0-alpha
v0.2.0-alpha
v0.1.0-alpha
v0.0.13
v0.0.12
v0.0.11-alpha
v0.0.10-alpha
v0.0.9
v0.0.8
v0.0.7
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
Labels
Clear labels
Epic
Integration tests
bug
critical
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
v5
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Further information is requested
This will not be worked on
An issue or PR manually copied from GitHub.
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/ipld-eth-server#245
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
After EIP-2718 when the new tx types were added, the “consensus encoding” of a transaction (and receipt) is not a pure RLP encoding except for the legacy transaction. For non-legacy tx/rct types it is an RLP encoding of the tx/rct + prepending it with a specific prefix. This is encapsulated in the new
tx.MarshalBinaryandrct.MarshalBinarymethods. https://github.com/cerc-io/ipld-eth-server/blob/v5/pkg/eth/api.go#L470 and other usages ofrlp.EncodeToBytesto encode transaction and receipts need to be replaced withtx.MarshalBinaryorrct.MarshalBinary.Also needs to be replaced at https://github.com/cerc-io/ipld-eth-server/blob/v5/pkg/eth/backend_utils.go#L278