-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bump alloy to 0.8.0 #13268
Bump alloy to 0.8.0 #13268
Conversation
supersedes #13077 |
@@ -228,7 +229,7 @@ impl alloy_rlp::Encodable for OpTransactionSigned { | |||
|
|||
fn length(&self) -> usize { | |||
let mut payload_length = self.encode_2718_len(); | |||
if !self.is_legacy() { | |||
if !Encodable2718::is_legacy(self) { |
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.
In some parts, we have to specify Encodable2718
or Typed2718
specifically to use is_legacy
, but the result will be the same.
Should we consolidate the is_legacy
method to one or the other on alloy side?
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.
right, I think Encodable2718 should just have Typed2718 as supertrait
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.
Got it, thanks for the suggestion. I'll address this later
@@ -162,7 +162,6 @@ pub fn block_id_to_str(id: BlockId) -> String { | |||
format!("hash {}", h.block_hash) | |||
} | |||
} | |||
BlockId::Number(n) if n.is_number() => format!("number {n}"), | |||
BlockId::Number(n) => format!("{n}"), |
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.
Due to alloy-rs/alloy#1765, we can remove the branching on whether BlockNumberOrTag
is a number or not
@@ -228,7 +229,7 @@ impl alloy_rlp::Encodable for OpTransactionSigned { | |||
|
|||
fn length(&self) -> usize { | |||
let mut payload_length = self.encode_2718_len(); | |||
if !self.is_legacy() { | |||
if !Encodable2718::is_legacy(self) { |
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.
right, I think Encodable2718 should just have Typed2718 as supertrait
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.
lgtm
@klkvr making Typed2718 a super trait of Encodeable is perhaps not worth it but would be nicer
|
Co-authored-by: Matthias Seitz <[email protected]>
Bumped alloy related dependencies
alloy
: 0.8.0core
: 0.8.15op-alloy
: 0.8.0revm-inspector
: 0.13.0The main changes in this PR are to support
Typed2718
trait introduced in alloy-rs/alloy#1746