alloy-rs / alloy

Transports, Middleware, and Networks for the Alloy project
https://alloy.rs
Apache License 2.0
666 stars 240 forks source link

consensus: rm `Receipts` `root_slow` unused method #1567

Closed tcoratger closed 4 weeks ago

tcoratger commented 1 month ago

Follow up on https://github.com/alloy-rs/alloy/pull/1563:

DaniPopes commented 1 month ago

I don't see the point of this function, after changing &[&T] to &[T] because that collect is unnecessary, it becomes essentially receipts.map(f), which doesn't need to be a method

tcoratger commented 1 month ago

I don't see the point of this function, after changing &[&T] to &[T] because that collect is unnecessary, it becomes essentially receipts.map(f), which doesn't need to be a method

@DaniPopes Yes fair point. I think it requires changing some function definitions in reth but I think it can only be beneficial. Here is what I propose:

What do you think?

emhane commented 1 month ago

agree with @DaniPopes , this only makes sense if this type is the l1 type, and it implements a new trait ReceiptsRoot, which should then also be implemented on a similar op-alloy type OpReceipts

tcoratger commented 1 month ago

@emhane https://github.com/paradigmxyz/reth/pull/12059 is ready for review, if everything is fine and merged then we can delete the function here in alloy :)

tcoratger commented 4 weeks ago

@DaniPopes @emhane Given the path taken by https://github.com/paradigmxyz/reth/pull/12162, just removed this unused method