Skip to content

Trace Filter support #4799

Open
Open
@mattsse

Description

@mattsse

Describe the feature

tracking issue for trace_fitler which is very useful for indexing

ref #3661 (comment)

trace_filter returns parity traces similar to eth_getLogs but for traces

pub struct TraceFilter {
/// From block
#[serde(with = "u64_hex_or_decimal_opt")]
pub from_block: Option<u64>,
/// To block
#[serde(with = "u64_hex_or_decimal_opt")]
pub to_block: Option<u64>,
/// From address
pub from_address: Option<Vec<Address>>,
/// To address
pub to_address: Option<Vec<Address>>,
/// Output offset
pub after: Option<u64>,
/// Output amount
pub count: Option<u64>,
}

all filter fields can be checked via Transactions alone, if I understand the filter options correctly.

Supporting the block range shouldn't be too difficult, at worst this is essentially a batch of replay_block requests.

Not sure how to support address fields without limiting blocks, because atm we don't have indices for that

@tjayrush what is a usual trace_filter request?

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rpcRelated to the RPC implementationC-enhancementNew feature or requestC-perfA change motivated by improving speed, memory usage or disk footprintM-prevent-stalePrevents old inactive issues/PRs from being closed due to inactivityS-needs-designThis issue requires design work to think about how it would best be accomplishedS-needs-triageThis issue needs to be labelled

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions