alloy-rs / alloy-rs/alloy

[Followup] Trait for relationships between receipts, logs, and log contents

未关闭
#623 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
debt enhancement
主要语言
Rust
星标
1.3k
派生
668
平均合并
2 天 1 小时
30 天内合并 PR
29

描述

We need trait bounds for specifying when the contents of a receipt log vector can be interpreted as logs. I.e. a trait-based definition for what a log is, including encoded, decoded, rpc, consensus, etc.

This means that they contain a `consensus::Log` object (either consensus Log or RPC Log containing an inner consensus log) and that the data type `consensus::Log` can be infallibly converted into `LogData`

it's a bit more complicated and we will need more work here. Because `Log` is actually `Log` we want to be able to implement generically across a wide variety of types, and may need to introduce a `trait Log` in order to do it

For now, this is an improvement over the existing state of things so we might as well

_Originally posted by @prestwich in https://github.com/alloy-rs/alloy/pull/617#discussion_r1577787888_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。