You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For certain use cases, the type of an RLP payload is not known in advance, but depends on its structure.
An example of this is the MPT node, which can be either a branch or a leaf node depending on the number of items in the list. Here, it would be helpful to have a function that extracts the payload structure without having to specify its type.
When implemented in the application, this adds quite a bit of error-prone boilerplate code (see for example here: decode in alloy-trie), and having it in the RLP library would be beneficial.
Such a function might look something like the following
For certain use cases, the type of an RLP payload is not known in advance, but depends on its structure.
An example of this is the MPT node, which can be either a branch or a leaf node depending on the number of items in the list. Here, it would be helpful to have a function that extracts the payload structure without having to specify its type.
When implemented in the application, this adds quite a bit of error-prone boilerplate code (see for example here:
decode
inalloy-trie
), and having it in the RLP library would be beneficial.Such a function might look something like the following
I can provide a PR with this feature, if this seems relevant for this crate.
The text was updated successfully, but these errors were encountered: