Closed virajbhartiya closed 8 hours ago
Good start!
Also, remember to update the change checklist in the PR and mark the checkboxes (e.g. update the Forest README file to reflect any visible changes for the users).
I have updated the changelog and made the changes according to the reviews.
Could you resolve this lint error: https://github.com/ChainSafe/forest/actions/runs/11830899080/job/32966034648?pr=4985 and make the CI ✅ again?
Additionally, please update the README to link to the issue number instead of the PR (See https://github.com/ChainSafe/forest/blob/main/CHANGELOG.md?plain=1#L3-L22)
Thanks!
@elmattic made the changes mentioned above and resolved the lint errors
Thanks. Hey @virajbhartiya , can you investigate the CI errors? ❌ Feel free to reach me on Slack if you need some help.
@virajbhartiya It seems Forest is not producing the same output as Lotus (see https://github.com/ChainSafe/forest/actions/runs/11831922981/job/32968391970). I recommend running locally https://github.com/ChainSafe/forest/blob/main/scripts/tests/api_compare/setup.sh and ensuring the logic matches.
While running the API compare command, I came across a few more discrepancies,
RUST_LOG=debug ./target/debug/forest-tool api compare --lotus /ip4/127.0.0.1/tcp/1234/http --forest /ip4/127.0.0.1/tcp/2345/http ../snap.zst --filter EthGetBlockReceipts -n 100
The discrepancies I could find:
Forest response: [
{
"blockHash": "0xed55e11735035e3e3a515a652456e0ba695348a7a7355ed987dac1a7dfdfb1d5",
"blockNumber": "0x20b8ce",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x1eb21",
"from": "0xff00000000000000000000000000000000000f03",
"gasUsed": "0x579c29",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xff0000000000000000000000ffffffffffffffff",
"transactionHash": "0xda75f460c1ec86a3dd126cce02be528c8c516516c94a78d51b17aa49f41d6cfa",
"transactionIndex": "0x0",
"type": "0x2"
},
{
"blockHash": "0xed55e11735035e3e3a515a652456e0ba695348a7a7355ed987dac1a7dfdfb1d5",
"blockNumber": "0x20b8ce",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x1e681",
"from": "0xff00000000000000000000000000000000000f03",
"gasUsed": "0x579c29",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xff0000000000000000000000ffffffffffffffff",
"transactionHash": "0xe438c6d5f80857a2a2138fe7ec43a0695525b8670a498a201c5b64f71daadc5e",
"transactionIndex": "0x1",
"type": "0x2"
}
]
Lotus response: [
{
"blockHash": "0xed55e11735035e3e3a515a652456e0ba695348a7a7355ed987dac1a7dfdfb1d5",
"blockNumber": "0x20b8ce",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x1eb21",
"from": "0xff00000000000000000000000000000000000f03",
"gasUsed": "0x579c29",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xff00000000000000000000000000000000023fcc",
"transactionHash": "0xda75f460c1ec86a3dd126cce02be528c8c516516c94a78d51b17aa49f41d6cfa",
"transactionIndex": "0x0",
"type": "0x2"
},
{
"blockHash": "0xed55e11735035e3e3a515a652456e0ba695348a7a7355ed987dac1a7dfdfb1d5",
"blockNumber": "0x20b8ce",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x1e681",
"from": "0xff00000000000000000000000000000000000f03",
"gasUsed": "0x579c29",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xff00000000000000000000000000000000023fcd",
"transactionHash": "0xe438c6d5f80857a2a2138fe7ec43a0695525b8670a498a201c5b64f71daadc5e",
"transactionIndex": "0x1",
"type": "0x2"
}
]
Diff: [
{
"blockHash": "0xed55e11735035e3e3a515a652456e0ba695348a7a7355ed987dac1a7dfdfb1d5",
"blockNumber": "0x20b8ce",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x1eb21",
"from": "0xff00000000000000000000000000000000000f03",
"gasUsed": "0x579c29",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
- "to": "0xff0000000000000000000000ffffffffffffffff",
+ "to": "0xff00000000000000000000000000000000023fcc",
"transactionHash": "0xda75f460c1ec86a3dd126cce02be528c8c516516c94a78d51b17aa49f41d6cfa",
"transactionIndex": "0x0",
"type": "0x2"
},
{
"blockHash": "0xed55e11735035e3e3a515a652456e0ba695348a7a7355ed987dac1a7dfdfb1d5",
"blockNumber": "0x20b8ce",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x1e681",
"from": "0xff00000000000000000000000000000000000f03",
"gasUsed": "0x579c29",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
- "to": "0xff0000000000000000000000ffffffffffffffff",
+ "to": "0xff00000000000000000000000000000000023fcd",
"transactionHash": "0xe438c6d5f80857a2a2138fe7ec43a0695525b8670a498a201c5b64f71daadc5e",
"transactionIndex": "0x1",
"type": "0x2"
}
]
The block hash and number mismatch is fixed but the to
values for some of the responses aren't matching (first returns 0xff0000000000000000000000ffffffffffffffff
)
The Final result:
| RPC Method | Forest | Lotus |
|-----------------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Filecoin.EthGetBlockReceipts | CustomCheckFailed | Valid |
| Filecoin.EthGetBlockReceipts (19) | Valid | Rejected("failed to create Eth receipt: failed to get eth logs for block and transaction: failed to get events for filter from chain indexer: not found in index") |
| Filecoin.EthGetBlockReceipts (80) | Valid | Valid
What version of Lotus are you using?
For the Lotus errors "failed to create Eth receipt"
I believe we should try the new version of Lotus that features the new indexer and request a backfill:
https://github.com/filecoin-project/lotus/issues/12555#issuecomment-2487409108
I am currently running 1.31.1-dev+calibnet
I am currently running
1.31.1-dev+calibnet
Nice. Did you try to backfill the indexer db?
Can you see if that removes the "failed to create Eth receipt"
errors? Thanks!
I will open a PR that fixes the to
address mismatch.
Edit: I sent you a message on Slack regarding the fix.
Yes I did backfill the indexer db
I am currently running
1.31.1-dev+calibnet
Note that on the CI we're still running v1.30.0-rc1
so your mileage may vary.
There’s a lint error in the CI ❌ that needs fixing. Can you enable 'Format On Save' in your favorite editor? Thanks!
The CI is ✅ now!
Summary of changes
Implemented
eth_getBlockReceipts
RPC methodReference issue to close (if applicable)
Closes #4839
Change checklist