Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect Tipset passed to new_eth_tx_receipt #5205

Merged
merged 4 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@

- [#5006](https://github.com/ChainSafe/forest/issues/5006) Fix incorrect logs, logs bloom and event index for the `Filecoin.EthGetBlockReceipts` RPC method.

- [#4996](https://github.com/ChainSafe/forest/issues/4996) Fix incorrect logs and logs bloom for the `Filecoin.EthGetTransactionReceipt` and
`Filecoin.EthGetTransactionReceiptLimited` RPC methods on some blocks.

## Forest v.0.23.3 "Plumber"

Mandatory release for calibnet node operators. It fixes a sync error at epoch 2281645.
Expand Down
5 changes: 2 additions & 3 deletions scripts/tests/api_compare/filter-list
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# They should be considered bugged, and not used until the root cause is resolved.
# Internal Server Error on Lotus: https://github.com/ChainSafe/forest/actions/runs/8619017774/job/23623141130?pr=4170
!Filecoin.MpoolGetNonce
# CustomCheckFailed in Forest: https://github.com/ChainSafe/forest/actions/runs/9593268587/job/26453560366
!Filecoin.StateReplay
# CustomCheckFailed in Forest: https://github.com/ChainSafe/forest/issues/5213
!Filecoin.EthGetLogs
# TODO: https://github.com/ChainSafe/forest/issues/4996
!Filecoin.EthGetTransactionReceipt
!Filecoin.EthGetTransactionReceiptLimited
3 changes: 0 additions & 3 deletions scripts/tests/api_compare/filter-list-offline
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,3 @@
!Filecoin.EthGetBlockByNumber
!eth_getBlockByNumber
!Filecoin.ChainSetHead
# TODO: https://github.com/ChainSafe/forest/issues/4996
!Filecoin.EthGetTransactionReceipt
!Filecoin.EthGetTransactionReceiptLimited
18 changes: 17 additions & 1 deletion src/rpc/methods/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,23 @@ async fn get_eth_transaction_receipt(
let tx = new_eth_tx_from_message_lookup(&ctx, &message_lookup, None)
.with_context(|| format!("failed to convert {} into an Eth Tx", tx_hash))?;

let tx_receipt = new_eth_tx_receipt(&ctx, &tipset, &tx, &message_lookup.receipt).await?;
let ts = ctx
.chain_index()
.load_required_tipset(&message_lookup.tipset)?;

// The tx is located in the parent tipset
let parent_ts = ctx
.chain_index()
.load_required_tipset(ts.parents())
.map_err(|e| {
format!(
"failed to lookup tipset {} when constructing the eth txn receipt: {}",
ts.parents(),
e
)
})?;

let tx_receipt = new_eth_tx_receipt(&ctx, &parent_ts, &tx, &message_lookup.receipt).await?;

Ok(tx_receipt)
}
Expand Down
Loading