Skip to content
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

eth_getTransactionBy* - RPC incompatibility, null fields should return 0x0 #1269

Closed
jaeaster opened this issue Dec 13, 2022 · 2 comments
Closed

Comments

@jaeaster
Copy link

In ethers-rs, when trying to deserialize the response from eth_getTransactionBy(Hash, BlockNumberAndIndex, BlockHashAndIndex), the deserialization fails because the ECDSA fields (r, s, v) are all equal to 0x. ethers-rs expects those fields to be populated with some value, namely:

"invalid length 0, expected a (both 0x-prefixed or not) hex string or byte array containing between (0; 8] bytes"

I'm not sure if those fields should be null, but if they are, the RPC should return 0x0. I've tested that filling those fields with 0x0 results in a successful deserialization.

@Stebalien
Copy link
Member

Yep. We need to be revers-engineering these fields from the signature in https://github.com/filecoin-project/lotus/blob/373b8b3517c6ade6f9d346bfe3c0af30007f2b47/node/impl/full/eth.go#L1483-L1485. But we're not.

@raulk
Copy link
Member

raulk commented Dec 19, 2022

Fixed in filecoin-project/lotus#9837.

@raulk raulk closed this as completed Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants