bor
bor copied to clipboard
eth_newFilter does not return bor logs
Re-Opening due to closure of #519
Yeah, I saw the code and creating new filter doesn't have support for bor logs yet.
If you take this request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getLogs",
"params": [
{
"fromBlock": "0x1FCB880",
"toBlock": "0x1FCB880",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
]
}
Looking at the logs that it returns, you can see 0x28f5d28babc3a64650745f5b8fa6580f1b1aab3a4f9d84786bd225fa7be852cf
as the final output in the array.
However, if you create an eth_newFilter with the same request and then request the logs from the filter, it's missing...
e.g.
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_newFilter",
"params": [
{
"fromBlock": "0x1FCB880",
"toBlock": "0x1FCB880",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
]
}
Followed by:
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getFilterLogs",
"params": [
"0xid"
]
}
It will not return 0x28f5d28babc3a64650745f5b8fa6580f1b1aab3a4f9d84786bd225fa7be852cf
Hi @quickchase, so the eth_newFilter
API can be used to retrieve logs when the state changes. This method cannot be
used to fetch logs that are already stored in the state.
As eth_getLogs
is returning the desired output, this means that the logs are already stored in the state, therefore eth_newFilter
is not returning them.
Hope this helps.
Wouldn't the other logs that are returned already be in the same "state" as the missing bor log? They're all old logs, they're all in the same "state"
https://github.com/maticnetwork/bor/issues/519#issuecomment-1260776664
We are working on this. Sorry, forgot to update here.
@quickchase This will be taken as a feature request and team will work on it as soon as they have some bandwidth, As of now I can confirm that eth_newFilter doesn't have support for bor logs.
Let me know if we can close the issue
here. Thank You
How can I track the issue (feature request) if not via github issue?
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Still an issue
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Still an issue
@quickchase this issue has been resolved and should be reflected in future releases.