Skip to content

The limit Parameter in API's where look-backs are required is not used correctly #6346

@akaladarshi

Description

@akaladarshi

Describe the bug

The limit parameter in eth_getTransactionReceiptLimited, eth_getTransactionByHashLimited, Filecoin.StateSearchMsg and Filecoin.StateSearchMsgLimited is interpreted incorrectly, causing unexpected behaviour. The parameter is meant to restrict how far back in the chain to search, but it's currently being treated as an absolute epoch instead of a relative look-back distance.

search_for_messagecheck_search (state_manager/mod.rs:1042)

while current.epoch() > look_back_limit.unwrap_or_default() {
    // Search backwards through chain
}

Metadata

Metadata

Assignees

Labels

Type: BugSomething isn't working

Type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions