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

Bump alloy to 0.8.0 #13268

Merged
merged 9 commits into from
Dec 10, 2024
Merged

Bump alloy to 0.8.0 #13268

merged 9 commits into from
Dec 10, 2024

Conversation

moricho
Copy link
Contributor

@moricho moricho commented Dec 10, 2024

Bumped alloy related dependencies

  • alloy: 0.8.0
  • core: 0.8.15
  • op-alloy: 0.8.0
  • revm-inspector: 0.13.0

The main changes in this PR are to support Typed2718 trait introduced in alloy-rs/alloy#1746

@moricho moricho requested a review from rkrasiuk as a code owner December 10, 2024 13:49
@mattsse
Copy link
Collaborator

mattsse commented Dec 10, 2024

supersedes #13077

@mattsse mattsse added the A-dependencies Pull requests or issues that are about dependencies label Dec 10, 2024
@@ -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) {
Copy link
Contributor Author

@moricho moricho Dec 10, 2024

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?

Copy link
Collaborator

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

Copy link
Contributor Author

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

@moricho moricho requested a review from joshieDo as a code owner December 10, 2024 14:09
@@ -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}"),
Copy link
Contributor Author

@moricho moricho Dec 10, 2024

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

klkvr
klkvr previously requested changes Dec 10, 2024
crates/net/eth-wire-types/src/broadcast.rs Outdated Show resolved Hide resolved
@@ -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) {
Copy link
Collaborator

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

Copy link
Collaborator

@mattsse mattsse left a 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

@moricho moricho requested a review from klkvr December 10, 2024 17:39
@moricho
Copy link
Contributor Author

moricho commented Dec 10, 2024

Arbitrary tests for OpTransactionSigned generated by maybe_generate_test fails with stack overflow error. Perhaps Arbitrary implementation for OpTransactionSigned causes this...?

@mattsse mattsse added this pull request to the merge queue Dec 10, 2024
Merged via the queue into paradigmxyz:main with commit 73f1583 Dec 10, 2024
42 checks passed
@moricho moricho deleted the bump-alloy branch December 11, 2024 02:09
lean-apple pushed a commit to lean-apple/reth that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Pull requests or issues that are about dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants