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

[Feature] add a way to switch between RLP and Protobuf for substateDB decoding #86

Closed
wants to merge 157 commits into from

Conversation

rpl-ffl
Copy link
Collaborator

@rpl-ffl rpl-ffl commented Sep 19, 2024

Add a builder function SetDecoder(encoding string) to substateDB and SubstateDB interface so that a decoder type can be selected.
A substateDB can decode using decodeRlp or decodeProtobuf. It defaults to decodeRlp to preserve original functionality.

Example usage:

db := (&substateDB{...})          // initializing db as normal, this defaults to RLP
         .SetDecoder(<encoding>)  // at end of init (or before decoding) to switch between RLP/Protobuf

Type of change

  • New feature (non-breaking change which adds functionality)

@rpl-ffl rpl-ffl force-pushed the rapol/feature/protobuf branch 5 times, most recently from 74fb259 to 6c8167f Compare September 23, 2024 08:02
@rpl-ffl rpl-ffl changed the base branch from rapol/feature/protobuf to develop September 23, 2024 12:26
@rpl-ffl rpl-ffl changed the base branch from develop to rapol/feature/protobuf September 23, 2024 12:26
@rpl-ffl
Copy link
Collaborator Author

rpl-ffl commented Sep 23, 2024

Squashed and recreated here: #87

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.

2 participants