Skip to content

00 prefixed addresses leading to an error. #26643

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

Closed
slawomir-pryczek opened this issue Feb 8, 2023 · 1 comment
Closed

00 prefixed addresses leading to an error. #26643

slawomir-pryczek opened this issue Feb 8, 2023 · 1 comment
Labels

Comments

@slawomir-pryczek
Copy link

Hi Guys, can you please check this bug report web3p/rlp#27 and explain how geth is handling RLP encoded addresses with leading 00's removed? Trying to find source of this error when dealing with 0x00 prefixed wallets.

rlp: input string too short for common.Address, decoding into (types.DynamicFeeTx).To

Seems when im signing transaction using geth it'll leave 00's in the address. Eg. destination address is
0x00f0cb2ed033f72b4a1e14948860e197aa2ee988

Geth will keep it in the transacion. PHP/RLP will convert this address to 0xf0cb2ed033f72b4a1e14948860e197aa2ee988

Thanks

@holiman
Copy link
Contributor

holiman commented Feb 8, 2023

patch to remove leading 0's from strings.

An address is not a string, it's a fixed-length (20) byte array.

The canonical encoding of address does not allow you to trim stuff.

@holiman holiman closed this as completed Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants