-
Notifications
You must be signed in to change notification settings - Fork 220
Open
Labels
Description
Summary
Add a `--max_traces` flag to `chifra export` and/or `chifra traces` that skips transactions exceeding a trace count threshold. This was present in the old C++ codebase and there's a TODO at `chifra/internal/export/options.go:359`.
Implementation
Use the new `HasNTraces(txHash, n)` function (added in the `trace_get` binary search work) which requires only a single RPC call regardless of trace count. This makes threshold checks essentially free.
Context
- `HasNTraces` and `GetTracesCount` are already implemented in `chifra/pkg/rpc/get_trace_count.go`
- Flag would be added via `cmd-line-options.csv`
- Primary use case: skipping DDoS-era transactions (10K+ traces) during exports
Reactions are currently unavailable