Skip to content
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

- [#7677](https://github.com/ChainSafe/forest/pull/7677): Fixed the same state migration running several times in parallel when multiple tipsets at the upgrade epoch share a parent, which is redundant.

- [#7700](https://github.com/ChainSafe/forest/issues/7700): Fixed `eth_call` and `trace_call` ignoring the `gas` field of the call. The given gas limit is now honored (capped at the block gas limit), so calls with insufficient gas fail as they would on-chain.

## Forest v0.37.0 "Sharad Sampat"

Mandatory release for calibnet node operators. It includes support for the NV29 _Solstice_ network upgrade for calibnet, which is set to activate at epoch `4109133` (2026-09-28T12:59:30Z). There are also additional (breaking) changes and improvements; see below.
Expand Down
23 changes: 22 additions & 1 deletion src/rpc/methods/eth/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,10 @@ impl TryFrom<EthCallMessage> for Message {
value: tx.value.unwrap_or_default().into(),
method_num,
params,
gas_limit: BLOCK_GAS_LIMIT,
gas_limit: match tx.gas {
Some(EthUint64(gas)) if gas > 0 => gas.min(BLOCK_GAS_LIMIT),
_ => BLOCK_GAS_LIMIT,
},
..Default::default()
})
}
Expand Down Expand Up @@ -646,6 +649,24 @@ mod tests {
assert_eq!(BASE64_STANDARD.encode(&*params).as_str(), "RUR7eINB");
}

#[test]
fn eth_call_message_gas_limit() {
let gas_limit = |gas: Option<u64>| {
Message::try_from(EthCallMessage {
gas: gas.map(EthUint64),
..Default::default()
})
.unwrap()
.gas_limit
};
assert_eq!(gas_limit(None), BLOCK_GAS_LIMIT);
assert_eq!(gas_limit(Some(0)), BLOCK_GAS_LIMIT);
assert_eq!(gas_limit(Some(1000)), 1000);
assert_eq!(gas_limit(Some(BLOCK_GAS_LIMIT)), BLOCK_GAS_LIMIT);
assert_eq!(gas_limit(Some(BLOCK_GAS_LIMIT + 1)), BLOCK_GAS_LIMIT);
assert_eq!(gas_limit(Some(u64::MAX)), BLOCK_GAS_LIMIT);
}

#[test]
fn test_eth_address_from_uncompressed_public_key() {
// Uncompressed pub key secp256k1)
Expand Down
Loading