-
Notifications
You must be signed in to change notification settings - Fork 252
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
feat: support no_std for alloy-eips
#181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can do that, so supportive, doesn't hurt.
though I'd like to not use thiserror-no-std and instead do all of that manually
can do expand and copy the generated code+cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg on the no-std changes
though about the error type. I'm skeptical that this even belongs in there if it's only used in the consensus crate
https://github.com/search?q=repo%3Aalloy-rs%2Falloy%20Eip2718Error&type=code
we should move it there imo
wdyt @DaniPopes
Cargo.toml
Outdated
@@ -83,10 +81,11 @@ rand = "0.8.5" | |||
reqwest = { version = "0.11.18", default-features = false } | |||
semver = "1.0" | |||
thiserror = "1.0" | |||
thiserror-no-std = { version = "2.0", default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need this
/// Some other error occurred. | ||
#[error(transparent)] | ||
Custom(#[from] Box<dyn std::error::Error>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think eventually we'd need this, so perhaps the better question for this PR is, does this type even belong in here?
perhaps we should rather move this to the consensus crate instead, I believe it's better suited in there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean?
Move all eip error type to consensus crate? and add Error type to trait such as Decodable2718
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that might be a break change, which the current one is not? Maybe it should be improved in subsequent versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing a variant is a breaking change as well, I'd really prefer moving the error. imo it does not belong in the eip crate
#[derive(Debug, Copy, Clone)] | ||
pub enum Eip2718Error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we should move this error type and keep the custom variant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we should move this error type and keep the custom variant
i want to how tohandle the related trait
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not opposed to removing it, the purpose of it is to allow for non-RLP encoding schemes in EIP-2718 in non-Ethereum networks. E.g. if Optimism decides to have a fallible SSZ encoding for some transaction type, the existing API can still capture that behavior via the |
'I have rebased this and it should go through re-review @mattsse |
cleaning up CI before merge 👍 |
nightly clippy strikes again |
ty for you contribution @yjhmelody, sorry for leaving it open so long 🙇♀️ |
And remove unused error
Custom