Skip to content

Commit

Permalink
Fix Filecoin.EthGetBlockReceiptsLimited method interface (#5150)
Browse files Browse the repository at this point in the history
  • Loading branch information
elmattic authored Jan 20, 2025
1 parent 18a9ab1 commit af5d234
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@

- [#5131](https://github.com/ChainSafe/forest/pull/5131) Fix incorrect data deserialization in the `Filecoin.EthGetBlockReceipts` RPC method. This caused the method to return an error on some blocks.

- [#5150](https://github.com/ChainSafe/forest/pull/5150) Fix incorrect prototype for the `Filecoin.EthGetBlockReceiptsLimited` RPC method.

## Forest v.0.23.3 "Plumber"

Mandatory release for calibnet node operators. It fixes a sync error at epoch 2281645.
Expand Down
4 changes: 2 additions & 2 deletions src/rpc/methods/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1296,12 +1296,12 @@ impl RpcMethod<2> for EthGetBlockReceiptsLimited {
const PARAM_NAMES: [&'static str; 2] = ["block_hash", "limit"];
const API_PATHS: ApiPaths = ApiPaths::V1;
const PERMISSION: Permission = Permission::Read;
type Params = (EthHash, EthUint64);
type Params = (EthHash, ChainEpoch);
type Ok = Vec<EthTxReceipt>;

async fn handle(
ctx: Ctx<impl Blockstore + Send + Sync + 'static>,
(block_hash, EthUint64(limit)): Self::Params,
(block_hash, limit): Self::Params,
) -> Result<Self::Ok, ServerError> {
get_block_receipts(&ctx, block_hash, Some(limit as usize)).await
}
Expand Down
6 changes: 2 additions & 4 deletions src/tool/subcommands/api_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::rpc;
use crate::rpc::auth::AuthNewParams;
use crate::rpc::beacon::BeaconGetEntry;
use crate::rpc::eth::{
new_eth_tx_from_signed_message, types::*, BlockNumberOrHash, EthInt64, EthUint64, Predefined,
new_eth_tx_from_signed_message, types::*, BlockNumberOrHash, EthInt64, Predefined,
};
use crate::rpc::gas::GasEstimateGasLimit;
use crate::rpc::miner::BlockTemplate;
Expand Down Expand Up @@ -1529,9 +1529,7 @@ fn eth_tests_with_tipset<DB: Blockstore>(store: &Arc<DB>, shared_tipset: &Tipset
RpcTest::identity(
EthGetBlockTransactionCountByHash::request((block_hash.clone(),)).unwrap(),
),
RpcTest::identity(
EthGetBlockReceiptsLimited::request((block_hash.clone(), EthUint64(800))).unwrap(),
),
RpcTest::identity(EthGetBlockReceiptsLimited::request((block_hash.clone(), 800)).unwrap()),
RpcTest::identity(
EthGetBlockTransactionCountByNumber::request((EthInt64(shared_tipset.epoch()),))
.unwrap(),
Expand Down

0 comments on commit af5d234

Please sign in to comment.