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

Fix: handle single-byte RLP strings, bump to v0.5.14 #293

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

samuelarogbonlo
Copy link

Fixes the RLP decoder to properly handle single-byte strings and bumps version to 0.5.14. Previously, attempting to decode a single-byte string like "a" would result in the error "RLP string ends with -32 superfluous bytes".

Changes:

  • Modified encoder to consistently wrap output in Rlp::Data
  • Fixed handling of single-byte strings in RLP encoding/decoding
  • Added test case to verify single-byte string handling
  • Bumped version from 0.5.13 to 0.5.14

Tests:

  • All existing tests pass
  • Added new test case for single-byte strings
  • Verified fix with direct testing of the failing case:
    Eth::Rlp.decode(Eth::Rlp.encode("a")) # now works correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant